aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Terry (VM) via Qemu-devel <qemu-devel@nongnu.org>2018-02-26 09:13:36 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-06 14:01:29 +0100
commiteb1fe944a89457981407f5335f11bae104a32e57 (patch)
treec710edaa18b982a10f6215e57e8387603151e436
parente2940978fc86b2bf2016e115c56c01f850092bfb (diff)
WHPX improve interrupt notification registration
Improves the usage of the InterruptNotification registration by skipping the additional call to WHvSetVirtualProcessorRegisters if we have already registered for the window exit. Signed-off-by: Justin Terry (VM) <juterry@microsoft.com> Message-Id: <1519665216-1078-9-git-send-email-juterry@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Justin Terry (VM) via Qemu-devel <qemu-devel@nongnu.org>
-rw-r--r--target/i386/whpx-all.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
index 24387bebad..940bbe590d 100644
--- a/target/i386/whpx-all.c
+++ b/target/i386/whpx-all.c
@@ -756,12 +756,11 @@ static void whpx_vcpu_pre_run(CPUState *cpu)
}
/* Update the state of the interrupt delivery notification */
- if (cpu->interrupt_request & CPU_INTERRUPT_HARD) {
+ if (!vcpu->window_registered &&
+ cpu->interrupt_request & CPU_INTERRUPT_HARD) {
reg_values[reg_count].DeliverabilityNotifications.InterruptNotification
= 1;
- if (vcpu->window_registered != 1) {
- vcpu->window_registered = 1;
- }
+ vcpu->window_registered = 1;
reg_names[reg_count] = WHvX64RegisterDeliverabilityNotifications;
reg_count += 1;
}