Skip to content

Commit 8b70d7f

Browse files
committed
Merge tag 'hw-misc-20241231' of https://github.com/philmd/qemu into staging
Misc HW patches queue - Allow more than 4 legacy IRQs on Generic PCI Express Bridge (Alexander) - Add MMIO-based Inter-VM shared memory device 'ivshmem-flat' (Gustavo) - Use UHCI register definitions (Guenter) - Propagate CPU endianness to microblaze_load_kernel (Philippe) - Mark x86/TriCore devices as little-endian, OpenRISC/SPARC as big (Philippe) - Don't set callback_opaque NULL in fw_cfg_modify_bytes_read (Shameer) - Simplify non-KVM checks on AMD IOMMU XTSup feature (Philippe) - Trivial cleanups on xilinx_ethlite, vmcoreinfo, qxl (Philippe, Hyman) - Move USB-HCD-XHCI msi/msix properties from NEC to superclass (Phil) - Redesign of main thread event handling due to macOS Cocoa (Phil) - Introduce ParavirtualizedGraphics.Framework support 'apple-gfx' (Phil) - Pad short Ethernet frames on macOS vmnet (William) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmd0Ul0ACgkQ4+MsLN6t # wN7sCA/9HFWahKYW+6Y+gHfLPvJzkIqC5mwfQAUY7GsrNVFdIpUjK9ln9xUEqCQz # DkVxoZQcP++d8cnnl17wXHsRcavyDDadGU5/161eNC7fbKbLRAslObz/dtExxDn2 # sctx9HMcbLl1UMFPqi/Pbt8NEZr0iOLzDDl+nRuOK8QRFnd2zGm1lF1oHeyja3t1 # flnQKI9YD0U/+0RVNR2FOpUam2Fu1EuQEPp0jMwkmcoyoNLwCXrP9XyRybVZnzgM # cFm9fYbVlwjsVia+Bsk3CmHX5Gna/1bS3CL8Y9gUScYYwYU5VDAA8Fvv4gPsa4+u # WSyttL2qCFdgF75S5FoAvEQzYFBcw25eFf8jJhbEn4I6MuQew8lww5OZEyvE8rag # 2hg3nc4W0x76mLunqrNm+h+Z3vqd/amFcd9YNZjpzxQK//TwvOAQTWi31VtWa4OF # F1qdv78tQKkRY7noq8WkcL/io6D7iE/BMx/XIOF8uPf8BLIBMvPDnDABjaB/yLkS # Q/e+/monxkhknDY6K9xkVei7rn6c0LkuLzKxVzEzVKPVzM8N0JAl/1KaNVO8fxjJ # kLvfGP/RdYOZqG4dNi8W3PhV/+UZz1FS3L1MpI4NXQ59br57BbVQP9ARGO6WpPWn # O9zIJOAqdzcWU0aULIsvQA3nC1iJnFHEovq0bl8qBbY51k26Lg0= # =AL3L # -----END PGP SIGNATURE----- # gpg: Signature made Tue 31 Dec 2024 15:21:49 EST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <[email protected]>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'hw-misc-20241231' of https://github.com/philmd/qemu: (29 commits) hw/display/qxl: Do not use C99 // comments net/vmnet: Pad short Ethernet frames MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF hw/display/apple-gfx: Adds configurable mode list hw/display/apple-gfx: Adds PCI implementation hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support ui & main loop: Redesign of system-specific main thread event handling hw/usb/hcd-xhci: Unimplemented/guest error logging for port MMIO hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to superclass hw/block/virtio-blk: Replaces request free function with g_free hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque' hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read() hw/net/xilinx_ethlite: Rename rxbuf -> port_index hw/net/xilinx_ethlite: Correct maximum RX buffer size hw/net/xilinx_ethlite: Update QOM style hw/net/xilinx_ethlite: Remove unuseful debug logs hw/net/xilinx_ethlite: Convert some debug logs to trace events hw/sparc: Mark devices as big-endian ... Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents 17cc877 + c6f59e3 commit 8b70d7f

Some content is hidden

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

61 files changed

