Re: [kvm-unit-tests PATCH] x86: nVMX: fix EPT A/D disabled MMIO access test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/10/2018 17:04, Vitaly Kuznetsov wrote:
> When testing MMIO interface to APIC we need to make sure that APIC is in
> xAPIC mode (and not x2APIC). KVM started enforcing this since commit
> d1766202779e ("x86/kvm/lapic: always disable MMIO interface in x2APIC
> mode").
> 
> While the 'clean' fix would be to separate L2's APIC from L1's and put
> it to xAPIC mode or create a different MMIO mapping just for the test
> we lack the required infrastructure in vmx library. As a quick band-aid
> put L1's APIC to xAPIC mode for both EPT A/D enabled and disabled tests,
> it seems we don't require x2APIC for anything.
> 
> Reported-by: kernel test robot <rong.a.chen@xxxxxxxxx>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
> ---
>  x86/vmx_tests.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index b105b23..cc5192f 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -1094,6 +1094,8 @@ static int ept_init_common(bool have_ad)
>  	install_ept(pml4, (unsigned long)data_page1, (unsigned long)data_page2,
>  			EPT_RA | EPT_WA | EPT_EA);
>  
> +	reset_apic();
> +
>  	apic_version = apic_read(APIC_LVR);
>  
>  	ret = pci_find_dev(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_TEST);
> 

Queued, thanks.

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux