qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linuxarm] Re: [RFC PATCH v2 07/32] hw/cxl/device: Implement basic


From: Ben Widawsky
Subject: Re: [Linuxarm] Re: [RFC PATCH v2 07/32] hw/cxl/device: Implement basic mailbox (8.2.8.4)
Date: Thu, 7 Jan 2021 21:36:40 -0800

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.Cameron@Huawei.com> wrote:
> > > 
> > > > On Tue, 5 Jan 2021 08:52:58 -0800
> > > > Ben Widawsky <ben.widawsky@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]
> 
> > 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]