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 <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
This commit is contained in:
David Woodhouse 2023-10-11 23:50:02 +01:00
parent 8ac98aedda
commit 8473607bcf
1 changed files with 4 additions and 0 deletions

View File

@ -1837,6 +1837,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);