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

2024-05-22 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

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"

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: [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: [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 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 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

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 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 w

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: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread Dan Williams
d 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 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

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

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 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,

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

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 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: [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 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

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: [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

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

2023-03-21 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: 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 ran

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

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: [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 > > > >

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: [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

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-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

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. > > > >

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

2021-05-03 Thread Dan Williams
On Mon, May 3, 2021 at 7:06 AM Shivaprasad G Bhat wrote: > > > On 5/1/21 12:44 AM, Dan Williams wrote: > > Some corrections to terminology confusion below... > > > > > > On Wed, Apr 28, 2021 at 8:49 PM Shivaprasad G Bhat > > wrote: > >>

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

2021-04-30 Thread Dan Williams
Some corrections to terminology confusion below... On Wed, Apr 28, 2021 at 8:49 PM Shivaprasad G Bhat wrote: > > The nvdimm devices are expected to ensure write persistence during power > failure kind of scenarios. No, QEMU is not expected to make that guarantee. QEMU is free to lie to the

Re: Microsoft and Intel NVDIMM ACPI _DSM interfaces status?

2021-03-17 Thread Dan Williams
On Wed, Mar 17, 2021 at 4:49 AM Stefan Hajnoczi wrote: > > Hi, > Microsoft and Intel developed two different ACPI NVDIMM _DSM interfaces. > > The specs for the Intel interface are available here: > https://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf > > This is the interface that QEMU

Re: [RFC] Set addresses for memory devices [CXL]

2021-01-27 Thread Dan Williams
On Wed, Jan 27, 2021 at 7:52 PM Ben Widawsky wrote: > > Hi list, Igor. > > I wanted to get some ideas on how to better handle this. Per the recent > discussion [1], it's become clear that there needs to be more thought put into > how to manage the address space for CXL memory devices. If you see

Re: [RFC PATCH 00/25] Introduce CXL 2.0 Emulation

2020-12-03 Thread Dan Williams
[ add linux-cxl for the Linux driver question ] On Thu, Dec 3, 2020 at 9:10 PM Chris Browy wrote: [..] I'll let Ben address the other questions... > 4. What are the userspace system APIs for targeting CXL HDM address domain? >Usually you can mmap a SPA if you know how to look it up.

Re: [PATCH] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-09 Thread Dan Williams
On Thu, Apr 9, 2020 at 7:33 AM Liu, Jingqi wrote: > > On 4/8/2020 5:42 PM, Joao Martins wrote: > > On 4/8/20 3:25 AM, Liu, Jingqi wrote: > >> On 4/8/2020 2:28 AM, Joao Martins wrote: > >>> On 4/7/20 5:55 PM, Dan Williams wrote: > >>>> On Tue, Ap

Re: [PATCH] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-07 Thread Dan Williams
gt; > > > It also fixes the problem that mmap() returns failure in qemu_ram_mmap() > > when the NUM of 'align=NUM' is less than the devdax pmem file 'align'. > > > > Cc: Dan Williams > > Signed-off-by: Jingqi Liu > > --- > > exec.c | 46 +

Re: [PATCH] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-07 Thread Dan Williams
pare > >> it with the NUM of 'align=NUM'. > >> The NUM needs to be larger than or equal to the devdax pmem file 'align'. > >> > >> It also fixes the problem that mmap() returns failure in qemu_ram_mmap() > >> when the NUM of 'align=NUM' is less than the de

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: [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-13 Thread Dan Williams
can 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 > > Sugges

Re: [Qemu-devel] [PATCH v10 4/7] dm: enable synchronous dax

2019-06-01 Thread Dan Williams
On Tue, May 21, 2019 at 6:43 AM Pankaj Gupta wrote: > > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > devices of device mapper support synchrononous DAX. If device > mapper consists of both synchronous and asynchronous dax devices, > we don't set 'DAXDEV_SYNC' flag. > >

Re: [Qemu-devel] [PATCH v4 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-05-31 Thread Dan Williams
On Tue, May 7, 2019 at 11:32 PM Tao Xu wrote: > > This series of patches will build Heterogeneous Memory Attribute Table (HMAT) > according to the command line. The ACPI HMAT describes the memory attributes, > such as memory side cache attributes and bandwidth and latency details, > related to

Re: [Qemu-devel] [PATCH v9 1/7] libnvdimm: nd_region flush callback support

2019-05-15 Thread Dan Williams
On Tue, May 14, 2019 at 7:55 AM Pankaj Gupta wrote: > > This patch adds functionality to perform flush from guest > to host over VIRTIO. We are registering a callback based > on 'nd_region' type. virtio_pmem driver requires this special > flush function. For rest of the region types we are

Re: [Qemu-devel] [PATCH v9 4/7] dm: enable synchronous dax

2019-05-15 Thread Dan Williams
[ add Mike and dm-devel ] Mike, any concerns with the below addition to the device-mapper-dax implementation? On Tue, May 14, 2019 at 7:58 AM Pankaj Gupta wrote: > > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > devices of device mapper support synchrononous DAX. If device

Re: [Qemu-devel] [PATCH v9 2/7] virtio-pmem: Add virtio pmem driver

2019-05-15 Thread Dan Williams
On Tue, May 14, 2019 at 8:25 AM Pankaj Gupta wrote: > > > > On 5/14/19 7:54 AM, Pankaj Gupta wrote: > > > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig > > > index 35897649c24f..94bad084ebab 100644 > > > --- a/drivers/virtio/Kconfig > > > +++ b/drivers/virtio/Kconfig > > > @@ -42,6

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 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 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

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

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:

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

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:

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

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Dan Williams
On Mon, Apr 22, 2019 at 8:59 AM Jeff Moyer wrote: > > Dan Williams writes: > > > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig > > wrote: > >> > >> On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > >> > > > I'd ei

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Dan Williams
On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig wrote: > > On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > > > > I'd either add a comment about avoiding retpoline overhead here or just > > > > make ->flush == NULL mean generic_nvdimm_flush(). J

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Dan Williams
On Fri, Apr 12, 2019 at 6:12 AM Jeff Moyer wrote: > > Jan Kara writes: > > > On Thu 11-04-19 07:51:48, Dan Williams wrote: > >> On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: > >> > + } else { > >> > + if (nd_region->

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-11 Thread Dan Williams
ayer > > > by creating a child bio and chaining it with parent bio. > > > > > > Signed-off-by: Pankaj Gupta > > > ---bio_chain Dan williams > > [..] > > > diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c > > > index b4ef7d

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

2019-04-11 Thread Dan Williams
On Tue, Apr 9, 2019 at 9:10 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:

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-11 Thread Dan Williams
On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: > > This patch adds functionality to perform flush from guest > to host over VIRTIO. We are registering a callback based > on 'nd_region' type. virtio_pmem driver requires this special > flush function. For rest of the region types we are

Re: [Qemu-devel] Why only devdax guarantees guest data persistence ?

2019-02-20 Thread Dan Williams
On Wed, Feb 20, 2019 at 7:37 AM Stefan Hajnoczi wrote: > > On Fri, Feb 15, 2019 at 05:09:31PM +, bipin.tomar--- via Qemu-devel wrote: > > Text from "docs/nvdimm.txt" says: > > Guest Data Persistence > > -- > > > > Though QEMU supports multiple types of vNVDIMM backends on

Re: [Qemu-devel] Querying the size of devdax devices from userspace

2019-02-04 Thread Dan Williams
On Sun, Feb 3, 2019 at 11:56 PM Stefan Hajnoczi wrote: > > How can userspace applications query the size of devdax character > devices? > > stat(1) doesn't know how large the device is: > > # stat /dev/dax0.0 > File: /dev/dax0.0 > Size: 0 Blocks: 0 IO Block: 4096

Re: [Qemu-devel] [PATCH V9 4/6] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2019-01-22 Thread Dan Williams
On Mon, Jan 21, 2019 at 7:27 PM Michael S. Tsirkin wrote: [..] > > 2. The reset of cases: > > - we will never pass the MAP_SYNC to mmap2 > > I don't see code probing for MAP_SYNC support. Did I miss it? > But if all you want is to have old linux ignore MAP_SYNC, > I think you got your wish

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-14 Thread Dan Williams
On Mon, Jan 14, 2019 at 1:25 PM Dave Chinner wrote: > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > Until you have images (and hence host page cache) shared between > > > > multiple guests. People will want to do this, because it means they > > > > only need a single

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-12 Thread Dan Williams
On Sat, Jan 12, 2019 at 5:38 PM Pankaj Gupta wrote: > > > > > > > On Thu 10-01-19 12:26:17, Dave Chinner wrote: > > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > > This patch series has implementation for "virtio pmem". > > > > "virtio pmem" is fake persistent

Re: [Qemu-devel] [PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Dan Williams
On Wed, Jan 9, 2019 at 5:53 AM Pankaj Gupta wrote: > > This patch adds 'DAXDEV_BUFFERED' flag which is set > for virtio pmem corresponding nd_region. This later > is used to disable MAP_SYNC functionality for ext4 > & xfs filesystem. > > Signed-off-by: Pankaj Gupta > --- > drivers/dax/super.c

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

2018-10-17 Thread Dan Williams
On Wed, Oct 17, 2018 at 12:11 PM Pankaj Gupta wrote: > > > > > On Fri, Oct 12, 2018 at 10:01 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

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

2018-10-13 Thread Dan Williams
On Fri, Oct 12, 2018 at 10:01 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_region object with the persistent memory > range

Re: [Qemu-devel] [PATCH v2 0/2] kvm "fake DAX" device

2018-10-13 Thread Dan Williams
On Fri, Oct 12, 2018 at 10:00 PM Pankaj Gupta wrote: > > This patch series has implementation for "fake DAX". > "fake DAX" is fake persistent memory(nvdimm) in guest > which allows to bypass the guest page cache. This also > implements a VIRTIO based asynchronous flush mechanism. Can we stop

Re: [Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-09-27 Thread Dan Williams
On Thu, Sep 27, 2018 at 6:07 AM Pankaj Gupta wrote: [..] > > We are plugging VIRTIO based flush callback for virtio_pmem driver. If pmem > > driver (pmem_make_request) has to queue request we have to plug "blk_mq_ops" > > callbacks for corresponding VIRTIO vqs. AFAICU there is no existing > >

Re: [Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-09-21 Thread Dan Williams
On Fri, Aug 31, 2018 at 6:32 AM 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_region object with the persistent memory > range

Re: [Qemu-devel] [PATCH 1/3] nd: move nd_region to common header

2018-09-21 Thread Dan Williams
On Fri, Aug 31, 2018 at 6:31 AM Pankaj Gupta wrote: > > This patch moves nd_region definition to common header > include/linux/nd.h file. This is required for flush callback > support for both virtio-pmem & pmem driver. > > Signed-off-by: Pankaj Gupta > --- > drivers/nvdimm/nd.h | 39

Re: [Qemu-devel] [PATCH 2/3] libnvdimm: nd_region flush callback support

2018-09-21 Thread Dan Williams
On Fri, Aug 31, 2018 at 6:32 AM Pankaj Gupta wrote: > > This patch adds functionality to perform flush from guest > to host over VIRTIO. We are registering a callback based > on 'nd_region' type. virtio_pmem driver requires this special > flush function. For rest of the region types we are

Re: [Qemu-devel] [RFC PATCH 1/1] nvdimm: let qemu requiring section alignment of pmem resource.

2018-06-11 Thread Dan Williams
On Mon, Jun 11, 2018 at 9:26 AM, Stefan Hajnoczi wrote: > On Mon, Jun 11, 2018 at 06:54:25PM +0800, Zhang Yi wrote: >> Nvdimm driver use Memory hot-plug APIs to map it's pmem resource, >> which at a section granularity. >> >> When QEMU emulated the vNVDIMM device, decrease the label-storage, >>

Re: [Qemu-devel] [qemu PATCH v4 3/4] nvdimm, acpi: support NFIT platform capabilities

2018-06-06 Thread Dan Williams
On Wed, Jun 6, 2018 at 4:20 PM, Elliott, Robert (Persistent Memory) wrote: > >> > Okay, we can move to the symbolic names. Do you want them to be that >> long, or >> > would: >> > >> > nvdimm-cap-cpu >> > nvdimm-cap-mem-ctrl >> > nvdimm-cap-mirroring >> >> Wait, why is mirroring part of this? >

Re: [Qemu-devel] [qemu PATCH v4 3/4] nvdimm, acpi: support NFIT platform capabilities

2018-06-05 Thread Dan Williams
On Tue, Jun 5, 2018 at 3:07 PM, Ross Zwisler wrote: > On Tue, Jun 05, 2018 at 09:37:25PM +0300, Michael S. Tsirkin wrote: >> On Tue, Jun 05, 2018 at 11:15:00AM -0700, Dan Williams wrote: >> > On Tue, Jun 5, 2018 at 9:42 AM, Ross Zwisler >> > wrote: >> > > O

Re: [Qemu-devel] [qemu PATCH v4 3/4] nvdimm, acpi: support NFIT platform capabilities

2018-06-05 Thread Dan Williams
On Tue, Jun 5, 2018 at 9:42 AM, Ross Zwisler wrote: > On Tue, Jun 05, 2018 at 06:25:27PM +0300, Michael S. Tsirkin wrote: >> On Mon, May 21, 2018 at 10:32:02AM -0600, Ross Zwisler wrote: >> > Add a machine command line option to allow the user to control the Platform >> > Capabilities Structure

Re: [Qemu-devel] Questions about vNVDIMM on qemu/KVM

2018-05-24 Thread Dan Williams
On Thu, May 24, 2018 at 12:19 AM, Yasunori Goto wrote: >> On Tue, May 22, 2018 at 10:08 PM, Yasunori Goto >> wrote: >> > Hello, >> > >> > I'm investigating status of vNVDIMM on qemu/KVM, >> > and I have some questions about it. I'm glad if anyone

Re: [Qemu-devel] Questions about vNVDIMM on qemu/KVM

2018-05-23 Thread Dan Williams
On Tue, May 22, 2018 at 10:08 PM, Yasunori Goto wrote: > Hello, > > I'm investigating status of vNVDIMM on qemu/KVM, > and I have some questions about it. I'm glad if anyone answer them. > > In my understanding, qemu/KVM has a feature to show NFIT for guest, > and it will

Re: [Qemu-devel] [RFC v2 2/2] pmem: device flush over VIRTIO

2018-04-26 Thread Dan Williams
On Thu, Apr 26, 2018 at 9:40 AM, Pankaj Gupta wrote: > >> >> On Wed, Apr 25, 2018 at 04:54:14PM +0530, Pankaj Gupta wrote: >> > This patch adds functionality to perform >> > flush from guest to hosy over VIRTIO >> > when 'ND_REGION_VIRTIO'flag is set on >> > nd_negion. Flag is

Re: [Qemu-devel] [PATCH] acpi/nvdimm: remove forward name references

2018-04-25 Thread Dan Williams
>> > Good to know, thanks. > > I have made a big mistake. I was comparing the resulting SSDT of this patch > to an SSDT > Generated by a much older version of kvm/qemu. The latest kvm/qemu upstream > builds > the SSDT with the operation region contained inside of methods. This should > resolve

Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Dan Williams
[ adding Jeff directly since he has also been looking at infrastructure to track when MAP_SYNC should be disabled ] On Wed, Apr 25, 2018 at 7:21 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta <pagu...@redhat.com> wrote: >> T

Re: [Qemu-devel] [RFC v2 2/2] pmem: device flush over VIRTIO

2018-04-25 Thread Dan Williams
On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: > This patch adds functionality to perform > flush from guest to hosy over VIRTIO > when 'ND_REGION_VIRTIO'flag is set on > nd_negion. Flag is set by 'virtio-pmem' > driver. > > Signed-off-by: Pankaj Gupta

Re: [Qemu-devel] [RFC v2 1/2] virtio: add pmem driver

2018-04-25 Thread Dan Williams
On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM > guest. Minor nit, please expand your changelog line wrapping to 72 columns. > > Guest reads the persistent memory range > information from Qemu over VIRTIO and registers > it

Re: [Qemu-devel] RFC: altering the NVDIMM acpi table

2018-04-23 Thread Dan Williams
On Mon, Apr 23, 2018 at 1:35 PM, Schmauss, Erik wrote: > Hello, > > I work on ACPICA and we have recently made changes to the behavior of > the Linux AML interpreter to match other OS implementations. After > sending the patches to upstream Linux, we have identified that

Re: [Qemu-devel] [PATCH v2 5/7] ACPICA: Integrate package handling with module-level code

2018-04-16 Thread Dan Williams
On Mon, Apr 16, 2018 at 5:05 PM, Schmauss, Erik <erik.schma...@intel.com> wrote: > >> -Original Message- >> From: linux-acpi-ow...@vger.kernel.org [mailto:linux-acpi- >> ow...@vger.kernel.org] On Behalf Of Dan Williams >> Sent: Monday, April 16, 2

Re: [Qemu-devel] [PATCH v2 5/7] ACPICA: Integrate package handling with module-level code

2018-04-16 Thread Dan Williams
On Mon, Apr 16, 2018 at 4:15 PM, Schmauss, Erik wrote: > [ trimming ] >> >> Rafael, we may want to hold back on the module-level code changes >> >> (the patches below) for rc1. Between this and the strange _TSS issue, >> >> it seems like there are a few more things to

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-21 Thread Dan Williams
On Wed, Feb 21, 2018 at 5:55 AM, Igor Mammedov <imamm...@redhat.com> wrote: > On Tue, 20 Feb 2018 17:17:58 -0800 > Dan Williams <dan.j.willi...@intel.com> wrote: > >> On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov <imamm...@redhat.com> wrote: >> > On Sat

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-20 Thread Dan Williams
On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov wrote: > On Sat, 17 Feb 2018 14:31:35 +0800 > Haozhong Zhang wrote: > >> ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity >> domain of a NVDIMM SPA range must match with corresponding

Re: [Qemu-devel] [PATCH v2 7/8] migration/ram: ensure write persistence on loading compressed pages to PMEM

2018-02-07 Thread Dan Williams
On Wed, Feb 7, 2018 at 10:37 AM, Dr. David Alan Gilbert <dgilb...@redhat.com> wrote: > * Dan Williams (dan.j.willi...@intel.com) wrote: >> On Wed, Feb 7, 2018 at 10:08 AM, Dr. David Alan Gilbert >> <dgilb...@redhat.com> wrote: >> > * Dan Williams (dan.j.willi...

Re: [Qemu-devel] [PATCH v2 7/8] migration/ram: ensure write persistence on loading compressed pages to PMEM

2018-02-07 Thread Dan Williams
On Wed, Feb 7, 2018 at 10:08 AM, Dr. David Alan Gilbert <dgilb...@redhat.com> wrote: > * Dan Williams (dan.j.willi...@intel.com) wrote: >> On Wed, Feb 7, 2018 at 5:24 AM, Dr. David Alan Gilbert >> <dgilb...@redhat.com> wrote: >> > * Haozhong Zhang (haozhong.zh

Re: [Qemu-devel] [PATCH v2 7/8] migration/ram: ensure write persistence on loading compressed pages to PMEM

2018-02-07 Thread Dan Williams
On Wed, Feb 7, 2018 at 5:24 AM, Dr. David Alan Gilbert wrote: > * Haozhong Zhang (haozhong.zh...@intel.com) wrote: >> On 02/07/18 13:03 +, Dr. David Alan Gilbert wrote: >> > * Haozhong Zhang (haozhong.zh...@intel.com) wrote: >> > > On 02/07/18 11:54 +, Dr. David Alan

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 <dan.j.willi...@intel.com> wrote: > On Wed, Jan 31, 2018 at 6:29 PM, Haozhong Zhang > <haozhong.zh...@intel.com> wrote: >> + vfio maintainer Alex Williamson in case my understanding of vfio is &

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 <haozhong.zh...@intel.com> 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 >

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 <haozhong.zh...@intel.com> wrote: > On 01/31/18 16:08 -0800, Dan Williams wrote: >> On Wed, Jan 31, 2018 at 4:02 PM, Haozhong Zhang >> <haozhong.zh...@intel.com> wrote: >> > On 01/31/18 14:25 -0800, Dan Willia

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 <haozhong.zh...@intel.com> wrote: > On 01/31/18 14:25 -0800, Dan Williams wrote: >> On Tue, Jan 30, 2018 at 10:02 PM, Haozhong Zhang >> <haozhong.zh...@intel.com> wrote: >> > Linux 4.15 introduces a new m

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

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

2018-01-18 Thread Dan Williams
On Thu, Jan 18, 2018 at 11:51 AM, David Hildenbrand wrote: > >>> 1] Existing pmem driver & virtio for region discovery: >>> - >>> Use existing pmem driver which is tightly coupled with concepts of >>> namespaces, labels

  1   2   >