All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Manali Shukla <manali.shukla@amd.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v4 3/8] x86: nSVM: Allow nSVM tests run with PT_USER_MASK enabled
Date: Wed, 15 Jun 2022 23:47:52 +0000	[thread overview]
Message-ID: <YqpvqEzEVfNvncwe@google.com> (raw)
In-Reply-To: <20220428070851.21985-4-manali.shukla@amd.com>

On Thu, Apr 28, 2022, Manali Shukla wrote:
> Commit 916635a813e975600335c6c47250881b7a328971
> (nSVM: Add test for NPT reserved bit and #NPF error code behavior)
> clears PT_USER_MASK for all svm testcases. Any tests that requires
> usermode access will fail after this commit.
> 
> Above mentioned commit did changes in main() due to which other
> nSVM tests became "incompatible" with usermode
> 
> Solution to this problem would be to set PT_USER_MASK on all PTEs.
> So that KUT will build other tests with PT_USER_MASK set on
> all PTEs.

Similar to the previous changelog, state what the patch does.  After reading all
of that, someone who doesn't already know what's going on might not understand
the change.

  Now that nNPT testcases, which need to run without USER page tables,
  live in their own test, use the default setup_vm() to create the page
  tables with the USER bit set so that usermode testcases can be added
  in the future.

> Suggested-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Manali Shukla <manali.shukla@amd.com>
> ---
>  x86/svm_tests.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/x86/svm_tests.c b/x86/svm_tests.c
> index f0eeb1d..3b3b990 100644
> --- a/x86/svm_tests.c
> +++ b/x86/svm_tests.c
> @@ -10,7 +10,6 @@
>  #include "isr.h"
>  #include "apic.h"
>  #include "delay.h"
> -#include "vmalloc.h"
>  
>  #define SVM_EXIT_MAX_DR_INTERCEPT 0x3f
>  
> @@ -3297,9 +3296,7 @@ static void svm_intr_intercept_mix_smi(void)
>  
>  int main(int ac, char **av)
>  {
> -    pteval_t opt_mask = 0;
> -
> -    __setup_vm(&opt_mask);
> +    setup_vm();
>      return run_svm_tests(ac, av);
>  }
>  
> -- 
> 2.30.2
> 

  reply	other threads:[~2022-06-15 23:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  7:08 [kvm-unit-tests PATCH v4 0/8] Move npt test cases and NPT code improvements Manali Shukla
2022-04-28  7:08 ` [kvm-unit-tests PATCH v4 1/8] x86: nSVM: Move common functionality of the main() to helper run_svm_tests Manali Shukla
2022-04-28  7:08 ` [kvm-unit-tests PATCH v4 2/8] x86: nSVM: Move all nNPT test cases from svm_tests.c to a separate file Manali Shukla
2022-06-15 23:43   ` Sean Christopherson
2022-06-20  2:03     ` Shukla, Manali
2022-04-28  7:08 ` [kvm-unit-tests PATCH v4 3/8] x86: nSVM: Allow nSVM tests run with PT_USER_MASK enabled Manali Shukla
2022-06-15 23:47   ` Sean Christopherson [this message]
2022-04-28  7:08 ` [kvm-unit-tests PATCH v4 4/8] x86: Improve set_mmu_range() to implement npt Manali Shukla
2022-06-15 23:58   ` Sean Christopherson
2022-06-16  0:04     ` Sean Christopherson
2022-06-22 15:32       ` Shukla, Manali
2022-06-24  0:46         ` Sean Christopherson
2022-04-28  7:08 ` [kvm-unit-tests PATCH v4 5/8] x86: nSVM: Build up the nested page table dynamically Manali Shukla
2022-06-16  0:06   ` Sean Christopherson
2022-04-28  7:08 ` [kvm-unit-tests PATCH v4 6/8] x86: nSVM: Correct indentation for svm.c Manali Shukla
2022-04-28  7:16 ` [kvm-unit-tests PATCH v4 7/8] x86: nSVM: Correct indentation for svm_tests.c part-1 Manali Shukla
2022-04-28  8:05 ` [kvm-unit-tests PATCH v4 8/8] x86: nSVM: Correct indentation for svm_tests.c part-2 Manali Shukla
2022-05-09  4:12 ` [kvm-unit-tests PATCH v4 0/8] Move npt test cases and NPT code improvements Shukla, Manali
2022-05-16  4:45   ` Shukla, Manali
2022-06-09  7:29     ` Shukla, Manali
2022-06-14  0:56       ` Sean Christopherson

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=YqpvqEzEVfNvncwe@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=manali.shukla@amd.com \
    --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.