Skip to content

Commit

Permalink
i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dwmw2 committed Nov 7, 2023
1 parent 8ac98ae commit 8473607
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target/i386/kvm/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8473607

Please sign in to comment.