Skip to content

Commit 9e7ce9e

Browse files
committed
Merge tag 'trivial-patches-20230708' of https://gitlab.com/mjt0k/qemu into staging
qemu trivial patches for 2023-07-08 # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmSo5UsPHG1qdEB0bHMu # bXNrLnJ1AAoJEHAbT2saaT5ZIygH/0z5heVC4CnU5sNuv8GRbXZL7sOXxvoOQf9K # dEBD0/Lzu8QL7mJBpqPuzK4FN/CNnY2nUaGGn3k7U44MrsU6g2P5ksD4Y0hUebkZ # sw+bsaqDeG0J+kZ9IN4V1iLoyGGQ53GDynisZMWY8w/hDmCkoRe5Xy2LZrXS7fgw # LVT04wlxTYG/EwXqMukBYd/S/lap8pUnzgc+VngHmX5gBF4O7qIAZV1j5WobIW6S # /OOOOBZ4YJU9Ha18H4DWrE5+ptfE2sfWAO0z+c/v3bpNTUb9bCyNIE3R3mUwg7z6 # i/96za3R9XH0ChoBWrKHtFn5wygUMGHt63JwIph0bwr73ENVlrE= # =4nBR # -----END PGP SIGNATURE----- # gpg: Signature made Sat 08 Jul 2023 05:25:47 AM BST # gpg: using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59 # gpg: issuer "[email protected]" # gpg: Good signature from "Michael Tokarev <[email protected]>" [undefined] # gpg: aka "Michael Tokarev <[email protected]>" [undefined] # gpg: aka "Michael Tokarev <[email protected]>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931 4B22 701B 4F6B 1A69 3E59 * tag 'trivial-patches-20230708' of https://gitlab.com/mjt0k/qemu: hw/arm/virt-acpi-build.c: Add missing header migration: unexport migrate_fd_error() migration: factor out "resume_requested" in qmp_migrate() qemu-options.hx: Fix indentation of some option descriptions vdpa: Sort vdpa_feature_bits array alphabetically vdpa: Delete duplicated VIRTIO_NET_F_RSS in vdpa_feature_bits hw: Simplify calls to pci_nic_init_nofail() trivial: man page: document display::gtk::zoom-to-fit target/avr: Fix handling of interrupts above 33. hw/riscv/virt.c: fix typo in 'aia' description Signed-off-by: Richard Henderson <[email protected]>
2 parents 276d72c + 13a6374 commit 9e7ce9e

File tree

12 files changed

+45
-64
lines changed

12 files changed

+45
-64
lines changed

hw/arm/sbsa-ref.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -689,13 +689,7 @@ static void create_pcie(SBSAMachineState *sms)
689689
pci = PCI_HOST_BRIDGE(dev);
690690
if (pci->bus) {
691691
for (i = 0; i < nb_nics; i++) {
692-
NICInfo *nd = &nd_table[i];
693-
694-
if (!nd->model) {
695-
nd->model = g_strdup(mc->default_nic);
696-
}
697-
698-
pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
692+
pci_nic_init_nofail(&nd_table[i], pci->bus, mc->default_nic, NULL);
699693
}
700694
}
701695

hw/arm/virt-acpi-build.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "qemu/osdep.h"
3030
#include "qapi/error.h"
3131
#include "qemu/bitmap.h"
32+
#include "qemu/error-report.h"
3233
#include "trace.h"
3334
#include "hw/core/cpu.h"
3435
#include "target/arm/cpu.h"

hw/arm/virt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,13 +1479,7 @@ static void create_pcie(VirtMachineState *vms)
14791479
vms->bus = pci->bus;
14801480
if (vms->bus) {
14811481
for (i = 0; i < nb_nics; i++) {
1482-
NICInfo *nd = &nd_table[i];
1483-
1484-
if (!nd->model) {
1485-
nd->model = g_strdup(mc->default_nic);
1486-
}
1487-
1488-
pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
1482+
pci_nic_init_nofail(&nd_table[i], pci->bus, mc->default_nic, NULL);
14891483
}
14901484
}
14911485

