Patchwork [4/7] Use global properties to emulate -no-kvm-pit-reinjection

login
register
mail settings
Submitter Marcelo Tosatti
Date Oct. 5, 2012, 5:13 p.m.
Message ID <20121005171442.420987358@amt.cnet>
Download mbox | patch
Permalink /patch/189550/
State New
Headers show

Comments

Marcelo Tosatti - Oct. 5, 2012, 5:13 p.m.
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>

Patch

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)