Re: [kvm-unit-tests] x86: access: Add test for 5 level paging mode

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

 



On 12/09/2017 15:39, Radim Krčmář wrote:
> 2017-09-12 14:16+0200, Paolo Bonzini:
>> On 25/08/2017 13:57, Yu Zhang wrote:
>>> Provide paging mode switching logic to run access test in 5
>>> level paging mode if LA57 is detected. Qemu parameter +la57
>>> should be used to expose this feature, for example:
>>> ./x86-run ./x86/access.flat -cpu qemu64,+la57
>>>
>>> Signed-off-by: Yu Zhang <yu.c.zhang@xxxxxxxxxxxxxxx>
>>> ---
>>>  x86/access.c   | 17 +++++++++++++++--
>>>  x86/cstart64.S | 43 ++++++++++++++++++++++++++++++++++++++++++-
>>>  2 files changed, 57 insertions(+), 3 deletions(-)
>>
>> I need this for the test to pass in QEMU.  Probably the TLB is helping
>> you on real hardware!  Pushed with this change.
> 
>   ...
> 
>>> diff --git a/x86/access.c b/x86/access.c
>>> @@ -107,6 +108,8 @@ enum {
>>>  #define AC_CPU_CR4_SMEP_MASK  (1 << AC_CPU_CR4_SMEP_BIT)
>>>  #define AC_CPU_CR4_PKE_MASK   (1 << AC_CPU_CR4_PKE_BIT)
>>>  
>>> +extern void setup_5level_page_table();
> 
> GCC doesn't like that this declaration got dropped:
> 
> x86/access.c: In function ‘main’:
> x86/access.c:1009:9: error: implicit declaration of function ‘setup_5level_page_table’ [-Werror=implicit-function-declaration]
>          setup_5level_page_table();
>          ^~~~~~~~~~~~~~~~~~~~~~~
> 
> We can also include instead:
> 
> diff --git a/x86/access.c b/x86/access.c
> index 8268b0065467..a0c19dc701b7 100644
> --- a/x86/access.c
> +++ b/x86/access.c
> @@ -3,6 +3,7 @@
>  #include "desc.h"
>  #include "processor.h"
>  #include "asm/page.h"
> +#include "x86/vm.h"
>  
>  #define smp_id() 0
>  
> 


Ugh.  Sorry, pushed the fix now.

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