[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 27/82] hw/mem/cxl-type3: Add MSIX support
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v2 27/82] hw/mem/cxl-type3: Add MSIX support |
|
Date: |
Wed, 2 Nov 2022 12:09:35 -0400 |
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This will be used by several upcoming patch sets so break it out
such that it doesn't matter which one lands first.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20221014151045.24781-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/mem/cxl_type3.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index a71bf1afeb..568c9d62f5 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -13,6 +13,7 @@
#include "qemu/rcu.h"
#include "sysemu/hostmem.h"
#include "hw/cxl/cxl.h"
+#include "hw/pci/msix.h"
/*
* Null value of all Fs suggested by IEEE RA guidelines for use of
@@ -146,6 +147,8 @@ 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 = 1;
+ int i;
if (!cxl_setup_memory(ct3d, errp)) {
return;
@@ -180,6 +183,12 @@ static void ct3_realize(PCIDevice *pci_dev, Error **errp)
PCI_BASE_ADDRESS_SPACE_MEMORY |
PCI_BASE_ADDRESS_MEM_TYPE_64,
&ct3d->cxl_dstate.device_registers);
+
+ /* MSI(-X) Initailization */
+ msix_init_exclusive_bar(pci_dev, msix_num, 4, NULL);
+ for (i = 0; i < msix_num; i++) {
+ msix_vector_use(pci_dev, i);
+ }
}
static void ct3_exit(PCIDevice *pci_dev)
--
MST
- [PULL v2 16/82] MAINTAINERS: add myself as the maintainer for acpi biosbits avocado tests, (continued)
- [PULL v2 16/82] MAINTAINERS: add myself as the maintainer for acpi biosbits avocado tests, Michael S. Tsirkin, 2022/11/02
- [PULL v2 17/82] hw/smbios: add core_count2 to smbios table type 4, Michael S. Tsirkin, 2022/11/02
- [PULL v2 18/82] bios-tables-test: teach test to use smbios 3.0 tables, Michael S. Tsirkin, 2022/11/02
- [PULL v2 19/82] tests/acpi: allow changes for core_count2 test, Michael S. Tsirkin, 2022/11/02
- [PULL v2 20/82] bios-tables-test: add test for number of cores > 255, Michael S. Tsirkin, 2022/11/02
- [PULL v2 22/82] tests/acpi: virt: allow acpi MADT and FADT changes, Michael S. Tsirkin, 2022/11/02
- [PULL v2 23/82] acpi: fadt: support revision 6.0 of the ACPI specification, Michael S. Tsirkin, 2022/11/02
- [PULL v2 24/82] acpi: arm/virt: madt: bump to revision 4 accordingly to ACPI 6.0 Errata A, Michael S. Tsirkin, 2022/11/02
- [PULL v2 25/82] tests/acpi: virt: update ACPI MADT and FADT binaries, Michael S. Tsirkin, 2022/11/02
- [PULL v2 21/82] tests/acpi: update tables for new core count test, Michael S. Tsirkin, 2022/11/02
- [PULL v2 27/82] hw/mem/cxl-type3: Add MSIX support,
Michael S. Tsirkin <=
- [PULL v2 28/82] hw/cxl/cdat: CXL CDAT Data Object Exchange implementation, Michael S. Tsirkin, 2022/11/02
- [PULL v2 29/82] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange, Michael S. Tsirkin, 2022/11/02
- [PULL v2 30/82] hw/pci-bridge/cxl-upstream: Add a CDAT table access DOE, Michael S. Tsirkin, 2022/11/02
- [PULL v2 26/82] hw/pci: PCIe Data Object Exchange emulation, Michael S. Tsirkin, 2022/11/02
- [PULL v2 32/82] vhost-user: Support vhost_dev_start, Michael S. Tsirkin, 2022/11/02
- [PULL v2 31/82] vhost: Change the sequence of device start, Michael S. Tsirkin, 2022/11/02