All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: Fix default machine options
@ 2012-07-06 16:21 Jan Kiszka
  2012-07-06 17:02 ` Daniel P. Berrange
  2012-07-12  9:02 ` Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2012-07-06 16:21 UTC (permalink / raw)
  To: Marcelo Tosatti, Avi Kivity; +Cc: kvm, Daniel P. Berrange

qemu-kvm-specific machine defaults were missing for pc-0.15 to pc-1.1.
Then Daniel noted that --disable-kvm caused problems as the generated
binaries would be unable to run. As we are at it, we can drop the
kernel_irqchip=on that is now enable by default in upstream.

CC: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Noticed that there was more to do. Can you take care of stable-1.1,
Daniel? TIA.

 hw/pc_piix.c |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 98a06fa..5860d52 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -353,6 +353,12 @@ static void pc_xen_hvm_init(ram_addr_t ram_size,
 }
 #endif
 
+#ifdef CONFIG_KVM_OPTIONS
+#define KVM_MACHINE_OPTIONS "accel=kvm"
+#else
+#define KVM_MACHINE_OPTIONS ""
+#endif
+
 static QEMUMachine pc_machine_v1_2 = {
     .name = "pc-1.2",
     .alias = "pc",
@@ -360,7 +366,7 @@ static QEMUMachine pc_machine_v1_2 = {
     .init = pc_init_pci,
     .max_cpus = 255,
     .is_default = 1,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_1_1 \
@@ -387,6 +393,7 @@ static QEMUMachine pc_machine_v1_1 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_1_1,
         { /* end of list */ }
@@ -422,6 +429,7 @@ static QEMUMachine pc_machine_v1_0 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_1_0,
         { /* end of list */ }
@@ -437,6 +445,7 @@ static QEMUMachine pc_machine_v0_15 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_15,
         { /* end of list */ }
@@ -469,7 +478,7 @@ static QEMUMachine pc_machine_v0_14 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_14, 
         {
@@ -503,7 +512,7 @@ static QEMUMachine pc_machine_v0_13 = {
     .desc = "Standard PC",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_13,
         {
@@ -541,7 +550,7 @@ static QEMUMachine pc_machine_v0_12 = {
     .desc = "Standard PC",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_12,
         {
@@ -575,7 +584,7 @@ static QEMUMachine pc_machine_v0_11 = {
     .desc = "Standard PC, qemu 0.11",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_11,
         {
@@ -597,7 +606,7 @@ static QEMUMachine pc_machine_v0_10 = {
     .desc = "Standard PC, qemu 0.10",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_11,
         {
@@ -631,7 +640,7 @@ static QEMUMachine isapc_machine = {
     .desc = "ISA-only PC",
     .init = pc_init_isa,
     .max_cpus = 1,
-    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
+    .default_machine_opts = KVM_MACHINE_OPTIONS,
     .compat_props = (GlobalProperty[]) {
         {
             .driver   = "pc-sysfw",
-- 
1.7.3.4

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

* Re: [PATCH] qemu-kvm: Fix default machine options
  2012-07-06 16:21 [PATCH] qemu-kvm: Fix default machine options Jan Kiszka
@ 2012-07-06 17:02 ` Daniel P. Berrange
  2012-07-12  9:02 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2012-07-06 17:02 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, Avi Kivity, kvm

On Fri, Jul 06, 2012 at 06:21:06PM +0200, Jan Kiszka wrote:
> qemu-kvm-specific machine defaults were missing for pc-0.15 to pc-1.1.
> Then Daniel noted that --disable-kvm caused problems as the generated
> binaries would be unable to run. As we are at it, we can drop the
> kernel_irqchip=on that is now enable by default in upstream.
> 
> CC: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

ACK, looks good to me.

> Noticed that there was more to do. Can you take care of stable-1.1,
> Daniel? TIA.

Yep, will post a patch for stable-1.1 when this is accepted
into master.

>  hw/pc_piix.c |   23 ++++++++++++++++-------
>  1 files changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index 98a06fa..5860d52 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -353,6 +353,12 @@ static void pc_xen_hvm_init(ram_addr_t ram_size,
>  }
>  #endif
>  
> +#ifdef CONFIG_KVM_OPTIONS
> +#define KVM_MACHINE_OPTIONS "accel=kvm"
> +#else
> +#define KVM_MACHINE_OPTIONS ""
> +#endif
> +
>  static QEMUMachine pc_machine_v1_2 = {
>      .name = "pc-1.2",
>      .alias = "pc",
> @@ -360,7 +366,7 @@ static QEMUMachine pc_machine_v1_2 = {
>      .init = pc_init_pci,
>      .max_cpus = 255,
>      .is_default = 1,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>  };
>  
>  #define PC_COMPAT_1_1 \
> @@ -387,6 +393,7 @@ static QEMUMachine pc_machine_v1_1 = {
>      .desc = "Standard PC",
>      .init = pc_init_pci,
>      .max_cpus = 255,
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_1_1,
>          { /* end of list */ }
> @@ -422,6 +429,7 @@ static QEMUMachine pc_machine_v1_0 = {
>      .desc = "Standard PC",
>      .init = pc_init_pci,
>      .max_cpus = 255,
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_1_0,
>          { /* end of list */ }
> @@ -437,6 +445,7 @@ static QEMUMachine pc_machine_v0_15 = {
>      .desc = "Standard PC",
>      .init = pc_init_pci,
>      .max_cpus = 255,
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_0_15,
>          { /* end of list */ }
> @@ -469,7 +478,7 @@ static QEMUMachine pc_machine_v0_14 = {
>      .desc = "Standard PC",
>      .init = pc_init_pci,
>      .max_cpus = 255,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_0_14, 
>          {
> @@ -503,7 +512,7 @@ static QEMUMachine pc_machine_v0_13 = {
>      .desc = "Standard PC",
>      .init = pc_init_pci_no_kvmclock,
>      .max_cpus = 255,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_0_13,
>          {
> @@ -541,7 +550,7 @@ static QEMUMachine pc_machine_v0_12 = {
>      .desc = "Standard PC",
>      .init = pc_init_pci_no_kvmclock,
>      .max_cpus = 255,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_0_12,
>          {
> @@ -575,7 +584,7 @@ static QEMUMachine pc_machine_v0_11 = {
>      .desc = "Standard PC, qemu 0.11",
>      .init = pc_init_pci_no_kvmclock,
>      .max_cpus = 255,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_0_11,
>          {
> @@ -597,7 +606,7 @@ static QEMUMachine pc_machine_v0_10 = {
>      .desc = "Standard PC, qemu 0.10",
>      .init = pc_init_pci_no_kvmclock,
>      .max_cpus = 255,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          PC_COMPAT_0_11,
>          {
> @@ -631,7 +640,7 @@ static QEMUMachine isapc_machine = {
>      .desc = "ISA-only PC",
>      .init = pc_init_isa,
>      .max_cpus = 1,
> -    .default_machine_opts = "accel=kvm,kernel_irqchip=on",
> +    .default_machine_opts = KVM_MACHINE_OPTIONS,
>      .compat_props = (GlobalProperty[]) {
>          {
>              .driver   = "pc-sysfw",
> -- 
> 1.7.3.4

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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

* Re: [PATCH] qemu-kvm: Fix default machine options
  2012-07-06 16:21 [PATCH] qemu-kvm: Fix default machine options Jan Kiszka
  2012-07-06 17:02 ` Daniel P. Berrange
@ 2012-07-12  9:02 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2012-07-12  9:02 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, kvm, Daniel P. Berrange

On 07/06/2012 07:21 PM, Jan Kiszka wrote:
> qemu-kvm-specific machine defaults were missing for pc-0.15 to pc-1.1.
> Then Daniel noted that --disable-kvm caused problems as the generated
> binaries would be unable to run. As we are at it, we can drop the
> kernel_irqchip=on that is now enable by default in upstream.

Thanks, applied.


-- 
error compiling committee.c: too many arguments to function



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

end of thread, other threads:[~2012-07-12  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-06 16:21 [PATCH] qemu-kvm: Fix default machine options Jan Kiszka
2012-07-06 17:02 ` Daniel P. Berrange
2012-07-12  9:02 ` Avi Kivity

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.