On Fri, Jun 10, 2022 at 12:07:04PM +0100, Jane Malalane wrote: > Have is_hvm_pv_evtchn_domain() return true for vector callbacks for > evtchn delivery set up on a per-vCPU basis via > HVMOP_set_evtchn_upcall_vector. > > Assume that if vCPU0 uses HVMOP_set_evtchn_upcall_vector, all > remaining vCPUs will too and thus remove is_hvm_pv_evtchn_vcpu() and > replace sole caller with is_hvm_pv_evtchn_domain(). > > is_hvm_pv_evtchn_domain() returning true is a condition for setting up > physical IRQ to event channel mappings. Therefore, also add a CPUID > bit so that guests know whether the check in is_hvm_pv_evtchn_domain() > will fail when using HVMOP_set_evtchn_upcall_vector. This matters for > guests that route PIRQs over event channels since > is_hvm_pv_evtchn_domain() is a condition in physdev_map_pirq(). > > The naming of the CPUID bit is quite generic about upcall support > being available. That's done so that the define name doesn't become > overly long. > > A guest that doesn't care about physical interrupts routed over event > channels can just test for the availability of the hypercall directly > (HVMOP_set_evtchn_upcall_vector) without checking the CPUID bit. > > Signed-off-by: Jane Malalane <jane.malal...@citrix.com>
Reviewed-by: Roger Pau Monné <roger....@citrix.com> Thanks, Roger.