kvm__supports_extension has been there before, and it's does it's job right
unlike kvm__has_cap.

Signed-off-by: Sasha Levin <[email protected]>
---
 tools/kvm/include/kvm/kvm.h |    1 +
 tools/kvm/ioeventfd.c       |    2 +-
 tools/kvm/kvm.c             |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h
index 35bb400..7996dfd 100644
--- a/tools/kvm/include/kvm/kvm.h
+++ b/tools/kvm/include/kvm/kvm.h
@@ -82,5 +82,6 @@ static inline void *guest_flat_to_host(struct kvm *kvm, 
unsigned long offset)
 }
 
 bool kvm__has_cap(struct kvm *kvm, u32 cap);
+bool kvm__supports_extension(struct kvm *kvm, unsigned int extension);
 
 #endif /* KVM__KVM_H */
diff --git a/tools/kvm/ioeventfd.c b/tools/kvm/ioeventfd.c
index 75dd3f2..1d6a7ac 100644
--- a/tools/kvm/ioeventfd.c
+++ b/tools/kvm/ioeventfd.c
@@ -22,7 +22,7 @@ static bool   ioeventfd_avail;
 
 void ioeventfd__init(struct kvm *kvm)
 {
-       ioeventfd_avail = kvm__has_cap(kvm, KVM_CAP_IOEVENTFD);
+       ioeventfd_avail = kvm__supports_extension(kvm, KVM_CAP_IOEVENTFD);
        if (!ioeventfd_avail)
                return;
 
diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c
index 9583ab2..24b8a60 100644
--- a/tools/kvm/kvm.c
+++ b/tools/kvm/kvm.c
@@ -90,7 +90,7 @@ const char *kvm__get_dir(void)
        return kvm_dir;
 }
 
-static bool kvm__supports_extension(struct kvm *kvm, unsigned int extension)
+bool kvm__supports_extension(struct kvm *kvm, unsigned int extension)
 {
        int ret;
 
-- 
1.7.8

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to