[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 4/4] hw/cxl: Add clear poison mailbox command support.
|
From: |
Ira Weiny |
|
Subject: |
Re: [PATCH v6 4/4] hw/cxl: Add clear poison mailbox command support. |
|
Date: |
Fri, 19 May 2023 10:48:13 -0700 |
Jonathan Cameron wrote:
> Current implementation is very simple so many of the corner
> cases do not exist (e.g. fragmenting larger poison list entries)
>
> Reviewed-by: Fan Ni <fan.ni@samsung.com>
Minor nit below. Otherwise looks good.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
> index ab600735eb..84022d7ae3 100644
> --- a/hw/mem/cxl_type3.c
> +++ b/hw/mem/cxl_type3.c
> @@ -947,6 +947,42 @@ static void set_lsa(CXLType3Dev *ct3d, const void *buf,
> uint64_t size,
> */
> }
>
> +static bool set_cacheline(CXLType3Dev *ct3d, uint64_t dpa_offset, uint8_t
> *data)
> +{
> + MemoryRegion *vmr = NULL, *pmr = NULL;
> + AddressSpace *as;
> +
> + if (ct3d->hostvmem) {
> + vmr = host_memory_backend_get_memory(ct3d->hostvmem);
> + }
> + if (ct3d->hostpmem) {
> + pmr = host_memory_backend_get_memory(ct3d->hostpmem);
> + }
> +
> + if (!vmr && !pmr) {
> + return false;
> + }
> +
> + if (dpa_offset + 64 > ct3d->cxl_dstate.mem_size) {
NIT: s/64/CXL_CACHE_LINE_SIZE/
Ira
- [PATCH v6 1/4] bswap: Add the ability to store to an unaligned 24 bit field, (continued)
[PATCH v6 2/4] hw/cxl: QMP based poison injection support, Jonathan Cameron, 2023/05/19
[PATCH v6 3/4] hw/cxl: Add poison injection via the mailbox., Jonathan Cameron, 2023/05/19
[PATCH v6 4/4] hw/cxl: Add clear poison mailbox command support., Jonathan Cameron, 2023/05/19
- Re: [PATCH v6 4/4] hw/cxl: Add clear poison mailbox command support.,
Ira Weiny <=