x86: use -cpu max instead of -cpu host

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@redhat.com>
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 @@
      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 @@
      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 @@
      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 @@
 
 [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 @@
 
 [memory]
 file = memory.flat
-extra_params = -cpu host
+extra_params = -cpu max
 arch = x86_64
 
 [msr]
@@ -171,12 +171,12 @@
 
 [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 @@
 
 [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 @@
 [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 @@
 
 [rdpru]
 file = rdpru.flat
-extra_params = -cpu host
+extra_params = -cpu max
 arch = x86_64
 
 [umip]
@@ -261,33 +261,33 @@
 
 [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 @@
 [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 @@
 [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 @@
 
 [tsx-ctrl]
 file = tsx-ctrl.flat
-extra_params = -cpu host
+extra_params = -cpu max
 groups = tsx-ctrl