All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests] vmx: fixes for MAXPHYADDR requirement
Date: Thu, 25 Jan 2018 16:11:32 +0100	[thread overview]
Message-ID: <20180125151132.GB19884@flask> (raw)
In-Reply-To: <1516212225-37393-2-git-send-email-pbonzini@redhat.com>

2018-01-17 19:03+0100, Paolo Bonzini:
> The EPT access tests require at least 41 bits of guest physical address
> space.  This is because the test data needs a separate PML4 entry in the
> EPT table.  However, many consumer-grade processors have only 36 or
> 39-bit MAXPHYADDR, and the tests fail there with a page fault due to
> reserved bits set in the guest (GVA->GPA) page tables.
> 
> Add a test on MAXPHYADDR and skip the tests if they cannot run on the
> system under test, and only require 40 bits to lower the requirements.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  x86/vmx_tests.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index e8c97f2..0c3b5a7 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -2609,6 +2609,10 @@ static void ept_access_test_setup(void)
>  	if (setup_ept(false))
>  		test_skip("EPT not supported");
>  
> +	/* We use data->gpa = 1 << 39 so that test data has a separate pml4 entry */
> +	if (cpuid_maxphyaddr() < 40)

This does not help at the moment -- QEMU reports 40 even on hosts that
don't have as much.  It is a QEMU bug, so applied still, thanks.

  reply	other threads:[~2018-01-25 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 18:03 [PATCH kvm-unit-tests] vmx: fixes for MAXPHYADDR requirement Paolo Bonzini
2018-01-25 15:11 ` Radim Krčmář [this message]
2018-01-25 16:36   ` Paolo Bonzini
2018-01-25 16:45     ` Radim Krčmář
2018-01-25 17:06       ` 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=20180125151132.GB19884@flask \
    --to=rkrcmar@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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.