All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Yu Zhang <yu.c.zhang@linux.intel.com>, kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests] x86: access: Add test for 5 level paging mode
Date: Tue, 12 Sep 2017 15:42:54 +0200	[thread overview]
Message-ID: <e54e1338-243e-c395-caa1-86ab592e5271@redhat.com> (raw)
In-Reply-To: <20170912133927.GB24326@flask>

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@linux.intel.com>
>>> ---
>>>  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

      reply	other threads:[~2017-09-12 13:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 11:57 [kvm-unit-tests] x86: access: Add test for 5 level paging mode Yu Zhang
2017-09-12 12:16 ` Paolo Bonzini
2017-09-12 13:39   ` Radim Krčmář
2017-09-12 13:42     ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e54e1338-243e-c395-caa1-86ab592e5271@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=yu.c.zhang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.