qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [patch 0/7] qemu-kvm compat (v2)
@ 2012-10-05 17:13 Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size Marcelo Tosatti
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Jan Kiszka, Gerd Hoffmann

As discussed on this weeks qemu call, follows qemu-kvm compat patches
for qemu:

    - command line compatibility
    - allow configurable ram size for cirrus

Jan, please ACK.

v2:

- add -no-kvm command line compatibility
- change command documentation to deprecated style
- improve changelogs

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

* [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 2/7] Use machine options to emulate -no-kvm-irqchip Marcelo Tosatti
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 01_cirrus-add-configurable-memsize --]
[-- Type: text/plain, Size: 3015 bytes --]

Allow RAM size to be configurable for cirrus, to allow migration 
compatibility from qemu-kvm.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/hw/cirrus_vga.c
===================================================================
--- qemu-compat-kvm.orig/hw/cirrus_vga.c
+++ qemu-compat-kvm/hw/cirrus_vga.c
@@ -43,8 +43,6 @@
 //#define DEBUG_CIRRUS
 //#define DEBUG_BITBLT
 
-#define VGA_RAM_SIZE (8192 * 1024)
-
 /***************************************
  *
  *  definitions
@@ -2853,7 +2851,8 @@ static void cirrus_init_common(CirrusVGA
 
     /* I/O handler for LFB */
     memory_region_init_io(&s->cirrus_linear_io, &cirrus_linear_io_ops, s,
-                          "cirrus-linear-io", VGA_RAM_SIZE);
+                          "cirrus-linear-io", s->vga.vram_size_mb
+                                              * 1024 * 1024);
 
     /* I/O handler for LFB */
     memory_region_init_io(&s->cirrus_linear_bitblt_io,
@@ -2893,7 +2892,6 @@ static int vga_initfn(ISADevice *dev)
     ISACirrusVGAState *d = DO_UPCAST(ISACirrusVGAState, dev, dev);
     VGACommonState *s = &d->cirrus_vga.vga;
 
-    s->vram_size_mb = VGA_RAM_SIZE >> 20;
     vga_common_init(s);
     cirrus_init_common(&d->cirrus_vga, CIRRUS_ID_CLGD5430, 0,
                        isa_address_space(dev));
@@ -2906,6 +2904,12 @@ static int vga_initfn(ISADevice *dev)
     return 0;
 }
 
