mbox series

[0/4] target/i386: Continuing fixing kvm-unit-tests for svm

Message ID 20210705081802.18960-1-laramglazier@gmail.com (mailing list archive)
Headers show
Series target/i386: Continuing fixing kvm-unit-tests for svm | expand

Message

Lara Lazier July 5, 2021, 8:17 a.m. UTC
Following the APM2 I added some consistency checks to
resolve the following tests in kvm-unit-tests for svm:

 * EFER.SVME: 1500
 * EFER.SVME: 500
 * Test EFER 9:8: 1700
 * Test EFER 63:16: 11500
 * Test EFER 63:16: 101500
 * Test EFER 63:16: 1001500
 * Test EFER 63:16: 10001500
 * Test EFER 63:16: 100001500
 * Test EFER 63:16: 1000001500
 * Test EFER 63:16: 10000001500
 * Test EFER 63:16: 100000001500
 * Test EFER 63:16: 1000000001500
 * Test EFER 63:16: 10000000001500
 * Test EFER 63:16: 100000000001500
 * Test EFER 63:16: 1000000000001500
 * EFER.LME=1, CR0.PG=1 and CR4.PAE=0
 * EFER.LME=1, CR0.PG=1 and CR0.PE=0
 * EFER.LME=1, CR0.PG=1, CR4.PAE=1, CS.L=1 and CS.D=1
 * Test CR3 63:0: 10000001007000
 * Test CR3 63:0: 20000001007000
 * Test CR3 63:0: 40000001007000
 * Test CR3 63:0: 80000001007000
 * Test CR3 63:0: 100000001007000
 * Test CR3 63:0: 200000001007000
 * Test CR3 63:0: 400000001007000
 * Test CR3 63:0: 800000001007000
 * Test CR3 63:0: 1000000001007000
 * Test CR3 63:0: 2000000001007000
 * Test CR3 63:0: 4000000001007000
 * Test CR3 63:0: 8000000001007000
 * Test CR3 63:0: 1007000
 * Test CR4 31:12: 1020
 * Test CR4 31:12: 2020
 * Test CR4 31:12: 4020
 * Test CR4 31:12: 8020
 * Test CR4 31:12: 80020
 * Test CR4 31:12: 800020
 * Test CR4 31:12: 1000020
 * Test CR4 31:12: 2000020
 * Test CR4 31:12: 4000020
 * Test CR4 31:12: 8000020
 * Test CR4 31:12: 10000020
 * Test CR4 31:12: 20000020
 * Test CR4 31:12: 40000020
 * Test CR4 31:12: 80000020
 * Test CR4 31:12: 1020
 * Test CR4 31:12: 2020
 * Test CR4 31:12: 4020
 * Test CR4 31:12: 8020
 * Test CR4 31:12: 80020
 * Test CR4 31:12: 800020
 * Test CR4 31:12: 1000020
 * Test CR4 31:12: 2000020
 * Test CR4 31:12: 4000020
 * Test CR4 31:12: 8000020
 * Test CR4 31:12: 10000020
 * Test CR4 31:12: 20000020
 * Test CR4 31:12: 40000020
 * Test CR4 31:12: 80000020
 * Test CR4 63:32: 100000020
 * Test CR4 63:32: 1000000020
 * Test CR4 63:32: 10000000020
 * Test CR4 63:32: 100000000020
 * Test CR4 63:32: 1000000000020
 * Test CR4 63:32: 10000000000020
 * Test CR4 63:32: 100000000000020
 * Test CR4 63:32: 1000000000000020
 * Test DR6 63:32: 1ffff0ff0
 * Test DR6 63:32: 10ffff0ff0
 * Test DR6 63:32: 100ffff0ff0
 * Test DR6 63:32: 1000ffff0ff0
 * Test DR6 63:32: 10000ffff0ff0
 * Test DR6 63:32: 100000ffff0ff0
 * Test DR6 63:32: 1000000ffff0ff0
 * Test DR6 63:32: 10000000ffff0ff0
 * Test DR7 63:32: 100000400
 * Test DR7 63:32: 1000000400
 * Test DR7 63:32: 10000000400
 * Test DR7 63:32: 100000000400
 * Test DR7 63:32: 1000000000400
 * Test DR7 63:32: 10000000000400
 * Test DR7 63:32: 100000000000400
 * Test DR7 63:32: 1000000000000400
 * Test MSRPM address: ffffffe000
 * Test MSRPM address: ffffffe001
 * Test MSRPM address: fffffff000
 * Test MSRPM address: 435000
 * Test MSRPM address: 435fff
 * Test IOPM address: ffffffc000
 * Test IOPM address: ffffffd000
 * Test IOPM address: ffffffdffe
 * Test IOPM address: ffffffe000
 * Test IOPM address: fffffff000
 * Test IOPM address: 438000
 * Test IOPM address: 438fff

Lara Lazier (4):
  target/i386: Added MSRPM and IOPM size check
  target/i386: Added DR6 and DR7 consistency checks
  target/i386: Added consistency checks for EFER
  target/i386: Added VMRUN consistency checks for CR3 and CR4

 target/i386/cpu.h                    | 31 +++++++++++
 target/i386/svm.h                    |  5 ++
 target/i386/tcg/sysemu/misc_helper.c |  6 +++
 target/i386/tcg/sysemu/svm_helper.c  | 80 +++++++++++++++++++++++++---
 4 files changed, 115 insertions(+), 7 deletions(-)