+2413
-256
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,15 @@ F: target/arm/hvf/
509509
X86 HVF CPUs
510510
M: Cameron Esfahani <[email protected]>
511511
M: Roman Bolshakov <[email protected]>
512+
R: Phil Dennis-Jordan <[email protected]>
512513
W: https://wiki.qemu.org/Features/HVF
513514
S: Maintained
514515
F: target/i386/hvf/
515516

516517
HVF
517518
M: Cameron Esfahani <[email protected]>
518519
M: Roman Bolshakov <[email protected]>
520+
R: Phil Dennis-Jordan <[email protected]>
519521
W: https://wiki.qemu.org/Features/HVF
520522
S: Maintained
521523
F: accel/hvf/
@@ -2631,6 +2633,11 @@ F: hw/display/edid*
26312633
F: include/hw/display/edid.h
26322634
F: qemu-edid.c
26332635

2636+
macOS PV Graphics (apple-gfx)
2637+
M: Phil Dennis-Jordan <[email protected]>
2638+
S: Maintained
2639+
F: hw/display/apple-gfx*
2640+
26342641
PIIX4 South Bridge (i82371AB)
26352642
M: Hervé Poussineau <[email protected]>
26362643
M: Philippe Mathieu-Daudé <[email protected]>

docs/system/device-emulation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Emulated Devices
8686
devices/ccid.rst
8787
devices/cxl.rst
8888
devices/ivshmem.rst
89+
devices/ivshmem-flat.rst
8990
devices/keyboard.rst
9091
devices/net.rst
9192
devices/nvme.rst

docs/system/devices/ivshmem-flat.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Inter-VM Shared Memory Flat Device
2+
----------------------------------
3+
4+
The ivshmem-flat device is meant to be used on machines that lack a PCI bus,
5+
making them unsuitable for the use of the traditional ivshmem device modeled as
6+
a PCI device. Machines like those with a Cortex-M MCU are good candidates to use
7+
the ivshmem-flat device. Also, since the flat version maps the control and
8+
status registers directly to the memory, it requires a quite tiny "device
9+
driver" to interact with other VMs, which is useful in some RTOSes, like
10+
Zephyr, which usually run on constrained resource targets.
11+
12+
Similar to the ivshmem device, the ivshmem-flat device supports both peer
13+
notification via HW interrupts and Inter-VM shared memory. This allows the
14+
device to be used together with the traditional ivshmem, enabling communication
15+
between, for instance, an aarch64 VM (using the traditional ivshmem device and
16+
running Linux), and an arm VM (using the ivshmem-flat device and running Zephyr
17+
instead).
18+
19+
The ivshmem-flat device does not support the use of a ``memdev`` option (see
20+
ivshmem.rst for more details). It relies on the ivshmem server to create and
21+
distribute the proper shared memory file descriptor and the eventfd(s) to notify
22+
(interrupt) the peers. Therefore, to use this device, it is always necessary to
23+
have an ivshmem server up and running for proper device creation.
24+
25+
Although the ivshmem-flat supports both peer notification (interrupts) and
26+
shared memory, the interrupt mechanism is optional. If no input IRQ is
27+
specified for the device it is disabled, preventing the VM from notifying or
28+
being notified by other VMs (a warning will be displayed to the user to inform
29+
the IRQ mechanism is disabled). The shared memory region is always present.
30+
31+
The MMRs (INTRMASK, INTRSTATUS, IVPOSITION, and DOORBELL registers) offsets at
32+
the MMR region, and their functions, follow the ivshmem spec, so they work
33+
exactly as in the ivshmem PCI device (see ./specs/ivshmem-spec.txt).

hw/arm/sbsa-ref.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ static void create_pcie(SBSAMachineState *sms)
673673
/* Map IO port space */
674674
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 2, base_pio);
675675

