cli: Remove mentions of legacy '-machine foo, accel=bar' command line
cover cli: Remove mentions of legacy '-machine foo, accel=bar' command line
Thomas told '-machine foo,accel=bar' is sugar and almost deprecated. Rather than having bad examples in the tree, remove the legacy form and update to the new '-accel bar' one.
Xen uses via MachineClass::default_machine_opts left for later:
hw/i386/pc_piix.c:818: m->default_machine_opts = "accel=xen,suppress-vmdesc=on";hw/i386/pc_piix.c:830: m->default_machine_opts = "accel=xen,suppress-vmdesc=on";hw/xen/xen-pvh-common.c:381: mc->default_machine_opts = "accel=xen";hw/xenpv/xen_machine_pv.c:69: mc->default_machine_opts = "accel=xen";
Philippe Mathieu-Daudé (7):
tests/functional/test_ppc64_hv: Remove legacy '-machine foo,accel=bar' tests/functional/test_virtio_gpu: Remove legacy '-machine
foo,accel=bar'
tests/qtest/fuzz: Remove legacy '-machine foo,accel=bar' scripts/device-crash-test: Remove legacy '-machine foo,accel=bar' accel/tcg: Remove mentions of legacy '-machine foo,accel=bar' accel/kvm: Remove mentions of legacy '-machine foo,accel=bar'
qemu-options: Remove mentions of legacy '-machine foo,accel=bar'
docs/about/removed-features.rst | 2 +- docs/bypass-iommu.txt | 3 ++- docs/nvdimm.txt | 2 +- docs/specs/tpm.rst | 2 +- docs/system/arm/cpu-features.rst | 2 +- docs/system/cpu-hotplug.rst | 2 +- docs/system/ppc/powernv.rst | 2 +- docs/system/ppc/pseries.rst | 4 ++-- linux-user/s390x/target_proc.h | 2 +- accel/tcg/monitor.c | 4 ++-- system/vl.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/i440fx_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- tests/qtest/qmp-cmd-test.c | 2 +- qemu-options.hx | 9 --------- scripts/device-crash-test | 11 ++++++++--- scripts/oss-fuzz/output_reproducer.py | 2 -- scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py | 6 +++--- tests/functional/test_ppc64_hv.py | 3 ++- tests/functional/test_virtio_gpu.py | 6 ++++-- 21 files changed, 35 insertions(+), 37 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/7 tests/functional/test_ppc64_hv: Remove legacy '-machine foo, accel=bar'
Since commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in functional tests.
--- tests/functional/test_ppc64_hv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/functional/test_ppc64_hv.py +2 -1
@@ -138,7 +138,8 @@ def do_test_kvm(self, hpt=False): else: append = '' exec_command(self, 'qemu-system-ppc64 -nographic -smp 2 -m 1g ' - '-machine pseries,x-vof=on,accel=kvm ' + '-accel kvm ' + '-machine pseries,x-vof=on ' '-machine cap-cfpc=broken,cap-sbbc=broken,' 'cap-ibs=broken,cap-ccf-assist=off ' '-drive file=/dev/nvme0n1,format=raw,readonly=on '
Signature · 1 line
2.45.2
Re: [PATCH 1/7] tests/functional/test_ppc64_hv: Remove legacy '-machine foo,accel=bar'
Quoted 10 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in functional tests.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/functional/test_ppc64_hv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 1/7] tests/functional/test_ppc64_hv: Remove legacy '-machine foo,accel=bar'
In reply to Philippe Mathieu-DaudéQuoted 16 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in functional tests.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/functional/test_ppc64_hv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tests/functional/test_ppc64_hv.py +0
-0
tests/functional/test_ppc64_hv.py def do_test_kvm(self, hpt=False): · line 145
Quoted 9 lines
tests/functional/test_ppc64_hv.py +2
-1@@ -138,7 +138,8 @@ def do_test_kvm(self, hpt=False): else: append = '' exec_command(self, 'qemu-system-ppc64 -nographic -smp 2 -m 1g ' - '-machine pseries,x-vof=on,accel=kvm ' + '-accel kvm ' + '-machine pseries,x-vof=on ' '-machine cap-cfpc=broken,cap-sbbc=broken,' 'cap-ibs=broken,cap-ccf-assist=off ' '-drive file=/dev/nvme0n1,format=raw,readonly=on '
PATCH 2/7 tests/functional/test_virtio_gpu: Remove legacy '-machine foo, accel=bar'
In reply to Philippe Mathieu-DaudéSince commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in functional tests.
--- tests/functional/test_virtio_gpu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tests/functional/test_virtio_gpu.py +4 -2
@@ -61,7 +61,8 @@ def test_virtio_vga_virgl(self): self.vm.set_console() self.vm.add_args("-cpu", "host") self.vm.add_args("-m", "2G") - self.vm.add_args("-machine", "pc,accel=kvm") + self.vm.add_args('-accel', 'kvm') + self.vm.add_args("-machine", "pc") self.vm.add_args("-device", "virtio-vga-gl") self.vm.add_args("-display", "egl-headless") self.vm.add_args(
@@ -118,10 +119,11 @@ def test_vhost_user_vga_virgl(self): ) self.vm.set_console() + self.vm.add_args('-accel', 'kvm') self.vm.add_args("-cpu", "host") self.vm.add_args("-m", "2G") self.vm.add_args("-object", "memory-backend-memfd,id=mem,size=2G") - self.vm.add_args("-machine", "pc,memory-backend=mem,accel=kvm") + self.vm.add_args("-machine", "pc,memory-backend=mem") self.vm.add_args("-chardev", "socket,id=vug,fd=%d" % qemu_sock.fileno()) self.vm.add_args("-device", "vhost-user-vga,chardev=vug") self.vm.add_args("-display", "egl-headless")
Signature · 1 line
2.45.2
Re: [PATCH 2/7] tests/functional/test_virtio_gpu: Remove legacy '-machine foo,accel=bar'
Quoted 10 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in functional tests.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/functional/test_virtio_gpu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 2/7] tests/functional/test_virtio_gpu: Remove legacy '-machine foo,accel=bar'
In reply to Philippe Mathieu-DaudéQuoted 16 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in functional tests.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/functional/test_virtio_gpu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)tests/functional/test_virtio_gpu.py +0
-0
tests/functional/test_virtio_gpu.py def test_virtio_vga_virgl(self): · line 65
Quoted 6 lines
tests/functional/test_virtio_gpu.py +2
-1@@ -61,7 +61,8 @@ def test_virtio_vga_virgl(self): self.vm.set_console() self.vm.add_args("-cpu", "host") self.vm.add_args("-m", "2G") - self.vm.add_args("-machine", "pc,accel=kvm") + self.vm.add_args('-accel', 'kvm') + self.vm.add_args("-machine", "pc")
While you're at it, could you please change this test to use "self.set_machine('pc')" at the very beginning of the test function instead of using -machine pc here? That way the test gets properly skipped in case the machine is not available in the QEMU binary.
Thanks,
Thomas
Quoted 16 lines
tests/functional/test_virtio_gpu.py +2
-1self.vm.add_args("-device", "virtio-vga-gl") self.vm.add_args("-display", "egl-headless") self.vm.add_args(@@ -118,10 +119,11 @@ def test_vhost_user_vga_virgl(self): ) self.vm.set_console() + self.vm.add_args('-accel', 'kvm') self.vm.add_args("-cpu", "host") self.vm.add_args("-m", "2G") self.vm.add_args("-object", "memory-backend-memfd,id=mem,size=2G") - self.vm.add_args("-machine", "pc,memory-backend=mem,accel=kvm") + self.vm.add_args("-machine", "pc,memory-backend=mem") self.vm.add_args("-chardev", "socket,id=vug,fd=%d" % qemu_sock.fileno()) self.vm.add_args("-device", "vhost-user-vga,chardev=vug") self.vm.add_args("-display", "egl-headless")
PATCH 3/7 tests/qtest/fuzz: Remove legacy '-machine foo,accel=bar'
In reply to Philippe Mathieu-DaudéSince commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in fuzzer scripts and tests.
--- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/i440fx_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- scripts/oss-fuzz/output_reproducer.py | 2 -- scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py | 6 +++--- 5 files changed, 6 insertions(+), 8 deletions(-)
tests/qtest/fuzz/generic_fuzz.c +1 -1
@@ -919,7 +919,7 @@ static GString *generic_fuzz_cmdline(FuzzTarget *t)usage (); }g_string_append_printf (cmd_line," -display none \ --machine accel=qtest, \ +-accel qtest \ -m 512M %s " ,getenv ("QEMU_FUZZ_ARGS" ));return cmd_line; }
tests/qtest/fuzz/i440fx_fuzz.c +1 -1
@@ -145,7 +145,7 @@ static void i440fx_fuzz_qos(QTestState *s,pciconfig_fuzz_qos (s, bus, Data, Size); } -static const char *i440fx_qtest_argv =TARGET_NAME " -machine accel=qtest" +static const char *i440fx_qtest_argv =TARGET_NAME " -accel qtest" " -m 0 -display none" ;static GString *i440fx_argv (FuzzTarget *t) {
tests/qtest/fuzz/qos_fuzz.c +1 -1
@@ -84,7 +84,7 @@ static GString *qos_build_main_args(void) }/* Prepend the arguments that we need */ g_string_prepend (cmd_line, -TARGET_NAME " -display none -machine accel=qtest -m 64 " ); +TARGET_NAME " -display none -accel qtest -m 64 " );return cmd_line; }
scripts/oss-fuzz/output_reproducer.py +0 -2
@@ -64,8 +64,6 @@ def c_reproducer(name, args, trace): # libqtest will add its own qtest args, so get rid of them args = args.replace("-accel qtest","") - args = args.replace(",accel=qtest","") - args = args.replace("-machine accel=qtest","") args = args.replace("-qtest stdio","") result.append("""QTestState *s = qtest_init("{}");""".format(args)) for l in trace.splitlines():
scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py +3 -3
@@ -5,15 +5,15 @@ Use this to convert qtest log info from a generic fuzzer input into a qtest trace that you can feed into a standard qemu-system process. Example usage: -QEMU_FUZZ_ARGS="-machine q35,accel=qtest" QEMU_FUZZ_OBJECTS="*" \ +QEMU_FUZZ_ARGS="-machine q35 -accel qtest" QEMU_FUZZ_OBJECTS="*" \ ./i386-softmmu/qemu-fuzz-i386 --fuzz-target=generic-pci-fuzz # .. Finds some crash QTEST_LOG=1 FUZZ_SERIALIZE_QTEST=1 \ -QEMU_FUZZ_ARGS="-machine q35,accel=qtest" QEMU_FUZZ_OBJECTS="*" \ +QEMU_FUZZ_ARGS="-machine q35 -accel qtest" QEMU_FUZZ_OBJECTS="*" \ ./i386-softmmu/qemu-fuzz-i386 --fuzz-target=generic-pci-fuzz /path/to/crash 2> qtest_log_output scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py qtest_log_output > qtest_trace -./i386-softmmu/qemu-fuzz-i386 -machine q35,accel=qtest \ +./i386-softmmu/qemu-fuzz-i386 -machine q35 -accel qtest \ -qtest stdio < qtest_trace ### Details ###
Signature · 1 line
2.45.2
Re: [PATCH 3/7] tests/qtest/fuzz: Remove legacy '-machine foo,accel=bar'
Quoted 6 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in fuzzer scripts and tests.
Quoted 8 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/i440fx_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- scripts/oss-fuzz/output_reproducer.py | 2 -- scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py | 6 +++--- 5 files changed, 6 insertions(+), 8 deletions(-)
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 3/7] tests/qtest/fuzz: Remove legacy '-machine foo,accel=bar'
In reply to Philippe Mathieu-DaudéQuoted 6 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in fuzzer scripts and tests.
Quoted 8 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/i440fx_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- scripts/oss-fuzz/output_reproducer.py | 2 -- scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py | 6 +++--- 5 files changed, 6 insertions(+), 8 deletions(-)
PATCH 4/7 scripts/device-crash-test: Remove legacy '-machine foo, accel=bar'
In reply to Philippe Mathieu-DaudéSince commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in the device-crash-test script.
--- scripts/device-crash-test | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
scripts/device-crash-test +7 -2
@@ -295,7 +295,10 @@ class QemuBinaryInfo(object): self._machine_info = {} dbg("devtype: %r", devtype) - args = ['-S', '-machine', 'none,accel=kvm:tcg'] + args = ['-S', + '-machine', 'none', + '-accel', 'kvm:tcg', + ] dbg("querying info for QEMU binary: %s", binary) vm = QEMUMachine(binary=binary, args=args) vm.launch()
@@ -358,7 +361,9 @@ def checkOneCase(args, testcase): dbg("will test: %r", testcase) - args = ['-S', '-machine', '%s,accel=%s' % (machine, accel), + args = ['-S', + '-machine', machine, + '-accel', accel, '-device', qemuOptsEscape(device)] cmdline = ' '.join([binary] + args) dbg("will launch QEMU: %s", cmdline)
Signature · 1 line
2.45.2
Re: [PATCH 4/7] scripts/device-crash-test: Remove legacy '-machine foo,accel=bar'
Quoted 16 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in the device-crash-test script.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- scripts/device-crash-test | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)scripts/device-crash-test +0
-0
scripts/device-crash-test class QemuBinaryInfo(object): · line 300
Quoted 7 lines
scripts/device-crash-test +3
-1@@ -295,7 +295,10 @@ class QemuBinaryInfo(object): self._machine_info = {} dbg("devtype: %r", devtype) - args = ['-S', '-machine', 'none,accel=kvm:tcg'] + args = ['-S', + '-machine', 'none', + '-accel', 'kvm:tcg',
-accel doesn't work this way - that is legacy syntax sugar from -machine
You need multiple args:
-accel kvm -accel tcg
scripts/device-crash-test def checkOneCase(args, testcase): · line 366
Quoted 12 lines
scripts/device-crash-test +4
-1+ ] dbg("querying info for QEMU binary: %s", binary) vm = QEMUMachine(binary=binary, args=args) vm.launch()@@ -358,7 +361,9 @@ def checkOneCase(args, testcase): dbg("will test: %r", testcase) - args = ['-S', '-machine', '%s,accel=%s' % (machine, accel), + args = ['-S', + '-machine', machine, + '-accel', accel,
I've not checked what 'accel' value is - if that's another compound value like 'kvm:tcg', it'll need to be turned into an array, and expanded to multiple '-accel' args.
Quoted 6 lines
scripts/device-crash-test +0
-0'-device', qemuOptsEscape(device)] cmdline = ' '.join([binary] + args) dbg("will launch QEMU: %s", cmdline)Signature · 1 line
2.45.2
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
PATCH 5/7 accel/tcg: Remove mentions of legacy '-machine foo,accel=bar'
In reply to Philippe Mathieu-DaudéSince commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
Update the documentation when TCG is referred to.
--- docs/about/removed-features.rst | 2 +- linux-user/s390x/target_proc.h | 2 +- accel/tcg/monitor.c | 4 ++-- system/vl.c | 2 +- tests/qtest/qmp-cmd-test.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
docs/about/removed-features.rst +1 -1
@@ -216,7 +216,7 @@ The ``enforce-config-section`` property was replaced by the ``-no-kvm`` (removed in 5.2) '''''''''''''''''''''''''''' -The ``-no-kvm`` argument was a synonym for setting ``-machine accel=tcg``. +The ``-no-kvm`` argument was a synonym for setting ``-accel tcg``. ``-realtime`` (removed in 6.0) ''''''''''''''''''''''''''''''
linux-user/s390x/target_proc.h +1 -1
@@ -7,7 +7,7 @@#define S390X_TARGET_PROC_H /* -* Emulate what a Linux kernel running in qemu-system-s390x -M accel=tcg would +* Emulate what a Linux kernel running in 'qemu-system-s390x -accel tcg' would * show in /proc/cpuinfo. * * Skip the following in order to match the missing support in op_ecag():
accel/tcg/monitor.c +2 -2
@@ -204,7 +204,7 @@ HumanReadableText *qmp_x_query_jit(Error **errp)g_autoptr (GString) buf =g_string_new ("" );if (!tcg_enabled ()) { -error_setg (errp,"JIT information is only available with accel=tcg" ); +error_setg (errp,"JIT information is only available with TCG" );return NULL ; }
@@ -226,7 +226,7 @@ HumanReadableText *qmp_x_query_opcount(Error **errp)if (!tcg_enabled ()) {error_setg (errp, -"Opcode count information is only available with accel=tcg" ); +"Opcode count information is only available with TCG" );return NULL ; }
system/vl.c +1 -1
@@ -2385,7 +2385,7 @@ static void configure_accelerators(const char *progname)for (tmp = accel_list; *tmp; tmp++) {/* * Filter invalid accelerators here, to prevent obscenities -* such as "-machine accel=tcg,,thread=single". +* such as "-accel tcg,,thread=single". */ if (accel_find (*tmp)) {qemu_opts_parse_noisily (qemu_find_opts ("accel" ), *tmp, true);
tests/qtest/qmp-cmd-test.c +1 -1
@@ -49,7 +49,7 @@ static int query_error_class(const char *cmd) { "query-vm-generation-id", ERROR_CLASS_GENERIC_ERROR },/* Only valid with a USB bus added */ { "x-query-usb", ERROR_CLASS_GENERIC_ERROR }, -/* Only valid with accel=tcg */ +/* Only valid with TCG */ { "x-query-jit", ERROR_CLASS_GENERIC_ERROR }, { "x-query-opcount", ERROR_CLASS_GENERIC_ERROR }, { "xen-event-list", ERROR_CLASS_GENERIC_ERROR },
Signature · 1 line
2.45.2
Re: [PATCH 5/7] accel/tcg: Remove mentions of legacy '-machine foo,accel=bar'
Quoted 19 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Update the documentation when TCG is referred to.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- docs/about/removed-features.rst | 2 +- linux-user/s390x/target_proc.h | 2 +- accel/tcg/monitor.c | 4 ++-- system/vl.c | 2 +- tests/qtest/qmp-cmd-test.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)system/vl.c +0
-0
system/vl.c static void configure_accelerators(const char *progname) · line 2389
Quoted 6 lines
system/vl.c +1
-1@@ -2385,7 +2385,7 @@ static void configure_accelerators(const char *progname)for (tmp = accel_list; *tmp; tmp++) {/* * Filter invalid accelerators here, to prevent obscenities -* such as "-machine accel=tcg,,thread=single". +* such as "-accel tcg,,thread=single". */
I'm not sure I understand what the old message was trying to archive, but at the same time I'm even less convinced it makes sense to change the comment.
system/vl.c static void configure_accelerators(const char *progname) · line 2391
Quoted 2 lines
system/vl.c +0
-0if (accel_find (*tmp)) {qemu_opts_parse_noisily (qemu_find_opts ("accel" ), *tmp, true);
For all of the patch, except for that chunk above:
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
PATCH 6/7 accel/kvm: Remove mentions of legacy '-machine foo, accel=bar'
In reply to Philippe Mathieu-DaudéSince commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
Update the documentation when KVM is referred to.
--- docs/bypass-iommu.txt | 3 ++- docs/nvdimm.txt | 2 +- docs/specs/tpm.rst | 2 +- docs/system/arm/cpu-features.rst | 2 +- docs/system/cpu-hotplug.rst | 2 +- docs/system/ppc/powernv.rst | 2 +- docs/system/ppc/pseries.rst | 4 ++-- scripts/device-crash-test | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-)
docs/bypass-iommu.txt +2 -1
@@ -51,7 +51,8 @@ And we got: x86 architecture: qemu-system-x86_64 \ - -machine q35,accel=kvm,default_bus_bypass_iommu=true \ + -accel kvm \ + -machine q35,default_bus_bypass_iommu=true \ -device pxb-pcie,bus_nr=0x10,id=pci.10,bus=pcie.0,addr=0x3 \ -device pxb-pcie,bus_nr=0x20,id=pci.20,bus=pcie.0,addr=0x4,bypass_iommu=true \ -device intel-iommu \
docs/nvdimm.txt +1 -1
@@ -228,7 +228,7 @@ which allows the platform to communicate what features it supports related to NVDIMM data persistence. Users can provide a persistence value to a guest via the optional "nvdimm-persistence" machine command line option: - -machine pc,accel=kvm,nvdimm,nvdimm-persistence=cpu + -machine pc,nvdimm,nvdimm-persistence=cpu There are currently two valid values for this option:
docs/specs/tpm.rst +1 -1
@@ -329,7 +329,7 @@ In case a pSeries machine is emulated, use the following command line: .. code-block:: console - qemu-system-ppc64 -display sdl -machine pseries,accel=kvm \ + qemu-system-ppc64 -display sdl -accel kvm -machine pseries \ -m 1024 -bios slof.bin -boot menu=on \ -nodefaults -device VGA -device pci-ohci -device usb-kbd \ -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
docs/system/arm/cpu-features.rst +1 -1
@@ -329,7 +329,7 @@ SVE CPU Property Examples 3) When KVM is enabled, implicitly enable all host CPU supported vector lengths with the ``host`` CPU type:: - $ qemu-system-aarch64 -M virt,accel=kvm -cpu host + $ qemu-system-aarch64 -M virt -accel kvm -cpu host 4) Only enable the 128-bit vector length::
docs/system/cpu-hotplug.rst +1 -1
@@ -12,7 +12,7 @@ vCPU hotplug allow vCPU hotplug):: $ qemu-system-x86_64 -display none -no-user-config -m 2048 \ - -nodefaults -monitor stdio -machine pc,accel=kvm,usb=off \ + -nodefaults -monitor stdio -accel kvm -machine pc,usb=off \ -smp 1,maxcpus=2 -cpu IvyBridge-IBRS \ -qmp unix:/tmp/qmp-sock,server=on,wait=off
docs/system/ppc/powernv.rst +1 -1
@@ -63,7 +63,7 @@ powernv. kvm-pr in theory could be used as a valid accel option but this isn't supported by kvm-pr at this moment. To spare users from dealing with not so informative errors when attempting -to use accel=kvm, the powernv machine will throw an error informing that +to use '-accel kvm', the powernv machine will throw an error informing that KVM is not supported. This can be revisited in the future if kvm-pr (or any other KVM alternative) is usable as KVM accel for this machine.
docs/system/ppc/pseries.rst +2 -2
@@ -164,9 +164,9 @@ Currently, there are two implementations of KVM on Power, ``kvm_hv.ko`` and If a host supports both KVM modes, and both KVM kernel modules are loaded, it is possible to switch between the two modes with the ``kvm-type`` parameter: -* Use ``qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=PR`` to use the +* Use ``qemu-system-ppc64 -accel kvm -M pseries,kvm-type=PR`` to use the ``kvm_pr.ko`` kernel module. -* Use ``qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=HV`` to use ``kvm_hv.ko`` +* Use ``qemu-system-ppc64 -accel kvm -M pseries,kvm-type=HV`` to use ``kvm_hv.ko`` instead. KVM-PR
scripts/device-crash-test +1 -1
@@ -147,7 +147,7 @@ ERROR_RULE_LIST = [ # "spapr-cpu-core needs a pseries machine" {'machine':'(?!pseries).*', 'device':'.*-spapr-cpu-core', 'expected':True}, - # KVM-specific devices shouldn't be tried without accel=kvm: + # KVM-specific devices shouldn't be tried without '-accel kvm': {'accel':'(?!kvm).*', 'device':'kvmclock', 'expected':True}, # xen-specific machines and devices:
Signature · 1 line
2.45.2
Re: [PATCH 6/7] accel/kvm: Remove mentions of legacy '-machine foo,accel=bar'
Quoted 6 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Update the documentation when KVM is referred to.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 10 lines
--- docs/bypass-iommu.txt | 3 ++- docs/nvdimm.txt | 2 +- docs/specs/tpm.rst | 2 +- docs/system/arm/cpu-features.rst | 2 +- docs/system/cpu-hotplug.rst | 2 +- docs/system/ppc/powernv.rst | 2 +- docs/system/ppc/pseries.rst | 4 ++-- scripts/device-crash-test | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-)
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 6/7] accel/kvm: Remove mentions of legacy '-machine foo,accel=bar'
In reply to Philippe Mathieu-DaudéQuoted 6 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.Update the documentation when KVM is referred to.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 10 lines
--- docs/bypass-iommu.txt | 3 ++- docs/nvdimm.txt | 2 +- docs/specs/tpm.rst | 2 +- docs/system/arm/cpu-features.rst | 2 +- docs/system/cpu-hotplug.rst | 2 +- docs/system/ppc/powernv.rst | 2 +- docs/system/ppc/pseries.rst | 4 ++-- scripts/device-crash-test | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-)
PATCH 7/7 qemu-options: Remove mentions of legacy '-machine foo, accel=bar'
In reply to Philippe Mathieu-DaudéSince commit 6f6e1698a68 ("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.
The new form started to be documented in commit 8d4e9146b35 ("tcg:
add options for enabling MTTCG"); it is safe to remove the mentions of the legacy option.
--- qemu-options.hx | 9 --------- 1 file changed, 9 deletions(-)
qemu-options.hx +0 -9
@@ -27,8 +27,6 @@ ERST DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ "-machine [type=]name[,prop[=value][,...]]\n" " selects emulated machine ('-machine help' for list)\n" - " property accel=accel1[:accel2[:...]] selects accelerator\n" - " supported accelerators are kvm, xen, hvf, nvmm, whpx or tcg (default: tcg)\n" " vmport=on|off|auto controls emulation of vmport (default: auto)\n" " dump-guest-core=on|off include guest memory in a core dump (default=on)\n" " mem-merge=on|off controls memory merge support (default: on)\n"
@@ -59,13 +57,6 @@ SRST Supported machine properties are: - ``accel=accels1[:accels2[:...]]`` - This is used to enable an accelerator. Depending on the target - architecture, kvm, xen, hvf, nvmm, whpx or tcg can be available. - By default, tcg is used. If there is more than one accelerator - specified, the next one is used if the previous one fails to - initialize. - ``vmport=on|off|auto`` Enables emulation of VMWare IO port, for vmmouse etc. auto says to select the value based on accel and i8042. For accel=xen or
Signature · 1 line
2.45.2
Re: [PATCH 7/7] qemu-options: Remove mentions of legacy '-machine foo,accel=bar'
Quoted 26 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.The new form started to be documented in commit
8d4e9146b35("tcg:
add options for enabling MTTCG"); it is safe to remove the mentions of the legacy option.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- qemu-options.hx | 9 --------- 1 file changed, 9 deletions(-)qemu-options.hx +0
-2@@ -27,8 +27,6 @@ ERST DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ "-machine [type=]name[,prop[=value][,...]]\n" " selects emulated machine ('-machine help' for list)\n" - " property accel=accel1[:accel2[:...]] selects accelerator\n" - " supported accelerators are kvm, xen, hvf, nvmm, whpx or tcg (default: tcg)\n" " vmport=on|off|auto controls emulation of vmport (default: auto)\n" " dump-guest-core=on|off include guest memory in a core dump (default=on)\n" " mem-merge=on|off controls memory merge support (default: on)\n"
qemu-options.hx SRST · line 68
Quoted 10 lines
qemu-options.hx +0
-7@@ -59,13 +57,6 @@ SRST Supported machine properties are: - ``accel=accels1[:accels2[:...]]`` - This is used to enable an accelerator. Depending on the target - architecture, kvm, xen, hvf, nvmm, whpx or tcg can be available. - By default, tcg is used. If there is more than one accelerator - specified, the next one is used if the previous one fails to - initialize. -
I'm not convinced we should be removing documentation for options that currently exist and remain supported.
The documentation should be updated to say that we prefer use of '-accel' instead at least.
Beyond that, what is our long term intention with '-machine accel=xxx' ?
Is this a case where we are happy to leave '-machine accel=' as syntax sugar forever ? Or is this a case where we want to deprecate it and eventually remove its impl (and thus the documention here)
Quoted 6 lines
qemu-options.hx +0
-0``vmport=on|off|auto`` Enables emulation of VMWare IO port, for vmmouse etc. auto says to select the value based on accel and i8042. For accel=xen orSignature · 1 line
2.45.2
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 7/7] qemu-options: Remove mentions of legacy '-machine foo,accel=bar'
Quoted 17 lines · Daniel P. Berrangé
Quoted 11 lines · Philippe Mathieu-Daudé
Since commit
6f6e1698a68("vl: configure accelerators from -accel options") we prefer the '-accel bar' command line option.The new form started to be documented in commit
8d4e9146b35("tcg:
add options for enabling MTTCG"); it is safe to remove the mentions of the legacy option.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- qemu-options.hx | 9 --------- 1 file changed, 9 deletions(-)I'm not convinced we should be removing documentation for options that currently exist and remain supported.
Quoted 8 lines
The documentation should be updated to say that we prefer use of '-accel' instead at least.
Beyond that, what is our long term intention with '-machine accel=xxx' ?
Is this a case where we are happy to leave '-machine accel=' as syntax sugar forever ? Or is this a case where we want to deprecate it and eventually remove its impl (and thus the documention here)
Right, we should deprecate and then remove.