On 18.05.2022 15:27, Jane Malalane wrote: > --- a/xen/arch/x86/include/asm/domain.h > +++ b/xen/arch/x86/include/asm/domain.h > @@ -14,8 +14,14 @@ > > #define has_32bit_shinfo(d) ((d)->arch.has_32bit_shinfo) > > +/* > + * Set to true if either the global vector-type callback or per-vCPU > + * LAPIC vectors are used. Assume all vCPUs will use > + * HVMOP_set_evtchn_upcall_vector as long as the initial vCPU does. > + */ > #define is_hvm_pv_evtchn_domain(d) (is_hvm_domain(d) && \ > - (d)->arch.hvm.irq->callback_via_type == HVMIRQ_callback_vector) > + ((d)->arch.hvm.irq->callback_via_type == HVMIRQ_callback_vector || \ > + (d)->vcpu[0]->arch.hvm.evtchn_upcall_vector)) > #define is_hvm_pv_evtchn_vcpu(v) (is_hvm_pv_evtchn_domain(v->domain))
I continue to think that with the vCPU0 dependency added to is_hvm_pv_evtchn_domain(), is_hvm_pv_evtchn_vcpu() should either be adjusted as well (to check the correct vCPU's field) or be deleted (and the sole caller be replaced). Jan
