[PATCH] mem/cxl_type3: fix GPF DVSEC

2022-09-15 Thread Tong Zhang
The structure is for device dvsec not port dvsec. Change type to fix this issue. Signed-off-by: Tong Zhang --- 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 3bf2869573..ada2108fac 100644 --- a/hw/mem

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-06-29 Thread Tong Zhang
On Wed, Jun 29, 2022 at 12:29 AM David Hildenbrand wrote: > On 06.05.22 18:31, Tong Zhang wrote: > > assert(dbs->acb) is meant to check the return value of io_func per > > documented in commit 6bee44ea34 ("dma: the passed io_func does not > > return NULL"). How

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-06-01 Thread Tong Zhang
b = dbs->io_func() > > aio_context_release(dbs->ctx); > > > > > > So where exactly would the lock that's now still held stop someone from > > modifying dbs->acb = NULL at the beginning of the function, which seems > > to be not protected by that lock? > > > >

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-05-31 Thread Tong Zhang
Hi David, On Mon, May 30, 2022 at 9:19 AM David Hildenbrand wrote: > > On 27.04.22 22:51, Tong Zhang wrote: > > assert(dbs->acb) is meant to check the return value of io_func per > > documented in commit 6bee44ea34 ("dma: the passed io_func does not > > return NU

[RESEND PATCH] hw/dma: fix crash caused by race condition

2022-05-06 Thread Tong Zhang
ion and dbs->acb is set to NULL again at line 121. Thus when we run assert at line 181 it will fail. softmmu/dma-helpers.c:181: dma_blk_cb: Assertion `dbs->acb' failed. Reported-by: Francisco Londono Signed-off-by: Tong Zhang --- softmmu/dma-helpers.c | 2 +- 1 file changed, 1 insertion(+

[RESEND PATCH] hw/dma: fix crash caused by race condition

2022-04-27 Thread Tong Zhang
ion and dbs->acb is set to NULL again at line 121. Thus when we run assert at line 181 it will fail. softmmu/dma-helpers.c:181: dma_blk_cb: Assertion `dbs->acb' failed. Reported-by: Francisco Londono Signed-off-by: Tong Zhang --- softmmu/dma-helpers.c | 2 +- 1 file changed, 1 insertion(+

[PATCH] hw/dma: fix crash caused by race condition

2022-04-08 Thread Tong Zhang
ion and dbs->acb is set to NULL again at line 121. Thus when we run assert at line 181 it will fail. softmmu/dma-helpers.c:181: dma_blk_cb: Assertion `dbs->acb' failed. Reported-by: Francisco Londono Signed-off-by: Tong Zhang --- softmmu/dma-helpers.c | 2 +- 1 file changed, 1 insertion(+

Re: [PATCH v9 33/45] cxl/cxl-host: Add memops for CFMWS region.

2022-04-07 Thread Tong Zhang
On 4/4/22 08:14, Jonathan Cameron wrote: > From: Jonathan Cameron > > > +static MemTxResult cxl_read_cfmws(void *opaque, hwaddr addr, uint64_t *data, > + unsigned size, MemTxAttrs attrs) > +{ > +CXLFixedWindow *fw = opaque; > +PCIDevice *d; > + > +d =

Re: [PATCH v9 18/45] hw/cxl/device: Implement MMIO HDM decoding (8.2.5.12)

2022-04-04 Thread Tong Zhang
> On Apr 4, 2022, at 8:14 AM, Jonathan Cameron via > wrote: > > From: Ben Widawsky > > A device's volatile and persistent memory are known Host Defined Memory > (HDM) regions. The mechanism by which the device is programmed to claim > the addresses associated with those regions is through

[Qemu-devel] [PATCH] applesmc: add error mem region handling for MacOS 10.12.4

2017-03-30 Thread Tong Zhang
This patch fixes a problem in applesmc emulation which prevent recent MacOS(10.12.4) from booing. Zhang Tong (1): applesmc: add error mem region handling for MacOS 10.12.4 hw/misc/applesmc.c | 152 + 1 file changed, 130 insertions(+), 22

[Qemu-devel] [PATCH] applesmc: add error mem region handling for MacOS 10.12.4

2017-03-30 Thread Tong Zhang
s.kext checks the returned error code for good. Signed-off-by: Tong Zhang<zt...@vt.edu> --- hw/misc/applesmc.c | 152 + 1 file changed, 130 insertions(+), 22 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c i