From 34c96d07bd7c028f9c933e61e9b3c2565559f844 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 11 Oct 2023 23:50:02 +0100 Subject: [PATCH] i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID This will allow Linux guests (since v6.0) to use the per-vCPU upcall vector delivered as MSI through the local APIC. Signed-off-by: David Woodhouse --- target/i386/kvm/kvm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index f6c7f7e268..8bdbdcdffe 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -1887,6 +1887,10 @@ int kvm_arch_init_vcpu(CPUState *cs) c->eax |= XEN_HVM_CPUID_VCPU_ID_PRESENT; c->ebx = cs->cpu_index; } + + if (cs->kvm_state->xen_version >= XEN_VERSION(4, 17)) { + c->eax |= XEN_HVM_CPUID_UPCALL_VECTOR; + } } r = kvm_xen_init_vcpu(cs); -- 2.50.1