qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Handling multiple inheritance [for CXL]
@ 2021-01-26 21:33 Ben Widawsky
  2021-01-27 10:06 ` Daniel P. Berrangé
  2021-01-27 20:18 ` Igor Mammedov
  0 siblings, 2 replies; 7+ messages in thread
From: Ben Widawsky @ 2021-01-26 21:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Xiao Guangrong, Markus Armbruster, Michael S. Tsirkin

I'm working on CXL 2.0 type 3 memory devices [1]. In short, these are PCIe devices
that have persistent memory on them. As such, it would be nice to inherit from
both a PCI_DEVICE class as well as an NVDIMM device class.

Truth be told, using TYPE_MEMORY_DEVICE as the interface does provide most of
what I need. I'm wondering what the best way to handle this is. Currently, the
only thing NVDIMM class provides is write/read_label_data, this is driven by
_DSM. For CXL, the mechanism to read/write the equivalent area is not done via
_DSM, but done directly via a mailbox interface. However, the intent is the
same, and so utilizing similar code seems ideal.

If there's a desire to unify these code paths, I'd need something like multiple
inheritance. I'm looking for some feedback here on how to do it.

Thanks.
Ben

[1]: https://lore.kernel.org/qemu-devel/20210105165323.783725-1-ben.widawsky@intel.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-27 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 21:33 Handling multiple inheritance [for CXL] Ben Widawsky
2021-01-27 10:06 ` Daniel P. Berrangé
2021-01-27 17:16   ` Ben Widawsky
2021-01-27 20:18 ` Igor Mammedov
2021-01-27 20:25   ` Ben Widawsky
2021-01-27 21:33     ` Igor Mammedov
2021-01-27 21:39       ` Ben Widawsky

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).