trivial-patches for 2023-07-08
Subsystems (2)
The following changes since commit 3b08e40b7abfe8be6020c4c27c93ad85590b9213:
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-07-07 20:23:01 +0100)
are available in the Git repository at:
https://gitlab.com/mjt0k/qemu.git tags/trivial-patches-20230708
for you to fetch changes up to 13a637430be13bda3e6726752936321a1955bc93:
hw/arm/virt-acpi-build.c: Add missing header (2023-07-08 07:24:38 +0300)
----------------------------------------------------------------
qemu trivial patches for 2023-07-08
----------------------------------------------------------------
Daniel Henrique Barboza (1):
hw/riscv/virt.c: fix typo in 'aia' description
Hawkins Jiawei (2):
vdpa: Delete duplicated VIRTIO_NET_F_RSS in vdpa_feature_bits
vdpa: Sort vdpa_feature_bits array alphabetically
Jan Kratochvil (1):
trivial: man page: document display::gtk::zoom-to-fit
Laszlo Ersek (2):
migration: factor out "resume_requested" in qmp_migrate()
migration: unexport migrate_fd_error()
Lucas Dietrich (1):
target/avr: Fix handling of interrupts above 33.
Peng Liang (1):
hw/arm/virt-acpi-build.c: Add missing header
Thomas Huth (2):
hw: Simplify calls to pci_nic_init_nofail() qemu-options.hx: Fix indentation of some option descriptions
hw/arm/sbsa-ref.c | 8 +------- hw/arm/virt-acpi-build.c | 1 + hw/arm/virt.c | 8 +------- hw/loongarch/virt.c | 8 +------- hw/mips/loongson3_virt.c | 8 +------- hw/riscv/virt.c | 2 +- hw/xtensa/virt.c | 8 +------- migration/migration.c | 12 +++++++----- migration/migration.h | 1 - net/vhost-vdpa.c | 40 +++++++++++++++++++++++----------------- qemu-options.hx | 9 ++++++--- target/avr/helper.c | 4 ++-- 12 files changed, 45 insertions(+), 64 deletions(-)
[PULL 06/10] vdpa: Sort vdpa_feature_bits array alphabetically
From: Hawkins Jiawei <[email protected]>
This patch sorts the vdpa_feature_bits array alphabetically in ascending order to avoid future duplicates.
--- net/vhost-vdpa.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-)
net/vhost-vdpa.c +23 -16
@@ -50,38 +50,45 @@ typedef struct VhostVDPAState {bool started; } VhostVDPAState; +/* +* The array is sorted alphabetically in ascending order, +* with the exception of VHOST_INVALID_FEATURE_BIT, +* which should always be the last entry. +*/ const int vdpa_feature_bits[] = { -VIRTIO_F_NOTIFY_ON_EMPTY , -VIRTIO_RING_F_INDIRECT_DESC , -VIRTIO_RING_F_EVENT_IDX ,VIRTIO_F_ANY_LAYOUT , +VIRTIO_F_IOMMU_PLATFORM , +VIRTIO_F_NOTIFY_ON_EMPTY , +VIRTIO_F_RING_PACKED , +VIRTIO_F_RING_RESET ,VIRTIO_F_VERSION_1 ,VIRTIO_NET_F_CSUM , -VIRTIO_NET_F_GUEST_CSUM ,VIRTIO_NET_F_CTRL_GUEST_OFFLOADS , +VIRTIO_NET_F_CTRL_MAC_ADDR , +VIRTIO_NET_F_CTRL_RX , +VIRTIO_NET_F_CTRL_RX_EXTRA , +VIRTIO_NET_F_CTRL_VLAN , +VIRTIO_NET_F_CTRL_VQ ,VIRTIO_NET_F_GSO , +VIRTIO_NET_F_GUEST_CSUM , +VIRTIO_NET_F_GUEST_ECN ,VIRTIO_NET_F_GUEST_TSO4 ,VIRTIO_NET_F_GUEST_TSO6 , -VIRTIO_NET_F_GUEST_ECN ,VIRTIO_NET_F_GUEST_UFO , +VIRTIO_NET_F_HASH_REPORT , +VIRTIO_NET_F_HOST_ECN ,VIRTIO_NET_F_HOST_TSO4 ,VIRTIO_NET_F_HOST_TSO6 , -VIRTIO_NET_F_HOST_ECN ,VIRTIO_NET_F_HOST_UFO , +VIRTIO_NET_F_MQ ,VIRTIO_NET_F_MRG_RXBUF ,VIRTIO_NET_F_MTU , -VIRTIO_NET_F_CTRL_RX , -VIRTIO_NET_F_CTRL_RX_EXTRA , -VIRTIO_NET_F_CTRL_VLAN , -VIRTIO_NET_F_CTRL_MAC_ADDR , -VIRTIO_NET_F_MQ , -VIRTIO_NET_F_CTRL_VQ , -VIRTIO_F_IOMMU_PLATFORM , -VIRTIO_F_RING_PACKED , -VIRTIO_F_RING_RESET ,VIRTIO_NET_F_RSS , -VIRTIO_NET_F_HASH_REPORT ,VIRTIO_NET_F_STATUS , +VIRTIO_RING_F_EVENT_IDX , +VIRTIO_RING_F_INDIRECT_DESC , + +/* VHOST_INVALID_FEATURE_BIT should always be the last entry */ VHOST_INVALID_FEATURE_BIT };
Signature · 1 line
2.39.2
[PULL 03/10] trivial: man page: document display::gtk::zoom-to-fit
In reply to Michael TokarevFrom: Jan Kratochvil <[email protected]>
Document display::gtk::zoom-to-fit.
info from: https://superuser.com/questions/1752209/qemu-zoom-to-fit-shortcut-or-cli-switch
--- qemu-options.hx | 3 +++ 1 file changed, 3 insertions(+)
qemu-options.hx +3 -0
@@ -2143,6 +2143,9 @@ SRST ``show-menubar=on|off`` : Display the main window menubar, defaults to "on" + ``zoom-to-fit=on|off`` : Expand video output to the window size, + defaults to "off" + ``curses[,charset=<encoding>]`` Display video output via curses. For graphics device models which support a text mode, QEMU can display this output using a
Signature · 1 line
2.39.2
[PULL 01/10] hw/riscv/virt.c: fix typo in 'aia' description
In reply to Michael TokarevFrom: Daniel Henrique Barboza <[email protected]>
--- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/virt.c +1 -1
@@ -1692,7 +1692,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) virt_set_aia);object_class_property_set_description (oc,"aia" ,"Set type of AIA interrupt " -"conttoller. Valid values are " +"controller. Valid values are " "none, aplic, and aplic-imsic." ); object_class_property_add_str(oc, "aia-guests",
Signature · 1 line
2.39.2
[PULL 02/10] target/avr: Fix handling of interrupts above 33.
In reply to Michael TokarevFrom: Lucas Dietrich <[email protected]>
This commit addresses a bug in the AVR interrupt handling code. The modification involves replacing the usage of the ctz32 function with ctz64 to ensure proper handling of interrupts above 33 in the AVR target.
Previously, timers 3, 4, and 5 interrupts were not functioning correctly because most of their interrupt vectors are numbered above 33.
(Mjt: updated subject line to have subsytem prefix)
--- target/avr/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/avr/helper.c +2 -2
@@ -52,7 +52,7 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) }if (interrupt_request &CPU_INTERRUPT_HARD ) {if (cpu_interrupts_enabled (env) && env->intsrc !=0 ) { -int index =ctz32 (env->intsrc); +int index =ctz64 (env->intsrc); cs->exception_index =EXCP_INT (index);avr_cpu_do_interrupt (cs);
@@ -79,7 +79,7 @@ void avr_cpu_do_interrupt(CPUState *cs)if (cs->exception_index ==EXCP_RESET ) { vector =0 ; }else if (env->intsrc !=0 ) { - vector =ctz32 (env->intsrc) +1 ; + vector =ctz64 (env->intsrc) +1 ; }if (avr_feature (env,AVR_FEATURE_3_BYTE_PC )) {
Signature · 1 line
2.39.2
[PULL 05/10] vdpa: Delete duplicated VIRTIO_NET_F_RSS in vdpa_feature_bits
In reply to Michael TokarevFrom: Hawkins Jiawei <[email protected]>
This entry was duplicated on referenced commit. Removing it.
--- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-)
net/vhost-vdpa.c +0 -1
@@ -74,7 +74,6 @@ const int vdpa_feature_bits[] = {VIRTIO_NET_F_CTRL_RX_EXTRA ,VIRTIO_NET_F_CTRL_VLAN ,VIRTIO_NET_F_CTRL_MAC_ADDR , -VIRTIO_NET_F_RSS ,VIRTIO_NET_F_MQ ,VIRTIO_NET_F_CTRL_VQ , VIRTIO_F_IOMMU_PLATFORM,
Signature · 1 line
2.39.2
[PULL 04/10] hw: Simplify calls to pci_nic_init_nofail()
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
pci_nic_init_nofail() calls qemu_find_nic_model(), and this function sets nd->model = g_strdup(default_model) if it has not been initialized yet. So we don't have to set nd->model to the default_nic in the calling sites.
--- hw/arm/sbsa-ref.c | 8 +------- hw/arm/virt.c | 8 +------- hw/loongarch/virt.c | 8 +------- hw/mips/loongson3_virt.c | 8 +------- hw/xtensa/virt.c | 8 +------- 5 files changed, 5 insertions(+), 35 deletions(-)
hw/arm/sbsa-ref.c +1 -7
@@ -689,13 +689,7 @@ static void create_pcie(SBSAMachineState *sms) pci =PCI_HOST_BRIDGE (dev);if (pci->bus) {for (i =0 ; i < nb_nics; i++) { -NICInfo *nd = &nd_table[i]; - -if (!nd->model) { - nd->model =g_strdup (mc->default_nic); - } - -pci_nic_init_nofail (nd, pci->bus, nd->model,NULL ); +pci_nic_init_nofail (&nd_table[i], pci->bus, mc->default_nic,NULL ); } }
hw/arm/virt.c +1 -7
@@ -1479,13 +1479,7 @@ static void create_pcie(VirtMachineState *vms) vms->bus = pci->bus;if (vms->bus) {for (i =0 ; i < nb_nics; i++) { -NICInfo *nd = &nd_table[i]; - -if (!nd->model) { - nd->model =g_strdup (mc->default_nic); - } - -pci_nic_init_nofail (nd, pci->bus, nd->model,NULL ); +pci_nic_init_nofail (&nd_table[i], pci->bus, mc->default_nic,NULL ); } }
hw/loongarch/virt.c +1 -7
@@ -547,13 +547,7 @@ static void loongarch_devices_init(DeviceState *pch_pic, LoongArchMachineState */* Network init */ for (i =0 ; i < nb_nics; i++) { -NICInfo *nd = &nd_table[i]; - -if (!nd->model) { - nd->model =g_strdup (mc->default_nic); - } - -pci_nic_init_nofail (nd, pci_bus, nd->model,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus, mc->default_nic,NULL ); }/*
hw/mips/loongson3_virt.c +1 -7
@@ -454,13 +454,7 @@ static inline void loongson3_virt_devices_init(MachineState *machine, }for (i =0 ; i < nb_nics; i++) { -NICInfo *nd = &nd_table[i]; - -if (!nd->model) { - nd->model =g_strdup (mc->default_nic); - } - -pci_nic_init_nofail (nd, pci_bus, nd->model,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus, mc->default_nic,NULL ); } }
hw/xtensa/virt.c +1 -7
@@ -103,13 +103,7 @@ static void create_pcie(MachineState *ms, CPUXtensaState *env, int irq_base, pci =PCI_HOST_BRIDGE (dev);if (pci->bus) {for (i =0 ; i < nb_nics; i++) { -NICInfo *nd = &nd_table[i]; - -if (!nd->model) { - nd->model =g_strdup (mc->default_nic); - } - -pci_nic_init_nofail (nd, pci->bus, nd->model,NULL ); +pci_nic_init_nofail (&nd_table[i], pci->bus, mc->default_nic,NULL ); } } }
Signature · 1 line
2.39.2
[PULL 10/10] hw/arm/virt-acpi-build.c: Add missing header
In reply to Michael TokarevFrom: Peng Liang <[email protected]>
virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we enable log trace backend. But if we disable the log trace backend (e.g., --enable-trace-backends=nop), then virt-acpi-build.c will not include qemu/error-report.h any more and it will lead to build errors. Include qemu/error-report.h directly in virt-acpi-build.c to avoid the errors.
(mjt: move the #include higher as suggested by Ani Sinha)
--- hw/arm/virt-acpi-build.c | 1 + 1 file changed, 1 insertion(+)
hw/arm/virt-acpi-build.c +1 -0
@@ -29,6 +29,7 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/bitmap.h" +#include "qemu/error-report.h" #include "trace.h" #include "hw/core/cpu.h" #include "target/arm/cpu.h"
Signature · 1 line
2.39.2
[PULL 07/10] qemu-options.hx: Fix indentation of some option descriptions
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
The description of the options starts at column 16, so fix this in some runaway lines for a more uniform output.
While we're at it, replace the capital "NOTE" with "Note" since this seems to be the more common capitalization in qemu-options.hx.
--- qemu-options.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
qemu-options.hx +3 -3
@@ -652,7 +652,7 @@ DEF("m", HAS_ARG, QEMU_OPTION_m, " size: initial amount of guest memory\n" " slots: number of hotplug slots (default: none)\n" " maxmem: maximum amount of guest memory (default: none)\n" - "NOTE: Some architectures might enforce a specific granularity\n", + " Note: Some architectures might enforce a specific granularity\n", QEMU_ARCH_ALL) SRST ``-m [size=]megs[,slots=n,maxmem=size]``
@@ -2217,8 +2217,8 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " [,disable-agent-file-xfer=on|off][,agent-mouse=[on|off]]\n" " [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n" " [,gl=[on|off]][,rendernode=<file>]\n" - " enable spice\n" - " at least one of {port, tls-port} is mandatory\n", + " enable spice\n" + " at least one of {port, tls-port} is mandatory\n", QEMU_ARCH_ALL) #endif SRST
Signature · 1 line
2.39.2
[PULL 08/10] migration: factor out "resume_requested" in qmp_migrate()
In reply to Michael TokarevFrom: Laszlo Ersek <[email protected]>
It cuts back on those awkward, duplicated !(has_resume && resume) expressions.
Cc: Juan Quintela <[email protected]> (maintainer:Migration)
Cc: Leonardo Bras <[email protected]> (reviewer:Migration)
Cc: Peter Xu <[email protected]> (reviewer:Migration)
Cc: [email protected]
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2018404
--- migration/migration.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
migration/migration.c +6 -4
@@ -1637,6 +1637,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, bool has_inc, bool inc, bool has_detach, bool detach, bool has_resume, bool resume, Error **errp) { + bool resume_requested;Error *local_err =NULL ;MigrationState *s =migrate_get_current ();const char *p =NULL ;
@@ -1646,13 +1647,14 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,return ; } + resume_requested = has_resume && resume;if (!migrate_prepare (s, has_blk && blk, has_inc && inc, - has_resume && resume, errp)) { + resume_requested, errp)) {/* Error detected, put into errp */ return ; } -if (!(has_resume && resume)) { +if (!resume_requested) {if (!yank_register_instance (MIGRATION_YANK_INSTANCE , errp)) {return ; }
@@ -1671,7 +1673,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, }else if (strstart (uri,"fd:" , &p)) {fd_start_outgoing_migration (s, p, &local_err); }else { -if (!(has_resume && resume)) { +if (!resume_requested) {yank_unregister_instance (MIGRATION_YANK_INSTANCE ); } error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "uri",
@@ -1683,7 +1685,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, }if (local_err) { -if (!(has_resume && resume)) { +if (!resume_requested) {yank_unregister_instance (MIGRATION_YANK_INSTANCE ); }migrate_fd_error (s, local_err);
Signature · 1 line
2.39.2
[PULL 09/10] migration: unexport migrate_fd_error()
In reply to Michael TokarevFrom: Laszlo Ersek <[email protected]>
The only migrate_fd_error() call sites are in "migration/migration.c", which is also where we define migrate_fd_error(). Make the function static, and remove its declaration from "migration/migration.h".
Cc: Juan Quintela <[email protected]> (maintainer:Migration)
Cc: Leonardo Bras <[email protected]> (reviewer:Migration)
Cc: Peter Xu <[email protected]> (reviewer:Migration)
Cc: [email protected]
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2018404
--- migration/migration.c | 2 +- migration/migration.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
migration/migration.c +1 -1
@@ -1220,7 +1220,7 @@ static void migrate_error_free(MigrationState *s) } } -void migrate_fd_error (MigrationState *s,const Error *error) +static void migrate_fd_error (MigrationState *s,const Error *error) {trace_migrate_fd_error (error_get_pretty (error));assert (s->to_dst_file ==NULL );
migration/migration.h +0 -1
@@ -466,7 +466,6 @@ bool migration_has_all_channels(void);uint64_t migrate_max_downtime (void );void migrate_set_error (MigrationState *s,const Error *error); -void migrate_fd_error (MigrationState *s,const Error *error);void migrate_fd_connect (MigrationState *s,Error *error_in);
Signature · 1 line
2.39.2
Richard Henderson
AppliedQuoted 6 lines · Michael Tokarev
The following changes since commit
3b08e40b7abfe8be6020c4c27c93ad85590b9213:Merge tag 'for-upstream' ofhttps://gitlab.com/bonzini/qemu into staging (2023-07-07 20:23:01 +0100)are available in the Git repository at:
Quoted 8 lines
https://gitlab.com/mjt0k/qemu.git tags/trivial-patches-20230708for you to fetch changes up to
13a637430be13bda3e6726752936321a1955bc93:hw/arm/virt-acpi-build.c: Add missing header (2023-07-08 07:24:38 +0300)----------------------------------------------------------------
qemu trivial patches for 2023-07-08
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/8.1 as appropriate.
r~