From: Igor Mammedov <imammedo@redhat.com>
To: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Cc: pbonzini@redhat.com, ehabkost@redhat.com, kvm@vger.kernel.org,
mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com,
qemu-devel@nongnu.org, stefanha@redhat.com,
dan.j.williams@intel.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support
Date: Mon, 3 Oct 2016 15:48:00 +0200 [thread overview]
Message-ID: <20161003154800.17e3ba30@nial.brq.redhat.com> (raw)
In-Reply-To: <1470984850-66891-1-git-send-email-guangrong.xiao@linux.intel.com>
On Fri, 12 Aug 2016 14:54:02 +0800
Xiao Guangrong <guangrong.xiao@linux.intel.com> wrote:
General design issue in this series is regenerating
_FIT data every time inside of _FIT read loop.
The issue here is that if FIT data doesn't fit in one page
RFIT would be called several times resulting in calling
nvdimm_dsm_func_read_fit() N-times, and in between
these N exits generated FIT data could change
(for example if another NVDIMM has been hotpluged in between)
resulting in corrupted concatenated FIT buffer returned by
_FIT method.
So one need either to block follow up hotplug or make sure
that FIT data regenerated/updated only once per _FIT
invocation and stay immutable until _FIT is completed
(maybe RCU protected buffer).
Regenerating/updating inside qemu could also be shared
with NFIT table creation path so that both cold/hotplug
would reuse the same data which are updated only when
a NVDIMM is added/removed.
---
I guess I'm done with v2 review at this point.
PS:
Not related to this series but still existing NVDIMM
codebase issues:
1:
OperationRegion (NRAM, SystemMemory, MEMA, 0x1000)
...
Name (MEMA, 0x7FFFF000)
is not valid ASL, and most certainly would make Windows BSOD.
Check spec for
RegionOffset := TermArg => Integer
Named object is not a TermArg.
I'd suggest to make that OperationRegion dynamic i.e
put its definition into sole user NCAL() and use
Store(MEMA, LocalX)
OperationRegion (NRAM, SystemMemory, LocalX, 0x1000)
2:
Field (NRAM, DWordAcc, NoLock, Preserve)
{
...
ARG3, 32672
}
...
NCAL()
...
Store (Local3, ARG3) /* \_SB_.NVDR.ARG3 */
Using ARG3 name is confusing at best and is wrong as ARG3
is reserved name and probably it won't compile back to valid AML.
Suggest s/ARG3/FARG/
with comment at declaration point
/* Package that contains function-specific arguments _DSM(..., Arg3) */
3:
Method (NCAL, 5, Serialized) {
...
Concatenate (Buffer (Zero) {}, OBUF, Arg6)
Return (Arg6)
it's wrong to use Arg6 here as function has only 5 arguments,
use LocalX instead.
4:
if method creates/access named fields it should be serialized.
next prev parent reply other threads:[~2016-10-03 13:48 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 6:54 [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 1/8] acpi nvdimm: fix wrong buffer size returned by DSM method Xiao Guangrong
2016-09-20 14:07 ` Igor Mammedov
2016-09-20 15:14 ` Michael S. Tsirkin
2016-09-20 16:23 ` Igor Mammedov
2016-09-21 5:30 ` Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 2/8] nvdimm acpi: prebuild nvdimm devices for available slots Xiao Guangrong
2016-09-21 11:48 ` Igor Mammedov
2016-09-22 2:43 ` Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 3/8] nvdimm acpi: introduce _FIT Xiao Guangrong
2016-09-30 13:14 ` Igor Mammedov
2016-10-08 7:17 ` Xiao Guangrong
2016-10-10 12:51 ` Igor Mammedov
2016-10-10 13:09 ` Xiao Guangrong
2016-10-11 11:49 ` Igor Mammedov
2016-10-12 8:20 ` Xiao Guangrong
2016-10-13 13:33 ` Igor Mammedov
2016-10-14 7:43 ` Xiao Guangrong
2016-10-14 11:59 ` Igor Mammedov
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 4/8] nvdimm acpi: implement Read FIT function Xiao Guangrong
2016-09-30 13:17 ` Igor Mammedov
2016-10-08 7:17 ` Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 5/8] pc-dimm: introduce prepare_unplug() callback Xiao Guangrong
2016-10-03 9:45 ` Igor Mammedov
2016-10-08 7:20 ` Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 6/8] pc: memhp: do not export nvdimm's memory via _CRS Xiao Guangrong
2016-10-03 13:21 ` Igor Mammedov
2016-10-08 7:42 ` Xiao Guangrong
2016-10-10 12:47 ` Igor Mammedov
2016-10-10 13:10 ` Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 7/8] pc: acpi: memhp: nvdimm hotplug support Xiao Guangrong
2016-08-12 6:54 ` [Qemu-devel] [PATCH v2 8/8] nvdimm docs: add nvdimm Read FIT function Xiao Guangrong
2016-09-30 14:03 ` Igor Mammedov
2016-10-08 7:18 ` Xiao Guangrong
2016-08-12 8:35 ` [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support Stefan Hajnoczi
2016-08-12 15:13 ` Igor Mammedov
2016-09-12 7:33 ` Xiao Guangrong
2016-09-12 12:22 ` Igor Mammedov
2016-08-18 17:47 ` Dan Williams
2016-08-18 18:54 ` Vishal Verma
2016-08-19 3:40 ` Xiao Guangrong
2016-08-19 3:46 ` Xiao Guangrong
2016-08-19 5:14 ` Dan Williams
2016-10-03 13:48 ` Igor Mammedov [this message]
2016-10-08 8:34 ` Xiao Guangrong
2016-10-10 12:59 ` Igor Mammedov
2016-10-10 13:57 ` Xiao Guangrong
2016-10-11 12:32 ` Igor Mammedov
2016-10-12 10:19 ` Xiao Guangrong
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=20161003154800.17e3ba30@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=ehabkost@redhat.com \
--cc=gleb@kernel.org \
--cc=guangrong.xiao@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).