[PATCH v2 0/4] target/i386: Start fixing kvm-unit-tests for svm

Lara Lazier posted 4 patches 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210616123907.17765-1-laramglazier@gmail.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
target/i386/cpu.h                    |   5 ++
target/i386/svm.h                    |   2 +
target/i386/tcg/sysemu/misc_helper.c |   9 ++
target/i386/tcg/sysemu/svm_helper.c  | 127 ++++++++++++++++-----------
4 files changed, 93 insertions(+), 50 deletions(-)
[PATCH v2 0/4] target/i386: Start fixing kvm-unit-tests for svm
Posted by Lara Lazier 2 years, 10 months ago
Following the APM2 I added some checks to 
resolve the following tests in kvm-unit-tests for svm:

  * vmrun_intercept_check
  * asid_zero
  * sel_cr0_bug
  * CR0 CD=0,NW=1: a0010011
  * CR0 63:32: 180010011
  * CR0 63:32: 1080010011
  * CR0 63:32: 10080010011
  * CR0 63:32: 100080010011
  * CR0 63:32: 1000080010011
  * CR0 63:32: 10000080010011
  * CR0 63:32: 100000080010011
  * CR0 63:32: 1000000080010011

v1->v2: introduced cpu_svm_has_intercept to avoid defining bitmasks for 
        intercepts

Lara Lazier (4):
  target/i386: Refactored intercept checks into cpu_svm_has_intercept
  target/i386: Added consistency checks for VMRUN intercept and ASID
  target/i386: Added consistency checks for CR0
  target/i386: Added Intercept CR0 writes check

 target/i386/cpu.h                    |   5 ++
 target/i386/svm.h                    |   2 +
 target/i386/tcg/sysemu/misc_helper.c |   9 ++
 target/i386/tcg/sysemu/svm_helper.c  | 127 ++++++++++++++++-----------
 4 files changed, 93 insertions(+), 50 deletions(-)

-- 
2.25.1


Re: [PATCH v2 0/4] target/i386: Start fixing kvm-unit-tests for svm
Posted by Paolo Bonzini 2 years, 10 months ago
On 16/06/21 14:39, Lara Lazier wrote:
> Following the APM2 I added some checks to
> resolve the following tests in kvm-unit-tests for svm:
> 
>    * vmrun_intercept_check
>    * asid_zero
>    * sel_cr0_bug
>    * CR0 CD=0,NW=1: a0010011
>    * CR0 63:32: 180010011
>    * CR0 63:32: 1080010011
>    * CR0 63:32: 10080010011
>    * CR0 63:32: 100080010011
>    * CR0 63:32: 1000080010011
>    * CR0 63:32: 10000080010011
>    * CR0 63:32: 100000080010011
>    * CR0 63:32: 1000000080010011
> 
> v1->v2: introduced cpu_svm_has_intercept to avoid defining bitmasks for
>          intercepts
> 
> Lara Lazier (4):
>    target/i386: Refactored intercept checks into cpu_svm_has_intercept
>    target/i386: Added consistency checks for VMRUN intercept and ASID
>    target/i386: Added consistency checks for CR0
>    target/i386: Added Intercept CR0 writes check
> 
>   target/i386/cpu.h                    |   5 ++
>   target/i386/svm.h                    |   2 +
>   target/i386/tcg/sysemu/misc_helper.c |   9 ++
>   target/i386/tcg/sysemu/svm_helper.c  | 127 ++++++++++++++++-----------
>   4 files changed, 93 insertions(+), 50 deletions(-)
> 

Looks good.  I fixed the small issue in patch 1 and queued it, thanks. 
It will appear in a pull request later this week.

Paolo