From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@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:39:28 +0200 [thread overview]
Message-ID: <20170912133927.GB24326@flask> (raw)
In-Reply-To: <04ab9a47-fad7-a656-de55-650d8630a8b8@redhat.com>
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
next prev parent reply other threads:[~2017-09-12 13:39 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ář [this message]
2017-09-12 13:42 ` Paolo Bonzini
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=20170912133927.GB24326@flask \
--to=rkrcmar@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox