Skip to content
Snippets Groups Projects
Commit a39e7b5b authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

selftests: kvm: set rax before vmcall

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2119111



commit 281106f9
Author: Andrei Vagin <avagin@google.com>
Date:   Fri Jul 22 16:02:40 2022 -0700

    selftests: kvm: set rax before vmcall

    kvm_hypercall has to place the hypercall number in rax.

    Trace events show that kvm_pv_test doesn't work properly:
         kvm_pv_test-53132: kvm_hypercall: nr 0x0 a0 0x0 a1 0x0 a2 0x0 a3 0x0
         kvm_pv_test-53132: kvm_hypercall: nr 0x0 a0 0x0 a1 0x0 a2 0x0 a3 0x0
         kvm_pv_test-53132: kvm_hypercall: nr 0x0 a0 0x0 a1 0x0 a2 0x0 a3 0x0

    With this change, it starts working as expected:
         kvm_pv_test-54285: kvm_hypercall: nr 0x5 a0 0x0 a1 0x0 a2 0x0 a3 0x0
         kvm_pv_test-54285: kvm_hypercall: nr 0xa a0 0x0 a1 0x0 a2 0x0 a3 0x0
         kvm_pv_test-54285: kvm_hypercall: nr 0xb a0 0x0 a1 0x0 a2 0x0 a3 0x0

Signed-off-by: default avatarAndrei Vagin <avagin@google.com>
    Message-Id: <20220722230241.1944655-5-avagin@google.com>
    Fixes: ac4a4d6d ("selftests: kvm: test enforcement of paravirtual cpuid features")
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent 1d596b1f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment