All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm,cleanup: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension()
@ 2010-12-10  7:52 Lai Jiangshan
  2010-12-20 10:55 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2010-12-10  7:52 UTC (permalink / raw)
  To: Avi Kivity, kvm

simple cleanup and use existed helper: kvm_check_extension().

Signed-off-by:  Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kvm-all.c b/kvm-all.c
index cae24bb..35fc73c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -678,7 +678,7 @@ int kvm_init(int smp_cpus)
 
     s->broken_set_mem_region = 1;
 #ifdef KVM_CAP_JOIN_MEMORY_REGIONS_WORKS
-    ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_JOIN_MEMORY_REGIONS_WORKS);
+    ret = kvm_check_extension(s, KVM_CAP_JOIN_MEMORY_REGIONS_WORKS);
     if (ret > 0) {
         s->broken_set_mem_region = 0;
     }
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 755f8c9..4004de7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -187,7 +187,7 @@ static int kvm_get_mce_cap_supported(KVMState *s, uint64_t *mce_cap,
 {
     int r;
 
-    r = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_MCE);
+    r = kvm_check_extension(s, KVM_CAP_MCE);
     if (r > 0) {
         *max_banks = r;
         return kvm_ioctl(s, KVM_X86_GET_MCE_CAP_SUPPORTED, mce_cap);
@@ -540,7 +540,7 @@ int kvm_arch_init(KVMState *s, int smp_cpus)
      * versions of KVM just assumed that it would be at the end of physical
      * memory but that doesn't work with more than 4GB of memory.  We simply
      * refuse to work with those older versions of KVM. */
-    ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SET_TSS_ADDR);
+    ret = kvm_check_extension(s, KVM_CAP_SET_TSS_ADDR);
     if (ret <= 0) {
         fprintf(stderr, "kvm does not support KVM_CAP_SET_TSS_ADDR\n");
         return ret;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qemu-kvm,cleanup: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension()
  2010-12-10  7:52 [PATCH] qemu-kvm,cleanup: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension() Lai Jiangshan
@ 2010-12-20 10:55 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-12-20 10:55 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Avi Kivity, kvm

On Fri, Dec 10, 2010 at 03:52:36PM +0800, Lai Jiangshan wrote:
> simple cleanup and use existed helper: kvm_check_extension().
> 
> Signed-off-by:  Lai Jiangshan <laijs@cn.fujitsu.com>

Applied to uq/master, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-20 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10  7:52 [PATCH] qemu-kvm,cleanup: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension() Lai Jiangshan
2010-12-20 10:55 ` Marcelo Tosatti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.