All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Yang Weijiang <weijiang.yang@intel.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] [kvm-unit-tests PATCH] x86/access: Fix intermittent test failure
Date: Fri, 9 Apr 2021 19:29:06 +0200	[thread overview]
Message-ID: <1c641daa-c11d-69b6-e63b-ff7d0576c093@redhat.com> (raw)
In-Reply-To: <20210409075518.32065-1-weijiang.yang@intel.com>

On 09/04/21 09:55, Yang Weijiang wrote:
> During kvm-unit-test, below failure pattern is observed, this is due to testing thread
> migration + cache "lazy" flush during test, so forcely flush the cache to avoid the issue.
> Pin the test app to certain physical CPU can fix the issue as well. The error report is
> misleading, pke is the victim of the issue.
> 
> test user cr4.pke: FAIL: error code 5 expected 4
> Dump mapping: address: 0x123400000000
> ------L4: 21ea007
> ------L3: 21eb007
> ------L2: 21ec000
> ------L1: 2000000
> 
> Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
> ---
>   x86/access.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/x86/access.c b/x86/access.c
> index 7dc9eb6..379d533 100644
> --- a/x86/access.c
> +++ b/x86/access.c
> @@ -211,6 +211,8 @@ static unsigned set_cr4_smep(int smep)
>           ptl2[2] |= PT_USER_MASK;
>       if (!r)
>           shadow_cr4 = cr4;
> +
> +    invlpg((void *)(ptl2[2] & ~PAGE_SIZE));
>       return r;
>   }
>   
> 

Applied, thanks.

Paolo


  reply	other threads:[~2021-04-09 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  7:55 [PATCH] [kvm-unit-tests PATCH] x86/access: Fix intermittent test failure Yang Weijiang
2021-04-09 17:29 ` Paolo Bonzini [this message]
2021-04-09 18:59   ` Sean Christopherson
2021-04-10 14:16     ` Paolo Bonzini
2021-04-12 13:25     ` Yang Weijiang
2021-04-12 18:30       ` Sean Christopherson
2021-04-13  3:13         ` Yang Weijiang
2021-04-13  4:44           ` Yang Weijiang

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=1c641daa-c11d-69b6-e63b-ff7d0576c093@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=weijiang.yang@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.