From: Ehrhardt Christian <ehrhardt@linux.vnet.ibm.com>
To: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, avi@redhat.com
Cc: ehrhardt@linux.vnet.ibm.com, hollisb@us.ibm.com, muli@il.ibm.com
Subject: [PATCH] kvm-userspace: move x86 specific calls introduced by device
Date: Mon, 03 Nov 2008 17:16:40 +0000 [thread overview]
Message-ID: <2e906c6317462fb1b551.1225732600@HelionPrime> (raw)
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);
WARNING: multiple messages have this Message-ID (diff)
From: Ehrhardt Christian <ehrhardt@linux.vnet.ibm.com>
To: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, avi@redhat.com
Cc: ehrhardt@linux.vnet.ibm.com, hollisb@us.ibm.com, muli@il.ibm.com
Subject: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files
Date: Mon, 03 Nov 2008 18:16:40 +0100 [thread overview]
Message-ID: <2e906c6317462fb1b551.1225732600@HelionPrime> (raw)
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);
next reply other threads:[~2008-11-03 17:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 17:16 Ehrhardt Christian [this message]
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 ` [PATCH] kvm-userspace: move x86 specific calls introduced by Hollis Blanchard
2008-11-03 17:21 ` [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files Hollis Blanchard
2008-11-04 10:11 ` [PATCH] kvm-userspace: move x86 specific calls introduced by Avi Kivity
2008-11-04 10:11 ` [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files Avi Kivity
2008-11-04 15:18 ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 Hollis Blanchard
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 ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific Avi Kivity
2008-11-04 15:25 ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files) Avi Kivity
2008-11-04 15:39 ` regression tests? (was Re: [PATCH] kvm-userspace: move Hollis Blanchard
2008-11-04 15:39 ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files) Hollis Blanchard
2008-11-04 15:55 ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific Avi Kivity
2008-11-04 15:55 ` regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files) Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e906c6317462fb1b551.1225732600@HelionPrime \
--to=ehrhardt@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=hollisb@us.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=muli@il.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.