[Qemu-devel] [PATCH] i386/kvm: fix build with CONFIG_HYPERV=n

Vitaly Kuznetsov posted 1 patch 4 years, 10 months ago
Test s390x passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190624124911.31795-1-vkuznets@redhat.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>
target/i386/hyperv-stub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] i386/kvm: fix build with CONFIG_HYPERV=n
Posted by Vitaly Kuznetsov 4 years, 10 months ago
When switching from boolean properties to bits to represent Hyper-V
enlightenments we forgot to update hyperv-stub.c for CONFIG_HYPERV=n
builds.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: 2d384d7c8361 ("i386/kvm: convert hyperv enlightenments properties from bools to bits")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 target/i386/hyperv-stub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/hyperv-stub.c b/target/i386/hyperv-stub.c
index fe548cbae2..0028527e79 100644
--- a/target/i386/hyperv-stub.c
+++ b/target/i386/hyperv-stub.c
@@ -15,7 +15,7 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit)
 {
     switch (exit->type) {
     case KVM_EXIT_HYPERV_SYNIC:
-        if (!cpu->hyperv_synic) {
+        if (!hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) {
             return -1;
         }
 
-- 
2.20.1