[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: |
Wed, 6 Jan 2021 11:08:25 -0800 |
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;
+ }
+
[snip]
>
- Re: [RFC PATCH v2 05/32] hw/cxl/device: Implement the CAP array (8.2.8.1-2), (continued)
[RFC PATCH v2 06/32] hw/cxl/device: Add device status (8.2.8.3), Ben Widawsky, 2021/01/05
[RFC PATCH v2 07/32] hw/cxl/device: Implement basic mailbox (8.2.8.4), Ben Widawsky, 2021/01/05
[RFC PATCH v2 09/32] hw/cxl/device: Add cheap EVENTS implementation (8.2.9.1), Ben Widawsky, 2021/01/05
[RFC PATCH v2 08/32] hw/cxl/device: Add memory devices (8.2.8.5), Ben Widawsky, 2021/01/05
[RFC PATCH v2 10/32] hw/cxl/device: Placeholder for firmware commands, Ben Widawsky, 2021/01/05
[RFC PATCH v2 11/32] hw/cxl/device: Timestamp implementation (8.2.9.3), Ben Widawsky, 2021/01/05
[RFC PATCH v2 13/32] hw/pxb: Use a type for realizing expanders, Ben Widawsky, 2021/01/05
[RFC PATCH v2 12/32] hw/cxl/device: Add log commands (8.2.9.4) + CEL, Ben Widawsky, 2021/01/05
[RFC PATCH v2 32/32] qtest/cxl: Add very basic sanity tests, Ben Widawsky, 2021/01/05
[RFC PATCH v2 30/32] tests/acpi: Add new CEDT files, Ben Widawsky, 2021/01/05