diff mbox series

[kvm-unit-tests] x86: VMX: Fix EPT MMIO access failed

Message ID 1539098070-1885-1-git-send-email-zhijianx.li@intel.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests] x86: VMX: Fix EPT MMIO access failed | expand

Commit Message

Li Zhijian Oct. 9, 2018, 3:14 p.m. UTC
0Day robot noticed that "FAIL: EPT - MMIO access" since kernel commit
d1766202: ("x86/kvm/lapic: always disable MMIO interface in x2APIC mode")

As the changelog said, MMIO accessing is disabled in x2APIC mode
which is a common feature in modern CPUs, so disable x2APIC mode when the tests
try to access lapic MMIO accrodingly

CC: Rong Chen <rong.a.chen@intel.com>
CC: Philip Li <philip.li@intel.com>
CC: 0day robot <lkp@intel.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
 x86/unittests.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vitaly Kuznetsov Oct. 9, 2018, 3:06 p.m. UTC | #1
Li Zhijian <zhijianx.li@intel.com> writes:

> 0Day robot noticed that "FAIL: EPT - MMIO access" since kernel commit
> d1766202: ("x86/kvm/lapic: always disable MMIO interface in x2APIC mode")
>
> As the changelog said, MMIO accessing is disabled in x2APIC mode
> which is a common feature in modern CPUs, so disable x2APIC mode when the tests
> try to access lapic MMIO accrodingly
>
> CC: Rong Chen <rong.a.chen@intel.com>
> CC: Philip Li <philip.li@intel.com>
> CC: 0day robot <lkp@intel.com>
> CC: Vitaly Kuznetsov <vkuznets@redhat.com>
> Signed-off-by: Li Zhijian <zhijianx.li@intel.com>

Yesterday I sent a patch fixing the issue:
https://www.spinics.net/lists/kvm/msg176052.html

the patch is different but the idea is the same.

> ---
>  x86/unittests.cfg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
> index 3b21a85..883dd82 100644
> --- a/x86/unittests.cfg
> +++ b/x86/unittests.cfg
> @@ -340,7 +340,7 @@ groups = vmx
>  
>  [vmx_EPT_AD_disabled]
>  file = vmx.flat
> -extra_params = -cpu host,+vmx -append EPT_A/D_disabled
> +extra_params = -cpu host,+vmx,-x2apic -append EPT_A/D_disabled
>  arch = x86_64
>  groups = vmx
Li Zhijian Oct. 10, 2018, 4:57 a.m. UTC | #2
On 10/9/2018 11:06 PM, Vitaly Kuznetsov wrote:
> Li Zhijian <zhijianx.li@intel.com> writes:
>
>> 0Day robot noticed that "FAIL: EPT - MMIO access" since kernel commit
>> d1766202: ("x86/kvm/lapic: always disable MMIO interface in x2APIC mode")
>>
>> As the changelog said, MMIO accessing is disabled in x2APIC mode
>> which is a common feature in modern CPUs, so disable x2APIC mode when the tests
>> try to access lapic MMIO accrodingly
>>
>> CC: Rong Chen <rong.a.chen@intel.com>
>> CC: Philip Li <philip.li@intel.com>
>> CC: 0day robot <lkp@intel.com>
>> CC: Vitaly Kuznetsov <vkuznets@redhat.com>
>> Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
> Yesterday I sent a patch fixing the issue:
> https://www.spinics.net/lists/kvm/msg176052.html

That's cool.
Feel free to drop/ignore my patch

Thanks


>
> the patch is different but the idea is the same.
>
>> ---
>>   x86/unittests.cfg | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
>> index 3b21a85..883dd82 100644
>> --- a/x86/unittests.cfg
>> +++ b/x86/unittests.cfg
>> @@ -340,7 +340,7 @@ groups = vmx
>>   
>>   [vmx_EPT_AD_disabled]
>>   file = vmx.flat
>> -extra_params = -cpu host,+vmx -append EPT_A/D_disabled
>> +extra_params = -cpu host,+vmx,-x2apic -append EPT_A/D_disabled
>>   arch = x86_64
>>   groups = vmx
diff mbox series

Patch

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 3b21a85..883dd82 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -340,7 +340,7 @@  groups = vmx
 
 [vmx_EPT_AD_disabled]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append EPT_A/D_disabled
+extra_params = -cpu host,+vmx,-x2apic -append EPT_A/D_disabled
 arch = x86_64
 groups = vmx