676-
for (i = 0; i < GPEX_NUM_IRQS; i++) {
676+
for (i = 0; i < PCI_NUM_PINS; i++) {
677677
sysbus_connect_irq(SYS_BUS_DEVICE(dev), i,
678678
qdev_get_gpio_in(sms->gic, irq + i));
679679
gpex_set_irq_num(GPEX_HOST(dev), i, irq + i);

hw/arm/virt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ static void create_pcie(VirtMachineState *vms)
15471547
/* Map IO port space */
15481548
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 2, base_pio);
15491549

1550-
for (i = 0; i < GPEX_NUM_IRQS; i++) {
1550+
for (i = 0; i < PCI_NUM_PINS; i++) {
15511551
sysbus_connect_irq(SYS_BUS_DEVICE(dev), i,
15521552
qdev_get_gpio_in(vms->gic, irq + i));
15531553
gpex_set_irq_num(GPEX_HOST(dev), i, irq + i);

hw/block/virtio-blk.c

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ static void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
5050
req->mr_next = NULL;
5151
}
5252

53-
static void virtio_blk_free_request(VirtIOBlockReq *req)
54-
{
55-
g_free(req);
56-
}
57-
5853
static void virtio_blk_req_complete(VirtIOBlockReq *req, unsigned char status)
5954
{
6055
VirtIOBlock *s = req->dev;
@@ -93,7 +88,7 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
9388
if (acct_failed) {
9489
block_acct_failed(blk_get_stats(s->blk), &req->acct);
9590
}
96-
virtio_blk_free_request(req);
91+
g_free(req);
9792
}
9893

9994
blk_error_action(s->blk, action, is_read, error);
@@ -136,7 +131,7 @@ static void virtio_blk_rw_complete(void *opaque, int ret)
136131

137132
virtio_blk_req_complete(req, VIRTIO_BLK_S_OK);
138133
block_acct_done(blk_get_stats(s->blk), &req->acct);
139-
virtio_blk_free_request(req);
134+
g_free(req);
140135
}
141136
}
142137

@@ -151,7 +146,7 @@ static void virtio_blk_flush_complete(void *opaque, int ret)
151146

152147
virtio_blk_req_complete(req, VIRTIO_BLK_S_OK);
153148
block_acct_done(blk_get_stats(s->blk), &req->acct);
154-
virtio_blk_free_request(req);
149+
g_free(req);
155150
}
156151

157152
static void virtio_blk_discard_write_zeroes_complete(void *opaque, int ret)
@@ -169,7 +164,7 @@ static void virtio_blk_discard_write_zeroes_complete(void *opaque, int ret)
169164
if (is_write_zeroes) {
170165
block_acct_done(blk_get_stats(s->blk), &req->acct);
171166
}
172-
virtio_blk_free_request(req);
167+
g_free(req);
173168
}
174169

175170
static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s, VirtQueue *vq)
@@ -214,7 +209,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
214209

215210
fail:
216211
virtio_blk_req_complete(req, status);
217-
virtio_blk_free_request(req);
212+
g_free(req);
218213
}
219214

220215
static inline void submit_requests(VirtIOBlock *s, MultiReqBuffer *mrb,
@@ -612,7 +607,7 @@ static void virtio_blk_zone_report_complete(void *opaque, int ret)
612607

613608
out:
614609
virtio_blk_req_complete(req, err_status);
615-
virtio_blk_free_request(req);
610+
g_free(req);
616611
g_free(data->zone_report_data.zones);
617612
g_free(data);
618613
}
@@ -661,7 +656,7 @@ static void virtio_blk_handle_zone_report(VirtIOBlockReq *req,
661656
return;
662657
out:
663658
virtio_blk_req_complete(req, err_status);
664-
virtio_blk_free_request(req);
659+
g_free(req);
665660
}
666661

667662
static void virtio_blk_zone_mgmt_complete(void *opaque, int ret)
@@ -677,7 +672,7 @@ static void virtio_blk_zone_mgmt_complete(void *opaque, int ret)
677672
}
678673

679674
virtio_blk_req_complete(req, err_status);
680-
virtio_blk_free_request(req);
675+
g_free(req);
681676
}
682677

683678
static int virtio_blk_handle_zone_mgmt(VirtIOBlockReq *req, BlockZoneOp op)
@@ -719,7 +714,7 @@ static int virtio_blk_handle_zone_mgmt(VirtIOBlockReq *req, BlockZoneOp op)
719714
return 0;
720715
out:
721716
virtio_blk_req_complete(req, err_status);
722-
virtio_blk_free_request(req);
717+
g_free(req);
723718
return err_status;
724719
}
725720

