From: Igor Mammedov <imammedo@redhat.com>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Markus Armbruster <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org,
Xiao Guangrong <xiaoguangrong.eric@gmail.com>
Subject: Re: Handling multiple inheritance [for CXL]
Date: Wed, 27 Jan 2021 21:18:24 +0100 [thread overview]
Message-ID: <20210127211824.4d64b45d@redhat.com> (raw)
In-Reply-To: <20210126213013.6v24im4sler3q3am@mail.bwidawsk.net>
On Tue, 26 Jan 2021 13:33:52 -0800
Ben Widawsky <ben@bwidawsk.net> wrote:
> 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.
could you be more specific on what you need from it?
>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/
>
next prev parent reply other threads:[~2021-01-27 20:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2021-01-27 20:25 ` Ben Widawsky
2021-01-27 21:33 ` Igor Mammedov
2021-01-27 21:39 ` Ben Widawsky
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=20210127211824.4d64b45d@redhat.com \
--to=imammedo@redhat.com \
--cc=armbru@redhat.com \
--cc=ben@bwidawsk.net \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoguangrong.eric@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.