|
|
91a090 |
From ad47ffe7134fc7cd6a74fd3cdc0470723b883b93 Mon Sep 17 00:00:00 2001
|
|
|
91a090 |
From: "Daniel P. Berrange" <berrange@redhat.com>
|
|
|
91a090 |
Date: Tue, 10 Jul 2012 10:54:55 +0100
|
|
|
91a090 |
Subject: [PATCH] qemu-kvm: Fix default machine options
|
|
|
91a090 |
|
|
|
91a090 |
qemu-kvm-specific machine defaults were missing for pc-0.15 to pc-1.1.
|
|
|
91a090 |
Then Daniel noted that --disable-kvm caused problems as the generated
|
|
|
91a090 |
binaries would be unable to run. As we are at it, we can drop the
|
|
|
91a090 |
kernel_irqchip=on that is now enable by default in upstream.
|
|
|
91a090 |
---
|
|
|
91a090 |
hw/pc_piix.c | 23 ++++++++++++++++-------
|
|
|
91a090 |
1 file changed, 16 insertions(+), 7 deletions(-)
|
|
|
91a090 |
|
|
|
91a090 |
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
|
|
Daniel P. Berrange |
5da8fb |
index 4e8a280..50e108a 100644
|
|
|
91a090 |
--- a/hw/pc_piix.c
|
|
|
91a090 |
+++ b/hw/pc_piix.c
|
|
Daniel P. Berrange |
5da8fb |
@@ -355,6 +355,12 @@ static void pc_xen_hvm_init(ram_addr_t ram_size,
|
|
|
91a090 |
}
|
|
|
91a090 |
#endif
|
|
|
91a090 |
|
|
|
91a090 |
+#ifdef CONFIG_KVM_OPTIONS
|
|
|
91a090 |
+#define KVM_MACHINE_OPTIONS "accel=kvm"
|
|
|
91a090 |
+#else
|
|
|
91a090 |
+#define KVM_MACHINE_OPTIONS ""
|
|
|
91a090 |
+#endif
|
|
|
91a090 |
+
|
|
Daniel P. Berrange |
5da8fb |
static QEMUMachine pc_machine_v1_1 = {
|
|
Daniel P. Berrange |
5da8fb |
.name = "pc-1.1",
|
|
|
91a090 |
.alias = "pc",
|
|
Daniel P. Berrange |
5da8fb |
@@ -362,7 +368,7 @@ static QEMUMachine pc_machine_v1_1 = {
|
|
|
91a090 |
.init = pc_init_pci,
|
|
|
91a090 |
.max_cpus = 255,
|
|
|
91a090 |
.is_default = 1,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
};
|
|
|
91a090 |
|
|
Daniel P. Berrange |
5da8fb |
#define PC_COMPAT_1_0 \
|
|
Daniel P. Berrange |
5da8fb |
@@ -393,7 +399,7 @@ static QEMUMachine pc_machine_v1_0 = {
|
|
|
91a090 |
.desc = "Standard PC",
|
|
|
91a090 |
.init = pc_init_pci,
|
|
|
91a090 |
.max_cpus = 255,
|
|
Daniel P. Berrange |
5da8fb |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_1_0,
|
|
|
91a090 |
{ /* end of list */ }
|
|
Daniel P. Berrange |
5da8fb |
@@ -408,7 +414,7 @@ static QEMUMachine pc_machine_v0_15 = {
|
|
|
91a090 |
.desc = "Standard PC",
|
|
|
91a090 |
.init = pc_init_pci,
|
|
|
91a090 |
.max_cpus = 255,
|
|
Daniel P. Berrange |
5da8fb |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_0_15,
|
|
|
91a090 |
{ /* end of list */ }
|
|
Daniel P. Berrange |
5da8fb |
@@ -440,7 +446,7 @@ static QEMUMachine pc_machine_v0_14 = {
|
|
|
91a090 |
.desc = "Standard PC",
|
|
|
91a090 |
.init = pc_init_pci,
|
|
|
91a090 |
.max_cpus = 255,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_0_14,
|
|
|
91a090 |
{
|
|
Daniel P. Berrange |
5da8fb |
@@ -473,7 +479,7 @@ static QEMUMachine pc_machine_v0_13 = {
|
|
|
91a090 |
.desc = "Standard PC",
|
|
|
91a090 |
.init = pc_init_pci_no_kvmclock,
|
|
|
91a090 |
.max_cpus = 255,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_0_13,
|
|
|
91a090 |
{
|
|
Daniel P. Berrange |
5da8fb |
@@ -510,7 +516,7 @@ static QEMUMachine pc_machine_v0_12 = {
|
|
|
91a090 |
.desc = "Standard PC",
|
|
|
91a090 |
.init = pc_init_pci_no_kvmclock,
|
|
|
91a090 |
.max_cpus = 255,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_0_12,
|
|
|
91a090 |
{
|
|
Daniel P. Berrange |
5da8fb |
@@ -543,7 +549,7 @@ static QEMUMachine pc_machine_v0_11 = {
|
|
|
91a090 |
.desc = "Standard PC, qemu 0.11",
|
|
|
91a090 |
.init = pc_init_pci_no_kvmclock,
|
|
|
91a090 |
.max_cpus = 255,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_0_11,
|
|
|
91a090 |
{
|
|
Daniel P. Berrange |
5da8fb |
@@ -564,7 +570,7 @@ static QEMUMachine pc_machine_v0_10 = {
|
|
|
91a090 |
.desc = "Standard PC, qemu 0.10",
|
|
|
91a090 |
.init = pc_init_pci_no_kvmclock,
|
|
|
91a090 |
.max_cpus = 255,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
PC_COMPAT_0_11,
|
|
|
91a090 |
{
|
|
Daniel P. Berrange |
5da8fb |
@@ -597,7 +603,7 @@ static QEMUMachine isapc_machine = {
|
|
|
91a090 |
.desc = "ISA-only PC",
|
|
|
91a090 |
.init = pc_init_isa,
|
|
|
91a090 |
.max_cpus = 1,
|
|
|
91a090 |
- .default_machine_opts = "accel=kvm,kernel_irqchip=on",
|
|
|
91a090 |
+ .default_machine_opts = KVM_MACHINE_OPTIONS,
|
|
|
91a090 |
.compat_props = (GlobalProperty[]) {
|
|
|
91a090 |
{
|
|
|
91a090 |
.driver = "pc-sysfw",
|