Re: [kvm-unit-tests PATCH v4 3/8] x86: nSVM: Allow nSVM tests run with PT_USER_MASK enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Signed-off-by: Manali Shukla <manali.shukla@xxxxxxx>
> ---
>  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
> 



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux