Skip to content

Commit 80748eb

Browse files
committed
Merge tag 'misc-20240619' of https://github.com/philmd/qemu into staging
Misc patches queue . Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil) . Always use little endian audio format in virtio-snd (Phil) . Avoid using Monitor in INTERRUPT_STATS_PROVIDER::print_info (Phil) . Introduce x-query-interrupt-controllers QMP command (Phil) . Introduce pnv_chip_foreach_cpu() to remove one CPU_FOREACH use (Cédric) . Constify few uses of IOMMUTLBEvent (Phil) . Wire loongson_ipi device to loongson3_virt/TCG (Jiaxun) . Fix inclusion of tracing headers on s390x/TCG (Phil) . Add few shortcuts missing to readline (Manos) . Update ui/display entries in MAINTAINERS (Gerd) . Use qemu_add_mouse_change_notifier on Cocoa (Akihiko) . Fix Standard VGA screen blanking and cleanups (Gerd) . Fix USB/MTP reported "free space" value (Fabio) . Cast size_memop() returned value (Roman) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmZyuKYACgkQ4+MsLN6t # wN5guxAAvwJWbxQA8B4+gfiYaMK0AnM4leuCZ+8Sf+LhK32k2UkFA4NnKBkxGmO+ # 45NOEEEEv1Tukvtq1STHkYEdERJbHndpSFk2XmaYY09Ofo54vv2dXy6MD6GJriuA # Pr9Mivzs490RSPXmxhsa8GU5IE6CO3LamgpSeH8XxPTvCbRIiB8LcKsme6utBAZv # 9dHnEX5sXEEY2ZvArQd+eueyJfRyN4+1PpQkE9uH/wLIBqHAkHgSvFVaLo+PtA7T # xfcFvrawRTWIU+P1lojmCMb+mOj+YS7yigpkkYQC4SFm0PEv5J5nyhr/mhhiVuSS # tK8DNNi44F7/Z2CzEwbwk1PEnfKWtCgG2rEiR5uT6E8nmvxaOr2LfswBjLSwVDPS # mBOnjTMLqTBPKq8E8x2di1h2cJ9PZ90zZtWzYD8Eqoq+eqz/x+8z/qP4vifzO+NB # 7lj4IQZzLn+iktDGpjfh2RNoV9F9i9BwFGJqO2i0MzVftezJuGfe9olVOP2ErpnR # jqB7gzgc6g4tYiOK9WchuIeB/S9dU/5qqQxWwINWX0j4cHF6Qq71LyejCTfpqpf8 # jjF65XdGHcyVm9NAnr18MTzwdu3YYWf4w2OGIHg7iGLC0hv3U+EzEEMpv2E6pelM # iXgtqkRQm9qJaSrjfv0MUp9irjq01aIaHceFmP20QtkMP256E6c= # =Ed8Z # -----END PGP SIGNATURE----- # gpg: Signature made Wed 19 Jun 2024 03:53:26 AM PDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'misc-20240619' of https://github.com/philmd/qemu: (74 commits) exec: Make the MemOp enum cast explicit ui+display: rename is_buffer_shared() -> surface_is_allocated() ui+display: rename is_placeholder() -> surface_is_placeholder() stdvga: fix screen blanking ui/cocoa: Use qemu_add_mouse_change_notifier MAINTAINERS: drop spice+ui maintainership MAINTAINERS: drop virtio-gpu maintainership util/readline: Add C-u shortcut util/readline: Add C-n, C-p shortcuts util/readline: Fix lints for readline_handle_byte target/s390x: Use s390_skeys_get|set() helper hw/s390x: Introduce s390_skeys_get|set() helpers hw/mips/loongson3_virt: Wire up loongson_ipi device hw/intc/loongson_ipi: Replace ipi_getcpu with cpu_by_arch_id hw/intc/loongson_ipi: Provide per core MMIO address spaces hw/intc: Remove loongarch_ipi.c hw/usb/dev-mtp: Correctly report free space hw/usb: Remove unused 'host.h' header hw/i386/iommu: Constify IOMMUTLBEvent in vtd_page_walk_hook prototype memory: Constify IOMMUTLBEvent in memory_region_notify_iommu() ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 parents 2236963 + fc0870c commit 80748eb

Some content is hidden

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

91 files changed

+742
-1415
lines changed

MAINTAINERS

+2-6
Original file line numberDiff line numberDiff line change
@@ -2579,8 +2579,7 @@ F: hw/display/ramfb*.c
25792579
F: include/hw/display/ramfb.h
25802580

25812581
virtio-gpu
2582-
M: Gerd Hoffmann <kraxel@redhat.com>
2583-
S: Odd Fixes
2582+
S: Orphan
25842583
F: hw/display/virtio-gpu*
25852584
F: hw/display/virtio-vga.*
25862585
F: include/hw/virtio/virtio-gpu.h
@@ -2602,7 +2601,6 @@ F: include/hw/virtio/virtio-blk-common.h
26022601

26032602
vhost-user-gpu
26042603
M: Marc-André Lureau <marcandre.lureau@redhat.com>
2605-
R: Gerd Hoffmann <kraxel@redhat.com>
26062604
S: Maintained
26072605
F: docs/interop/vhost-user-gpu.rst
26082606
F: contrib/vhost-user-gpu
@@ -3060,8 +3058,7 @@ F: stubs/memory_device.c
30603058
F: docs/nvdimm.txt
30613059

30623060
SPICE
3063-
M: Gerd Hoffmann <kraxel@redhat.com>
3064-
S: Odd Fixes
3061+
S: Orphan
30653062
F: include/ui/qemu-spice.h
30663063
F: include/ui/spice-display.h
30673064
F: ui/spice-*.c
@@ -3071,7 +3068,6 @@ F: qapi/ui.json
30713068
F: docs/spice-port-fqdn.txt
30723069

30733070
Graphics
3074-
M: Gerd Hoffmann <kraxel@redhat.com>
30753071
M: Marc-André Lureau <marcandre.lureau@redhat.com>
30763072
S: Odd Fixes
30773073
F: ui/

docs/about/deprecated.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
212212
better reflects the way this property affects all random data within
213213
the device tree blob, not just the ``kaslr-seed`` node.
214214

215-
``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2)
216-
'''''''''''''''''''''''''''''''''''''''''''''''''''''
215+
``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
216+
''''''''''''''''''''''''''''''''''''''''''''''''''''''
217217

218218
These old machine types are quite neglected nowadays and thus might have
219219
various pitfalls with regards to live migration. Use a newer machine type

docs/about/removed-features.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
948948

949949
This machine has been renamed ``fuloong2e``.
950950

951-
``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2)
951+
``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0)
952952
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
953953

954954
These machine types were very old and likely could not be used for live

hmp-commands-info.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ERST
174174
.args_type = "",
175175
.params = "",
176176
.help = "show PIC state",
177-
.cmd = hmp_info_pic,
177+
.cmd_info_hrt = qmp_x_query_interrupt_controllers,
178178
},
179179

180180
SRST

hw/acpi/ich9.c

+6-40
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id)
153153
.offset = vmstate_offset_pointer(_state, _field, uint8_t), \
154154
}
155155

156-
static bool vmstate_test_use_memhp(void *opaque)
157-
{
158-
ICH9LPCPMRegs *s = opaque;
159-
return s->acpi_memory_hotplug.is_enabled;
160-
}
161-
162156
static const VMStateDescription vmstate_memhp_state = {
163157
.name = "ich9_pm/memhp",
164158
.version_id = 1,
165159
.minimum_version_id = 1,
166-
.needed = vmstate_test_use_memhp,
167160
.fields = (const VMStateField[]) {
168161
VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs),
169162
VMSTATE_END_OF_LIST()
@@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq)
335328
legacy_acpi_cpu_hotplug_init(pci_address_space_io(lpc_pci),
336329
OBJECT(lpc_pci), &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE);
337330

338-
if (pm->acpi_memory_hotplug.is_enabled) {
339-
acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
340-
&pm->acpi_memory_hotplug,
341-
ACPI_MEMORY_HOTPLUG_BASE);
342-
}
331+
acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
332+
&pm->acpi_memory_hotplug,
333+
ACPI_MEMORY_HOTPLUG_BASE);
343334
}
344335

345336
static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,
@@ -351,21 +342,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,
351342
visit_type_uint32(v, name, &value, errp);
352343
}
353344

354-
static bool ich9_pm_get_memory_hotplug_support(Object *obj, Error **errp)
355-
{
356-
ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
357-
358-
return s->pm.acpi_memory_hotplug.is_enabled;
359-
}
360-
361-
static void ich9_pm_set_memory_hotplug_support(Object *obj, bool value,
362-
Error **errp)
363-
{
364-
ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
365-
366-
s->pm.acpi_memory_hotplug.is_enabled = value;
367-
}
368-
369345
static bool ich9_pm_get_cpu_hotplug_legacy(Object *obj, Error **errp)
370346
{
371347
ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
@@ -445,9 +421,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
445421
NULL, NULL, pm);
446422
object_property_add_uint32_ptr(obj, ACPI_PM_PROP_GPE0_BLK_LEN,
447423
&gpe0_len, OBJ_PROP_FLAG_READ);
448-
object_property_add_bool(obj, "memory-hotplug-support",
449-
ich9_pm_get_memory_hotplug_support,
450-
ich9_pm_set_memory_hotplug_support);
451424
object_property_add_bool(obj, "cpu-hotplug-legacy",
452425
ich9_pm_get_cpu_hotplug_legacy,
453426
ich9_pm_set_cpu_hotplug_legacy);
@@ -478,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
478451
return;
479452
}
480453

481-
if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) &&
482-
!lpc->pm.acpi_memory_hotplug.is_enabled) {
483-
error_setg(errp,
484-
"memory hotplug is not enabled: %s.memory-hotplug-support "
485-
"is not set", object_get_typename(OBJECT(lpc)));
486-
} else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
454+
if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
487455
uint64_t negotiated = lpc->smi_negotiated_features;
488456

489457
if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) &&
@@ -527,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
527495
{
528496
ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
529497

530-
if (lpc->pm.acpi_memory_hotplug.is_enabled &&
531-
object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
498+
if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
532499
acpi_memory_unplug_request_cb(hotplug_dev,
533500
&lpc->pm.acpi_memory_hotplug, dev,
534501
errp);
@@ -563,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
563530
{
564531
ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
565532

566-
if (lpc->pm.acpi_memory_hotplug.is_enabled &&
567-
object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
533+
if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
568534
acpi_memory_unplug_cb(&lpc->pm.acpi_memory_hotplug, dev, errp);
569535
} else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) &&
570536
!lpc->pm.cpu_hotplug_legacy) {

hw/arm/virt.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1677,8 +1677,7 @@ static void virt_build_smbios(VirtMachineState *vms)
16771677
}
16781678

16791679
smbios_set_defaults("QEMU", product,
1680-
vmc->smbios_old_sys_ver ? "1.0" : mc->name,
1681-
true);
1680+
vmc->smbios_old_sys_ver ? "1.0" : mc->name);
16821681

16831682
/* build the array of physical mem area from base_memmap */
16841683
mem_array.address = vms->memmap[VIRT_MEM].base;
@@ -2764,7 +2763,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
27642763
return;
27652764
}
27662765

2767-
pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp);
2766+
pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp);
27682767
}
27692768

27702769
static void virt_memory_plug(HotplugHandler *hotplug_dev,

hw/audio/virtio-snd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as,
401401
as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels);
402402
as->fmt = virtio_snd_get_qemu_format(params->format);
403403
as->freq = virtio_snd_get_qemu_freq(params->rate);
404-
as->endianness = target_words_bigendian() ? 1 : 0;
404+
as->endianness = 0; /* Conforming to VIRTIO 1.0: always little endian. */
405405
}
406406

407407
/*

hw/core/machine-qmp-cmds.c

+29
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,35 @@ HumanReadableText *qmp_x_query_irq(Error **errp)
361361
return human_readable_text_from_str(buf);
362362
}
363363

364+
static int qmp_x_query_intc_foreach(Object *obj, void *opaque)
365+
{
366+
InterruptStatsProvider *intc;
367+
InterruptStatsProviderClass *k;
368+
GString *buf = opaque;
369+
370+
if (object_dynamic_cast(obj, TYPE_INTERRUPT_STATS_PROVIDER)) {
371+
intc = INTERRUPT_STATS_PROVIDER(obj);
372+
k = INTERRUPT_STATS_PROVIDER_GET_CLASS(obj);
373+
if (k->print_info) {
374+
k->print_info(intc, buf);
375+
} else {
376+
g_string_append_printf(buf,
377+
"Interrupt controller information not available for %s.\n",
378+
object_get_typename(obj));
379+
}
380+
}
381+
382+
return 0;
383+
}
384+
385+
HumanReadableText *qmp_x_query_interrupt_controllers(Error **errp)
386+
{
387+
g_autoptr(GString) buf = g_string_new("");
388+
object_child_foreach_recursive(object_get_root(),
389+
qmp_x_query_intc_foreach, buf);
390+
return human_readable_text_from_str(buf);
391+
}
392+
364393
GuidInfo *qmp_query_vm_generation_id(Error **errp)
365394
{
366395
GuidInfo *info;

hw/display/qxl-render.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)
3131
uint8_t *src;
3232
int len, i;
3333

34-
if (is_buffer_shared(surface)) {
34+
if (!surface_is_allocated(surface)) {
3535
return;
3636
}
3737
trace_qxl_render_blit(qxl->guest_primary.qxl_stride,

hw/display/vga.c

+16-9
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
14871487
uint8_t *d;
14881488
uint32_t v, addr1, addr;
14891489
vga_draw_line_func *vga_draw_line = NULL;
1490-
bool share_surface, force_shadow = false;
1490+
bool allocate_surface, force_shadow = false;
14911491
pixman_format_code_t format;
14921492
#if HOST_BIG_ENDIAN
14931493
bool byteswap = !s->big_endian_fb;
@@ -1609,18 +1609,18 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
16091609
*/
16101610
format = qemu_default_pixman_format(depth, !byteswap);
16111611
if (format) {
1612-
share_surface = dpy_gfx_check_format(s->con, format)
1613-
&& !s->force_shadow && !force_shadow;
1612+
allocate_surface = !dpy_gfx_check_format(s->con, format)
1613+
|| s->force_shadow || force_shadow;
16141614
} else {
1615-
share_surface = false;
1615+
allocate_surface = true;
16161616
}
16171617

16181618
if (s->params.line_offset != s->last_line_offset ||
16191619
disp_width != s->last_width ||
16201620
height != s->last_height ||
16211621
s->last_depth != depth ||
16221622
s->last_byteswap != byteswap ||
1623-
share_surface != is_buffer_shared(surface)) {
1623+
allocate_surface != surface_is_allocated(surface)) {
16241624
/* display parameters changed -> need new display surface */
16251625
s->last_scr_width = disp_width;
16261626
s->last_scr_height = height;
@@ -1635,14 +1635,14 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
16351635
full_update = 1;
16361636
}
16371637
if (surface_data(surface) != s->vram_ptr + (s->params.start_addr * 4)
1638-
&& is_buffer_shared(surface)) {
1638+
&& !surface_is_allocated(surface)) {
16391639
/* base address changed (page flip) -> shared display surfaces
16401640
* must be updated with the new base address */
16411641
full_update = 1;
16421642
}
16431643

16441644
if (full_update) {
1645-
if (share_surface) {
1645+
if (!allocate_surface) {
16461646
surface = qemu_create_displaysurface_from(disp_width,
16471647
height, format, s->params.line_offset,
16481648
s->vram_ptr + (s->params.start_addr * 4));
@@ -1655,7 +1655,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
16551655

16561656
vga_draw_line = vga_draw_line_table[v];
16571657

1658-
if (!is_buffer_shared(surface) && s->cursor_invalidate) {
1658+
if (surface_is_allocated(surface) && s->cursor_invalidate) {
16591659
s->cursor_invalidate(s);
16601660
}
16611661

@@ -1707,7 +1707,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
17071707
if (update) {
17081708
if (y_start < 0)
17091709
y_start = y;
1710-
if (!(is_buffer_shared(surface))) {
1710+
if (surface_is_allocated(surface)) {
17111711
uint8_t *p;
17121712
p = vga_draw_line(s, d, addr, width, hpel);
17131713
if (p) {
@@ -1762,6 +1762,13 @@ static void vga_draw_blank(VGACommonState *s, int full_update)
17621762
if (s->last_scr_width <= 0 || s->last_scr_height <= 0)
17631763
return;
17641764

1765+
if (!surface_is_allocated(surface)) {
1766+
/* unshare buffer, otherwise the blanking corrupts vga vram */
1767+
surface = qemu_create_displaysurface(s->last_scr_width,
1768+
s->last_scr_height);
1769+
dpy_gfx_replace_surface(s->con, surface);
1770+
}
1771+
17651772
w = s->last_scr_width * surface_bytes_per_pixel(surface);
17661773
d = surface_data(surface);
17671774
for(i = 0; i < s->last_scr_height; i++) {

hw/display/xenfb.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
638638
int linesize = surface_stride(surface);
639639
uint8_t *data = surface_data(surface);
640640

641-
if (!is_buffer_shared(surface)) {
641+
if (surface_is_allocated(surface)) {
642642
switch (xenfb->depth) {
643643
case 8:
644644
if (bpp == 16) {
@@ -756,7 +756,8 @@ static void xenfb_update(void *opaque)
756756
xen_pv_printf(&xenfb->c.xendev, 1,
757757
"update: resizing: %dx%d @ %d bpp%s\n",
758758
xenfb->width, xenfb->height, xenfb->depth,
759-
is_buffer_shared(surface) ? " (shared)" : "");
759+
surface_is_allocated(surface)
760+
? " (allocated)" : " (borrowed)");
760761
xenfb->up_fullscreen = 1;
761762
}
762763

0 commit comments

Comments
 (0)