qemu/hw
Zhao Liu e9e92433c8 hw/cxl/cxl-host: Fix segmentation fault when getting cxl-fmw property
QEMU crashes (Segmentation fault) when getting cxl-fmw property via
qmp:

(QEMU) qom-get path=machine property=cxl-fmw

This issue is caused by accessing wrong callback (opaque) type in
machine_get_cfmw().

cxl_machine_init() sets the callback as `CXLState *` type but
machine_get_cfmw() treats the callback as
`CXLFixedMemoryWindowOptionsList **`.

Fix this error by casting opaque to `CXLState *` type in
machine_get_cfmw().

Fixes: 03b39fcf64 ("hw/cxl: Make the CXL fixed memory window setup a machine parameter.")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Xingtao Yao <yaoxt.fnst@fujitsu.com>
Link: https://lore.kernel.org/r/20240704093404.1848132-1-zhao1.liu@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705113956.941732-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit a207d5f87d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-07-24 07:31:09 +03:00
..
9pfs
acpi hmat acpi: Fix out of bounds access due to missing use of indirection 2024-03-12 17:59:46 -04:00
adc
alpha
arm hw/arm/npcm7xx: Store derivative OTP fuse key in little endian 2024-05-02 13:17:18 +03:00
audio hw/audio/virtio-snd: Always use little endian audio format 2024-06-20 10:03:44 +03:00
avr
block hw/pflash: fix block write start 2024-05-27 07:37:34 +03:00
char hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs 2024-04-10 09:09:33 +02:00
core hw/core: allow parameter=1 for SMP topology on any machine 2024-07-03 11:44:24 +03:00
cpu
cris
cxl hw/cxl/cxl-host: Fix segmentation fault when getting cxl-fmw property 2024-07-24 07:31:09 +03:00
display stdvga: fix screen blanking 2024-06-20 10:04:31 +03:00
dma hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields 2024-05-02 13:16:29 +03:00
fsi
gpio * Fix timeouts in Travis-CI jobs 2024-03-25 14:19:42 +00:00
hppa
hyperv
i2c
i386 * lsi53c895a: fix assertion failure with invalid Block Move 2024-04-03 12:52:03 +01:00
ide
input
intc hw/intc/riscv_aplic: APLICs should add child earlier than realize 2024-06-05 13:00:13 +03:00
ipack
ipmi
isa hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately 2024-04-15 13:07:11 +02:00
loongarch hw/loongarch/virt: Fix FDT memory node address width 2024-05-27 07:50:35 +03:00
m68k
mem hw/mem/cxl_type3: Fix missing ERRP_GUARD() in ct3_realize() 2024-03-12 17:56:55 -04:00
microblaze hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user 2024-03-25 09:57:43 +01:00
mips
misc hw/misc/applesmc: Fix memory leak in reset() handler 2024-04-10 09:09:34 +02:00
net virtio-net: drop too short packets early 2024-06-11 10:09:42 +03:00
nios2
nubus
nvme hw/nvme: fix memory leak in nvme_dsm 2024-07-23 21:00:28 +03:00
nvram hw/nvram/mac_nvram: Report failure to write data 2024-03-25 10:41:01 +00:00
openrisc
pci virtio,pc,pci: features, cleanups, fixes 2024-03-13 15:11:53 +00:00
pci-bridge virtio,pc,pci: features, cleanups, fixes 2024-03-13 15:11:53 +00:00
pci-host hw/pci-host/ppc440_pcix: Do not expose a bridge device on PCI bus 2024-04-15 13:07:15 +02:00
pcmcia
ppc hw/ppc/spapr: Include missing 'sysemu/tcg.h' header 2024-03-30 18:50:23 +10:00
rdma
remote hw/remote/vfio-user: Fix config space access byte order 2024-05-10 13:20:20 +03:00
riscv target/riscv/kvm: fix timebase-frequency when using KVM acceleration 2024-03-22 15:41:01 +10:00
rtc
rx
s390x
scsi scsi: fix regression and honor bootindex again for legacy drives 2024-07-19 19:43:05 +03:00
sd hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set 2024-04-10 09:09:34 +02:00
sensor
sh4
smbios hw/smbios: add stub for smbios_get_table_legacy() 2024-03-26 14:32:54 +01:00
sparc
sparc64
ssi aspeed/smc: Only wire flash devices at reset 2024-03-19 11:58:15 +01:00
timer
tpm
tricore
ufs hw/ufs: Fix buffer overflow bug 2024-05-02 13:03:05 +03:00
usb usb-storage: Fix BlockConf defaults 2024-04-16 11:50:52 +01:00
vfio vfio/iommufd: Fix memory leak 2024-03-19 11:56:37 +01:00
virtio virtio: remove virtio_tswap16s() call in vring_packed_event_read() 2024-07-05 00:13:15 +03:00
watchdog
xen Xen queue: 2024-03-12 21:32:31 +00:00
xenpv
xtensa
Kconfig
meson.build