@@ -750,7 +745,7 @@ static void virtio_blk_zone_append_complete(void *opaque, int ret)
750745

751746
out:
752747
virtio_blk_req_complete(req, err_status);
753-
virtio_blk_free_request(req);
748+
g_free(req);
754749
g_free(data);
755750
}
756751

@@ -788,7 +783,7 @@ static int virtio_blk_handle_zone_append(VirtIOBlockReq *req,
788783

789784
out:
790785
virtio_blk_req_complete(req, err_status);
791-
virtio_blk_free_request(req);
786+
g_free(req);
792787
return err_status;
793788
}
794789

@@ -855,7 +850,7 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
855850
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
856851
block_acct_invalid(blk_get_stats(s->blk),
857852
is_write ? BLOCK_ACCT_WRITE : BLOCK_ACCT_READ);
858-
virtio_blk_free_request(req);
853+
g_free(req);
859854
return 0;
860855
}
861856

@@ -911,7 +906,7 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
911906
VIRTIO_BLK_ID_BYTES));
912907
iov_from_buf(in_iov, in_num, 0, serial, size);
913908
virtio_blk_req_complete(req, VIRTIO_BLK_S_OK);
914-
virtio_blk_free_request(req);
909+
g_free(req);
915910
break;
916911
}
917912
case VIRTIO_BLK_T_ZONE_APPEND & ~VIRTIO_BLK_T_OUT:
@@ -943,7 +938,7 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
943938
if (unlikely(!(type & VIRTIO_BLK_T_OUT) ||
944939
out_len > sizeof(dwz_hdr))) {
945940
virtio_blk_req_complete(req, VIRTIO_BLK_S_UNSUPP);
946-
virtio_blk_free_request(req);
941+
g_free(req);
947942
return 0;
948943
}
949944

@@ -960,14 +955,14 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
960955
is_write_zeroes);
961956
if (err_status != VIRTIO_BLK_S_OK) {
962957
virtio_blk_req_complete(req, err_status);
963-
virtio_blk_free_request(req);
958+
g_free(req);
964959
}
965960

966961
break;
967962
}
968963
default:
969964
virtio_blk_req_complete(req, VIRTIO_BLK_S_UNSUPP);
970-
virtio_blk_free_request(req);
965+
g_free(req);
971966
}
972967
return 0;
973968
}
@@ -988,7 +983,7 @@ void virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq)
988983
while ((req = virtio_blk_get_request(s, vq))) {
989984
if (virtio_blk_handle_request(req, &mrb)) {
990985
virtqueue_detach_element(req->vq, &req->elem, 0);
991-
virtio_blk_free_request(req);
986+
g_free(req);
992987
break;
993988
}
994989
}
@@ -1038,7 +1033,7 @@ static void virtio_blk_dma_restart_bh(void *opaque)
10381033
while (req) {
10391034
next = req->next;
10401035
virtqueue_detach_element(req->vq, &req->elem, 0);
1041-
virtio_blk_free_request(req);
1036+
g_free(req);
10421037
req = next;
10431038
}
10441039
break;
@@ -1121,7 +1116,7 @@ static void virtio_blk_reset(VirtIODevice *vdev)
11211116
/* No other threads can access req->vq here */
11221117
virtqueue_detach_element(req->vq, &req->elem, 0);
11231118

1124-
virtio_blk_free_request(req);
1119+
g_free(req);
11251120
}
11261121
}
11271122

hw/display/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,16 @@ config XLNX_DISPLAYPORT
140140

141141
config DM163
142142
bool
143+
144+
config MAC_PVG
145+
bool
146+
default y
147+
148+
config MAC_PVG_MMIO
149+
bool
150+
depends on MAC_PVG && AARCH64
151+
152+
config MAC_PVG_PCI
153+
bool
154+
depends on MAC_PVG && PCI
155+
default y if PCI_DEVICES

0 commit comments

Comments
 (0)