Skip to content

Commit e3a2077

Browse files
committed
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* qdev: second part of Property cleanups * rust: second part of QOM rework * rust: callbacks wrapper * rust: pl011 bugfixes * kvm: cleanup errors in kvm_convert_memory() # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmdkaEkUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroN0/wgAgIJg8BrlRKfmiz14NZfph8/jarSj # TOWYVxL2v4q98KBuL5pta2ucObgzwqyqSyc02S2DGSOIMQCIiBB5MaCk1iMjx+BO # pmVU8gNlD8faO8SSmnnr+jDQt+G+bQ/nRgQJOAReF8oVw3O2aC/FaVKpitMzWtvv # PLnJWdrqqpGq14OzX8iNCzSujxppAuyjrhT4lNlekzDoDfdTez72r+rXkvg4GzZL # QC3xLYg/LrT8Rs+zgOhm/AaIyS4bOyMlkU9Du1rQ6Tyne45ey2FCwKVzBKrJdGcw # sVbzEclxseLenoTbZqYK6JTzLdDoThVUbY2JwoCGUaIm+74P4NjEsUsTVg== # =TuQM # -----END PGP SIGNATURE----- # gpg: Signature made Thu 19 Dec 2024 13:39:05 EST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "[email protected]" # gpg: Good signature from "Paolo Bonzini <[email protected]>" [full] # gpg: aka "Paolo Bonzini <[email protected]>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (42 commits) rust: pl011: simplify handling of the FIFO enabled bit in LCR rust: pl011: fix migration stream rust: pl011: extend registers to 32 bits rust: pl011: fix break errors and definition of Data struct rust: pl011: always use reset() method on registers rust: pl011: match break logic of C version rust: pl011: fix declaration of LineControl bits target/i386: Reset TSCs of parked vCPUs too on VM reset kvm: consistently return 0/-errno from kvm_convert_memory rust: qemu-api: add a module to wrap functions and zero-sized closures rust: qom: add initial subset of methods on Object rust: qom: add casting functionality rust: tests: allow writing more than one test bql: add a "mock" BQL for Rust unit tests rust: re-export C types from qemu-api submodules rust: rename qemu-api modules to follow C code a bit more rust: qom: add possibility of overriding unparent rust: qom: put class_init together from multiple ClassInitImpl<> Constify all opaque Property pointers hw/core/qdev-properties: Constify Property argument to PropertyInfo.print ... Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents 9863d46 + bf9987c commit e3a2077

File tree

603 files changed

+1410
-1257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

603 files changed

+1410
-1257
lines changed

accel/kvm/kvm-all.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,16 @@ int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id)
437437
return kvm_fd;
438438
}
439439

440+
static void kvm_reset_parked_vcpus(void *param)
441+
{
442+
KVMState *s = param;
443+
struct KVMParkedVcpu *cpu;
444+
445+
QLIST_FOREACH(cpu, &s->kvm_parked_vcpus, node) {
446+
kvm_arch_reset_parked_vcpu(cpu->vcpu_id, cpu->kvm_fd);
447+
}
448+
}
449+
440450
int kvm_create_vcpu(CPUState *cpu)
441451
{
442452
unsigned long vcpu_id = kvm_arch_vcpu_id(cpu);
@@ -2728,6 +2738,7 @@ static int kvm_init(MachineState *ms)
27282738
}
27292739

27302740
qemu_register_reset(kvm_unpoison_all, NULL);
2741+
qemu_register_reset(kvm_reset_parked_vcpus, s);
27312742

27322743
if (s->kernel_irqchip_allowed) {
27332744
kvm_irqchip_create(s);
@@ -2999,17 +3010,17 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private)
29993010
MemoryRegion *mr;
30003011
RAMBlock *rb;
30013012
void *addr;
3002-
int ret = -1;
3013+
int ret = -EINVAL;
30033014

30043015
trace_kvm_convert_memory(start, size, to_private ? "shared_to_private" : "private_to_shared");
30053016

