public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files
@ 2008-11-03 17:16 Ehrhardt Christian
  2008-11-03 17:21 ` Hollis Blanchard
  2008-11-04 10:11 ` Avi Kivity
  0 siblings, 2 replies; 7+ messages in thread
From: Ehrhardt Christian @ 2008-11-03 17:16 UTC (permalink / raw)
  To: kvm-ppc, kvm, avi; +Cc: ehrhardt, hollisb, muli

The device asignment patches added the x86 specific ioperm in qemu-kvm.
This patch moves
  qemu-kvm.c:kvm_do_ioperm()
to
  qemu-kvm-x86.c:kvm_arch_do_ioperm()
The patch also changes the qemu-kvm header and the includes according to that.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 qemu-kvm-x86.c |    7 +++++++
 qemu-kvm.c     |   11 +++--------
 qemu-kvm.h     |    3 +++
 3 files changed, 13 insertions(+), 8 deletions(-)

[diff]

diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
--- a/qemu/qemu-kvm-x86.c
+++ b/qemu/qemu-kvm-x86.c
@@ -11,6 +11,7 @@
 
 #include <string.h>
 #include "hw/hw.h"
+#include <sys/io.h>
 
 #include "qemu-kvm.h"
 #include <libkvm.h>
@@ -717,3 +718,9 @@
 	}
     }
 }
+
+void kvm_arch_do_ioperm(void *_data)
+{
+    struct ioperm_data *data = _data;
+    ioperm(data->start_port, data->num, data->turn_on);
+}
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -27,7 +27,6 @@
 #include <sys/utsname.h>
 #include <sys/syscall.h>
 #include <sys/mman.h>
-#include <sys/io.h>
 
 #define bool _Bool
 #define false 0
@@ -1049,14 +1048,10 @@
     return kvm_unregister_coalesced_mmio(kvm_context, addr, size);
 }
 
-static void kvm_do_ioperm(void *_data)
-{
-    struct ioperm_data *data = _data;
-    ioperm(data->start_port, data->num, data->turn_on);
-}
-
+#ifdef USE_KVM_DEVICE_ASSIGNMENT
 void kvm_ioperm(CPUState *env, void *data)
 {
     if (kvm_enabled() && qemu_system_ready)
-	on_vcpu(env, kvm_do_ioperm, data);
+	on_vcpu(env, kvm_arch_do_ioperm, data);
 }
+#endif
diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -93,7 +93,10 @@
 
 void qemu_kvm_system_reset_request(void);
 
+#ifdef USE_KVM_DEVICE_ASSIGNMENT
 void kvm_ioperm(CPUState *env, void *data);
+void kvm_arch_do_ioperm(void *_data);
+#endif
 
 #ifdef TARGET_PPC
 int handle_powerpc_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data);

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

end of thread, other threads:[~2008-11-04 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03 17:16 [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files Ehrhardt Christian
2008-11-03 17:21 ` Hollis Blanchard
2008-11-04 10:11 ` Avi Kivity
2008-11-04 15:18   ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files) Hollis Blanchard
2008-11-04 15:25     ` Avi Kivity
2008-11-04 15:39       ` Hollis Blanchard
2008-11-04 15:55         ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox