[PATCH kvm-unit-tests] x86: use -cpu max instead of -cpu host

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

 



This allows the tests to run under TCG as well.  "-cpu max" is not available on
CentOS 7, however that doesn't change much for our CI since we weren't testing
the CentOS 7 + KVM combination anyway.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 .gitlab-ci.yml    |  4 +++-
 x86/unittests.cfg | 40 ++++++++++++++++++++--------------------
 2 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8834e59..d97e27e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -75,6 +75,7 @@ build-x86_64:
      vmexit_mov_to_cr8 vmexit_inl_pmtimer  vmexit_ipi vmexit_ipi_halt
      vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed
      eventinj msr port80 setjmp sieve syscall tsc rmap_chain umip intel_iommu
+     rdpru pku pks smap tsc_adjust xsave
      | tee results.txt
  - if grep -q FAIL results.txt ; then exit 1 ; fi
 
@@ -89,7 +90,7 @@ build-i386:
      cmpxchg8b vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8
      vmexit_inl_pmtimer vmexit_ipi vmexit_ipi_halt vmexit_ple_round_robin
      vmexit_tscdeadline vmexit_tscdeadline_immed eventinj port80 setjmp sieve
-     tsc taskswitch umip
+     tsc taskswitch umip rdpru smap tsc_adjust xsave
      | tee results.txt
  - if grep -q FAIL results.txt ; then exit 1 ; fi
 
@@ -103,6 +104,7 @@ build-clang:
      vmexit_mov_to_cr8 vmexit_inl_pmtimer  vmexit_ipi vmexit_ipi_halt
      vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed
      eventinj msr port80 setjmp syscall tsc rmap_chain umip intel_iommu
+     rdpru pku pks smap tsc_adjust xsave
      | tee results.txt
  - grep -q PASS results.txt && ! grep -q FAIL results.txt
 
diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 8c39630..90e370f 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -128,12 +128,12 @@ check = /sys/module/kvm_intel/parameters/allow_smaller_maxphyaddr=Y
 
 [smap]
 file = smap.flat
-extra_params = -cpu host
+extra_params = -cpu max
 
 [pku]
 file = pku.flat
 arch = x86_64
-extra_params = -cpu host
+extra_params = -cpu max
 
 [pks]
 file = pks.flat
@@ -163,7 +163,7 @@ arch = x86_64
 
 [memory]
 file = memory.flat
-extra_params = -cpu host
+extra_params = -cpu max
 arch = x86_64
 
 [msr]
@@ -171,12 +171,12 @@ file = msr.flat
 
 [pmu]
 file = pmu.flat
-extra_params = -cpu host
+extra_params = -cpu max
 check = /proc/sys/kernel/nmi_watchdog=0
 
 [vmware_backdoors]
 file = vmware_backdoors.flat
-extra_params = -machine vmport=on -cpu host
+extra_params = -machine vmport=on -cpu max
 check = /sys/module/kvm/parameters/enable_vmware_backdoor=Y
 arch = x86_64
 
@@ -204,12 +204,12 @@ extra_params = -cpu kvm64,+rdtscp
 
 [tsc_adjust]
 file = tsc_adjust.flat
-extra_params = -cpu host
+extra_params = -cpu max
 
 [xsave]
 file = xsave.flat
 arch = x86_64
-extra_params = -cpu host
+extra_params = -cpu max
 
 [rmap_chain]
 file = rmap_chain.flat
@@ -218,7 +218,7 @@ arch = x86_64
 [svm]
 file = svm.flat
 smp = 2
-extra_params = -cpu host,+svm -m 4g
+extra_params = -cpu max,+svm -m 4g
 arch = x86_64
 
 [taskswitch]
@@ -248,7 +248,7 @@ arch = x86_64
 
 [rdpru]
 file = rdpru.flat
-extra_params = -cpu host
+extra_params = -cpu max
 arch = x86_64
 
 [umip]
@@ -261,33 +261,33 @@ arch = i386
 
 [vmx]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append "-exit_monitor_from_l2_test -ept_access* -vmx_smp* -vmx_vmcs_shadow_test -atomic_switch_overflow_msrs_test -vmx_init_signal_test -vmx_apic_passthrough_tpr_threshold_test"
+extra_params = -cpu max,+vmx -append "-exit_monitor_from_l2_test -ept_access* -vmx_smp* -vmx_vmcs_shadow_test -atomic_switch_overflow_msrs_test -vmx_init_signal_test -vmx_apic_passthrough_tpr_threshold_test"
 arch = x86_64
 groups = vmx
 
 [ept]
 file = vmx.flat
-extra_params = -cpu host,host-phys-bits,+vmx -m 2560 -append "ept_access*"
+extra_params = -cpu max,host-phys-bits,+vmx -m 2560 -append "ept_access*"
 arch = x86_64
 groups = vmx
 
 [vmx_eoi_bitmap_ioapic_scan]
 file = vmx.flat
 smp = 2
-extra_params = -cpu host,+vmx -m 2048 -append vmx_eoi_bitmap_ioapic_scan_test
+extra_params = -cpu max,+vmx -m 2048 -append vmx_eoi_bitmap_ioapic_scan_test
 arch = x86_64
 groups = vmx
 
 [vmx_hlt_with_rvi_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append vmx_hlt_with_rvi_test
+extra_params = -cpu max,+vmx -append vmx_hlt_with_rvi_test
 arch = x86_64
 groups = vmx
 timeout = 10
 
 [vmx_apicv_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append "apic_reg_virt_test virt_x2apic_mode_test"
+extra_params = -cpu max,+vmx -append "apic_reg_virt_test virt_x2apic_mode_test"
 arch = x86_64
 groups = vmx
 timeout = 10
@@ -295,14 +295,14 @@ timeout = 10
 [vmx_apic_passthrough_thread]
 file = vmx.flat
 smp = 2
-extra_params = -cpu host,+vmx -m 2048 -append vmx_apic_passthrough_thread_test
+extra_params = -cpu max,+vmx -m 2048 -append vmx_apic_passthrough_thread_test
 arch = x86_64
 groups = vmx
 
 [vmx_init_signal_test]
 file = vmx.flat
 smp = 2
-extra_params = -cpu host,+vmx -m 2048 -append vmx_init_signal_test
+extra_params = -cpu max,+vmx -m 2048 -append vmx_init_signal_test
 arch = x86_64
 groups = vmx
 timeout = 10
@@ -310,21 +310,21 @@ timeout = 10
 [vmx_sipi_signal_test]
 file = vmx.flat
 smp = 2
-extra_params = -cpu host,+vmx -m 2048 -append vmx_sipi_signal_test
+extra_params = -cpu max,+vmx -m 2048 -append vmx_sipi_signal_test
 arch = x86_64
 groups = vmx
 timeout = 10
 
 [vmx_apic_passthrough_tpr_threshold_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -m 2048 -append vmx_apic_passthrough_tpr_threshold_test
+extra_params = -cpu max,+vmx -m 2048 -append vmx_apic_passthrough_tpr_threshold_test
 arch = x86_64
 groups = vmx
 timeout = 10
 
 [vmx_vmcs_shadow_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append vmx_vmcs_shadow_test
+extra_params = -cpu max,+vmx -append vmx_vmcs_shadow_test
 arch = x86_64
 groups = vmx
 
@@ -367,5 +367,5 @@ extra_params = -M q35,kernel-irqchip=split -device intel-iommu,intremap=on,eim=o
 
 [tsx-ctrl]
 file = tsx-ctrl.flat
-extra_params = -cpu host
+extra_params = -cpu max
 groups = tsx-ctrl
-- 
2.29.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