qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] A Followup for "QEMU: CXL mailbox rework and features (Part 1)"
@ 2023-12-22  9:00 Hyeonggon Yoo
  2023-12-22  9:00 ` [PATCH v2 1/4] hw/cxl: fix build error in cxl_type3_stubs.c Hyeonggon Yoo
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Hyeonggon Yoo @ 2023-12-22  9:00 UTC (permalink / raw)
  To: Jonathan Cameron, Davidlohr Bueso, Fan Ni, Michael S . Tsirkin
  Cc: Hyeonggon Yoo, linux-cxl, qemu-devel

v1: https://lore.kernel.org/qemu-devel/20231127105830.2104954-1-42.hyeyoo@gmail.com

Changes from v1:
    - Added patch 1 that fixes a build failure in Jonathan's tree.
    - Added patch 3, as (partially) suggested by Davidlohr Buseo.
      One difference is that I dropped sanitize_running(), because
      cxl_dev_media_diabled() is enough for checking if the media is
      disabled (which implies sanitation is in progress)
    - Added patch 4 that dicards all event logs during sanitation

    Thanks everyone for giving feedbacks!

This is a fixup for the recent patch series "QEMU: CXL mailbox rework and
features (Part 1)" [1].

I don't mind if patch 1 is squashed into the problematic patch, as the
patch is not mainlined yet. This is based on Jonathan
Cameron's git tree (https://gitlab.com/jic23/qemu/-/tree/cxl-2023-11-02)

Sequence of Patches:

   1. Fix build error when CXL is not enabled, because of mismatching
      definition in cxl_type3_stubs.c
 
   2. Make mdev_reg_read() actually read registers, instead of
      returning a dummy value. This fixes Media Status being incorrectly
      read as "Enabled" while sanitation is in progress.

   3. Introduce cxl_dev_media_disabled() and replace sanitize_running()
      with it. Also add an assert() to check the media is correctly disabled
      during sanitation. (Now enabling when already enabled, or vice versa
      raises an assert failure.)

   4. Drop all event records during sanitation, as per spec.

[1] https://lore.kernel.org/linux-cxl/20231023160806.13206-1-Jonathan.Cameron@huawei.com

Hyeonggon Yoo (4):
  hw/cxl: fix build error in cxl_type3_stubs.c
  hw/cxl/device: read from register values in mdev_reg_read()
  hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()
  hw/cxl/events: discard all event records during sanitation

 hw/cxl/cxl-device-utils.c   | 17 +++++++++++------
 hw/cxl/cxl-events.c         | 13 +++++++++++++
 hw/cxl/cxl-mailbox-utils.c  |  7 +++++--
 hw/mem/cxl_type3.c          |  4 ++--
 hw/mem/cxl_type3_stubs.c    |  4 ++--
 include/hw/cxl/cxl_device.h | 16 ++++++++++------
 6 files changed, 43 insertions(+), 18 deletions(-)

-- 
2.39.3



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

end of thread, other threads:[~2024-04-01 18:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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 via
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 via
2024-01-22  2:50     ` Hyeonggon Yoo
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 via

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