On Wed, Feb 09, 2022 at 10:57:28AM +0000, Jane Malalane wrote: > On 08/02/2022 16:17, Roger Pau Monné wrote: > > On Mon, Feb 07, 2022 at 06:21:01PM +0000, Jane Malalane wrote: > >> diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c > >> index 485bd66971..33694acc99 100644 > >> --- a/xen/arch/x86/traps.c > >> +++ b/xen/arch/x86/traps.c > >> @@ -1115,7 +1115,8 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, > >> uint32_t leaf, > >> if ( !is_hvm_domain(d) || subleaf != 0 ) > >> break; > >> > >> - if ( cpu_has_vmx_apic_reg_virt ) > >> + if ( cpu_has_vmx_apic_reg_virt && > > > > You can drop the cpu_has_vmx_apic_reg_virt check here, if > > cpu_has_vmx_apic_reg_virt is false assisted_xapic won't be set to true. > Oh, but assisted_xapic_available is only set to depend on > cpu_has_vmx_virtualize_apic_accesses, unless I should correct this, but > I might be missing something...
No, you are right. We only report hw virtualized xAPIC to guests if both apic_reg_virt and virtualize_apic_accesses are available. Thanks, Roger.