diff options
author | Sunil Muthuswamy <sunilmut@microsoft.com> | 2020-10-28 02:23:19 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:01 -0500 |
commit | faf20793b5af15ed4bea9c40dd8e6ae46d51be23 (patch) | |
tree | 323f0f9bebaa45bc847dcc93bcbe604323e2a2eb /hw | |
parent | c2ba0515f2df58a661fcb5d6485139877d92ab1b (diff) | |
download | qemu-faf20793b5af15ed4bea9c40dd8e6ae46d51be23.zip qemu-faf20793b5af15ed4bea9c40dd8e6ae46d51be23.tar.gz qemu-faf20793b5af15ed4bea9c40dd8e6ae46d51be23.tar.bz2 |
WHPX: support for the kernel-irqchip on/off
This patch adds support the kernel-irqchip option for
WHPX with on or off value. 'split' value is not supported
for the option. The option only works for the latest version
of Windows (ones that are coming out on Insiders). The
change maintains backward compatibility on older version of
Windows where this option is not supported.
Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Message-Id: <SN4PR2101MB0880B13258DA9251F8459F4DC0170@SN4PR2101MB0880.namprd21.prod.outlook.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/x86.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c index d68a9ea..7c1f64a 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -31,6 +31,7 @@ #include "qapi/qapi-visit-common.h" #include "qapi/visitor.h" #include "sysemu/qtest.h" +#include "sysemu/whpx.h" #include "sysemu/numa.h" #include "sysemu/replay.h" #include "sysemu/sysemu.h" @@ -532,7 +533,8 @@ static void pic_irq_request(void *opaque, int irq, int level) X86CPU *cpu = X86_CPU(cs); trace_x86_pic_interrupt(irq, level); - if (cpu->apic_state && !kvm_irqchip_in_kernel()) { + if (cpu->apic_state && !kvm_irqchip_in_kernel() && + !whpx_apic_in_platform()) { CPU_FOREACH(cs) { cpu = X86_CPU(cs); if (apic_accept_pic_intr(cpu->apic_state)) { @@ -558,7 +560,7 @@ int cpu_get_pic_interrupt(CPUX86State *env) X86CPU *cpu = env_archcpu(env); int intno; - if (!kvm_irqchip_in_kernel()) { + if (!kvm_irqchip_in_kernel() && !whpx_apic_in_platform()) { intno = apic_get_interrupt(cpu->apic_state); if (intno >= 0) { return intno; |