hw/loongarch/virt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -547,13 +547,7 @@ static void loongarch_devices_init(DeviceState *pch_pic, LoongArchMachineState *
547547

548548
/* Network init */
549549
for (i = 0; i < nb_nics; i++) {
550-
NICInfo *nd = &nd_table[i];
551-
552-
if (!nd->model) {
553-
nd->model = g_strdup(mc->default_nic);
554-
}
555-
556-
pci_nic_init_nofail(nd, pci_bus, nd->model, NULL);
550+
pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL);
557551
}
558552

559553
/*

hw/mips/loongson3_virt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,7 @@ static inline void loongson3_virt_devices_init(MachineState *machine,
454454
}
455455

456456
for (i = 0; i < nb_nics; i++) {
457-
NICInfo *nd = &nd_table[i];
458-
459-
if (!nd->model) {
460-
nd->model = g_strdup(mc->default_nic);
461-
}
462-
463-
pci_nic_init_nofail(nd, pci_bus, nd->model, NULL);
457+
pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL);
464458
}
465459
}
466460

hw/riscv/virt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
16921692
virt_set_aia);
16931693
object_class_property_set_description(oc, "aia",
16941694
"Set type of AIA interrupt "
1695-
"conttoller. Valid values are "
1695+
"controller. Valid values are "
16961696
"none, aplic, and aplic-imsic.");
16971697

16981698
object_class_property_add_str(oc, "aia-guests",

hw/xtensa/virt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,7 @@ static void create_pcie(MachineState *ms, CPUXtensaState *env, int irq_base,
103103
pci = PCI_HOST_BRIDGE(dev);
104104
if (pci->bus) {
105105
for (i = 0; i < nb_nics; i++) {
106-
NICInfo *nd = &nd_table[i];
107-
108-
if (!nd->model) {
109-
nd->model = g_strdup(mc->default_nic);
110-
}
111-
112-
pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
106+
pci_nic_init_nofail(&nd_table[i], pci->bus, mc->default_nic, NULL);
113107
}
114108
}
115109
}

migration/migration.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ static void migrate_error_free(MigrationState *s)
12201220
}
12211221
}
12221222

1223-
void migrate_fd_error(MigrationState *s, const Error *error)
1223+
static void migrate_fd_error(MigrationState *s, const Error *error)
12241224
{
12251225
trace_migrate_fd_error(error_get_pretty(error));
12261226
assert(s->to_dst_file == NULL);
@@ -1637,6 +1637,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
16371637
bool has_inc, bool inc, bool has_detach, bool detach,
16381638
bool has_resume, bool resume, Error **errp)
16391639
{
1640+
bool resume_requested;
16401641
Error *local_err = NULL;
16411642
MigrationState *s = migrate_get_current();
16421643
const char *p = NULL;
@@ -1646,13 +1647,14 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
16461647
return;
16471648
}
16481649

1650+
resume_requested = has_resume && resume;
16491651
if (!migrate_prepare(s, has_blk && blk, has_inc && inc,
1650-
has_resume && resume, errp)) {
1652+
resume_requested, errp)) {
16511653
/* Error detected, put into errp */
16521654
return;
16531655
}
16541656

