On 21-01-06 11:08:28, Ben Widawsky wrote: > On 21-01-06 10:05:57, Ben Widawsky wrote: > > On 21-01-06 17:40:14, Jonathan Cameron wrote: > > > On Wed, 6 Jan 2021 13:21:23 +0000 > > > Jonathan Cameron <jonathan.came...@huawei.com> wrote: > > > > > > > On Tue, 5 Jan 2021 08:52:58 -0800 > > > > Ben Widawsky <ben.widaw...@intel.com> wrote: > > > > > > [snip] > > > > > I'm sorry you had to debug this. I had fixed this previously and it got > > lost. > > I'm currently between test applications, so my regression testing isn't > > great. > > > > I think the fix should be something like this, but I can't easily test at > > the > > moment: > > > > diff --git a/hw/cxl/cxl-device-utils.c b/hw/cxl/cxl-device-utils.c > > index c515d45d20..b38e9b4c17 100644 > > --- a/hw/cxl/cxl-device-utils.c > > +++ b/hw/cxl/cxl-device-utils.c > > @@ -102,6 +102,9 @@ static void mailbox_reg_write(void *opaque, hwaddr > > offset, uint64_t value, > > { > > CXLDeviceState *cxl_dstate = opaque; > > > > + if (offset >= A_CXL_DEV_CMD_PAYLOAD) > > + stn_le_p(cxl_dstate->mbox_reg_state, size, value); > > + > > /* > > * Lock is needed to prevent concurrent writes as well as to prevent > > writes > > * coming in while the firmware is processing. Without background > > commands > > > > > > > > + if (offset >= A_CXL_DEV_CMD_PAYLOAD) { > + stn_le_p(cxl_dstate->mbox_reg_state, size, value); > + return; > + } > +
Last time's a charm stn_le_p(cxl_dstate->mbox_reg_state + offset, size, value); > > [snip] > > >