[PATCH] qemu: Relax validation for mem->access if guest has no NUMA
by Michal Privoznik
In v6.8.0-27-g88957116c9 and friends I've switched the way the
default RAM is specified for QEMU (from plain -m to
memory-backend-*). This means, that even if a guest doesn't have
any NUMA nodes configured we can use memory-backend-* attributes
to translate user config requests. For instance, we can allow
memory to be shared (<access mode='shared'/> under
<memoryBacking/>). But what my original commits are missing is
allowing such configuration in our validator.
Fixes: 88957116c9d3cb4705380c3702c9d4315fb500bb
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1839034#c12
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_validate.c | 10 +++--
.../hugepages-memaccess3.x86_64-latest.args | 39 +++++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
3 files changed, 47 insertions(+), 3 deletions(-)
create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index bf8127a575..eadf3af8b3 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -754,6 +754,9 @@ static int
qemuValidateDomainDefMemory(const virDomainDef *def,
virQEMUCapsPtr qemuCaps)
{
+ const char *defaultRAMid = virQEMUCapsGetMachineDefaultRAMid(qemuCaps,
+ def->virtType,
+ def->os.machine);
const long system_page_size = virGetSystemPageSizeKB();
const virDomainMemtune *mem = &def->mem;
@@ -781,9 +784,10 @@ qemuValidateDomainDefMemory(const virDomainDef *def,
return -1;
}
- /* We can't guarantee any other mem.access
- * if no guest NUMA nodes are defined. */
- if (mem->hugepages[0].size != system_page_size &&
+ /* We can't guarantee any other mem.access if no guest NUMA
+ * nodes are defined, unless defaultRAMid is provided. */
+ if (!defaultRAMid &&
+ mem->hugepages[0].size != system_page_size &&
virDomainNumaGetNodeCount(def->numa) == 0 &&
mem->access != VIR_DOMAIN_MEMORY_ACCESS_DEFAULT &&
mem->access != VIR_DOMAIN_MEMORY_ACCESS_PRIVATE) {
diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args
new file mode 100644
index 0000000000..6033950eab
--- /dev/null
+++ b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args
@@ -0,0 +1,39 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-fedora \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-fedora/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-fedora/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name guest=fedora,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-fedora/master-key.aes \
+-machine pc-i440fx-2.9,accel=kvm,usb=off,dump-guest-core=off,\
+memory-backend=pc.ram \
+-cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,\
+arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,\
+rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \
+-m 4096 \
+-object memory-backend-file,id=pc.ram,\
+mem-path=/dev/hugepages2M/libvirt/qemu/-1-fedora,share=yes,prealloc=yes,\
+size=4294967296 \
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot menu=on,strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 9b853c6d59..96a2b95331 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1145,6 +1145,7 @@ mymain(void)
DO_TEST_PARSE_ERROR("hugepages-memaccess3",
QEMU_CAPS_OBJECT_MEMORY_RAM,
QEMU_CAPS_OBJECT_MEMORY_FILE);
+ DO_TEST_CAPS_LATEST("hugepages-memaccess3");
DO_TEST_CAPS_LATEST("hugepages-nvdimm");
DO_TEST("nosharepages", QEMU_CAPS_MEM_MERGE);
DO_TEST("disk-cdrom", NONE);
--
2.26.2
3 years, 11 months
[PATCH] node_device: pacify grumpy coverity due to addr override
by Boris Fiuczynski
With commit 09364608b4 node_device: refactor address retrieval of node device
"if-else if" was replaced by "switch".
The contained break statement now is no longer in context of the for loop
but instead of the switch causing the legitimate grumpiness of coverity.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Suggested-by: John Ferlan <jferlan(a)redhat.com>
---
src/node_device/node_device_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index e254b49244..da1bc8a545 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -637,7 +637,7 @@ nodeDeviceFindAddressByName(const char *name)
}
def = virNodeDeviceObjGetDef(dev);
- for (caps = def->caps; caps != NULL; caps = caps->next) {
+ for (caps = def->caps; caps != NULL && addr == NULL; caps = caps->next) {
switch (caps->data.type) {
case VIR_NODE_DEV_CAP_PCI_DEV: {
virPCIDeviceAddress pci_addr = {
--
2.26.2
3 years, 11 months
[PATCHv2 0/5] netdev: Extract GenerateName/ReserveName as common functions
by Shi Lei
V1 here: https://www.redhat.com/archives/libvir-list/2020-December/msg00308.html
Since V1:
(1) Remove virNetDev[Lock|Unlock]GenName.
Only *lastID* needs to be protected. Now we lock *lastID*
inside virNetDevReserveName and virNetDevGenerateName, then lock and
unlock functions are no longer needed.
(2) Shorten the locking range for generating names for tap and macvlan.
Since virNetDevReserveName and virNetDevGenerateName are now with lock,
we can call them directly rather than adding lock outside.
(3) Rename *_GEN_NAME_TAP to *_GEN_NAME_VNET.
(4) Now veth and tap share the same prefix "vnet".
(5) Use name rather than type as the argument of virNetDevReserveName.
Just follow the style of virNetDev[Tap|MacVlan]ReserveName.
(6) Remove those in-between functions for tap and macvlan.
(7) Remove useless ENUM_[DECL|IMPL] for enum virNetDevGenNameType.
(8) Remove the *_NONE item for enum virNetDevGenNameType.
(9) Remove useless <math.h> in virnetdevtap.
(10) When @ifname of virNetDevGenerateName is NOT a template or NULL,
just leave it unchanged.
(11) Take advantage of the "g_strdup_printf(*ifname, id)" in
virNetDevGenerateName, prevent the functions that call virNetDevTapCreate()
from adding in "vnet%d" when ifname is empty.
(12) Use VIR_NETDEV_MACVLAN_CREATE_WITH_TAP to distinguish macvtap and
macvlan and remove those useless macros.
Shi Lei (5):
netdev: Introduce several helper functions for generating unique netdev name
netdevtap: Use common helper function to create unique tap name
netdevmacvlan: Use helper function to create unique macvlan/macvtap name
netdevveth: Simplify virNetDevVethCreate by using virNetDevGenerateName
netdev: Prevent functions that call virNetDevTapCreate from adding 'vnet%d' into ifname
src/bhyve/bhyve_command.c | 3 +-
src/conf/domain_conf.c | 4 +-
src/interface/interface_backend_udev.c | 2 +-
src/libvirt_private.syms | 4 +-
src/lxc/lxc_process.c | 5 +-
src/qemu/qemu_interface.c | 16 +--
src/qemu/qemu_process.c | 4 +-
src/util/virnetdev.c | 116 ++++++++++++++++
src/util/virnetdev.h | 27 +++-
src/util/virnetdevmacvlan.c | 177 +++----------------------
src/util/virnetdevmacvlan.h | 14 +-
src/util/virnetdevtap.c | 100 +-------------
src/util/virnetdevtap.h | 4 -
src/util/virnetdevveth.c | 140 +++++--------------
14 files changed, 217 insertions(+), 399 deletions(-)
--
2.25.1
3 years, 11 months
[libvirt PATCH v2 0/7] fix PCI vs PCIe detection when running libvirtd as root, but unprivileged
by Laine Stump
danpb had asked for some documentation on the changes to the APIs of
internal functions in V1. I've added some standard function header
docs in patches 5 & 6. Everything else is completely unchanged (and
already reviewed by mprivozn).
Laine Stump (7):
qemu: use g_autoptr for a virPCIDevice
util: simplify calling of virPCIDeviceDetectFunctionLevelReset()
util: simplify call to virPCIDeviceDetectPowerManagementReset()
util: make read error of PCI config file more detailed
util: change call sequence for virPCIDeviceFindCapabilityOffset()
util: make virPCIDeviceIsPCIExpress() more intelligent
qemu: remove now-redundant check for file length when determining PCIe
vs. PCI
src/qemu/qemu_domain_address.c | 43 +--------
src/util/virpci.c | 166 +++++++++++++++++++++++++++------
2 files changed, 141 insertions(+), 68 deletions(-)
--
2.28.0
3 years, 11 months
[libvirt PATCH 0/3] tests: Add capabilities for QEMU 5.2
by Andrea Bolognani
As usual, this is an abridged version of the changes.
For the full version, run
$ git fetch https://gitlab.com/abologna/libvirt.git caps-5.2
or browse
https://gitlab.com/abologna/libvirt/-/commits/caps-5.2
Andrea Bolognani (3):
tests: Add capabilities for QEMU 5.2 on aarch64
tests: Add capabilities for QEMU 5.2 on ppc64
tests: Add capabilities for QEMU 5.2 on riscv64
.../qemu_5.2.0-virt.aarch64.xml | 161 +
tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 155 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 120 +
.../caps_5.2.0.aarch64.replies | 25361 ++++++++++++++
.../caps_5.2.0.aarch64.xml | 509 +
.../caps_5.2.0.ppc64.replies | 28789 ++++++++++++++++
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1169 +
.../caps_5.2.0.riscv64.replies | 21075 +++++++++++
.../caps_5.2.0.riscv64.xml | 214 +
...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 4 +-
...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 4 +-
.../aarch64-features-sve.aarch64-latest.args | 4 +-
...arch64-os-firmware-efi.aarch64-latest.args | 4 +-
.../aarch64-virt-graphics.aarch64-latest.args | 4 +-
.../aarch64-virt-headless.aarch64-latest.args | 4 +-
.../clock-timer-armvtimer.aarch64-latest.args | 4 +-
...ult-video-type-aarch64.aarch64-latest.args | 4 +-
...default-video-type-ppc64.ppc64-latest.args | 4 +-
.../disk-arm-virtio-sd.aarch64-latest.args | 4 +-
.../iommu-smmuv3.aarch64-latest.args | 4 +-
...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 4 +-
...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 4 +-
...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 4 +-
...ault-cpu-tcg-pseries-2.7.ppc64-latest.args | 4 +-
...ault-cpu-tcg-pseries-3.1.ppc64-latest.args | 4 +-
...ault-cpu-tcg-pseries-4.2.ppc64-latest.args | 4 +-
.../ppc64-pseries-graphics.ppc64-latest.args | 4 +-
.../ppc64-pseries-headless.ppc64-latest.args | 4 +-
.../ppc64-tpmproxy-single.ppc64-latest.args | 4 +-
.../ppc64-tpmproxy-with-tpm.ppc64-latest.args | 4 +-
.../tpm-emulator-spapr.ppc64-latest.args | 4 +-
31 files changed, 77619 insertions(+), 22 deletions(-)
create mode 100644 tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
create mode 100644 tests/domaincapsdata/qemu_5.2.0.aarch64.xml
create mode 100644 tests/domaincapsdata/qemu_5.2.0.ppc64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml
--
2.26.2
3 years, 11 months
RFC: don't store backing filename in qcow2 image
by Vladimir Sementsov-Ogievskiy
Hi all!
I have an idea, that not storing backing filename in qcow2 image at all may be a good thing. I'll give some reasons and want to know what do you think about it.
1. Libvirt has to manage and keep in mind backing chains anyway.
This means, that storing this information in qcow2 header is a source of bugs when we update it in one place but failed/forget to update in another. Of course, Libvirt is not the only user of qemu.. But we are moving to "blockdev" anyway, when management tool should control all node-names at least. It would be strange to not control the relations between images in the same time.
2. backing file name specified in qcow2 metadata doesn't relate to any other thing, and nothing rely on it.
3. calculating and updating backing file name in Qemu is a headache:
- with some options specified or with filters we risk to write json filenames into qcow2 metadata, which is almost never what user wants. Also, json may exceed the qcow2 limitation of backing_file_size to be <= 1023
- updating it in transactional way for read-only image during reopen, when another transactional permission update is ongoing is difficult (who know, how to do it?) (remember recent d669ed6ab02849 "block: make bdrv_drop_intermediate() less wrong")
4. Moving qcow2 files to another directory is a problem: you should care to update backing file names in all dependent qcow2 images.
So, what about moving libvirt (at least) to not rely on backing file name stored in qcow2 image? Backing chain then should be in xml? Is it hard or not? Finally, will it make the code simpler, or more difficult?
Then, if the idea is good in general, what to do on Qemu part? If we want to finally get rid of problem code (see [3.]) we should deprecate something.. Just deprecate support for qcow2 images with backing file specified, requiring user always specify backing chain by hand? I don't see anything that should be changed in qcow2 format itself: no reason to add some kind of restricted bits, etc..
--
Best regards,
Vladimir
3 years, 11 months
[PATCH libvirt v4 00/12] Support AP card, AP queues and AP matrix
by Shalini Chellathurai Saroja
Add support for AP card devices, AP queues and AP matrix devices in
libvirt node device driver.
---
v4:
- Added virNodeDevAPAdapterParseXML function to extract the adapter
parsing logic.
- Modified according to review comments.
- New patch to mention support for AP devices in NEWS.rst.
v3:
- Modify schema definition of ap-adapter to support hex values alone.
- Modify schema definition of ap-domain to support hex values alone.
- Verify domain value of AP queue device to be within the supported
range during parsing.
- Re-organized patches 6 and 10 according to review comment.
- Minor changes according to review comments.
v2:
- The tests included in the patches to detect the node devices (AP
card, AP queues and AP matrix) are moved to separate patches.
These patches are not divided further due to the following reasons:
- The previous patches that add support for node devices in
libvirt are not divided further into smaller patches (eg:
53aec799fa31711ffaeacc7ec17ec6d3c2e3cadf).
- It would be easier to identify the patches relevant to support
AP node devices.
- The number of lines in each of these patches are around 125,
which is not too much.
- Modified according to review comments.
- New patch to detect mdev_types capabilty of AP matrix device is
added to this patch series.
Boris Fiuczynski (1):
node_device: detecting mdev_types capability on ap_matrix device
Farhan Ali (1):
virsh: nodedev: Filter by AP card and AP queue capabilities
Shalini Chellathurai Saroja (10):
nodedev: detect AP card device
tests: AP card node device
nodedev: detect AP queues
tests: AP queue node device
nodedev: detect AP matrix device
tests: AP matrix node device
virsh: nodedev: filter by AP Matrix capability
node_device: refactor address retrieval of node device
node_device: mdev matrix support
NEWS: mention node device driver support for AP devices
NEWS.rst | 6 +
docs/formatnode.html.in | 48 +++-
docs/manpages/virsh.rst | 2 +-
docs/schemas/nodedev.rng | 46 ++++
include/libvirt/libvirt-nodedev.h | 3 +
src/conf/node_device_conf.c | 213 ++++++++++++++++++
src/conf/node_device_conf.h | 41 +++-
src/conf/virnodedeviceobj.c | 13 +-
src/libvirt-nodedev.c | 3 +
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 33 ++-
src/node_device/node_device_udev.c | 80 +++++++
tests/nodedevschemadata/ap_07_0038.xml | 9 +
tests/nodedevschemadata/ap_card07.xml | 8 +
tests/nodedevschemadata/ap_matrix.xml | 7 +
.../ap_matrix_mdev_types.xml | 14 ++
...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 9 +
tests/nodedevxml2xmltest.c | 5 +
tools/virsh-nodedev.c | 9 +
19 files changed, 544 insertions(+), 6 deletions(-)
create mode 100644 tests/nodedevschemadata/ap_07_0038.xml
create mode 100644 tests/nodedevschemadata/ap_card07.xml
create mode 100644 tests/nodedevschemadata/ap_matrix.xml
create mode 100644 tests/nodedevschemadata/ap_matrix_mdev_types.xml
create mode 100644 tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml
--
2.26.2
3 years, 11 months
[PATCH v2] accel/tcg: Remove deprecated '-tb-size' option
by Philippe Mathieu-Daudé
The '-tb-size' option (replaced by '-accel tcg,tb-size') is
deprecated since 5.0 (commit fe174132478). Remove it.
Reviewed-by: Thomas Huth <thuth(a)redhat.com>
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)redhat.com>
---
v2: fixed "Title underline too short." (Thomas)
---
docs/system/deprecated.rst | 12 +++++-------
accel/tcg/translate-all.c | 2 +-
softmmu/vl.c | 8 --------
qemu-options.hx | 8 --------
4 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 565389697e8..14326063e9a 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -100,13 +100,6 @@ QEMU 5.1 has three options:
to the user to load all the images they need.
3. ``-bios <file>`` - Tells QEMU to load the specified file as the firmwrae.
-``-tb-size`` option (since 5.0)
-'''''''''''''''''''''''''''''''
-
-QEMU 5.0 introduced an alternative syntax to specify the size of the translation
-block cache, ``-accel tcg,tb-size=``. The new syntax deprecates the
-previously available ``-tb-size`` option.
-
``-show-cursor`` option (since 5.0)
'''''''''''''''''''''''''''''''''''
@@ -523,6 +516,11 @@ for the ``id`` parameter, which should now be used instead.
The ``-no-kvm`` argument was a synonym for setting ``-machine accel=tcg``.
+``-tb-size`` option (removed in 6.0)
+''''''''''''''''''''''''''''''''''''
+
+QEMU 5.0 introduced an alternative syntax to specify the size of the translation
+block cache, ``-accel tcg,tb-size=``.
QEMU Machine Protocol (QMP) commands
------------------------------------
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 4572b4901fb..b7d50a73d44 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -2379,7 +2379,7 @@ void dump_exec_info(void)
qemu_printf("Translation buffer state:\n");
/*
* Report total code size including the padding and TB structs;
- * otherwise users might think "-tb-size" is not honoured.
+ * otherwise users might think "-accel tcg,tb-size" is not honoured.
* For avg host size we use the precise numbers from tb_tree_stats though.
*/
qemu_printf("gen code size %zu/%zu\n",
diff --git a/softmmu/vl.c b/softmmu/vl.c
index e6e0ad5a925..3f052849d8c 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3639,14 +3639,6 @@ void qemu_init(int argc, char **argv, char **envp)
exit(1);
}
break;
- case QEMU_OPTION_tb_size:
-#ifndef CONFIG_TCG
- error_report("TCG is disabled");
- exit(1);
-#endif
- warn_report("The -tb-size option is deprecated, use -accel tcg,tb-size instead");
- object_register_sugar_prop(ACCEL_CLASS_NAME("tcg"), "tb-size", optarg);
- break;
case QEMU_OPTION_icount:
icount_opts = qemu_opts_parse_noisily(qemu_find_opts("icount"),
optarg, true);
diff --git a/qemu-options.hx b/qemu-options.hx
index 104632ea343..7ce06290b68 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4080,14 +4080,6 @@ SRST
Show cursor.
ERST
-DEF("tb-size", HAS_ARG, QEMU_OPTION_tb_size, \
- "-tb-size n set TB size\n", QEMU_ARCH_ALL)
-SRST
-``-tb-size n``
- Set TCG translation block cache size. Deprecated, use
- '\ ``-accel tcg,tb-size=n``\ ' instead.
-ERST
-
DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
"-incoming tcp:[host]:port[,to=maxport][,ipv4][,ipv6]\n" \
"-incoming rdma:host:port[,ipv4][,ipv6]\n" \
--
2.26.2
3 years, 11 months
[PATCH 0/4] Remove deprecated CLI parameters
by Thomas Huth
Remove some simple CLI parameters that have been deprecated since
at least two releass already.
Philippe Mathieu-Daudé (1):
accel/tcg: Remove deprecated '-tb-size' option
Thomas Huth (3):
docs/system: Move the list of removed features to a separate file
Remove the deprecated -realtime option
Remove the deprecated -show-cursor option
accel/tcg/translate-all.c | 2 +-
docs/system/deprecated.rst | 246 ----------------------------
docs/system/removed-features.rst | 243 +++++++++++++++++++++++++++
qemu-options.hx | 29 +---
softmmu/vl.c | 45 +----
tests/migration/guestperf/engine.py | 2 +-
6 files changed, 247 insertions(+), 320 deletions(-)
create mode 100644 docs/system/removed-features.rst
--
2.27.0
3 years, 11 months
[PATCH] accel/tcg: Remove deprecated '-tb-size' option
by Philippe Mathieu-Daudé
The '-tb-size' option (replaced by '-accel tcg,tb-size') is
deprecated since 5.0 (commit fe174132478). Remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)redhat.com>
---
docs/system/deprecated.rst | 12 +++++-------
accel/tcg/translate-all.c | 2 +-
softmmu/vl.c | 8 --------
qemu-options.hx | 8 --------
4 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 565389697e8..70bdb62a6d6 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -100,13 +100,6 @@ QEMU 5.1 has three options:
to the user to load all the images they need.
3. ``-bios <file>`` - Tells QEMU to load the specified file as the firmwrae.
-``-tb-size`` option (since 5.0)
-'''''''''''''''''''''''''''''''
-
-QEMU 5.0 introduced an alternative syntax to specify the size of the translation
-block cache, ``-accel tcg,tb-size=``. The new syntax deprecates the
-previously available ``-tb-size`` option.
-
``-show-cursor`` option (since 5.0)
'''''''''''''''''''''''''''''''''''
@@ -523,6 +516,11 @@ for the ``id`` parameter, which should now be used instead.
The ``-no-kvm`` argument was a synonym for setting ``-machine accel=tcg``.
+``-tb-size`` option (removed in 6.0)
+'''''''''''''''''''''''''''''''
+
+QEMU 5.0 introduced an alternative syntax to specify the size of the translation
+block cache, ``-accel tcg,tb-size=``.
QEMU Machine Protocol (QMP) commands
------------------------------------
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 4572b4901fb..b7d50a73d44 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -2379,7 +2379,7 @@ void dump_exec_info(void)
qemu_printf("Translation buffer state:\n");
/*
* Report total code size including the padding and TB structs;
- * otherwise users might think "-tb-size" is not honoured.
+ * otherwise users might think "-accel tcg,tb-size" is not honoured.
* For avg host size we use the precise numbers from tb_tree_stats though.
*/
qemu_printf("gen code size %zu/%zu\n",
diff --git a/softmmu/vl.c b/softmmu/vl.c
index e6e0ad5a925..3f052849d8c 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3639,14 +3639,6 @@ void qemu_init(int argc, char **argv, char **envp)
exit(1);
}
break;
- case QEMU_OPTION_tb_size:
-#ifndef CONFIG_TCG
- error_report("TCG is disabled");
- exit(1);
-#endif
- warn_report("The -tb-size option is deprecated, use -accel tcg,tb-size instead");
- object_register_sugar_prop(ACCEL_CLASS_NAME("tcg"), "tb-size", optarg);
- break;
case QEMU_OPTION_icount:
icount_opts = qemu_opts_parse_noisily(qemu_find_opts("icount"),
optarg, true);
diff --git a/qemu-options.hx b/qemu-options.hx
index 104632ea343..7ce06290b68 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4080,14 +4080,6 @@ SRST
Show cursor.
ERST
-DEF("tb-size", HAS_ARG, QEMU_OPTION_tb_size, \
- "-tb-size n set TB size\n", QEMU_ARCH_ALL)
-SRST
-``-tb-size n``
- Set TCG translation block cache size. Deprecated, use
- '\ ``-accel tcg,tb-size=n``\ ' instead.
-ERST
-
DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
"-incoming tcp:[host]:port[,to=maxport][,ipv4][,ipv6]\n" \
"-incoming rdma:host:port[,ipv4][,ipv6]\n" \
--
2.26.2
3 years, 11 months