From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Zhi Wang <zhiw@nvidia.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"dave.jiang@intel.com" <dave.jiang@intel.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>,
"fan.ni@samsung.com" <fan.ni@samsung.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"alucerop@amd.com" <alucerop@amd.com>,
"clg@redhat.com" <clg@redhat.com>,
Andy Currid <ACurrid@nvidia.com>, Neo Jia <cjia@nvidia.com>,
Surath Mitra <smitra@nvidia.com>,
Ankit Agrawal <ankita@nvidia.com>,
Aniket Agashe <aniketa@nvidia.com>,
Kirti Wankhede <kwankhede@nvidia.com>,
"Tarun Gupta (SW-GPU)" <targupta@nvidia.com>,
"zhiwang@kernel.org" <zhiwang@kernel.org>
Subject: Re: [PATCH 3/3] hw/cxl: introduce CXL type-2 device emulation
Date: Fri, 31 Jan 2025 11:52:20 +0000 [thread overview]
Message-ID: <20250131115220.0000625c@huawei.com> (raw)
In-Reply-To: <8d08ab33-d989-4209-b137-a6991c7af415@nvidia.com>
> >> +static void cxl_accel_class_init(ObjectClass *oc, void *data)
> >> +{
> >> + DeviceClass *dc = DEVICE_CLASS(oc);
> >> + PCIDeviceClass *pc = PCI_DEVICE_CLASS(oc);
> >> +
> >> + pc->realize = cxl_accel_realize;
> >> + pc->exit = cxl_accel_exit;
> >> +
> >> + pc->class_id = PCI_CLASS_CXL_QEMU_ACCEL;
> >> + pc->vendor_id = PCI_VENDOR_ID_INTEL;
> >> + pc->device_id = 0xd94;
> >
>
> The IDs are mostly from Ira's original T2 emulated device patches.
> I will take a look to see if there is a better option for this.
I pinged Ira and you on the CXL discord. May be fine to use this
and save you figuring out who in holds the magic list at NVidia
and persuading them to let you have one ;)
>
> > If you are posting these I hope you have those IDs reserved
> > (which seems unlikely ;)
> > We need to be absolutely sure we never hit an existing ID which generally
> > means you need to find whoever controls those allocations in your company
> > and get them to give you an ID for this.
> >
> >> + pc->revision = 1;
> >> +
> >> + set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
> >> + dc->desc = "CXL Accelerator Device (Type 2)";
> >> + device_class_set_legacy_reset(dc, cxl_accel_reset);
> >> + device_class_set_props(dc, cxl_accel_props);
> >> +}
> >
> >> void cxl_event_init(CXLDeviceState *cxlds, int start_msg_num);
> >> diff --git a/include/hw/pci/pci_ids.h b/include/hw/pci/pci_ids.h
> >> index f1a53fea8d..08bc469316 100644
> >> --- a/include/hw/pci/pci_ids.h
> >> +++ b/include/hw/pci/pci_ids.h
> >> @@ -55,6 +55,7 @@
> >> #define PCI_CLASS_MEMORY_RAM 0x0500
> >> #define PCI_CLASS_MEMORY_FLASH 0x0501
> >> #define PCI_CLASS_MEMORY_CXL 0x0502
> >> +#define PCI_CLASS_CXL_QEMU_ACCEL 0x0503
> >
> > Either this is a real device class (which seems unlikely given the name)
> > or you need to choose something else. PCI maintains a big list of
> > class codes and currently 0x0502 is the highest one define in baseclass 05h
> > (memory controllers)
> >
> > https://members.pcisig.com/wg/PCI-SIG/document/20113
> > (behind a pcisig login)
> >
> >> #define PCI_CLASS_MEMORY_OTHER 0x0580
> >>
> >> #define PCI_BASE_CLASS_BRIDGE 0x06
> >
>
next prev parent reply other threads:[~2025-01-31 11:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 13:04 [PATCH 0/3] Introduce CXL type-2 device emulation Zhi Wang
2024-12-12 13:04 ` [PATCH 1/3] hw/cxl: factor out cxl_host_addr_to_dpa() Zhi Wang
2025-01-21 15:52 ` Jonathan Cameron via
2024-12-12 13:04 ` [PATCH 2/3] hw/cxl: introduce cxl_component_update_dvsec() Zhi Wang
2025-01-21 15:57 ` Jonathan Cameron via
2024-12-12 13:04 ` [PATCH 3/3] hw/cxl: introduce CXL type-2 device emulation Zhi Wang
2024-12-12 17:02 ` Alejandro Lucero Palau
2024-12-12 18:33 ` Zhi Wang
2025-01-21 16:16 ` Jonathan Cameron via
2025-01-31 10:45 ` Zhi Wang
2025-01-31 11:52 ` Jonathan Cameron via [this message]
2024-12-12 16:49 ` [PATCH 0/3] Introduce " Alejandro Lucero Palau
2024-12-12 18:10 ` Zhi Wang
2025-01-21 15:34 ` Jonathan Cameron via
2025-01-31 10:37 ` Zhi Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250131115220.0000625c@huawei.com \
--to=qemu-devel@nongnu.org \
--cc=ACurrid@nvidia.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=alucerop@amd.com \
--cc=aniketa@nvidia.com \
--cc=ankita@nvidia.com \
--cc=cjia@nvidia.com \
--cc=clg@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=kwankhede@nvidia.com \
--cc=smitra@nvidia.com \
--cc=targupta@nvidia.com \
--cc=zhiw@nvidia.com \
--cc=zhiwang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).