From: Li Zhijian Date: Wed, 15 Jan 2025 07:58:34 +0000 (+0800) Subject: hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr` X-Git-Tag: v9.1.3~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7594c49b95453c085d4da3903e6ffb79bae07c50;p=thirdparty%2Fqemu.git hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr` This assertion always happens when we sanitize the CXL memory device. $ echo 1 > /sys/bus/cxl/devices/mem0/security/sanitize It is incorrect to register an MSIX number beyond the device's capability. Increase the device's MSIX number to cover the mailbox msix number(9). Fixes: 43efb0bfad2b ("hw/cxl/mbox: Wire up interrupts for background completion") Signed-off-by: Li Zhijian Message-Id: <20250115075834.167504-1-lizhijian@fujitsu.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 1ce979e7269a34d19ea1a65808df014d8b2acbf6) Signed-off-by: Michael Tokarev --- diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index d648192ab9..cc4ba97701 100644 --- a/hw/mem/cxl_type3.c +++ b/hw/mem/cxl_type3.c @@ -842,7 +842,7 @@ static void ct3_realize(PCIDevice *pci_dev, Error **errp) ComponentRegisters *regs = &cxl_cstate->crb; MemoryRegion *mr = ®s->component_registers; uint8_t *pci_conf = pci_dev->config; - unsigned short msix_num = 6; + unsigned short msix_num = 10; int i, rc; uint16_t count;