30063017
if (!QEMU_PTR_IS_ALIGNED(start, qemu_real_host_page_size()) ||
30073018
!QEMU_PTR_IS_ALIGNED(size, qemu_real_host_page_size())) {
3008-
return -1;
3019+
return ret;
30093020
}
30103021

30113022
if (!size) {
3012-
return -1;
3023+
return ret;
30133024
}
30143025

30153026
section = memory_region_find(get_system_memory(), start, size);
@@ -3027,7 +3038,7 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private)
30273038
if (!to_private) {
30283039
return 0;
30293040
}
3030-
return -1;
3041+
return ret;
30313042
}
30323043

30333044
if (!memory_region_has_guest_memfd(mr)) {

backends/tpm/tpm_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static void get_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
4646
static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
4747
Error **errp)
4848
{
49-
Property *prop = opaque;
49+
const Property *prop = opaque;
5050
TPMBackend *s, **be = object_field_prop_ptr(obj, prop);
5151
char *str;
5252

@@ -66,7 +66,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
6666

6767
static void release_tpm(Object *obj, const char *name, void *opaque)
6868
{
69-
Property *prop = opaque;
69+
const Property *prop = opaque;
7070
TPMBackend **be = object_field_prop_ptr(obj, prop);
7171

7272
if (*be) {

configs/targets/i386-softmmu.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
TARGET_ARCH=i386
22
TARGET_SUPPORTS_MTTCG=y
33
TARGET_KVM_HAVE_GUEST_DEBUG=y
4+
TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
45
TARGET_XML_FILES= gdb-xml/i386-32bit.xml

configs/targets/x86_64-softmmu.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ TARGET_ARCH=x86_64
22
TARGET_BASE_ARCH=i386
33
TARGET_SUPPORTS_MTTCG=y
44
TARGET_KVM_HAVE_GUEST_DEBUG=y
5+
TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
56
TARGET_XML_FILES= gdb-xml/i386-64bit.xml

cpu-target.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ static const Property cpu_common_props[] = {
201201
DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION,
202202
MemoryRegion *),
203203
#endif
204-
DEFINE_PROP_END_OF_LIST(),
205204
};
206205

207206
#ifndef CONFIG_USER_ONLY

docs/devel/migration/compatibility.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ the old behaviour or the new behaviour::
401401
DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0),
402402
+ DEFINE_PROP_BIT("x-pcie-err-unc-mask", PCIDevice, cap_present,
403403
+ QEMU_PCIE_ERR_UNC_MASK_BITNR, true),
404-
DEFINE_PROP_END_OF_LIST()
405404
};
406405

407406
Notice that we enable the feature for new machine types.

docs/devel/virtio-backends.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ manually instantiated:
107107
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
108108
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
109109
DEV_NVECTORS_UNSPECIFIED),
110-
DEFINE_PROP_END_OF_LIST(),
111110
};
112111
113112
static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)

hw/9pfs/virtio-9p-device.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ static const VMStateDescription vmstate_virtio_9p = {
246246
static const Property virtio_9p_properties[] = {
247247
DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag),
248248
DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id),
249-
DEFINE_PROP_END_OF_LIST(),
250249
};
251250

252251
static void virtio_9p_class_init(ObjectClass *klass, void *data)

hw/acpi/erst.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,6 @@ static const Property erst_properties[] = {
10161016
TYPE_MEMORY_BACKEND, HostMemoryBackend *),
10171017
DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState,
10181018
default_record_size, ERST_RECORD_SIZE),
1019-
DEFINE_PROP_END_OF_LIST(),
10201019
};
10211020

10221021
static void erst_class_init(ObjectClass *klass, void *data)

hw/acpi/generic_event_device.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
318318

319319
static const Property acpi_ged_properties[] = {
320320
DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0),
321-
DEFINE_PROP_END_OF_LIST(),
322321
};
323322

324323
static const VMStateDescription vmstate_memhp_state = {

0 commit comments

Comments
 (0)