1655-
if (!(has_resume && resume)) {
1657+
if (!resume_requested) {
16561658
if (!yank_register_instance(MIGRATION_YANK_INSTANCE, errp)) {
16571659
return;
16581660
}
@@ -1671,7 +1673,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
16711673
} else if (strstart(uri, "fd:", &p)) {
16721674
fd_start_outgoing_migration(s, p, &local_err);
16731675
} else {
1674-
if (!(has_resume && resume)) {
1676+
if (!resume_requested) {
16751677
yank_unregister_instance(MIGRATION_YANK_INSTANCE);
16761678
}
16771679
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "uri",
@@ -1683,7 +1685,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
16831685
}
16841686

16851687
if (local_err) {
1686-
if (!(has_resume && resume)) {
1688+
if (!resume_requested) {
16871689
yank_unregister_instance(MIGRATION_YANK_INSTANCE);
16881690
}
16891691
migrate_fd_error(s, local_err);

migration/migration.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ bool migration_has_all_channels(void);
466466
uint64_t migrate_max_downtime(void);
467467

468468
void migrate_set_error(MigrationState *s, const Error *error);
469-
void migrate_fd_error(MigrationState *s, const Error *error);
470469

471470
void migrate_fd_connect(MigrationState *s, Error *error_in);
472471

net/vhost-vdpa.c

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,39 +50,45 @@ typedef struct VhostVDPAState {
5050
bool started;
5151
} VhostVDPAState;
5252

53+
/*
54+
* The array is sorted alphabetically in ascending order,
55+
* with the exception of VHOST_INVALID_FEATURE_BIT,
56+
* which should always be the last entry.
57+
*/
5358
const int vdpa_feature_bits[] = {
54-
VIRTIO_F_NOTIFY_ON_EMPTY,
55-
VIRTIO_RING_F_INDIRECT_DESC,
56-
VIRTIO_RING_F_EVENT_IDX,
5759
VIRTIO_F_ANY_LAYOUT,
60+
VIRTIO_F_IOMMU_PLATFORM,
61+
VIRTIO_F_NOTIFY_ON_EMPTY,
62+
VIRTIO_F_RING_PACKED,
63+
VIRTIO_F_RING_RESET,
5864
VIRTIO_F_VERSION_1,
5965
VIRTIO_NET_F_CSUM,
60-
VIRTIO_NET_F_GUEST_CSUM,
6166
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS,
67+
VIRTIO_NET_F_CTRL_MAC_ADDR,
68+
VIRTIO_NET_F_CTRL_RX,
69+
VIRTIO_NET_F_CTRL_RX_EXTRA,
70+
VIRTIO_NET_F_CTRL_VLAN,
71+
VIRTIO_NET_F_CTRL_VQ,
6272
VIRTIO_NET_F_GSO,
73+
VIRTIO_NET_F_GUEST_CSUM,
74+
VIRTIO_NET_F_GUEST_ECN,
6375
VIRTIO_NET_F_GUEST_TSO4,
6476
VIRTIO_NET_F_GUEST_TSO6,
65-
VIRTIO_NET_F_GUEST_ECN,
6677
VIRTIO_NET_F_GUEST_UFO,
78+
VIRTIO_NET_F_HASH_REPORT,
79+
VIRTIO_NET_F_HOST_ECN,
6780
VIRTIO_NET_F_HOST_TSO4,
6881
VIRTIO_NET_F_HOST_TSO6,
69-
VIRTIO_NET_F_HOST_ECN,
7082
VIRTIO_NET_F_HOST_UFO,
83+
VIRTIO_NET_F_MQ,
7184
VIRTIO_NET_F_MRG_RXBUF,
7285
VIRTIO_NET_F_MTU,
73-
VIRTIO_NET_F_CTRL_RX,
74-
VIRTIO_NET_F_CTRL_RX_EXTRA,
75-
VIRTIO_NET_F_CTRL_VLAN,
76-
VIRTIO_NET_F_CTRL_MAC_ADDR,
77-
VIRTIO_NET_F_RSS,
78-
VIRTIO_NET_F_MQ,
79-
VIRTIO_NET_F_CTRL_VQ,
80-
VIRTIO_F_IOMMU_PLATFORM,
81-
VIRTIO_F_RING_PACKED,
82-
VIRTIO_F_RING_RESET,
8386
VIRTIO_NET_F_RSS,
84-
VIRTIO_NET_F_HASH_REPORT,
8587
VIRTIO_NET_F_STATUS,
88+
VIRTIO_RING_F_EVENT_IDX,
89+
VIRTIO_RING_F_INDIRECT_DESC,
90+
91+
/* VHOST_INVALID_FEATURE_BIT should always be the last entry */
8692
VHOST_INVALID_FEATURE_BIT
8793
};
8894

0 commit comments

Comments
 (0)