From: Gregory Price <gregory.price@memverge.com>
To: Fan Ni <fan.ni@samsung.com>
Cc: Gregory Price <gourry.memverge@gmail.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"jonathan.cameron@huawei.com" <jonathan.cameron@huawei.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"alison.schofield@intel.com" <alison.schofield@intel.com>,
"dave@stgolabs.net" <dave@stgolabs.net>,
Adam Manzanares <a.manzanares@samsung.com>,
"bwidawsk@kernel.org" <bwidawsk@kernel.org>,
"hchkuo@avery-design.com.tw" <hchkuo@avery-design.com.tw>,
"cbrowy@avery-design.com" <cbrowy@avery-design.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>
Subject: Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)
Date: Thu, 8 Dec 2022 18:06:30 -0500 [thread overview]
Message-ID: <Y5Jt9iPs8GX9EMug@memverge.com> (raw)
In-Reply-To: <20221208225515.GA2510517@bgt-140510-bm03>
On Thu, Dec 08, 2022 at 10:55:58PM +0000, Fan Ni wrote:
> On Mon, Nov 28, 2022 at 10:01:57AM -0500, Gregory Price wrote:
> >
> > - if (cxl_dstate->pmem_size < CXL_CAPACITY_MULTIPLIER) {
> > + if ((cxl_dstate->vmem_size < CXL_CAPACITY_MULTIPLIER) ||
> > + (cxl_dstate->pmem_size < CXL_CAPACITY_MULTIPLIER)) {
> > return CXL_MBOX_INTERNAL_ERROR;
> > }
> For a cxl configuration with only pmem or vmem, vmem_size or pmem_size
> can be 0 and fail the check?
>
While nonsensical, i believe it's technically supported. The prior
implementation likewise enabled pmem_size to be 0 in these checks.
> >
> > +error_cleanup:
> > + int i;
> > + for (i = 0; i < cur_ent; i++) {
> > + g_free(table[i]);
> > + }
> > + return rc;
> > }
>
> I hit an error when compiling with gcc version 9.4.0
> (Ubuntu 9.4.0-1ubuntu1~20.04.1), maybe moving the declaration of `i` to
> the following loop.
>
>
> ../hw/mem/cxl_type3.c:211:5: error: a label can only be part of a statement
> and a declaration is not a statement
> 211 | int i;
> | ^~~
Moved the declaration to the top fo the function with the rest of the
declarations. Good catch.
next prev parent reply other threads:[~2022-12-08 23:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 15:01 [RFC v4 0/3] CXL Type-3 Volatile Memory Support Gregory Price
2022-11-28 15:01 ` [RFC v4 1/3] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition Gregory Price
2022-11-28 15:01 ` [RFC v4 2/3] tests/qtest/cxl-test: whitespace, line ending cleanup Gregory Price
2023-01-05 14:38 ` Jonathan Cameron
2023-01-30 13:11 ` Jonathan Cameron
2023-01-30 14:38 ` Gregory Price
2022-11-28 15:01 ` [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent) Gregory Price
2022-12-08 22:55 ` Fan Ni
2022-12-08 23:06 ` Gregory Price [this message]
2022-12-19 12:42 ` Jonathan Cameron
2022-12-19 16:12 ` Gregory Price
2022-12-19 17:25 ` Jonathan Cameron
2022-12-19 17:55 ` Gregory Price
2022-12-20 15:34 ` Jonathan Cameron
2022-12-20 19:27 ` Gregory Price
2023-01-03 15:56 ` Jonathan Cameron
[not found] ` <CAD3UvdQ7nZab7Y+tbc1Ox-zqzse4C16dwv6qtOAgfe4dA6_crQ@mail.gmail.com>
2023-01-03 18:15 ` Jonathan Cameron
2023-01-19 17:15 ` Gregory Price
2023-01-19 17:31 ` Jonathan Cameron
2023-01-19 22:13 ` Gregory Price
2023-01-20 10:59 ` Jonathan Cameron
2023-01-30 13:24 ` Jonathan Cameron
2023-01-30 14:37 ` Gregory Price
2023-01-31 11:53 ` Jonathan Cameron
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=Y5Jt9iPs8GX9EMug@memverge.com \
--to=gregory.price@memverge.com \
--cc=a.manzanares@samsung.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=cbrowy@avery-design.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=gourry.memverge@gmail.com \
--cc=hchkuo@avery-design.com.tw \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox