From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>, Fan Ni <fan.ni@samsung.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
<linux-cxl@vger.kernel.org>, <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 3/4] hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()
Date: Mon, 1 Apr 2024 19:44:44 +0100 [thread overview]
Message-ID: <20240401194444.00001db0@Huawei.com> (raw)
In-Reply-To: <CAB=+i9QrmMMazcNvEhuwTNF+UZMHPQE=yT=RE+MJCUQO+QY27A@mail.gmail.com>
On Sun, 21 Jan 2024 21:50:00 -0500
Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote:
> On Tue, Jan 9, 2024 at 12:54 PM Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
> >
> > On Fri, 22 Dec 2023 18:00:50 +0900
> > Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote:
> >
> > > The spec states that reads/writes should have no effect and a part of
> > > commands should be ignored when the media is disabled, not when the
> > > sanitize command is running.qq
> > >
> > > Introduce cxl_dev_media_disabled() to check if the media is disabled and
> > > replace sanitize_running() with it.
> > >
> > > Make sure that the media has been correctly disabled during sanitation
> > > by adding an assert to __toggle_media(). Now, enabling when already
> > > enabled or vice versa results in an assert() failure.
> > >
> > > Suggested-by: Davidlohr Bueso <dave@stgolabs.net>
> > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
> >
> > This applies to
> >
> > hw/cxl: Add get scan media capabilities cmd support.
> >
> > Should I just squash it with that patch in my tree?
> > For now I'm holding it immediately on top of that, but I'm not keen to
> > send messy code upstream unless there is a good reason to retain the
> > history.
>
> Oh, while the diff looks like the patch touches scan_media_running(), it's not.
>
> The proper Fixes: tag will be:
> Fixes: d77176724422 ("hw/cxl: Add support for device sanitation")
>
> > If you are doing this sort of fix series in future, please call out
> > what they fix explicitly. Can't use fixes tags as the commit ids
> > are unstable, but can mention the patch to make my life easier!
>
> Okay, next time I will either add the Fixes tag or add a comment on
> what it fixes.
>
> By the way I guess your latest, public branch is still cxl-2023-11-02, right?
> https://gitlab.com/jic23/qemu/-/tree/cxl-2023-11-02
>
> I assume you adjusted my v2 series, but please let me know if you prefer
> sending v3 against your latest tree.
>
> Thanks,
> Hyeonggon
Side note, in it's current form this breaks the switch-cci support in upstream
QEMU. I've finally gotten back to getting ready to look at MMPT support and
ran into a crash as a result. Needs protection with checked object_dynamic_cast()
to make sure we have a type3 device. I'll update the patch in my tree.
Thanks,
Jonathan
>
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>, Fan Ni <fan.ni@samsung.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
<linux-cxl@vger.kernel.org>, <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 3/4] hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()
Date: Mon, 1 Apr 2024 19:44:44 +0100 [thread overview]
Message-ID: <20240401194444.00001db0@Huawei.com> (raw)
In-Reply-To: <CAB=+i9QrmMMazcNvEhuwTNF+UZMHPQE=yT=RE+MJCUQO+QY27A@mail.gmail.com>
On Sun, 21 Jan 2024 21:50:00 -0500
Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote:
> On Tue, Jan 9, 2024 at 12:54 PM Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
> >
> > On Fri, 22 Dec 2023 18:00:50 +0900
> > Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote:
> >
> > > The spec states that reads/writes should have no effect and a part of
> > > commands should be ignored when the media is disabled, not when the
> > > sanitize command is running.qq
> > >
> > > Introduce cxl_dev_media_disabled() to check if the media is disabled and
> > > replace sanitize_running() with it.
> > >
> > > Make sure that the media has been correctly disabled during sanitation
> > > by adding an assert to __toggle_media(). Now, enabling when already
> > > enabled or vice versa results in an assert() failure.
> > >
> > > Suggested-by: Davidlohr Bueso <dave@stgolabs.net>
> > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
> >
> > This applies to
> >
> > hw/cxl: Add get scan media capabilities cmd support.
> >
> > Should I just squash it with that patch in my tree?
> > For now I'm holding it immediately on top of that, but I'm not keen to
> > send messy code upstream unless there is a good reason to retain the
> > history.
>
> Oh, while the diff looks like the patch touches scan_media_running(), it's not.
>
> The proper Fixes: tag will be:
> Fixes: d77176724422 ("hw/cxl: Add support for device sanitation")
>
> > If you are doing this sort of fix series in future, please call out
> > what they fix explicitly. Can't use fixes tags as the commit ids
> > are unstable, but can mention the patch to make my life easier!
>
> Okay, next time I will either add the Fixes tag or add a comment on
> what it fixes.
>
> By the way I guess your latest, public branch is still cxl-2023-11-02, right?
> https://gitlab.com/jic23/qemu/-/tree/cxl-2023-11-02
>
> I assume you adjusted my v2 series, but please let me know if you prefer
> sending v3 against your latest tree.
>
> Thanks,
> Hyeonggon
Side note, in it's current form this breaks the switch-cci support in upstream
QEMU. I've finally gotten back to getting ready to look at MMPT support and
ran into a crash as a result. Needs protection with checked object_dynamic_cast()
to make sure we have a type3 device. I'll update the patch in my tree.
Thanks,
Jonathan
>
next prev parent reply other threads:[~2024-04-01 18:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 9:00 [PATCH v2 0/4] A Followup for "QEMU: CXL mailbox rework and features (Part 1)" Hyeonggon Yoo
2023-12-22 9:00 ` [PATCH v2 1/4] hw/cxl: fix build error in cxl_type3_stubs.c Hyeonggon Yoo
2024-01-09 17:40 ` Jonathan Cameron
2024-01-09 17:40 ` Jonathan Cameron via
2024-01-10 17:30 ` fan
2023-12-22 9:00 ` [PATCH v2 2/4] hw/cxl/device: read from register values in mdev_reg_read() Hyeonggon Yoo
2024-01-09 17:45 ` Jonathan Cameron
2024-01-09 17:45 ` Jonathan Cameron via
2024-01-11 12:32 ` Jonathan Cameron
2024-01-11 12:32 ` Jonathan Cameron via
2023-12-22 9:00 ` [PATCH v2 3/4] hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled() Hyeonggon Yoo
2024-01-09 17:53 ` Jonathan Cameron
2024-01-09 17:53 ` Jonathan Cameron via
2024-01-22 2:50 ` Hyeonggon Yoo
2024-04-01 18:44 ` Jonathan Cameron [this message]
2024-04-01 18:44 ` Jonathan Cameron via
2023-12-22 9:00 ` [PATCH v2 4/4] hw/cxl/events: discard all event records during sanitation Hyeonggon Yoo
2024-01-01 21:38 ` Davidlohr Bueso
2024-01-09 17:55 ` Jonathan Cameron
2024-01-09 17:55 ` Jonathan Cameron via
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=20240401194444.00001db0@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=42.hyeyoo@gmail.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=linux-cxl@vger.kernel.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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 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.