summaryrefslogtreecommitdiffstats
path: root/hw/i386
diff options
context:
space:
mode:
authorSunil Muthuswamy2020-10-28 03:23:19 +0100
committerPaolo Bonzini2020-12-10 18:15:01 +0100
commitfaf20793b5af15ed4bea9c40dd8e6ae46d51be23 (patch)
tree323f0f9bebaa45bc847dcc93bcbe604323e2a2eb /hw/i386
parenttarget/i386: seg_helper: Correct segment selector nullification in the RET/IR... (diff)
downloadqemu-faf20793b5af15ed4bea9c40dd8e6ae46d51be23.tar.gz
qemu-faf20793b5af15ed4bea9c40dd8e6ae46d51be23.tar.xz
qemu-faf20793b5af15ed4bea9c40dd8e6ae46d51be23.zip
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/i386')
-rw-r--r--hw/i386/x86.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index d68a9eaefc..7c1f64a1fc 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;