diff mbox series

[kvm-unit-tests] vmware_backdoors: run with -cpu host

Message ID 1557956157-40196-1-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests] vmware_backdoors: run with -cpu host | expand

Commit Message

Paolo Bonzini May 15, 2019, 9:35 p.m. UTC
After KVM commit 672ff6cff80ca43bf3258410d2b887036969df5f, reading a VMware
pseudo PMC will fail with #GP unless the PMU is supported by the guest.
Invoke the test with PMU emulation to ensure that it passes.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/unittests.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liran Alon May 15, 2019, 9:40 p.m. UTC | #1
> On 16 May 2019, at 0:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> After KVM commit 672ff6cff80ca43bf3258410d2b887036969df5f, reading a VMware
> pseudo PMC will fail with #GP unless the PMU is supported by the guest.
> Invoke the test with PMU emulation to ensure that it passes.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Liran Alon <liran.alon@oracle.com>
I think it will also be more intuitive if in addition, we will check in the kvm-unit-test itself the CPUID such that we will skip test in case PMU is not exposed by vCPU.

-Liran

> ---
> x86/unittests.cfg | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
> index 2abf6d5..ed47d3f 100644
> --- a/x86/unittests.cfg
> +++ b/x86/unittests.cfg
> @@ -157,7 +157,7 @@ check = /proc/sys/kernel/nmi_watchdog=0
> 
> [vmware_backdoors]
> file = vmware_backdoors.flat
> -extra_params = -machine vmport=on
> +extra_params = -machine vmport=on -cpu host
> arch = x86_64
> 
> [port80]
> -- 
> 1.8.3.1
>
Paolo Bonzini May 15, 2019, 9:42 p.m. UTC | #2
On 15/05/19 23:40, Liran Alon wrote:
> 
>> On 16 May 2019, at 0:35, Paolo Bonzini <pbonzini@redhat.com>
>> wrote:
>> 
>> After KVM commit 672ff6cff80ca43bf3258410d2b887036969df5f, reading
>> a VMware pseudo PMC will fail with #GP unless the PMU is supported
>> by the guest. Invoke the test with PMU emulation to ensure that it
>> passes.
>> 
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Reviewed-by: Liran Alon <liran.alon@oracle.com>

> I think it will also
> be more intuitive if in addition, we will check in the kvm-unit-test
> itself the CPUID such that we will skip test in case PMU is not
> exposed by vCPU.

Yes, good idea.

Paolo
diff mbox series

Patch

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 2abf6d5..ed47d3f 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -157,7 +157,7 @@  check = /proc/sys/kernel/nmi_watchdog=0
 
 [vmware_backdoors]
 file = vmware_backdoors.flat
-extra_params = -machine vmport=on
+extra_params = -machine vmport=on -cpu host
 arch = x86_64
 
 [port80]