kvm tools: Use kvm__supports_extension instead of kvm__has_cap

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

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Sasha Levin
2011-12-15 08:02:54 +02:00
committed by Will Deacon
parent e2077857c0
commit 1d6fb3f2bb
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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 */
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;