From: Sean Christopherson <seanjc@google.com>
To: Babu Moger <babu.moger@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
thuth@redhat.com, drjones@redhat.com, kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH 1/2] x86: access: Fix timeout failure by limiting number of flag combinations
Date: Wed, 11 Aug 2021 16:13:19 +0000 [thread overview]
Message-ID: <YRP3HxfCRMQBt2Ty@google.com> (raw)
In-Reply-To: <29220431-5b08-9419-636e-d4331648aed1@amd.com>
On Wed, Aug 11, 2021, Babu Moger wrote:
>
> On 8/11/21 2:09 AM, Paolo Bonzini wrote:
> > On 11/08/21 01:38, Babu Moger wrote:
> >> No. This will not work. The PKU feature flag is bit 30. That is 2^30
> >> iterations to cover the tests for this feature. Looks like I need to split
> >> the tests into PKU and non PKU tests. For PKU tests I may need to change
> >> the bump frequency (in ac_test_bump_one) to much higher value. Right now,
> >> it is 1. Let me try that,
> >
> > The simplest way to cut on tests, which is actually similar to this patch,
> > would be:
> >
> > - do not try all combinations of PTE access bits when reserved bits are set
> >
> > - do not try combinations with more than one reserved bit set
>
> Did you mean this? Just doing this reduces the combination by huge number.
> I don't need to add your first PTE access combinations.
>
> diff --git a/x86/access.c b/x86/access.c
> index 47807cc..a730b6b 100644
> --- a/x86/access.c
> +++ b/x86/access.c
> @@ -317,9 +317,7 @@ static _Bool ac_test_legal(ac_test_t *at)
> /*
> * Shorten the test by avoiding testing too many reserved bit
> combinations
> */
> - if ((F(AC_PDE_BIT51) + F(AC_PDE_BIT36) + F(AC_PDE_BIT13)) > 1)
> - return false;
> - if ((F(AC_PTE_BIT51) + F(AC_PTE_BIT36)) > 1)
> + if ((F(AC_PDE_BIT51) + F(AC_PDE_BIT36) + F(AC_PDE_BIT13) +
> F(AC_PTE_BIT51) + F(AC_PTE_BIT36)) > 1)
> return false;
>
> return true;
Looks good to me, is it sufficient to keep the overall runtime sane?. And maybe
update the comment too, e.g. something like
/*
* Skip testing multiple reserved bits to shorten the test. Reserved
* bit page faults are terminal and multiple reserved bits do not affect
* the error code; the odds of a KVM bug are super low, and the odds of
* actually being able to detect a bug are even lower.
*/
next prev parent reply other threads:[~2021-08-11 16:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 16:08 [kvm-unit-tests PATCH 0/2] Couple of SVM fixes Babu Moger
2021-08-06 16:08 ` [kvm-unit-tests PATCH 1/2] x86: access: Fix timeout failure by limiting number of flag combinations Babu Moger
[not found] ` <YQ1pA9nN6DP0veQ1@google.com>
2021-08-09 19:43 ` Babu Moger
2021-08-10 16:59 ` Babu Moger
2021-08-10 23:38 ` Babu Moger
2021-08-11 7:09 ` Paolo Bonzini
2021-08-11 16:03 ` Babu Moger
2021-08-11 16:13 ` Sean Christopherson [this message]
2021-08-11 16:43 ` Babu Moger
2021-08-06 16:08 ` [kvm-unit-tests PATCH 2/2] nSVM: Fix NPT reserved bits test hang Babu Moger
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=YRP3HxfCRMQBt2Ty@google.com \
--to=seanjc@google.com \
--cc=babu.moger@amd.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=thuth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox