All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fan Ni <fan.ni@gmx.us>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jonathan.Cameron@huawei.com, fan.ni@samsung.com,
	dan.j.williams@intel.com, alison.schofield@intel.com,
	ayush.m55@samsung.com, a.manzanares@samsung.com,
	linux-cxl@vger.kernel.org
Subject: Re: [PATCH 1/4] cxl/type3: Fix crash in set_cacheline()
Date: Fri, 8 Sep 2023 11:37:31 -0700	[thread overview]
Message-ID: <ZPtp63VmaKHl+G+K@debian> (raw)
In-Reply-To: <20230908073152.4386-2-dave@stgolabs.net>

On Fri, Sep 08, 2023 at 12:31:49AM -0700, Davidlohr Bueso wrote:
> Use the correct vmr_size, otherwise a clear poison operation, for
> example, can crash the emulator.
>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>  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 fd9d134d468f..b90a7397d62f 100644
> --- a/hw/mem/cxl_type3.c
> +++ b/hw/mem/cxl_type3.c
> @@ -1417,7 +1417,7 @@ static bool set_cacheline(CXLType3Dev *ct3d, uint64_t dpa_offset, uint8_t *data)
>          as = &ct3d->hostvmem_as;
>      } else if (dpa_offset < vmr_size + pmr_size) {
>          as = &ct3d->hostpmem_as;
> -        dpa_offset -= vmr->size;
> +        dpa_offset -= vmr_size;

Good catch. It is a typo from my DCD patch, not upstreamed yet.

Fan
>      } else {
>          as = &ct3d->dc.host_dc_as;
>          dpa_offset -= (vmr_size + pmr_size);
> --
> 2.42.0
>

  reply	other threads:[~2023-09-08 18:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08  7:31 [PATCH -qemu 0/4] hw/cxl: Support for scan media Davidlohr Bueso
2023-09-08  7:31 ` [PATCH 1/4] cxl/type3: Fix crash in set_cacheline() Davidlohr Bueso
2023-09-08 18:37   ` Fan Ni [this message]
2023-09-12 10:59     ` Jonathan Cameron
2023-09-08  7:31 ` [PATCH 2/4] hw/cxl: Add get scan media capabilities cmd support Davidlohr Bueso
2023-09-08 18:47   ` Fan Ni
2023-09-08 19:44     ` Davidlohr Bueso
2023-09-12 11:20   ` Jonathan Cameron
2023-09-12 11:25   ` Jonathan Cameron
2023-09-08  7:31 ` [PATCH 3/4] hw/cxl: Add scan media " Davidlohr Bueso
2023-09-12 11:57   ` Jonathan Cameron
2023-09-13  3:47     ` Davidlohr Bueso
2023-09-08  7:31 ` [PATCH 4/4] hw/cxl: Add get scan media results " Davidlohr Bueso
2023-09-12 12:04   ` Jonathan Cameron
2023-09-13  3:33     ` Davidlohr Bueso
2023-09-13 13:30       ` Jonathan Cameron
2023-09-16  0:11         ` Davidlohr Bueso
2023-09-18 11:11           ` Jonathan Cameron
2023-09-18 16:58             ` Gregory Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZPtp63VmaKHl+G+K@debian \
    --to=fan.ni@gmx.us \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=a.manzanares@samsung.com \
    --cc=alison.schofield@intel.com \
    --cc=ayush.m55@samsung.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=linux-cxl@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.