Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-10 Thread Dan Williams
On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: [..] > == Test == > In host > 1) create memory backed file, e.g # dd if=zero of=/tmp/nvdimm bs=1G count=10 > 2) append "-object memory-backend-file,share,id=mem1, >mem-path=/tmp/nvdimm -device nvdimm,memdev=mem1,reserve-label-data,

Re: [Qemu-devel] [PATCH v2 06/11] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-02-19 Thread Dan Williams
On Fri, Feb 19, 2016 at 12:08 AM, Michael S. Tsirkin wrote: > On Thu, Feb 18, 2016 at 11:05:23AM +0100, Igor Mammedov wrote: >> On Thu, 18 Feb 2016 12:03:36 +0800 >> Xiao Guangrong wrote: >> >> > On 02/18/2016 01:26 AM, Michael S. Tsirkin wrote: >> > > On Wed, Feb 17, 2016 at 10:04:18AM +0800, Xi

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Dan Williams
On Sun, Oct 11, 2015 at 9:33 PM, Xiao Guangrong wrote: > > > On 10/11/2015 05:17 AM, Dan Williams wrote: >> >> On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong >> wrote: >> [..] >>> >>> == Test == >>> In host >>>

Re: [Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Dan Williams
On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: > NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) > > Currently, we only support PMEM mode. Each device has 3 structures: > - SPA structure, defines the PMEM region info > > - MEM DEV structure, it has the @handle wh

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Dan Williams
On Mon, Oct 12, 2015 at 10:49 PM, Xiao Guangrong wrote: > > > On 10/13/2015 11:38 AM, Dan Williams wrote: >> >> On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong >> wrote: >>> >>> On 10/13/2015 12:36 AM, Dan Williams wrote: >>>> >>&g

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-13 Thread Dan Williams
On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong wrote: > On 10/13/2015 12:36 AM, Dan Williams wrote: >> Static namespaces can be emitted without a label. Linux needs this to >> support existing "label-less" bare metal NVDIMMs. > > > This is Linux specific? As i

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-14 Thread Dan Williams
On Tue, Oct 13, 2015 at 9:03 PM, Xiao Guangrong wrote: >> Label-less DIMMs are tested as part of the unit test [1] and the >> "memmap=nn!ss" kernel parameter that registers a persistent-memory >> address range without a DIMM. What error do you see when label >> support is disabled? >> >> [1]: htt

Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Dan Williams
On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > I mean don't use ASL to comment C. It's not more readable. > Describe why the code is the way it is. Use variables by preference, > C does not have weird limitations like

Re: [Qemu-devel] [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Dan Williams
On Mon, Oct 19, 2015 at 2:19 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote: >> On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: >> > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: >> > I mean

Re: [Qemu-devel] [PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-03-22 Thread Dan Williams
On Thu, Mar 17, 2016 at 3:04 AM, Stefan Hajnoczi wrote: > On Thu, Mar 17, 2016 at 04:32:46PM +0800, Xiao Guangrong wrote: >> This patchset is against commit d4207b223eef3 (fw-cfg: support writeable >> blobs) on pci branch of Michael's git tree and can be found at: >> https://github.com/xiaog

RE: [BUG] cxl can not create region

2022-08-08 Thread Dan Williams
Bobo WL wrote: > Hi list > > I want to test cxl functions in arm64, and found some problems I can't > figure out. > > My test environment: > > 1. build latest bios from https://github.com/tianocore/edk2.git master > branch(cc2db6ebfb6d9d85ba4c7b35fba1fa37fffc0bc2) > 2. build latest qemu-system-a

Re: [BUG] cxl can not create region

2022-08-09 Thread Dan Williams
Bobo WL wrote: > Hi Dan, > > Thanks for your reply! > > On Mon, Aug 8, 2022 at 11:58 PM Dan Williams wrote: > > > > What is the output of: > > > > cxl list -MDTu -d decoder0.0 > > > > ...? It might be the case that mem1 cannot be mapped

Re: [BUG] cxl can not create region

2022-08-11 Thread Dan Williams
Dan Williams wrote: > Bobo WL wrote: > > Hi Dan, > > > > Thanks for your reply! > > > > On Mon, Aug 8, 2022 at 11:58 PM Dan Williams > > wrote: > > > > > > What is the output of: > > > > > > cxl list -MDTu -d dec

Re: [BUG] cxl can not create region

2022-08-12 Thread Dan Williams
Jonathan Cameron wrote: > On Thu, 11 Aug 2022 18:08:57 +0100 > Jonathan Cameron via wrote: > > > On Tue, 9 Aug 2022 17:08:25 +0100 > > Jonathan Cameron wrote: > > > > > On Tue, 9 Aug 2022 21:07:06 +0800 > > > Bobo WL wrote: > > > > > > > Hi Jonathan > > > > > > > > Thanks for your reply! >

Re: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks

2024-02-21 Thread Dan Williams
[ add Ira and Davidlohr ] Shiyang Ruan wrote: > > > 在 2024/2/10 14:34, Dan Williams 写道: > > Shiyang Ruan wrote: > >> The length of Physical Address in General Media Event Record/DRAM Event > >> Record is 64-bit, so the field mask should be defined as such leng

RE: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > The length of Physical Address in General Media Event Record/DRAM Event > Record is 64-bit, so the field mask should be defined as such length. Can you include this user visible side-effect of this change. Looks like this could cause usages of CXL_DPA_FLAGS_MASK to return an

RE: [RFC PATCH 2/5] cxl/core: introduce cxl_memdev_dpa_to_hpa()

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > When a memdev is assigned to a region, its Device Physical Address will be > mapped to Host Physical Address. Introduce this helper function to > translate HPA from a given memdev and its DPA. > > Signed-off-by: Shiyang Ruan > --- > drivers/cxl/core/memdev.c | 12 +

RE: [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison()

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > If poison is detected(reported from cxl memdev), OS should be notified to > handle it. Introduce this function: > 1. translate DPA to HPA; > 2. construct a MCE instance; (TODO: more details need to be filled) > 3. log it into MCE event queue; > > After that, MCE mechan

RE: [RFC PATCH 4/5] cxl/core: add report option for cxl_mem_get_poison()

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > When a poison event is received, driver uses GET_POISON_LIST command > to get the poison list. Now driver has cxl_mem_get_poison(), so > reuse it and add a parameter 'bool report', report poison record to MCE > if set true. If the memory error record has the poison event, wh

RE: [RFC PATCH 5/5] cxl/core: add poison injection event handler

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > Currently driver only trace cxl events, poison injection on cxl memdev > is silent. OS needs to be notified then it could handle poison range > in time. Per CXL spec, the device error event could be signaled through > FW-First and OS-First methods. > > So, add poison event

Re: [RFC PATCH v2 0/6] cxl: add poison event handler

2024-03-29 Thread Dan Williams
Alison Schofield wrote: [..] > Upon receipt of that new poison list, call memory_failture_queue() > on *any* poison in a mapped space. Is that OK? Can we call > memory_failure_queue() on any and every poison report that is in > HPA space regardless of whether it first came to us through a GMER? >

Re: [RFC PATCH v2 0/6] cxl: add poison event handler

2024-03-29 Thread Dan Williams
Alison Schofield wrote: > On Fri, Mar 29, 2024 at 11:22:32AM -0700, Dan Williams wrote: > > Alison Schofield wrote: > > [..] > > > Upon receipt of that new poison list, call memory_failture_queue() > > > on *any* poison in a mapped space. Is that OK? Can we cal

Re: [RFC PATCH v2 1/6] cxl/core: correct length of DPA field masks

2024-03-29 Thread Dan Williams
e cxl_poison event is > unaffected. > > If userspace was doing its own DPA-to-HPA translation this could lead to > incorrect page retirement decisions, but there is no known consumer > (like rasdaemon) of this event today. > > Fixes: d54a531a430b ("cxl/mem: Trace General

Re: [RFC PATCH v2 2/6] cxl/core: introduce cxl_mem_report_poison()

2024-03-29 Thread Dan Williams
Shiyang Ruan wrote: > If poison is detected(reported from cxl memdev), OS should be notified to > handle it. So, introduce this helper function for later use: > 1. translate DPA to HPA; > 2. enqueue records into memory_failure's work queue; > > Signed-off-by: Shiyang Ruan This patch is too s

Re: [RFC PATCH v2 3/6] cxl/core: add report option for cxl_mem_get_poison()

2024-03-29 Thread Dan Williams
Shiyang Ruan wrote: > The GMER only has "Physical Address" field, no such one indicates length. > So, when a poison event is received, we could use GET_POISON_LIST command > to get the poison list. Now driver has cxl_mem_get_poison(), so > reuse it and add a parameter 'bool report', report poison

Re: [RFC PATCH v2 4/6] cxl/core: report poison when injecting from debugfs

2024-03-29 Thread Dan Williams
Shiyang Ruan wrote: > Poison injection from debugfs is silent too. Add calling > cxl_mem_report_poison() to make it able to do memory_failure(). Why does this needs to be signalled? It is a debug interface, the debugger can also trigger a read after the injection, or trigger page soft-offline.

Re: [RFC PATCH v2 5/6] cxl: add definition for transaction types

2024-03-29 Thread Dan Williams
Shiyang Ruan wrote: > The transaction types are defined in General Media Event Record/DRAM Event > per CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43 and > Section 8.2.9.2.1.2; Table 8-44. Add them for Event Record handler use. Combine this patch with the one that uses them so that the use case can

Re: [PATCH 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-15 Thread Dan Williams
Yuquan Wang wrote: > The dev_dbg info for Clear Event Records mailbox command would report > the handle of the next record to clear not the current one. > > This was because the index 'i' had incremented before printing the > current handle value. > > This fix also adjusts the index variable name

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread Dan Williams
t needs spaces around the -. e.g. [i - 1] > > Maybe Dan can fix up whilst applying. > > Otherwise > > Reviewed-by: Jonathan Cameron I have enlisted Dave to start wrangling CXL kernel patches upstream, and I will fall back to just reviewing. Dave, you can add my: Reviewed-by: Dan Williams ...with the same caveat as above.

Re: [PATCH v3 1/2] cxl/core: correct length of DPA field masks

2024-04-23 Thread Dan Williams
8-44 > */ > -#define CXL_DPA_FLAGS_MASK 0x3F > +#define CXL_DPA_FLAGS_MASK 0x3FULL > #define CXL_DPA_MASK (~CXL_DPA_FLAGS_MASK) > > #define CXL_DPA_VOLATILE BIT(0) Looks good, Reviewed-by: Dan Williams

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-04-23 Thread Dan Williams
Shiyang Ruan wrote: > Currently driver only traces cxl events, poison creation (for both vmem > and pmem type) on cxl memdev is silent. As it should be. > OS needs to be notified then it could handle poison pages in time. No, it was always the case that latent poison is an "action optional" even

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-07 Thread Dan Williams
Hi Pankaj, Some minor file placement comments below. On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_r

Re: [Qemu-devel] [PATCH v7 3/6] libnvdimm: add dax_dev sync flag

2019-05-07 Thread Dan Williams
On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > This patch adds 'DAXDEV_SYNC' flag which is set > for nd_region doing synchronous flush. This later > is used to disable MAP_SYNC functionality for > ext4 & xfs filesystem for devices don't support > synchronous flush. > > Signed-off-by: Pan

Re: [Qemu-devel] [PATCH v7 6/6] xfs: disable map_sync for async flush

2019-05-07 Thread Dan Williams
On Thu, Apr 25, 2019 at 10:03 PM Pankaj Gupta wrote: > > Dont support 'MAP_SYNC' with non-DAX files and DAX files > with asynchronous dax_device. Virtio pmem provides > asynchronous host page cache flush mechanism. We don't > support 'MAP_SYNC' with virtio pmem and xfs. > > Signed-off-by: Pankaj G

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Dan Williams
On Fri, May 10, 2019 at 8:53 AM Pankaj Gupta wrote: > > This patch adds 'DAXDEV_SYNC' flag which is set > for nd_region doing synchronous flush. This later > is used to disable MAP_SYNC functionality for > ext4 & xfs filesystem for devices don't support > synchronous flush. > > Signed-off-by: Pank

Re: [Qemu-devel] [PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Dan Williams
On Fri, May 10, 2019 at 8:52 AM Pankaj Gupta wrote: > > Hi Michael & Dan, > > Please review/ack the patch series from LIBNVDIMM & VIRTIO side. > We have ack on ext4, xfs patches(4, 5 & 6) patch 2. Still need > your ack on nvdimm patches(1 & 3) & virtio patch 2. I was planning to merge these v

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-10 Thread Dan Williams
On Wed, May 8, 2019 at 4:19 AM Pankaj Gupta wrote: > > > Hi Dan, > > Thank you for the review. Please see my reply inline. > > > > > Hi Pankaj, > > > > Some minor file placement comments below. > > Sure. > > > > > On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > > > > > This patch adds vi

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Dan Williams
On Fri, May 10, 2019 at 5:45 PM Pankaj Gupta wrote: > > > > > > > > > This patch adds 'DAXDEV_SYNC' flag which is set > > > for nd_region doing synchronous flush. This later > > > is used to disable MAP_SYNC functionality for > > > ext4 & xfs filesystem for devices don't support > > > synchronous

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-13 Thread Dan Williams
On Mon, May 13, 2019 at 10:32 AM Pankaj Gupta wrote: > > > Hi Dan, > > While testing device mapper with DAX, I faced a bug with the commit: > > commit ad428cdb525a97d15c0349fdc80f3d58befb50df > Author: Dan Williams > Date: Wed Feb 20 21:12:50 2019 -0800 > > Whe

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-13 Thread Dan Williams
n be described. > > > > Extend CLI of "-numa node" option to indicate the initiator numa node-id. > > In the linux kernel, the codes in drivers/acpi/hmat/hmat.c parse and report > > the platform's HMAT tables. > > > > Reviewed-by: Jingqi Liu > > S

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-14 Thread Dan Williams
On Tue, Aug 13, 2019 at 10:14 PM Tao Xu wrote: > > On 8/14/2019 10:39 AM, Dan Williams wrote: > > On Tue, Aug 13, 2019 at 8:00 AM Igor Mammedov wrote: > >> > >> On Fri, 9 Aug 2019 14:57:25 +0800 > >> Tao wrote: > >> > >>> From:

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-14 Thread Dan Williams
On Wed, Aug 14, 2019 at 6:57 PM Tao Xu wrote: > > On 8/15/2019 5:29 AM, Dan Williams wrote: > > On Tue, Aug 13, 2019 at 10:14 PM Tao Xu wrote: > >> > >> On 8/14/2019 10:39 AM, Dan Williams wrote: > >>> On Tue, Aug 13, 2019 at 8:00 AM Igor Mammedov wrot

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Dan Williams
Jonathan Cameron wrote: > On Thu, 19 Jan 2023 15:04:49 + > Jonathan Cameron wrote: > > > On Thu, 19 Jan 2023 12:42:44 + > > Jonathan Cameron via wrote: > > > > > On Wed, 18 Jan 2023 14:31:53 -0500 > > > Gregory Price wrote: > > > > > > > I apparently forgot an intro lol > > > > > >

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Dan Williams
Gregory Price wrote: > On Thu, Jan 19, 2023 at 03:04:49PM +, Jonathan Cameron wrote: > > Gregory, would you mind checking if > > cxl_nvb is NULL here... > > https://elixir.bootlin.com/linux/v6.2-rc4/source/drivers/cxl/pmem.c#L67 > > (printk before it is used should work). > > > > Might also be

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Dan Williams
Gregory Price wrote: > On Fri, Jan 20, 2023 at 09:38:13AM -0800, Dan Williams wrote: > > As it stands currently that dax device and the cxl device are not > > related since a default dax-device is loaded just based on the presence > > of an EFI_MEMORY_SP address range in the

[PATCH] hw/acpi/cxl: Drop device-memory support from CFMWS entries

2023-03-20 Thread Dan Williams
memory, move QEMU exclusively to declaring host-only windows. Signed-off-by: Dan Williams --- hw/acpi/cxl.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/acpi/cxl.c b/hw/acpi/cxl.c index 2bf8c0799359..defb289e2fef 100644 --- a/hw/acpi/cxl.c +++ b/hw/acpi/cxl.c

RE: [PATCH] hw/acpi/cxl: Drop device-memory support from CFMWS entries

2023-03-21 Thread Dan Williams
Dan Williams wrote: > While it was a reasonable idea to specify no window restricitions at the > outset of the CXL emulation support, it turns out that in practice a > platform will never follow the QEMU example of specifying simultaneous > support for HDM-H and HDM-D[B] in a s

Re: [PATCH] hw/acpi/cxl: Drop device-memory support from CFMWS entries

2023-03-22 Thread Dan Williams
Jonathan Cameron wrote: > On Mon, 20 Mar 2023 23:08:31 -0700 > Dan Williams wrote: > > > While it was a reasonable idea to specify no window restricitions at the > > outset of the CXL emulation support, it turns out that in practice a > > platform will never follow the

Re: [BUG] cxl can not create region

2022-08-15 Thread Dan Williams
Jonathan Cameron wrote: > On Fri, 12 Aug 2022 16:44:03 +0100 > Jonathan Cameron wrote: > > > On Thu, 11 Aug 2022 18:08:57 +0100 > > Jonathan Cameron via wrote: > > > > > On Tue, 9 Aug 2022 17:08:25 +0100 > > > Jonathan Cameron wrote: > > > > > > > On Tue, 9 Aug 2022 21:07:06 +0800 > > > > B

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-21 Thread Dan Williams
Shiyang Ruan wrote: > Background: > Since CXL device is a memory device, while CPU consumes a poison page of > CXL device, it always triggers a MCE by interrupt (INT18), no matter > which-First path is configured. This is the first report. Then > currently, in FW-First path, the poison event i

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-05-21 Thread Dan Williams
Shiyang Ruan wrote: [..] > >> My expectation is MF_ACTION_REQUIRED is not appropriate for CXL event > >> reported errors since action is only required for direct consumption > >> events and those need not be reported through the device event queue. > > Got it. > > I'm not very sure about 'Host wri

Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device

2023-10-06 Thread Dan Williams
Jonathan Cameron wrote: [..] > > > > > > > > what does "a WORD" mean is unclear - do you match what hardware does > > > > when you use aml_buffer? pls mention this in commit log, and > > > > show actual hardware dump for comparison. > > > The CXL spec says WORD without much qualification. It's a

Re: [PATCH v6 1/2] qom: new object to associate device to numa node

2024-01-09 Thread Dan Williams
Jason Gunthorpe wrote: > On Tue, Jan 09, 2024 at 06:02:03PM +0100, David Hildenbrand wrote: > > > Given that, an alternative proposal that I think would work > > > for you would be to add a 'placeholder' memory node definition > > > in SRAT (so allow 0 size explicitly - might need a new SRAT > > >

Re: [PATCH v4 0/3] nvdimm: Enable sync-dax property for nvdimm

2021-05-04 Thread Dan Williams
On Tue, May 4, 2021 at 2:03 AM Aneesh Kumar K.V wrote: > > On 5/4/21 11:13 AM, Pankaj Gupta wrote: > > > >> > >> What this patch series did was to express that property via a device > >> tree node and guest driver enables a hypercall based flush mechanism to > >> ensure persistence. > > > > W

Re: [Qemu-devel] DAX can not work on virtual nvdimm device

2016-08-30 Thread Dan Williams
On Mon, Aug 29, 2016 at 11:53 PM, Xiao Guangrong wrote: > > > On 08/30/2016 03:30 AM, Ross Zwisler wrote: > >> >> Can you please verify that you are using "usable" memory for your memmap? >> All >> the details are here: >> >> >> https://nvdimm.wiki.kernel.org/how_to_choose_the_correct_memmap_kerne

Re: [Qemu-devel] [PATCH] acpi: fix assert failure caused by commit 35c5a52d

2016-10-19 Thread Dan Williams
a(..., NvdimmDsmIn *in, ...): > assert(sizeof(*in) + sizeof(*set_label_data) + set_label_data->length <= >4096); > which could crash QEMU when guest writes NVDIMM labels. > > Fix it by replacing sizeof(*in) by offsetof(NvdimmDsmIn, arg3). > > Signed-off-by: Hao

[Qemu-devel] [PATCH 1/2] libnvdimm: allow a platform to force enable label support

2016-10-19 Thread Dan Williams
regions the labels have a purpose. Arrange for the labels to be honored when we find an existing / valid namespace index block. Cc: Cc: Haozhong Zhang Cc: Xiao Guangrong Signed-off-by: Dan Williams --- drivers/nvdimm/dimm.c |2 ++ drivers/nvdimm/dimm_devs.c |7 +++ drivers/nvdimm

[Qemu-devel] [PATCH 0/2] libnvdimm: dynamic label support

2016-10-19 Thread Dan Williams
/ disable the pmem region 2/ write a valid namespace index block to the label area 3/ re-enable the region and create a namespace See the man page for the "ndctl init-labels" command. --- Dan Williams (2): libnvdimm: allow a platform to force enable label support tools/test

[Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-19 Thread Dan Williams
ise unrelated to the rest of the set. [1]: https://patchwork.kernel.org/patch/9384741/ [2]: http://pmem.io/documents/NVDIMM_DSM_Interface_Example-V1.2.pdf --- Dan Williams (8): libndctl: fix error returns for unsigned apis ndctl: consolidate label commands into a single file ndc

[Qemu-devel] [ndctl PATCH 7/8] ndctl: init-labels command

2016-10-19 Thread Dan Williams
valid namespace label index block. The 'ndctl init-labels' command writes an empty namespace label index block to convert the pmem region to labelled mode, or otherwise repair a label area. Cc: Signed-off-by: Dan Williams --- Documentation/Makefile.am |1 Documentation/

Re: [Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-19 Thread Dan Williams
On Wed, Oct 19, 2016 at 11:42 AM, Eric Blake wrote: > On 10/19/2016 11:47 AM, Dan Williams wrote: >> The 4.9 kernel added support for sub-dividing PMEM. With this kernel >> patch [1] on top of that baseline, the PMEM-sub-division support can be >> enabled for QEMU-KVM an

Re: [Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-19 Thread Dan Williams
On Wed, Oct 19, 2016 at 12:41 PM, Dan Williams wrote: > On Wed, Oct 19, 2016 at 11:42 AM, Eric Blake wrote: >> On 10/19/2016 11:47 AM, Dan Williams wrote: >>> The 4.9 kernel added support for sub-dividing PMEM. With this kernel >>> patch [1] on top of that base

Re: [Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-19 Thread Dan Williams
On Wed, Oct 19, 2016 at 4:46 PM, Eric Blake wrote: > On 10/19/2016 04:29 PM, Dan Williams wrote: >> On Wed, Oct 19, 2016 at 12:41 PM, Dan Williams >> wrote: >>> On Wed, Oct 19, 2016 at 11:42 AM, Eric Blake wrote: >>>> On 10/19/2016 11:47 AM, Dan Willia

[Qemu-devel] [ndctl PATCH] ndctl: revert glob support for dimm commands

2016-10-19 Thread Dan Williams
hat point it is less characters to simply rely on shell expansion of the form nmem{X..Y}, if available. Reported-by: Eric Blake Signed-off-by: Dan Williams --- ndctl/builtin-dimm.c | 70 +- 1 file changed, 13 insertions(+), 57 deletions(-) diff -

Re: [Qemu-devel] [ndctl PATCH 0/8] dimm label space initialization support

2016-10-20 Thread Dan Williams
On Thu, Oct 20, 2016 at 12:32 PM, Vishal Verma wrote: > On 10/19, Dan Williams wrote: >> The 4.9 kernel added support for sub-dividing PMEM. With this kernel >> patch [1] on top of that baseline, the PMEM-sub-division support can be >> enabled for QEMU-KVM and any other pla

Re: [Qemu-devel] [RFC PATCH 4/4] nvdimm acpi: build flush hint address structure if required

2017-04-07 Thread Dan Williams
On Thu, Apr 6, 2017 at 3:13 AM, Stefan Hajnoczi wrote: > On Fri, Mar 31, 2017 at 04:41:47PM +0800, Haozhong Zhang wrote: >> >> Add an boolean option 'flush-hint' to device 'nvdimm'. If it's on, a >> flush hint address structure will be constructed for each nvdimm >> device. > > Users should not ne

Re: [Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-04-11 Thread Dan Williams
[ adding Christoph ] On Tue, Apr 11, 2017 at 1:41 AM, Haozhong Zhang wrote: > On 04/06/17 20:02 +0800, Xiao Guangrong wrote: >> >> >> On 04/06/2017 05:43 PM, Stefan Hajnoczi wrote: >> > On Fri, Mar 31, 2017 at 04:41:43PM +0800, Haozhong Zhang wrote: >> > > This patch series constructs the flush h

Re: [Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-04-20 Thread Dan Williams
On Tue, Apr 11, 2017 at 7:56 AM, Dan Williams wrote: > [ adding Christoph ] > > On Tue, Apr 11, 2017 at 1:41 AM, Haozhong Zhang > wrote: >> On 04/06/17 20:02 +0800, Xiao Guangrong wrote: >>> >>> >>> On 04/06/2017 05:43 PM, Stefan Hajnoczi wrote: &

Re: [Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-04-21 Thread Dan Williams
[ adding xfs and fsdevel ] On Fri, Apr 21, 2017 at 6:56 AM, Stefan Hajnoczi wrote: [..] >> >>> If the vNVDIMM device is based on the regular file, i think >> >>> fsync is the bottleneck rather than this mmio-virtualization. :( >> >>> >> >> >> >> Yes, fsync() on the regular file is the bottleneck.

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-06-01 Thread Dan Williams
[ adding linux-fsdevel ] On Thu, Jun 1, 2017 at 5:00 AM, Xiao Guangrong wrote: > > > On 05/26/2017 10:32 AM, Haozhong Zhang wrote: > >> +static void nvdimm_check_dax(HostMemoryBackend *hostmem) >> +{ >> +char *mem_path = >> +object_property_get_str(OBJECT(hostmem), "mem-path", NULL);

Re: [Qemu-devel] [PATCH v2 2/4] nvdimm: warn if the backend is not a DAX device

2017-06-06 Thread Dan Williams
On Tue, Jun 6, 2017 at 12:22 AM, Haozhong Zhang wrote: > Applications in Linux guest that use device-dax never trigger flush > that can be trapped by KVM/QEMU. Meanwhile, if the host backend is not > device-dax, QEMU cannot guarantee the persistence of guest writes. > Before solving this flushing

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-08 Thread Dan Williams
On Wed, Jun 7, 2017 at 11:50 PM, Haozhong Zhang wrote: > On 06/08/17 14:40 +0800, Xiao Guangrong wrote: >> >> >> On 06/08/2017 01:06 PM, Haozhong Zhang wrote: >> > On 06/08/17 11:07 +0800, Xiao Guangrong wrote: >> > > >> > > >> > > On 06/07/2017 04:06 PM, Haozhong Zhang wrote: >> > > > Per ACPI 6.

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-11 Thread Dan Williams
On Thu, May 11, 2017 at 11:17 AM, Stefan Hajnoczi wrote: > On Wed, May 10, 2017 at 09:26:00PM +0530, Pankaj Gupta wrote: >> We are sharing initial project proposal for >> 'KVM "fake DAX" device flushing' project for feedback. >> Got the idea during discussion with 'Rik van Riel'. > > CCing NVDIMM

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-11 Thread Dan Williams
[ adding nvdimm mailing list ] On Wed, May 10, 2017 at 8:56 AM, Pankaj Gupta wrote: > We are sharing initial project proposal for > 'KVM "fake DAX" device flushing' project for feedback. > Got the idea during discussion with 'Rik van Riel'. > > Also, request answers to 'Questions' section. > > Ab

Re: [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support

2016-08-18 Thread Dan Williams
[ adding Vishal who implemented the kernel side of nvdimm hotplug support ] On Thu, Aug 11, 2016 at 11:54 PM, Xiao Guangrong wrote: > This patchset is against commit c597dc90fbcd6 (virtio-net: allow increasing > rx queue siz) on pci branch of Michael's git tree and can be found at: > https:

Re: [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support

2016-08-18 Thread Dan Williams
On Thu, Aug 18, 2016 at 8:46 PM, Xiao Guangrong wrote: > > > On 08/19/2016 11:40 AM, Xiao Guangrong wrote: >> >> >> >> On 08/19/2016 02:54 AM, Vishal Verma wrote: >>> >>> On 08/18, Dan Williams wrote: >>>> >>>> [ a

Re: [Qemu-devel] DAX can not work on virtual nvdimm device

2016-08-19 Thread Dan Williams
On Fri, Aug 19, 2016 at 4:19 AM, Xiao Guangrong wrote: > > Hi Dan, > > Recently, Redhat reported that nvml test suite failed on QEMU/KVM, > more detailed info please refer to: >https://bugzilla.redhat.com/show_bug.cgi?id=1365721 > > The reason for this bug is that the memory region created by

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-05-25 Thread Dan Williams
smcrtd0p_86kgr3dhovne+6t5sy2u7wxg3...@mail.gmail.com > --- > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc: Xiao Guangrong > Cc: Stefan Hajnoczi > Cc: Dan Williams > --- > Resend because the wrong maintainer email address was used. > --- > hw/mem/nvdimm.c |

Re: [Qemu-devel] [RESEND PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-26 Thread Dan Williams
On Fri, May 26, 2017 at 12:16 AM, Haozhong Zhang wrote: > On 05/26/17 07:05 +, Marc-André Lureau wrote: >> Hi >> >> On Fri, May 26, 2017 at 10:51 AM Haozhong Zhang >> wrote: >> >> > On 05/26/17 06:39 +, Marc-André Lureau wrote: >> > > Hi >> > > >> > > On Fri, May 26, 2017 at 6:34 AM Haozh

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-05-26 Thread Dan Williams
On Thu, May 25, 2017 at 9:30 PM, Haozhong Zhang wrote: > On 05/25/17 20:34 -0700, Dan Williams wrote: >> On Thu, May 25, 2017 at 7:32 PM, Haozhong Zhang >> wrote: >> > Applications in Linux guest that use device-dax never trigger flush >> > that can be trapped by

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-05-26 Thread Dan Williams
On Fri, May 26, 2017 at 7:38 AM, Daniel P. Berrange wrote: > On Thu, May 25, 2017 at 08:34:23PM -0700, Dan Williams wrote: >> On Thu, May 25, 2017 at 7:32 PM, Haozhong Zhang >> wrote: >> > Applications in Linux guest that use device-dax never trigger flush >> >

Re: [Qemu-devel] [RESEND PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-26 Thread Dan Williams
On Fri, May 26, 2017 at 11:55 AM, Eduardo Habkost wrote: > On Fri, May 26, 2017 at 07:24:26AM -0700, Dan Williams wrote: >> On Fri, May 26, 2017 at 12:16 AM, Haozhong Zhang >> wrote: >> > On 05/26/17 07:05 +, Marc-André Lureau wrote: >> >> Hi >>

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-05-30 Thread Dan Williams
On Tue, May 30, 2017 at 2:20 AM, Daniel P. Berrange wrote: > On Fri, May 26, 2017 at 08:25:20AM -0700, Dan Williams wrote: >> On Fri, May 26, 2017 at 7:38 AM, Daniel P. Berrange >> wrote: >> > On Thu, May 25, 2017 at 08:34:23PM -0700, Dan Williams wrote: >> >

Re: [Qemu-devel] [RESEND PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-30 Thread Dan Williams
On Tue, May 30, 2017 at 5:17 AM, Paolo Bonzini wrote: > > > On 26/05/2017 16:24, Dan Williams wrote: >>> For DAX device only, QEMU can figure out the proper alignment by >>> itself. However, I'm not sure whether there are other non-DAX cases >>> requiri

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-22 Thread Dan Williams
On Fri, Jul 21, 2017 at 8:58 AM, Stefan Hajnoczi wrote: > On Fri, Jul 21, 2017 at 09:29:15AM -0400, Pankaj Gupta wrote: >> >> > > A] Problems to solve: >> > > -- >> > > >> > > 1] We are considering two approaches for 'fake DAX flushing interface'. >> > > >> > > 1.1] fake dax with

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-23 Thread Dan Williams
[ adding Ross and Jan ] On Sun, Jul 23, 2017 at 7:04 AM, Rik van Riel wrote: > On Sat, 2017-07-22 at 12:34 -0700, Dan Williams wrote: >> On Fri, Jul 21, 2017 at 8:58 AM, Stefan Hajnoczi > > wrote: >> > >> > Maybe the NVDIMM folks can comment on this idea. >>

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-23 Thread Dan Williams
On Sun, Jul 23, 2017 at 11:10 AM, Rik van Riel wrote: > On Sun, 2017-07-23 at 09:01 -0700, Dan Williams wrote: >> [ adding Ross and Jan ] >> >> On Sun, Jul 23, 2017 at 7:04 AM, Rik van Riel >> wrote: >> > >> > The goal is to increase density of gu

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-24 Thread Dan Williams
On Mon, Jul 24, 2017 at 5:37 AM, Jan Kara wrote: > On Mon 24-07-17 08:06:07, Pankaj Gupta wrote: >> >> > On Sun 23-07-17 13:10:34, Dan Williams wrote: >> > > On Sun, Jul 23, 2017 at 11:10 AM, Rik van Riel wrote: >> > > > On Sun, 2017-07-23 at 09:01

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-24 Thread Dan Williams
On Mon, Jul 24, 2017 at 8:48 AM, Jan Kara wrote: > On Mon 24-07-17 08:10:05, Dan Williams wrote: >> On Mon, Jul 24, 2017 at 5:37 AM, Jan Kara wrote: [..] >> This approach would turn into a full fsync on the host. The question >> in my mind is whether there is any opti

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-25 Thread Dan Williams
On Tue, Jul 25, 2017 at 7:27 AM, Pankaj Gupta wrote: > >> Subject: Re: KVM "fake DAX" flushing interface - discussion >> >> On Mon 24-07-17 08:06:07, Pankaj Gupta wrote: >> > >> > > On Sun 23-07-17 13:10:34, Dan Williams wrote: >> &

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-26 Thread Dan Williams
On Wed, Jul 26, 2017 at 2:27 PM, Rik van Riel wrote: > On Wed, 2017-07-26 at 09:47 -0400, Pankaj Gupta wrote: >> > >> Just want to summarize here(high level): >> >> This will require implementing new 'virtio-pmem' device which >> presents >> a DAX address range(like pmem) to guest with read/write(

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-26 Thread Dan Williams
On Wed, Jul 26, 2017 at 4:46 PM, Rik van Riel wrote: > On Wed, 2017-07-26 at 14:40 -0700, Dan Williams wrote: >> On Wed, Jul 26, 2017 at 2:27 PM, Rik van Riel >> wrote: >> > On Wed, 2017-07-26 at 09:47 -0400, Pankaj Gupta wrote: >> > > > >> >

Re: [Qemu-devel] [RFC] virtio-mem: paravirtualized memory

2017-07-28 Thread Dan Williams
On Fri, Jul 28, 2017 at 4:09 AM, David Hildenbrand wrote: > Btw, I am thinking about the following addition to the concept: > > 1. Add a type to each virtio-mem device. > > This describes the type of the memory region we expose to the guest. > Initially, we could have RAM and RAM_HUGE. The latter

Re: [Qemu-devel] QEMU NVDIMM as type 7 in e820 table

2017-07-28 Thread Dan Williams
On Fri, Jul 28, 2017 at 11:04 AM, Ross Zwisler wrote: > I've been using the virtualized NVDIMM support in QEMU for testing, and I > noticed that the physical addresses used by the virtual NVDIMMs aren't present > in the guest's e820 table. > > Here is the e820 table on my QEMU instance where I hav

Re: [Qemu-devel] QEMU NVDIMM as type 7 in e820 table

2017-07-28 Thread Dan Williams
On Fri, Jul 28, 2017 at 12:45 PM, Ross Zwisler wrote: > On Fri, Jul 28, 2017 at 11:11:10AM -0700, Dan Williams wrote: >> On Fri, Jul 28, 2017 at 11:04 AM, Ross Zwisler [..] > [ Adding Linda & Toshi to see if they have an opinion. ] > > I guess maybe we don't need it.

Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file

2018-01-31 Thread Dan Williams
On Tue, Jan 30, 2018 at 10:02 PM, Haozhong Zhang wrote: > Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to > guarantee the write persistence to mmap'ed files supporting DAX (e.g., > files on ext4/xfs file system mounted with '-o dax'). Wait, MAP_SYNC does not guarantee persist

Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file

2018-01-31 Thread Dan Williams
On Wed, Jan 31, 2018 at 4:02 PM, Haozhong Zhang wrote: > On 01/31/18 14:25 -0800, Dan Williams wrote: >> On Tue, Jan 30, 2018 at 10:02 PM, Haozhong Zhang >> wrote: >> > Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to >> > guarantee the w

Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file

2018-01-31 Thread Dan Williams
On Wed, Jan 31, 2018 at 4:24 PM, Haozhong Zhang wrote: > On 01/31/18 16:08 -0800, Dan Williams wrote: >> On Wed, Jan 31, 2018 at 4:02 PM, Haozhong Zhang >> wrote: >> > On 01/31/18 14:25 -0800, Dan Williams wrote: >> >> On Tue, Jan 30, 2018 at 10:02 PM, Haozho

Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file

2018-01-31 Thread Dan Williams
On Wed, Jan 31, 2018 at 6:29 PM, Haozhong Zhang wrote: > + vfio maintainer Alex Williamson in case my understanding of vfio is > incorrect. > > On 01/31/18 16:32 -0800, Dan Williams wrote: >> On Wed, Jan 31, 2018 at 4:24 PM, Haozhong Zhang >> wrote: >> > On 0

Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file

2018-01-31 Thread Dan Williams
[ adding Michal and lsf-pci ] On Wed, Jan 31, 2018 at 7:02 PM, Dan Williams wrote: > On Wed, Jan 31, 2018 at 6:29 PM, Haozhong Zhang > wrote: >> + vfio maintainer Alex Williamson in case my understanding of vfio is >> incorrect. >> >> On 01/31/18 16:32 -0800,

  1   2   >