Re: [PATCH v2 3/4] hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()

2024-01-21 Thread Hyeonggon Yoo
On Tue, Jan 9, 2024 at 12:54 PM Jonathan Cameron wrote: > > On Fri, 22 Dec 2023 18:00:50 +0900 > Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > > The spec states that reads/writes should have no effect and a part of > > commands should be ignored when the m

Re: [PATCH v2 qemu] hw/cxl/device: read from register values in mdev_reg_read()

2024-01-13 Thread Hyeonggon Yoo
On Thu, Jan 11, 2024 at 9:59 AM Jonathan Cameron wrote: > > From: Hyeonggon Yoo <42.hye...@gmail.com> > > In the current mdev_reg_read() implementation, it consistently returns > that the Media Status is Ready (01b). This was fine until commit > 25a52959f99d ("h

[PATCH v2 3/4] hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()

2023-12-22 Thread Hyeonggon Yoo
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 Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> --- hw/cxl/cxl-mailbox-utils.c

[PATCH v2 4/4] hw/cxl/events: discard all event records during sanitation

2023-12-22 Thread Hyeonggon Yoo
Per spec 8.2.9.9.5.1 Sanitize (Opcode 4400h), sanitize command should delete all event logs. Introduce cxl_discard_all_event_logs() and call this in __do_sanitization(). Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> --- hw/cxl/cxl-events.c | 13 + hw/cxl/cxl-m

[PATCH v2 0/4] A Followup for "QEMU: CXL mailbox rework and features (Part 1)"

2023-12-22 Thread Hyeonggon Yoo
anitation, as per spec. [1] https://lore.kernel.org/linux-cxl/20231023160806.13206-1-jonathan.came...@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_

[PATCH v2 2/4] hw/cxl/device: read from register values in mdev_reg_read()

2023-12-22 Thread Hyeonggon Yoo
dummy values. Fixes: commit 25a52959f99d ("hw/cxl: Add support for device sanitation") Reviewed-by: Davidlohr Bueso Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> --- hw/cxl/cxl-device-utils.c | 17 +++-- include/hw/cxl/cxl_device.h | 4 +++- 2 files changed, 14

[PATCH v2 1/4] hw/cxl: fix build error in cxl_type3_stubs.c

2023-12-22 Thread Hyeonggon Yoo
Fix build errors in cxl_type3_stubs.c due to a the incorrect definition of the qmp_cxl_{add,release}_dynamic_capacity functions. Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> --- hw/mem/cxl_type3_stubs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH v1 2/2] hw/mem/cxl_type3: allocate more vectors for MSI-X

2023-11-29 Thread Hyeonggon Yoo
On Tue, Nov 28, 2023 at 9:46 PM Jonathan Cameron wrote: > > On Tue, 28 Nov 2023 09:27:28 +0900 > Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > > On Tue, Nov 28, 2023 at 2:53 AM Davidlohr Bueso wrote: > > > > > > On Mon, 27 Nov 2023, Hyeonggon Yoo wrote:

Re: [PATCH v1 0/2] A Fixup for "QEMU: CXL mailbox rework and features (Part 1)"

2023-11-28 Thread Hyeonggon Yoo
On Tue, Nov 28, 2023 at 4:31 PM Michael S. Tsirkin wrote: > > On Mon, Nov 27, 2023 at 07:58:28PM +0900, Hyeonggon Yoo wrote: > > Hi, this is a fixup for the recent patch series "QEMU: CXL mailbox rework > > and > > features (Part 1)" [1]. > > > To c

Re: [PATCH v1 1/2] hw/cxl/device: read from register values in mdev_reg_read()

2023-11-27 Thread Hyeonggon Yoo
On Tue, Nov 28, 2023 at 5:27 AM Davidlohr Bueso wrote: > > On Mon, 27 Nov 2023, Hyeonggon Yoo wrote: > > >In the current mdev_reg_read() implementation, it consistently returns > >that the Media Status is Ready (01b). This was fine until commit > >25a52959f99d (&quo

Re: [PATCH v1 2/2] hw/mem/cxl_type3: allocate more vectors for MSI-X

2023-11-27 Thread Hyeonggon Yoo
On Tue, Nov 28, 2023 at 2:53 AM Davidlohr Bueso wrote: > > On Mon, 27 Nov 2023, Hyeonggon Yoo wrote: > > >commit 43efb0bfad2b ("hw/cxl/mbox: Wire up interrupts for background > >completion") enables notifying background command completion via MSI-X > >interr

[PATCH v1 1/2] hw/cxl/device: read from register values in mdev_reg_read()

2023-11-27 Thread Hyeonggon Yoo
dummy values. Fixes: commit 25a52959f99d ("hw/cxl: Add support for device sanitation") Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> --- hw/cxl/cxl-device-utils.c | 17 +++-- include/hw/cxl/cxl_device.h | 4 +++- 2 files changed, 14 insertions(+), 7 deletion

[PATCH v1 2/2] hw/mem/cxl_type3: allocate more vectors for MSI-X

2023-11-27 Thread Hyeonggon Yoo
up interrupts for background completion") Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> --- hw/mem/cxl_type3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 52647b4ac7..72d9371347 100644 --- a/hw/mem/cxl_type3.c +

[PATCH v1 0/2] A Fixup for "QEMU: CXL mailbox rework and features (Part 1)"

2023-11-27 Thread Hyeonggon Yoo
tion failure when it issues an MSI-X interrupt (indicating the completion of the sanitize command). [1] https://lore.kernel.org/linux-cxl/20231023160806.13206-1-jonathan.came...@huawei.com Hyeonggon Yoo (2): hw/cxl/device: read from register values in mdev_reg_read() hw/mem/cxl_type3: a

Re: [PATCH v2 13/17] hw/cxl: Add support for device sanitation

2023-11-13 Thread Hyeonggon Yoo
On Tue, Oct 24, 2023 at 1:14 AM Jonathan Cameron wrote: > > From: Davidlohr Bueso > > Make use of the background operations through the sanitize command, per CXL > 3.0 specs. Traditionally run times can be rather long, depending on the > size of the media. > > Estimate times based on: >

Re: Accessing emulated CXL memory is unstable

2023-10-10 Thread Hyeonggon Yoo
On Wed, Oct 11, 2023 at 12:54 AM Gregory Price wrote: > > On Tue, Oct 10, 2023 at 10:35:03AM +0900, Hyeonggon Yoo wrote: > > Hello folks, > > > > I experienced strange application crashes/internal KVM errors > > while playing with emulated type 3 CXL memory. I would

Re: reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-18 Thread Hyeonggon Yoo
r should I use other tools to debug SMP bugs? > On 18.01.2023 11:47, Hyeonggon Yoo wrote: > > On Wed, Jan 18, 2023 at 10:12:48AM +0300, Pavel Dovgalyuk wrote: > > > As replay works well, the reverse debugging should be ok too. > > > But for "goin

Re: reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-18 Thread Hyeonggon Yoo
something wrong? thank you so much with your help. -- Best regards, Hyeonggon > > And you also need to add rrsnapshot to icount for creating the snapshot at > the start of VM execution: > -icount shift=auto,rr=record,rrfile=$REPLAY_FILE,rrsnapshot=start > > > On 18.01.2

reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-17 Thread Hyeonggon Yoo
Hello QEMU folks. I was struggling to fix a recent heisenbug in the Linux kernel, and fortunately the bug was reproducible with TCG and -smp 1. I'm using qemu version 7.2.0, and guest architecture is i386. I tried to inspect the bug using record/replay and reverse-debugging feature in the QEMU.