* [PATCH 2/2] qemu: add a command line option to disable irqchip
@ 2007-08-07 9:42 He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C1AB-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: He, Qing @ 2007-08-07 9:42 UTC (permalink / raw)
To: kvm-devel
[-- Attachment #1: Type: text/plain, Size: 2175 bytes --]
kvm: qemu: add qemu command line option -no-kvm-irqchip
This option disables in-kernel irqchip (PIC/IOAPIC/LAPIC) and uses
qemu interrupt controllers in userspace instead.
Signed-off-by: Qing He <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
qemu/qemu-kvm.c | 4 ++++
qemu/vl.c | 5 +++++
qemu/vl.h | 1 +
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index a0e01e7..83cdcd4 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -9,6 +9,7 @@
#endif
int kvm_allowed = KVM_ALLOWED_DEFAULT;
+int kvm_irqchip = 1;
#ifdef USE_KVM
@@ -923,6 +924,9 @@ int kvm_qemu_create_context(void)
{
int i;
+ if (!kvm_irqchip) {
+ kvm_disable_irqchip_creation(kvm_context);
+ }
if (kvm_create(kvm_context, phys_ram_size, (void**)&phys_ram_base)
< 0) {
kvm_qemu_destroy();
return -1;
diff --git a/qemu/vl.c b/qemu/vl.c
index 7150d48..cae52cf 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -6569,6 +6569,7 @@ enum {
QEMU_OPTION_vnc,
QEMU_OPTION_no_acpi,
QEMU_OPTION_no_kvm,
+ QEMU_OPTION_no_kvm_irqchip,
QEMU_OPTION_no_reboot,
QEMU_OPTION_daemonize,
QEMU_OPTION_option_rom,
@@ -6638,6 +6639,7 @@ const QEMUOption qemu_options[] = {
#endif
#ifdef USE_KVM
{ "no-kvm", 0, QEMU_OPTION_no_kvm },
+ { "no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip },
#endif
#if defined(TARGET_PPC) || defined(TARGET_SPARC)
{ "g", 1, QEMU_OPTION_g },
@@ -7347,6 +7349,9 @@ int main(int argc, char **argv)
case QEMU_OPTION_no_kvm:
kvm_allowed = 0;
break;
+ case QEMU_OPTION_no_kvm_irqchip:
+ kvm_irqchip = 0;
+ break;
#endif
case QEMU_OPTION_usb:
usb_enabled = 1;
diff --git a/qemu/vl.h b/qemu/vl.h
index 43f56bd..75289f8 100644
--- a/qemu/vl.h
+++ b/qemu/vl.h
@@ -163,6 +163,7 @@ extern int graphic_depth;
extern const char *keyboard_layout;
extern int kqemu_allowed;
extern int kvm_allowed;
+extern int kvm_irqchip;
extern int win2k_install_hack;
extern int usb_enabled;
extern int smp_cpus;
[-- Attachment #2: kvm-qemu-option-no-irqchip-creation.patch --]
[-- Type: application/octet-stream, Size: 2067 bytes --]
kvm: qemu: add qemu command line option -no-kvm-irqchip
This option disables in-kernel irqchip (PIC/IOAPIC/LAPIC) and uses
qemu interrupt controllers in userspace instead.
Signed-off-by: Qing He <qing.he@intel.com>
---
qemu/qemu-kvm.c | 4 ++++
qemu/vl.c | 5 +++++
qemu/vl.h | 1 +
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index a0e01e7..83cdcd4 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -9,6 +9,7 @@
#endif
int kvm_allowed = KVM_ALLOWED_DEFAULT;
+int kvm_irqchip = 1;
#ifdef USE_KVM
@@ -923,6 +924,9 @@ int kvm_qemu_create_context(void)
{
int i;
+ if (!kvm_irqchip) {
+ kvm_disable_irqchip_creation(kvm_context);
+ }
if (kvm_create(kvm_context, phys_ram_size, (void**)&phys_ram_base) < 0) {
kvm_qemu_destroy();
return -1;
diff --git a/qemu/vl.c b/qemu/vl.c
index 7150d48..cae52cf 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -6569,6 +6569,7 @@ enum {
QEMU_OPTION_vnc,
QEMU_OPTION_no_acpi,
QEMU_OPTION_no_kvm,
+ QEMU_OPTION_no_kvm_irqchip,
QEMU_OPTION_no_reboot,
QEMU_OPTION_daemonize,
QEMU_OPTION_option_rom,
@@ -6638,6 +6639,7 @@ const QEMUOption qemu_options[] = {
#endif
#ifdef USE_KVM
{ "no-kvm", 0, QEMU_OPTION_no_kvm },
+ { "no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip },
#endif
#if defined(TARGET_PPC) || defined(TARGET_SPARC)
{ "g", 1, QEMU_OPTION_g },
@@ -7347,6 +7349,9 @@ int main(int argc, char **argv)
case QEMU_OPTION_no_kvm:
kvm_allowed = 0;
break;
+ case QEMU_OPTION_no_kvm_irqchip:
+ kvm_irqchip = 0;
+ break;
#endif
case QEMU_OPTION_usb:
usb_enabled = 1;
diff --git a/qemu/vl.h b/qemu/vl.h
index 43f56bd..75289f8 100644
--- a/qemu/vl.h
+++ b/qemu/vl.h
@@ -163,6 +163,7 @@ extern int graphic_depth;
extern const char *keyboard_layout;
extern int kqemu_allowed;
extern int kvm_allowed;
+extern int kvm_irqchip;
extern int win2k_install_hack;
extern int usb_enabled;
extern int smp_cpus;
[-- Attachment #3: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-09 21:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 9:42 [PATCH 2/2] qemu: add a command line option to disable irqchip He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C1AB-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-09 21:35 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox