mbox series

[kvm-unit-tests,v2,0/2] Couple of SVM unit test fixes

Message ID 162880829114.21995.10386671727462287172.stgit@bmoger-ubuntu (mailing list archive)
Headers show
Series Couple of SVM unit test fixes | expand

Message

Moger, Babu Aug. 12, 2021, 10:46 p.m. UTC
This series fixes couple of unittest failures for SVM.
1.The test ./x86/access is failing with timeout.
2.The test ./x86/svm failure with infinite loop.
---
v2:
 1. Modified the check in ac_test_legal to limit the number of test
    combinations based on comments from Paolo Bonzini and Sean Christopherson.
 2. Changed the rdrand function's retry method. Kept the retry outside the
    function. Tom Lendacky commented that RDRAND instruction can sometimes
    loop forever without setting the carry flag.
  
v1:
 https://lore.kernel.org/kvm/162826604263.32391.7580736822527851972.stgit@bmoger-ubuntu/

Babu Moger (2):
      x86: access: Fix timeout failure by limiting number of tests
      nSVM: Fix NPT reserved bits test hang


 lib/x86/processor.h |   11 +++++++++++
 x86/access.c        |   11 +++++++----
 x86/svm_tests.c     |   28 ++++++++++++++++++++++++----
 3 files changed, 42 insertions(+), 8 deletions(-)

--

Comments

Paolo Bonzini Aug. 13, 2021, 10:38 a.m. UTC | #1
On 13/08/21 00:46, Babu Moger wrote:
> This series fixes couple of unittest failures for SVM.
> 1.The test ./x86/access is failing with timeout.
> 2.The test ./x86/svm failure with infinite loop.
> ---
> v2:
>   1. Modified the check in ac_test_legal to limit the number of test
>      combinations based on comments from Paolo Bonzini and Sean Christopherson.
>   2. Changed the rdrand function's retry method. Kept the retry outside the
>      function. Tom Lendacky commented that RDRAND instruction can sometimes
>      loop forever without setting the carry flag.
>    
> v1:
>   https://lore.kernel.org/kvm/162826604263.32391.7580736822527851972.stgit@bmoger-ubuntu/
> 
> Babu Moger (2):
>        x86: access: Fix timeout failure by limiting number of tests
>        nSVM: Fix NPT reserved bits test hang
> 
> 
>   lib/x86/processor.h |   11 +++++++++++
>   x86/access.c        |   11 +++++++----
>   x86/svm_tests.c     |   28 ++++++++++++++++++++++++----
>   3 files changed, 42 insertions(+), 8 deletions(-)
> 
> --
> 

Applied, thanks.  I'm looking at a few more limits to the number of 
tests as well as optimizations to ac_emulate_access, which should reduce 
the runtime further.

Paolo
Moger, Babu Aug. 13, 2021, 2:14 p.m. UTC | #2
On 8/13/21 5:38 AM, Paolo Bonzini wrote:
> On 13/08/21 00:46, Babu Moger wrote:
>> This series fixes couple of unittest failures for SVM.
>> 1.The test ./x86/access is failing with timeout.
>> 2.The test ./x86/svm failure with infinite loop.
>> ---
>> v2:
>>   1. Modified the check in ac_test_legal to limit the number of test
>>      combinations based on comments from Paolo Bonzini and Sean
>> Christopherson.
>>   2. Changed the rdrand function's retry method. Kept the retry outside the
>>      function. Tom Lendacky commented that RDRAND instruction can sometimes
>>      loop forever without setting the carry flag.
>>    v1:
>>  
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fkvm%2F162826604263.32391.7580736822527851972.stgit%40bmoger-ubuntu%2F&data=04%7C01%7Cbabu.moger%40amd.com%7C37359356e8fa4a0c33bf08d95e4690ae%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637644479455847518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JFA5zk9xqFpdbASQlHyTVtpn7yBhF1mk9NFaKrllYjU%3D&reserved=0
>>
>>
>> Babu Moger (2):
>>        x86: access: Fix timeout failure by limiting number of tests
>>        nSVM: Fix NPT reserved bits test hang
>>
>>
>>   lib/x86/processor.h |   11 +++++++++++
>>   x86/access.c        |   11 +++++++----
>>   x86/svm_tests.c     |   28 ++++++++++++++++++++++++----
>>   3 files changed, 42 insertions(+), 8 deletions(-)
>>
>> -- 
>>
> 
> Applied, thanks.  I'm looking at a few more limits to the number of tests
> as well as optimizations to ac_emulate_access, which should reduce the
> runtime further.

Paolo, Thanks for applying. I will test your patches and let you know.
thanks
Babu