+static Property isa_vga_cirrus_properties[] = {
+    DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
+                       cirrus_vga.vga.vram_size_mb, 8),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
 {
     ISADeviceClass *k = ISA_DEVICE_CLASS(klass);
@@ -2913,6 +2917,7 @@ static void isa_cirrus_vga_class_init(Ob
 
     dc->vmsd  = &vmstate_cirrus_vga;
     k->init   = vga_initfn;
+    dc->props = isa_vga_cirrus_properties;
 }
 
 static TypeInfo isa_cirrus_vga_info = {
@@ -2936,7 +2941,6 @@ static int pci_cirrus_vga_initfn(PCIDevi
      int16_t device_id = pc->device_id;
 
      /* setup VGA */
-     s->vga.vram_size_mb = VGA_RAM_SIZE >> 20;
      vga_common_init(&s->vga);
      cirrus_init_common(s, device_id, 1, pci_address_space(dev));
      s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
@@ -2968,6 +2972,12 @@ DeviceState *pci_cirrus_vga_init(PCIBus 
     return &pci_create_simple(bus, -1, "cirrus-vga")->qdev;
 }
 
+static Property pci_vga_cirrus_properties[] = {
+    DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
+                       cirrus_vga.vga.vram_size_mb, 8),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 static void cirrus_vga_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -2981,6 +2991,7 @@ static void cirrus_vga_class_init(Object
     k->class_id = PCI_CLASS_DISPLAY_VGA;
     dc->desc = "Cirrus CLGD 54xx VGA";
     dc->vmsd = &vmstate_pci_cirrus_vga;
+    dc->props = pci_vga_cirrus_properties;
 }
 
 static TypeInfo cirrus_vga_info = {

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

* [Qemu-devel] [patch 2/7] Use machine options to emulate -no-kvm-irqchip
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit Marcelo Tosatti
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 02_qemukvm-compat-nokvmirqchip --]
[-- Type: text/plain, Size: 1516 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port -no-kvm-irqchip option.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/vl.c
===================================================================
--- qemu-compat-kvm.orig/vl.c
+++ qemu-compat-kvm/vl.c
@@ -2470,6 +2470,11 @@ int main(int argc, char **argv, char **e
             case QEMU_OPTION_M:
                 machine = machine_parse(optarg);
                 break;
+            case QEMU_OPTION_no_kvm_irqchip: {
+                olist = qemu_find_opts("machine");
+                qemu_opts_parse(olist, "kernel_irqchip=off", 0);
+                break;
+            }
             case QEMU_OPTION_cpu:
                 /* hw initialization will check this */
                 cpu_model = optarg;
Index: qemu-compat-kvm/qemu-options.hx
===================================================================
--- qemu-compat-kvm.orig/qemu-options.hx
+++ qemu-compat-kvm/qemu-options.hx
@@ -2838,6 +2838,9 @@ STEXI
 Enable FIPS 140-2 compliance mode.
 ETEXI
 
+HXCOMM Deprecated by -machine kernel_irqchip=on|off property
+DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
+
 HXCOMM This is the last statement. Insert new options before this line!
 STEXI
 @end table

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

* [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 2/7] Use machine options to emulate -no-kvm-irqchip Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:23   ` Jan Kiszka
  2012-10-05 17:13 ` [Qemu-devel] [patch 4/7] Use global properties to emulate -no-kvm-pit-reinjection Marcelo Tosatti
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 03_qemukvm-compat-nokvmpit --]
[-- Type: text/plain, Size: 1485 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port -no-kvm-pit option.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/vl.c
===================================================================
--- qemu-compat-kvm.orig/vl.c
+++ qemu-compat-kvm/vl.c
@@ -3066,6 +3066,11 @@ int main(int argc, char **argv, char **e
                     machine = machine_parse(optarg);
                 }
                 break;
+            case QEMU_OPTION_no_kvm_pit: {
+                fprintf(stderr, "Warning: KVM PIT can no longer be disabled "
+                                "separately.\n");
+                break;
+            }
             case QEMU_OPTION_usb:
                 usb_enabled = 1;
                 break;
Index: qemu-compat-kvm/qemu-options.hx
===================================================================
--- qemu-compat-kvm.orig/qemu-options.hx
+++ qemu-compat-kvm/qemu-options.hx
@@ -2838,6 +2838,9 @@ STEXI
 Enable FIPS 140-2 compliance mode.
 ETEXI
 
+HXCOMM Deprecated (ignored)
+DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
+
 HXCOMM Deprecated by -machine kernel_irqchip=on|off property
 DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
 

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

* [Qemu-devel] [patch 4/7] Use global properties to emulate -no-kvm-pit-reinjection
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
                   ` (2 preceding siblings ...)
  2012-10-05 17:13 ` [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:13 ` [Qemu-devel] [patch 5/7] Emulate qemu-kvms drive parameter boot=on|off Marcelo Tosatti
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 04_qemukvm-nokvmpit-reinjection --]
[-- Type: text/plain, Size: 1928 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port -no-kvm-pit-reinjection.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/vl.c
===================================================================
--- qemu-compat-kvm.orig/vl.c
+++ qemu-compat-kvm/vl.c
@@ -3071,6 +3071,21 @@ int main(int argc, char **argv, char **e
                                 "separately.\n");
                 break;
             }
+            case QEMU_OPTION_no_kvm_pit_reinjection: {
+                static GlobalProperty kvm_pit_lost_tick_policy[] = {
+                    {
+                        .driver   = "kvm-pit",
+                        .property = "lost_tick_policy",
+                        .value    = "discard",
+                    },
+                    { /* end of list */ }
+                };
+
+                fprintf(stderr, "Warning: option deprecated, use "
+                        "lost_tick_policy property of kvm-pit instead.\n");
+                qdev_prop_register_global_list(kvm_pit_lost_tick_policy);
+                break;
+            }
             case QEMU_OPTION_usb:
                 usb_enabled = 1;
                 break;
Index: qemu-compat-kvm/qemu-options.hx
===================================================================
--- qemu-compat-kvm.orig/qemu-options.hx
+++ qemu-compat-kvm/qemu-options.hx
@@ -2838,6 +2838,10 @@ STEXI
 Enable FIPS 140-2 compliance mode.
 ETEXI
 
+HXCOMM Deprecated by kvm-pit driver properties
+DEF("no-kvm-pit-reinjection", HAS_ARG, QEMU_OPTION_no_kvm_pit_reinjection,
+    "", QEMU_ARCH_I386)
+
 HXCOMM Deprecated (ignored)
 DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
 

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

* [Qemu-devel] [patch 5/7] Emulate qemu-kvms drive parameter boot=on|off
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
                   ` (3 preceding siblings ...)
  2012-10-05 17:13 ` [Qemu-devel] [patch 4/7] Use global properties to emulate -no-kvm-pit-reinjection Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:24   ` Jan Kiszka
  2012-10-05 17:13 ` [Qemu-devel] [patch 6/7] Emulate qemu-kvms -tdf option Marcelo Tosatti
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 05_qemukvm-commandline-boot-option --]
[-- Type: text/plain, Size: 1861 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port drive boot option. From the qemu-kvm original commit message:

We do not want to maintain this option forever. It will be removed after
a grace period of a few releases. So warn the user that this option has
no effect and will become invalid soon.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/blockdev.c
===================================================================
--- qemu-compat-kvm.orig/blockdev.c
+++ qemu-compat-kvm/blockdev.c
@@ -432,6 +432,12 @@ DriveInfo *drive_init(QemuOpts *opts, in
         return NULL;
     }
 
+    if (qemu_opt_get(opts, "boot") != NULL) {
+        fprintf(stderr, "qemu-kvm: boot=on|off is deprecated and will be "
+                "ignored. Future versions will reject this parameter. Please "
+                "update your scripts.\n");
+    }
+
     on_write_error = BLOCK_ERR_STOP_ENOSPC;
     if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
         if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type != IF_NONE) {
Index: qemu-compat-kvm/qemu-config.c
===================================================================
--- qemu-compat-kvm.orig/qemu-config.c
+++ qemu-compat-kvm/qemu-config.c
@@ -114,6 +114,10 @@ static QemuOptsList qemu_drive_opts = {
             .name = "copy-on-read",
             .type = QEMU_OPT_BOOL,
             .help = "copy read data from backing file into image file",
+        },{
+            .name = "boot",
+            .type = QEMU_OPT_BOOL,
+            .help = "(deprecated, ignored)",
         },
         { /* end of list */ }
     },

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

* [Qemu-devel] [patch 6/7] Emulate qemu-kvms -tdf option
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
                   ` (4 preceding siblings ...)
  2012-10-05 17:13 ` [Qemu-devel] [patch 5/7] Emulate qemu-kvms drive parameter boot=on|off Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:24   ` Jan Kiszka
  2012-10-05 17:13 ` [Qemu-devel] [patch 7/7] Emulate qemu-kvms -no-kvm option Marcelo Tosatti
  2012-10-05 17:25 ` [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Jan Kiszka
  7 siblings, 1 reply; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 06_qemukvm-commandline-opt-tdf --]
[-- Type: text/plain, Size: 1530 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port -tdf option.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/vl.c
===================================================================
--- qemu-compat-kvm.orig/vl.c
+++ qemu-compat-kvm/vl.c
@@ -3169,6 +3169,10 @@ int main(int argc, char **argv, char **e
             case QEMU_OPTION_semihosting:
                 semihosting_enabled = 1;
                 break;
+            case QEMU_OPTION_tdf:
+                fprintf(stderr, "Warning: user space PIT time drift fix "
+                                "is no longer supported.\n");
+                break;
             case QEMU_OPTION_name:
                 qemu_name = g_strdup(optarg);
 		 {
Index: qemu-compat-kvm/qemu-options.hx
===================================================================
--- qemu-compat-kvm.orig/qemu-options.hx
+++ qemu-compat-kvm/qemu-options.hx
@@ -2848,6 +2848,9 @@ DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_n
 HXCOMM Deprecated by -machine kernel_irqchip=on|off property
 DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
 
+HXCOMM Deprecated (ignored)
+DEF("tdf", 0, QEMU_OPTION_tdf,"", QEMU_ARCH_ALL)
+
 HXCOMM This is the last statement. Insert new options before this line!
 STEXI
 @end table

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

* [Qemu-devel] [patch 7/7] Emulate qemu-kvms -no-kvm option
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
                   ` (5 preceding siblings ...)
  2012-10-05 17:13 ` [Qemu-devel] [patch 6/7] Emulate qemu-kvms -tdf option Marcelo Tosatti
@ 2012-10-05 17:13 ` Marcelo Tosatti
  2012-10-05 17:25 ` [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Jan Kiszka
  7 siblings, 0 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 07_qemukvm-commandline-opt-notdf --]
[-- Type: text/plain, Size: 1539 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port -no-kvm option.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/vl.c
===================================================================
--- qemu-compat-kvm.orig/vl.c
+++ qemu-compat-kvm/vl.c
@@ -3066,6 +3066,10 @@ int main(int argc, char **argv, char **e
                     machine = machine_parse(optarg);
                 }
                 break;
+             case QEMU_OPTION_no_kvm:
+                olist = qemu_find_opts("machine");
+                qemu_opts_parse(olist, "accel=tcg", 0);
+                break;
             case QEMU_OPTION_no_kvm_pit: {
                 fprintf(stderr, "Warning: KVM PIT can no longer be disabled "
                                 "separately.\n");
Index: qemu-compat-kvm/qemu-options.hx
===================================================================
--- qemu-compat-kvm.orig/qemu-options.hx
+++ qemu-compat-kvm/qemu-options.hx
@@ -2838,6 +2838,9 @@ STEXI
 Enable FIPS 140-2 compliance mode.
 ETEXI
 
+HXCOMM Deprecated by -machine accel=tcg property
+DEF("no-kvm", HAS_ARG, QEMU_OPTION_no_kvm, "", QEMU_ARCH_I386)
+
 HXCOMM Deprecated by kvm-pit driver properties
 DEF("no-kvm-pit-reinjection", HAS_ARG, QEMU_OPTION_no_kvm_pit_reinjection,
     "", QEMU_ARCH_I386)

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

* Re: [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit
  2012-10-05 17:13 ` [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit Marcelo Tosatti
@ 2012-10-05 17:23   ` Jan Kiszka
  2012-10-05 17:28     ` Marcelo Tosatti
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2012-10-05 17:23 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann

On 2012-10-05 19:13, Marcelo Tosatti wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Releases of qemu-kvm will be interrupted at qemu 1.3.0.
> Users should switch to plain qemu releases.
> To avoid breaking scenarios which are setup with command line
> options specific to qemu-kvm, port these switches from qemu-kvm
> to qemu.git.
> 
> Port -no-kvm-pit option.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> Index: qemu-compat-kvm/vl.c
> ===================================================================
> --- qemu-compat-kvm.orig/vl.c
> +++ qemu-compat-kvm/vl.c
> @@ -3066,6 +3066,11 @@ int main(int argc, char **argv, char **e
>                      machine = machine_parse(optarg);
>                  }
>                  break;
> +            case QEMU_OPTION_no_kvm_pit: {
> +                fprintf(stderr, "Warning: KVM PIT can no longer be disabled "
> +                                "separately.\n");
> +                break;
> +            }
>              case QEMU_OPTION_usb:
>                  usb_enabled = 1;
>                  break;
> Index: qemu-compat-kvm/qemu-options.hx
> ===================================================================
> --- qemu-compat-kvm.orig/qemu-options.hx
> +++ qemu-compat-kvm/qemu-options.hx
> @@ -2838,6 +2838,9 @@ STEXI
>  Enable FIPS 140-2 compliance mode.
>  ETEXI
>  
> +HXCOMM Deprecated (ignored)
> +DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
> +
>  HXCOMM Deprecated by -machine kernel_irqchip=on|off property
>  DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
>  
> 
> 

This doesn't emulate anything. It just adds a warning that some long
disabled option was used.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

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

* Re: [Qemu-devel] [patch 5/7] Emulate qemu-kvms drive parameter boot=on|off
  2012-10-05 17:13 ` [Qemu-devel] [patch 5/7] Emulate qemu-kvms drive parameter boot=on|off Marcelo Tosatti
@ 2012-10-05 17:24   ` Jan Kiszka
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Kiszka @ 2012-10-05 17:24 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann

On 2012-10-05 19:13, Marcelo Tosatti wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Releases of qemu-kvm will be interrupted at qemu 1.3.0.
> Users should switch to plain qemu releases.
> To avoid breaking scenarios which are setup with command line
> options specific to qemu-kvm, port these switches from qemu-kvm
> to qemu.git.
> 
> Port drive boot option. From the qemu-kvm original commit message:
> 
> We do not want to maintain this option forever. It will be removed after
> a grace period of a few releases. So warn the user that this option has
> no effect and will become invalid soon.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> Index: qemu-compat-kvm/blockdev.c
> ===================================================================
> --- qemu-compat-kvm.orig/blockdev.c
> +++ qemu-compat-kvm/blockdev.c
> @@ -432,6 +432,12 @@ DriveInfo *drive_init(QemuOpts *opts, in
>          return NULL;
>      }
>  
> +    if (qemu_opt_get(opts, "boot") != NULL) {
> +        fprintf(stderr, "qemu-kvm: boot=on|off is deprecated and will be "
> +                "ignored. Future versions will reject this parameter. Please "
> +                "update your scripts.\n");
> +    }
> +
>      on_write_error = BLOCK_ERR_STOP_ENOSPC;
>      if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
>          if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type != IF_NONE) {
> Index: qemu-compat-kvm/qemu-config.c
> ===================================================================
> --- qemu-compat-kvm.orig/qemu-config.c
> +++ qemu-compat-kvm/qemu-config.c
> @@ -114,6 +114,10 @@ static QemuOptsList qemu_drive_opts = {
>              .name = "copy-on-read",
>              .type = QEMU_OPT_BOOL,
>              .help = "copy read data from backing file into image file",
> +        },{
> +            .name = "boot",
> +            .type = QEMU_OPT_BOOL,
> +            .help = "(deprecated, ignored)",
>          },
>          { /* end of list */ }
>      },
> 
> 

Same as with patch 3: nothing is emulated, only a warning issued.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

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

* Re: [Qemu-devel] [patch 6/7] Emulate qemu-kvms -tdf option
  2012-10-05 17:13 ` [Qemu-devel] [patch 6/7] Emulate qemu-kvms -tdf option Marcelo Tosatti
@ 2012-10-05 17:24   ` Jan Kiszka
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Kiszka @ 2012-10-05 17:24 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann

On 2012-10-05 19:13, Marcelo Tosatti wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Releases of qemu-kvm will be interrupted at qemu 1.3.0.
> Users should switch to plain qemu releases.
> To avoid breaking scenarios which are setup with command line
> options specific to qemu-kvm, port these switches from qemu-kvm
> to qemu.git.
> 
> Port -tdf option.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> Index: qemu-compat-kvm/vl.c
> ===================================================================
> --- qemu-compat-kvm.orig/vl.c
> +++ qemu-compat-kvm/vl.c
> @@ -3169,6 +3169,10 @@ int main(int argc, char **argv, char **e
>              case QEMU_OPTION_semihosting:
>                  semihosting_enabled = 1;
>                  break;
> +            case QEMU_OPTION_tdf:
> +                fprintf(stderr, "Warning: user space PIT time drift fix "
> +                                "is no longer supported.\n");
> +                break;
>              case QEMU_OPTION_name:
>                  qemu_name = g_strdup(optarg);
>  		 {
> Index: qemu-compat-kvm/qemu-options.hx
> ===================================================================
> --- qemu-compat-kvm.orig/qemu-options.hx
> +++ qemu-compat-kvm/qemu-options.hx
> @@ -2848,6 +2848,9 @@ DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_n
>  HXCOMM Deprecated by -machine kernel_irqchip=on|off property
>  DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
>  
> +HXCOMM Deprecated (ignored)
> +DEF("tdf", 0, QEMU_OPTION_tdf,"", QEMU_ARCH_ALL)
> +
>  HXCOMM This is the last statement. Insert new options before this line!
>  STEXI
>  @end table
> 
> 

No emulation here either.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

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

* Re: [Qemu-devel] [patch 0/7] qemu-kvm compat (v2)
  2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
                   ` (6 preceding siblings ...)
  2012-10-05 17:13 ` [Qemu-devel] [patch 7/7] Emulate qemu-kvms -no-kvm option Marcelo Tosatti
@ 2012-10-05 17:25 ` Jan Kiszka
  2012-10-05 17:28   ` Marcelo Tosatti
  7 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2012-10-05 17:25 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann

On 2012-10-05 19:13, Marcelo Tosatti wrote:
> As discussed on this weeks qemu call, follows qemu-kvm compat patches
> for qemu:
> 
>     - command line compatibility
>     - allow configurable ram size for cirrus
> 
> Jan, please ACK.

Ack except for the misleading subjects.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

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

* Re: [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit
  2012-10-05 17:23   ` Jan Kiszka
@ 2012-10-05 17:28     ` Marcelo Tosatti
  2012-10-05 17:36       ` Jan Kiszka
  0 siblings, 1 reply; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:28 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann

On Fri, Oct 05, 2012 at 07:23:26PM +0200, Jan Kiszka wrote:
> On 2012-10-05 19:13, Marcelo Tosatti wrote:
> > From: Jan Kiszka <jan.kiszka@siemens.com>
> > 
> > Releases of qemu-kvm will be interrupted at qemu 1.3.0.
> > Users should switch to plain qemu releases.
> > To avoid breaking scenarios which are setup with command line
> > options specific to qemu-kvm, port these switches from qemu-kvm
> > to qemu.git.
> > 
> > Port -no-kvm-pit option.
> > 
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> > 
> > Index: qemu-compat-kvm/vl.c
> > ===================================================================
> > --- qemu-compat-kvm.orig/vl.c
> > +++ qemu-compat-kvm/vl.c
> > @@ -3066,6 +3066,11 @@ int main(int argc, char **argv, char **e
> >                      machine = machine_parse(optarg);
> >                  }
> >                  break;
> > +            case QEMU_OPTION_no_kvm_pit: {
> > +                fprintf(stderr, "Warning: KVM PIT can no longer be disabled "
> > +                                "separately.\n");
> > +                break;
> > +            }
> >              case QEMU_OPTION_usb:
> >                  usb_enabled = 1;
> >                  break;
> > Index: qemu-compat-kvm/qemu-options.hx
> > ===================================================================
> > --- qemu-compat-kvm.orig/qemu-options.hx
> > +++ qemu-compat-kvm/qemu-options.hx
> > @@ -2838,6 +2838,9 @@ STEXI
> >  Enable FIPS 140-2 compliance mode.
> >  ETEXI
> >  
> > +HXCOMM Deprecated (ignored)
> > +DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
> > +
> >  HXCOMM Deprecated by -machine kernel_irqchip=on|off property
> >  DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
> >  
> > 
> > 
> 
> This doesn't emulate anything. It just adds a warning that some long
> disabled option was used.
> 
> Jan

It emulates the command line switch. In my mind, "printing a warning"
can be considered "emulating a command from qemu-kvm". If you prefer 
something else, please let me know the best wording.

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

* Re: [Qemu-devel] [patch 0/7] qemu-kvm compat (v2)
  2012-10-05 17:25 ` [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Jan Kiszka
@ 2012-10-05 17:28   ` Marcelo Tosatti
  0 siblings, 0 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:28 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann

On Fri, Oct 05, 2012 at 07:25:05PM +0200, Jan Kiszka wrote:
> On 2012-10-05 19:13, Marcelo Tosatti wrote:
> > As discussed on this weeks qemu call, follows qemu-kvm compat patches
> > for qemu:
> > 
> >     - command line compatibility
> >     - allow configurable ram size for cirrus
> > 
> > Jan, please ACK.
> 
> Ack except for the misleading subjects.
> 
> Jan

Let me know if you a respin (and the suggestion if so).

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

* Re: [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit
  2012-10-05 17:28     ` Marcelo Tosatti
@ 2012-10-05 17:36       ` Jan Kiszka
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Kiszka @ 2012-10-05 17:36 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, qemu-devel@nongnu.org, Gerd Hoffmann

On 2012-10-05 19:28, Marcelo Tosatti wrote:
> On Fri, Oct 05, 2012 at 07:23:26PM +0200, Jan Kiszka wrote:
>> On 2012-10-05 19:13, Marcelo Tosatti wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Releases of qemu-kvm will be interrupted at qemu 1.3.0.
>>> Users should switch to plain qemu releases.
>>> To avoid breaking scenarios which are setup with command line
>>> options specific to qemu-kvm, port these switches from qemu-kvm
>>> to qemu.git.
>>>
>>> Port -no-kvm-pit option.
>>>
>>> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>>>
>>> Index: qemu-compat-kvm/vl.c
>>> ===================================================================
>>> --- qemu-compat-kvm.orig/vl.c
>>> +++ qemu-compat-kvm/vl.c
>>> @@ -3066,6 +3066,11 @@ int main(int argc, char **argv, char **e
>>>                      machine = machine_parse(optarg);
>>>                  }
>>>                  break;
>>> +            case QEMU_OPTION_no_kvm_pit: {
>>> +                fprintf(stderr, "Warning: KVM PIT can no longer be disabled "
>>> +                                "separately.\n");
>>> +                break;
>>> +            }
>>>              case QEMU_OPTION_usb:
>>>                  usb_enabled = 1;
>>>                  break;
>>> Index: qemu-compat-kvm/qemu-options.hx
>>> ===================================================================
>>> --- qemu-compat-kvm.orig/qemu-options.hx
>>> +++ qemu-compat-kvm/qemu-options.hx
>>> @@ -2838,6 +2838,9 @@ STEXI
>>>  Enable FIPS 140-2 compliance mode.
>>>  ETEXI
>>>  
>>> +HXCOMM Deprecated (ignored)
>>> +DEF("no-kvm-pit", HAS_ARG, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
>>> +
>>>  HXCOMM Deprecated by -machine kernel_irqchip=on|off property
>>>  DEF("no-kvm-irqchip", HAS_ARG, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
>>>  
>>>
>>>
>>
>> This doesn't emulate anything. It just adds a warning that some long
>> disabled option was used.
>>
>> Jan
> 
> It emulates the command line switch. In my mind, "printing a warning"
> can be considered "emulating a command from qemu-kvm". If you prefer 
> something else, please let me know the best wording.
> 

"Use machine options to emulate..." makes no sense for those
warning-only switches. It makes sense where we translate them and
register the corresponding machine options.

So call this "Issue warning when deprecated -bla is used" or so.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

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

* [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size
  2012-10-05 17:51 [Qemu-devel] [patch 0/7] qemu-kvm compat (v3) Marcelo Tosatti
@ 2012-10-05 17:51 ` Marcelo Tosatti
  2012-10-08  7:50   ` Gerd Hoffmann
  0 siblings, 1 reply; 17+ messages in thread
From: Marcelo Tosatti @ 2012-10-05 17:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marcelo Tosatti, Jan Kiszka, Gerd Hoffmann

[-- Attachment #1: 01_cirrus-add-configurable-memsize --]
[-- Type: text/plain, Size: 3015 bytes --]

Allow RAM size to be configurable for cirrus, to allow migration 
compatibility from qemu-kvm.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-compat-kvm/hw/cirrus_vga.c
===================================================================
--- qemu-compat-kvm.orig/hw/cirrus_vga.c
+++ qemu-compat-kvm/hw/cirrus_vga.c
@@ -43,8 +43,6 @@
 //#define DEBUG_CIRRUS
 //#define DEBUG_BITBLT
 
-#define VGA_RAM_SIZE (8192 * 1024)
-
 /***************************************
  *
  *  definitions
@@ -2853,7 +2851,8 @@ static void cirrus_init_common(CirrusVGA
 
     /* I/O handler for LFB */
     memory_region_init_io(&s->cirrus_linear_io, &cirrus_linear_io_ops, s,
-                          "cirrus-linear-io", VGA_RAM_SIZE);
+                          "cirrus-linear-io", s->vga.vram_size_mb
+                                              * 1024 * 1024);
 
     /* I/O handler for LFB */
     memory_region_init_io(&s->cirrus_linear_bitblt_io,
@@ -2893,7 +2892,6 @@ static int vga_initfn(ISADevice *dev)
     ISACirrusVGAState *d = DO_UPCAST(ISACirrusVGAState, dev, dev);
     VGACommonState *s = &d->cirrus_vga.vga;
 
-    s->vram_size_mb = VGA_RAM_SIZE >> 20;
     vga_common_init(s);
     cirrus_init_common(&d->cirrus_vga, CIRRUS_ID_CLGD5430, 0,
                        isa_address_space(dev));
@@ -2906,6 +2904,12 @@ static int vga_initfn(ISADevice *dev)
     return 0;
 }
 
+static Property isa_vga_cirrus_properties[] = {
+    DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
+                       cirrus_vga.vga.vram_size_mb, 8),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
 {
     ISADeviceClass *k = ISA_DEVICE_CLASS(klass);
@@ -2913,6 +2917,7 @@ static void isa_cirrus_vga_class_init(Ob
 
     dc->vmsd  = &vmstate_cirrus_vga;
     k->init   = vga_initfn;
+    dc->props = isa_vga_cirrus_properties;
 }
 
 static TypeInfo isa_cirrus_vga_info = {
@@ -2936,7 +2941,6 @@ static int pci_cirrus_vga_initfn(PCIDevi
      int16_t device_id = pc->device_id;
 
      /* setup VGA */
-     s->vga.vram_size_mb = VGA_RAM_SIZE >> 20;
      vga_common_init(&s->vga);
      cirrus_init_common(s, device_id, 1, pci_address_space(dev));
      s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
@@ -2968,6 +2972,12 @@ DeviceState *pci_cirrus_vga_init(PCIBus 
     return &pci_create_simple(bus, -1, "cirrus-vga")->qdev;
 }
 
+static Property pci_vga_cirrus_properties[] = {
+    DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
+                       cirrus_vga.vga.vram_size_mb, 8),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 static void cirrus_vga_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -2981,6 +2991,7 @@ static void cirrus_vga_class_init(Object
     k->class_id = PCI_CLASS_DISPLAY_VGA;
     dc->desc = "Cirrus CLGD 54xx VGA";
     dc->vmsd = &vmstate_pci_cirrus_vga;
+    dc->props = pci_vga_cirrus_properties;
 }
 
 static TypeInfo cirrus_vga_info = {

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

* Re: [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size
  2012-10-05 17:51 ` [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size Marcelo Tosatti
@ 2012-10-08  7:50   ` Gerd Hoffmann
  0 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-10-08  7:50 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, Jan Kiszka, qemu-devel

On 10/05/12 19:51, Marcelo Tosatti wrote:
> Allow RAM size to be configurable for cirrus, to allow migration 
> compatibility from qemu-kvm.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd

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

end of thread, other threads:[~2012-10-08  7:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 17:13 [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Marcelo Tosatti
2012-10-05 17:13 ` [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size Marcelo Tosatti
2012-10-05 17:13 ` [Qemu-devel] [patch 2/7] Use machine options to emulate -no-kvm-irqchip Marcelo Tosatti
2012-10-05 17:13 ` [Qemu-devel] [patch 3/7] Use machine options to emulate -no-kvm-pit Marcelo Tosatti
2012-10-05 17:23   ` Jan Kiszka
2012-10-05 17:28     ` Marcelo Tosatti
2012-10-05 17:36       ` Jan Kiszka
2012-10-05 17:13 ` [Qemu-devel] [patch 4/7] Use global properties to emulate -no-kvm-pit-reinjection Marcelo Tosatti
2012-10-05 17:13 ` [Qemu-devel] [patch 5/7] Emulate qemu-kvms drive parameter boot=on|off Marcelo Tosatti
2012-10-05 17:24   ` Jan Kiszka
2012-10-05 17:13 ` [Qemu-devel] [patch 6/7] Emulate qemu-kvms -tdf option Marcelo Tosatti
2012-10-05 17:24   ` Jan Kiszka
2012-10-05 17:13 ` [Qemu-devel] [patch 7/7] Emulate qemu-kvms -no-kvm option Marcelo Tosatti
2012-10-05 17:25 ` [Qemu-devel] [patch 0/7] qemu-kvm compat (v2) Jan Kiszka
2012-10-05 17:28   ` Marcelo Tosatti
  -- strict thread matches above, loose matches on Subject: below --
2012-10-05 17:51 [Qemu-devel] [patch 0/7] qemu-kvm compat (v3) Marcelo Tosatti
2012-10-05 17:51 ` [Qemu-devel] [patch 1/7] cirrus_vga: allow configurable vram size Marcelo Tosatti
2012-10-08  7:50   ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).