Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-02-24 Thread Pankaj Gupta
Hi Babu, > >> +.features[FEAT_8000_0008_EBX] = > >> +CPUID_8000_0008_EBX_CLZERO | CPUID_8000_0008_EBX_XSAVEERPTR | > >> +CPUID_8000_0008_EBX_WBNOINVD | CPUID_8000_0008_EBX_IBPB | > >> +CPUID_8000_0008_EBX_IBRS | CPUID_8000_0008_EBX_STIBP | > >> +

Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-02-23 Thread Pankaj Gupta
Hello Babu, Have below doubt about exposed CPU flags between EPYC-Rome & EPYC-Milan family. Please see below. > Adds the support for AMD 3rd generation processors. The model > display for the new processor will be EPYC-Milan. > > Adds the following new feature bits on top of the feature bits

Re: [PATCH] virtio-pmem: add trace events

2021-02-02 Thread Pankaj Gupta
Ping @M On Wed, 9 Dec 2020 at 20:15, David Hildenbrand wrote: > > On 17.11.20 12:57, Pankaj Gupta wrote: > > This patch adds trace events for virtio-pmem functionality. > > Adding trace events for virtio pmem request, reponse and host > > side fsync functionality. >

Re: [PATCH v3 04/10] vfio: Query and store the maximum number of DMA mappings

2020-12-16 Thread Pankaj Gupta
ze > divided by the mapping page size might be a bad indication of what will > happen in practice - we might end up warning all the time. > > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedo

Re: [PATCH v2 07/10] softmmu/physmem: Don't use atomic operations in ram_block_discard_(disable|require)

2020-12-10 Thread Pankaj Gupta
> >> bool ram_block_discard_is_disabled(void) > >> { > >> -return qatomic_read(_block_discard_disabled) > 0; > >> +return qatomic_read(_block_discard_disablers); > >> } > > return value won't be bool? > > The compiler does type conversion. > > != 0 -> true > == 0 -> false ah... I missed

Re: [PATCH v2 07/10] softmmu/physmem: Don't use atomic operations in ram_block_discard_(disable|require)

2020-12-10 Thread Pankaj Gupta
Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Cc: Peter Xu > Cc: Auger Eric > Cc: Wei Yang > Cc: teawater > Cc: Marek Kedzierski > Signed-off-by: David Hildenbrand > --- > softmmu/physmem.c | 70

Re: [PATCH v2 10/10] vfio: Disable only uncoordinated discards

2020-12-10 Thread Pankaj Gupta
e mappings). > > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Cc: Peter Xu > Cc: Auger Eric > Cc: Wei Yang > Cc: teawater > Cc: Marek Kedzierski > Signed

Re: [PATCH v2 08/10] softmmu/physmem: Extend ram_block_discard_(require|disable) by two discard types

2020-12-09 Thread Pankaj Gupta
Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Cc: Peter Xu > Cc: Auger Eric > Cc: Wei Yang > Cc: teawater > Cc: Marek Kedzierski > Signed-off-by: David Hildenbrand > --- > include/exec/memory.h | 18 +-- > softmmu/physmem.c | 54 ++

Re: [PATCH v2 08/10] softmmu/physmem: Extend ram_block_discard_(require|disable) by two discard types

2020-12-09 Thread Pankaj Gupta
or both is sufficient for current users - which only care if > any type of discard is required to work. Thanks! O.k. Looks good to me. Reviewed-by: Pankaj Gupta

Re: [PATCH v2 09/10] virtio-mem: Require only coordinated discards

2020-12-09 Thread Pankaj Gupta
> We implement the RamDiscardMgr interface and only require coordinated > discarding of RAM to work. > > Reviewed-by: Dr. David Alan Gilbert > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mamm

Re: [PATCH v2 02/10] virtio-mem: Factor out traversing unplugged ranges

2020-12-09 Thread Pankaj Gupta
> Let's factor out the core logic, to be reused soon. > > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Cc: Peter Xu > Cc: Auger Eric > Cc: Wei Yang >

Re: [PATCH v2 01/10] memory: Introduce RamDiscardMgr for RAM memory regions

2020-12-09 Thread Pankaj Gupta
RAMBlock users (esp. vfio used > for nvme://) consume this interface as well. We'll need RAMBlock notifier > calls when a RAMBlock is getting mapped/unmapped (via the corresponding > memory region), so we can properly register a listener there as well. > > Cc: Paolo Bonzini > Cc: &quo

Re: [PATCH] virtio-pmem: add trace events

2020-12-09 Thread Pankaj Gupta
ping. > This patch adds trace events for virtio-pmem functionality. > Adding trace events for virtio pmem request, reponse and host > side fsync functionality. > > Signed-off-by: Pankaj Gupta > --- > hw/virtio/trace-events | 5 + > hw/virtio/virtio-pmem.c | 4 ++

Re: [PATCH v3] migration: Don't allow migration if vm is in POSTMIGRATE

2020-12-09 Thread Pankaj Gupta
_O_INACTIVE enabled which cause crash. > > As Vladimir suggested, this patch makes migrate_prepare check the state of vm > and > return error if it is in RUN_STATE_POSTMIGRATE state. > > Signed-off-by: Tuguoyi Similar issue is reported by Li Zhang(+CC) with almost same patch[3]

Re: [PATCH 02/13] virtio-pmem: put it into the 'storage' category

2020-12-03 Thread Pankaj Gupta
> The category of the virtio-pmem device is not set, put it into the 'storage' > category. > > Signed-off-by: Gan Qixin > --- > Cc: Michael S. Tsirkin > --- > hw/virtio/virtio-pmem.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c >

Re: [PATCH v2 01/12] pc-dimm: put it into the 'storage' category

2020-12-03 Thread Pankaj Gupta
> mdc->get_memory_region = pc_dimm_md_get_memory_region; > > > mdc->fill_device_info = pc_dimm_md_fill_device_info; > > > +set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); > > > > Any reason why pc-dimm would be in the storage category? ... > Thanks for you reply. As far as I know,

Re: [PATCH v2 01/12] pc-dimm: put it into the 'storage' category

2020-11-30 Thread Pankaj Gupta
> The category of the pc-dimm device is not set, put it into the 'storage' > category. > > Signed-off-by: Gan Qixin > --- > Cc: Michael S. Tsirkin > --- > hw/mem/pc-dimm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c > index 2ffc986734..017146e3d1

Re: [PATCH v2 04/12] nvdimm: put it into the 'storage' category

2020-11-30 Thread Pankaj Gupta
data; > +set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); > } > > static TypeInfo nvdimm_info = { Reviewed-by: Pankaj Gupta

Re: [for-5.2 4/9] docs/system/virtio-pmem.rst: Fix minor style issues

2020-11-19 Thread Pankaj Gupta
est data persistence on non-NVDIMM requires guest userspace applications > +to perform fsync/msync. This is different from a real nvdimm backend where > +no additional fsync/msync is required. This is to persist guest writes in > +host backing file which otherwise remains in host page cache and there is > +risk of losing the data in case of power failure. > > - With virtio pmem device, MAP_SYNC mmap flag is not supported. This provides > - a hint to application to perform fsync for write persistence. > +With virtio pmem device, MAP_SYNC mmap flag is not supported. This provides > +a hint to application to perform fsync for write persistence. > > Limitations > Reviewed-by: Pankaj Gupta

Re: [PATCH 02/13] virtio-pmem: put it into the 'storage' category

2020-11-19 Thread Pankaj Gupta
rtio_pmem_fill_device_info; > vpc->get_memory_region = virtio_pmem_get_memory_region; > +set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); > } > > static TypeInfo virtio_pmem_info = { Reviewed-by: Pankaj Gupta

[PATCH] virtio-pmem: add trace events

2020-11-17 Thread Pankaj Gupta
This patch adds trace events for virtio-pmem functionality. Adding trace events for virtio pmem request, reponse and host side fsync functionality. Signed-off-by: Pankaj Gupta --- hw/virtio/trace-events | 5 + hw/virtio/virtio-pmem.c | 4 2 files changed, 9 insertions(+) diff --git

Re: [PATCH] physmem: improve ram size error messages

2020-11-06 Thread Pankaj Gupta
Ping > Ram size mismatch condition logs below message. > >"Length mismatch: pc.ram: 0x8000 in != 0x18000: Invalid argument" > > This patch improves the readability of error messages. > Removed the superflous "in" and changed "Length&

Re: Documents not in sphinx toctree

2020-11-06 Thread Pankaj Gupta
> > >> By running sphinx over the docs/ directory (like readthedocs.org > > >> presumably does), it finds a couple of rst documents that are not > > >> referenced: > > >> - cpu-hotplug.rst > > >> - microvm.rst > > >> - pr-manager.rst > > >> - virtio-net-failover.rst > > > > Given the current

[PATCH] physmem: improve ram size error messages

2020-10-22 Thread Pankaj Gupta
Ram size mismatch condition logs below message. "Length mismatch: pc.ram: 0x8000 in != 0x18000: Invalid argument" This patch improves the readability of error messages. Removed the superflous "in" and changed "Length" to "Size". Signed-off

Re: io_uring possibly the culprit for qemu hang (linux-5.4.y)

2020-10-19 Thread Pankaj Gupta
@Jack Wang, Maybe four io_uring patches in 5.4.71 fixes the issue for you as well? Thanks, Pankaj > Hi Jens. > > On Sat, Oct 17, 2020 at 3:07 AM Jens Axboe wrote: > > > > Would be great if you could try 5.4.71 and see if that helps for your > > issue. > > > > Oh wow, yeah it did fix the issue.

Re: [PATCH v2 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-29 Thread Pankaj Gupta
; >> > >> If we ever have THP on the PUD level (e.g., 1 GiB THP on x86-64), we > >> expect to have a trigger to explicitly opt-in for the new THP granularity. > >> > >> Cc: "Michael S. Tsirkin" > >> Cc: Wei Yang > >> Cc: Dr. Dav

Re: [PATCH v2 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-29 Thread Pankaj Gupta
Cc: Wei Yang > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Signed-off-by: David Hildenbrand > --- > hw/virtio/virtio-mem.c | 105 +++-- > 1 file changed, 101 insertions(+), 4 deletions(-) > > diff --git a

Re: [PATCH v1 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-28 Thread Pankaj Gupta
>> If we ever have THP on the PUD level (e.g., 1 GiB THP on x86-64), we > >> expect to have a trigger to explicitly opt-in for the new THP granularity. > >> > >> Cc: "Michael S. Tsirkin" > >> Cc: Wei Yang > &g

Re: [PATCH v1 5/5] virito-mem: Implement get_min_alignment()

2020-09-26 Thread Pankaj Gupta
chael S. Tsirkin" > Cc: Wei Yang > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Signed-off-by: David Hildenbrand > --- > hw/virtio/virtio-mem-pci.c | 14 ++ > hw/virtio/virtio-mem.c | 8 > 2 files changed, 22 inse

Re: [PATCH v1 4/5] memory-device: Add get_min_alignment() callback

2020-09-26 Thread Pankaj Gupta
; Cc: Wei Yang > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Signed-off-by: David Hildenbrand > --- > hw/mem/memory-device.c | 11 +-- > include/hw/mem/memory-device.h | 11 +++ > 2 files changed, 20 insertions(+), 2 de

Re: [PATCH v1 3/5] memory-device: Support big alignment requirements

2020-09-25 Thread Pankaj Gupta
m device with a 2G block size - > which will become important, for example, when supporting vfio in the > future. > > Cc: "Michael S. Tsirkin" > Cc: Wei Yang > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Signed-off-by: David Hildenbr

Re: [PATCH v1 2/5] virtio-mem: Check that "memaddr" is multiples of the block size

2020-09-25 Thread Pankaj Gupta
uot;Michael S. Tsirkin" > Cc: Wei Yang > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Signed-off-by: David Hildenbrand > --- > hw/virtio/virtio-mem.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/virtio/virtio-mem

Re: [PATCH v1 1/5] virtio-mem: Probe THP size to determine default block size

2020-09-25 Thread Pankaj Gupta
er to explicitly opt-in for the new THP granularity. > > Cc: "Michael S. Tsirkin" > Cc: Wei Yang > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Signed-off-by: David Hildenbrand > --- > hw/virtio/virtio-mem.c | 82 +++

Re: [PATCH] virtio-pmem-pci: force virtio version 1

2020-09-25 Thread Pankaj Gupta
fixes this by forcing virtio 1 with virtio-pmem. > > > > fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem") > > Signed-off-by: Pankaj Gupta > > --- > > hw/virtio/virtio-pmem-pci.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff

[PATCH] virtio-pmem-pci: force virtio version 1

2020-09-25 Thread Pankaj Gupta
irtio-pmem") Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-pmem-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c index 21a457d151..2b2a0b1eae 100644 --- a/hw/virtio/virtio-pmem-pci.c +++ b/hw/virtio/virtio-pmem-pci.c @@ -

Re: [PATCH] docs: add 'io_uring' option to 'aio' param in qemu-options.hx

2020-09-24 Thread Pankaj Gupta
reads", or "native" and selects between pthread based > -disk I/O and native Linux AIO. > +aio is "threads", "native", or "io_uring" and selects between > pthread > +based disk I/O, native Linux AIO, or Linux io_uring API. > > ``format=format`` > Specify which disk format will be used rather than detecting the > Reviewed-by: Pankaj Gupta -- > 2.26.2 > > >

Re: [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs

2020-09-10 Thread Pankaj Gupta
Hi Michael, Please add while applying the patch. fixes: 5f503cd9f3 ("virtio-pmem: add virtio device") On Mon, 7 Sep 2020 at 03:38, Li Qiang wrote: > > ping! > > Li Qiang 于2020年8月28日周五 上午9:21写道: > > > > Kindly ping. > > > > Li Qiang 于2020年8月14日周五 上午12:52写道: > > > > > > If error occurs while

Re: [PATCH v7 2/2] i386: Simplify CPUID_8000_001E for AMD

2020-09-02 Thread Pankaj Gupta
ave > - * is 32 (255/8) with 8 cores per node and 255 max cores. We only > need > - * 5 bits for nodes. Find the left most set bit to represent the > total > - * number of nodes. find_last_bit returns last set bit(0 based). Left > - * shift(+1) the

Re: [PATCH v7 1/2] i386: Simplify CPUID_8000_001d for AMD

2020-09-02 Thread Pankaj Gupta
encode_cache_cpuid801d(env->cache_info_amd.l3_cache, cs, > - eax, ebx, ecx, edx); > +encode_cache_cpuid801d(env->cache_info_amd.l3_cache, > + _info, eax, ebx, ecx, edx); > break; > default: /* end of info */ > *eax = *ebx = *ecx = *edx = 0; > Nice clean up. Reviewed-by: Pankaj Gupta

Re: [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs

2020-08-17 Thread Pankaj Gupta
data->elem.out_num < 1 || req_data->elem.in_num < 1) { > virtio_error(vdev, "virtio-pmem request not proper"); > +virtqueue_detach_element(vq, (VirtQueueElement *)req_data, 0); > g_free(req_data); > return; > } > -- Reviewed-by: Pankaj Gupta > 2.17.1 > >

Re: [PATCH] virtio-mem: Correct format specifier mismatch for RISC-V

2020-07-30 Thread Pankaj Gupta
ize if possible. Esp. > * Linux guests will only add (aligned) memory blocks in case they fully Reviewed-by: Pankaj Gupta

Re: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-29 Thread Pankaj Gupta
ure from msync(). > +So we add 'pmem=on' to avoid calling msync(), use the QEMU command line: > + > +-object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G > + > References > -- > > -- Good to document this. Reviewed-by: Pankaj Gupta > 2.17.1 > >

Re: [PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats

2020-06-03 Thread Pankaj Gupta
de].node_mem += vmi->size; > +node_mem[vmi->node].node_plugged_mem += vmi->size; > +break; > default: > g_assert_not_reached(); > } Reviewed-by: Pankaj Gupta

Re: [PATCH v4 4/5] virtio-blk: default num_queues to -smp N

2020-05-28 Thread Pankaj Gupta
{ > VirtIOBlkPCI *dev = VIRTIO_BLK_PCI(vpci_dev); > DeviceState *vdev = DEVICE(>vdev); > +VirtIOBlkConf *conf = >vdev.conf; > + > +if (conf->num_queues == VIRTIO_BLK_AUTO_NUM_QUEUES) { > +conf->num_queues = virtio_pci_optimal_num_queues(0); > +} > > if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) { > -vpci_dev->nvectors = dev->vdev.conf.num_queues + 1; > +vpci_dev->nvectors = conf->num_queues + 1; > } > > qdev_set_parent_bus(vdev, BUS(_dev->bus)); Looks good to me. Reviewed-by: Pankaj Gupta

Re: [PATCH v4 2/5] virtio-scsi: introduce a constant for fixed virtqueues

2020-05-28 Thread Pankaj Gupta
i-pci.c b/hw/virtio/virtio-scsi-pci.c > index e82e7e5680..c52d68053a 100644 > --- a/hw/virtio/virtio-scsi-pci.c > +++ b/hw/virtio/virtio-scsi-pci.c > @@ -51,7 +51,8 @@ static void virtio_scsi_pci_realize(VirtIOPCIProxy > *vpci_dev, Error **errp) > char *bus_name; > > if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) { > -vpci_dev->nvectors = vs->conf.num_queues + 3; > +vpci_dev->nvectors = vs->conf.num_queues + > + VIRTIO_SCSI_VQ_NUM_FIXED + 1; > } > > /* > -- Better readability with no change in logic. Code looks good to me. Reviewed-by: Pankaj Gupta

Re: [PATCH v1] pc: Support coldplugging of virtio-pmem-pci devices on all buses

2020-05-27 Thread Pankaj Gupta
Hi David, Vivek, s > >> Hi Vivek, > >> > >> you have to declare the maxMemory option. Memory devices like > >> virtio-pmem-pci reside in RAM like a pc-dimm or a nvdimm. If your > >> virtio-pmem device will be 4GB, you have to add that to maxMemory. > >> > >> 64 > >> 68 > >> 64 > >> > >> (you

Re: [PATCH v1] pc: Support coldplugging of virtio-pmem-pci devices on all buses

2020-05-25 Thread Pankaj Gupta
ror: Bus 'pcie.0' does not support hotplugging" > > Hotunplug attempts will still fail with: > "Error: Bus 'pcie.0' does not support hotplugging" > > Reported-by: Vivek Goyal > Cc: Pankaj Gupta > Cc: Igor Mammedov > Cc: Paolo Bonzini > Cc: Richard Hende

Re: [PATCH v1 13/17] hmp: Handle virtio-mem when printing memory device info

2020-05-06 Thread Pankaj Gupta
"\n", > + vmi->requested_size); > +monitor_printf(mon, " size: %" PRIu64 "\n", vmi->size); > +monitor_printf(mon, " max-size: %" PRIu64 "\n", > vmi->max_size); > +monitor_printf(mon, " block-size: %" PRIu64 "\n", > + vmi->block_size); > +monitor_printf(mon, " memdev: %s\n", vmi->memdev); > +break; > default: > g_assert_not_reached(); > } > -- > 2.25.3 Reviewed-by: Pankaj Gupta

Re: [PATCH v1 11/17] virtio-pci: Proxy for virtio-mem

2020-05-06 Thread Pankaj Gupta
lude "hw/virtio/virtio-mem.h" > + > +typedef struct VirtIOMEMPCI VirtIOMEMPCI; > + > +/* > + * virtio-mem-pci: This extends VirtioPCIProxy. > + */ > +#define TYPE_VIRTIO_MEM_PCI "virtio-mem-pci-base" > +#define VIRTIO_MEM_PCI(obj) \ > +OBJECT_CHECK(VirtIOMEMPCI, (obj), TYPE_VIRTIO_MEM_PCI) > + > +struct VirtIOMEMPCI { > +VirtIOPCIProxy parent_obj; > +VirtIOMEM vdev; > +}; > + > +#endif /* QEMU_VIRTIO_MEM_PCI_H */ > diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h > index cfedf5a995..fec72d5a31 100644 > --- a/include/hw/pci/pci.h > +++ b/include/hw/pci/pci.h > @@ -87,6 +87,7 @@ extern bool pci_available; > #define PCI_DEVICE_ID_VIRTIO_VSOCK 0x1012 > #define PCI_DEVICE_ID_VIRTIO_PMEM0x1013 > #define PCI_DEVICE_ID_VIRTIO_IOMMU 0x1014 > +#define PCI_DEVICE_ID_VIRTIO_MEM 0x1015 > > #define PCI_VENDOR_ID_REDHAT 0x1b36 > #define PCI_DEVICE_ID_REDHAT_BRIDGE 0x0001 > -- > 2.25.3 Reviewed-by: Pankaj Gupta

Re: [PATCH v1 15/17] pc: Support for virtio-mem-pci

2020-05-06 Thread Pankaj Gupta
io_md_pci_unplug(hotplug_dev, dev, errp); > } else { > error_setg(errp, "acpi: device unplug for not supported device" > " type: %s", object_get_typename(OBJECT(dev))); > @@ -1772,7 +1778,8 @@ static HotplugHandler > *pc_get_hotplug_handler(MachineState *machine, > { > if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) || > object_dynamic_cast(OBJECT(dev), TYPE_CPU) || > -object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_PMEM_PCI)) { > +object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_PMEM_PCI) || > +object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI)) { > return HOTPLUG_HANDLER(machine); > } > > -- Reviewed-by: Pankaj Gupta > 2.25.3 > >

Re: [PATCH RESEND v3 0/4] virtio-pci: enable blk and scsi multi-queue by default

2020-03-30 Thread Pankaj Gupta
For best case its really a good idea to configure default number of queues to the number of CPU's. For the series: Reviewed-by: Pankaj Gupta

Re: [PATCH v4 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-30 Thread Pankaj Gupta
Reviewed-by: Pankaj Gupta

Re: [PATCH v2 1/3] virtio: add ability to delete vq through a pointer

2019-12-04 Thread Pankaj Gupta
> > On 2019/12/4 16:33, Pankaj Gupta wrote: > > > >> From: Pan Nengyuan > >> > >> Devices tend to maintain vq pointers, allow deleting them trough a vq > >> pointer. > >> > >> Signed-off-by: Michael S. Tsirkin > >> Si

Re: [PATCH v2 1/3] virtio: add ability to delete vq through a pointer

2019-12-04 Thread Pankaj Gupta
n); > void virtqueue_flush(VirtQueue *vq, unsigned int count); > -- > 2.7.2.windows.1 > > Overall it ooks good to me. Just one point: e.g in virtio_rng: "virtio_rng_device_unrealize" function We are doing : virtio_del_queue(vdev, 0); One can directly call "virtio_delete_queue". It can become confusing to call multiple functions for same purpose. Instead, Can we make "virtio_delete_queue" static inline? Other than that: Reviewed-by: Pankaj Gupta > >

Re: [PATCH v4 0/8] Introduce the microvm machine type

2019-09-25 Thread Pankaj Gupta
> >>> Microvm is a machine type inspired by both NEMU and Firecracker, and > >>> constructed after the machine model implemented by the latter. > >>> > >>> It's main purpose is providing users a minimalist machine type free > >>> from the burden of legacy compatibility, serving as a stepping

Re: [PATCH v4 0/8] Introduce the microvm machine type

2019-09-25 Thread Pankaj Gupta
> On 24.09.19 14:44, Sergio Lopez wrote: > > Microvm is a machine type inspired by both NEMU and Firecracker, and > > constructed after the machine model implemented by the latter. > > > > It's main purpose is providing users a minimalist machine type free > > from the burden of legacy

Re: [Qemu-devel] Call for volunteers: LWN.net articles about KVM Forum talks

2019-09-17 Thread Pankaj Gupta
Hi Stefan, > > Hi, > LWN.net is a popular open source news site that covers Linux and other > open source communities (Python, GNOME, Debian, etc). It has published > a few KVM articles in the past too. > > Let's raise awareness of QEMU, KVM, and libvirt by submitting articles > covering >

Re: [Qemu-devel] [PATCH v3] virtio pmem: user document

2019-09-16 Thread Pankaj Gupta
ations. > > > > Signed-off-by: Pankaj Gupta > > --- > > v3->v3 > > - Text format fixes - Cornerlia > > v1->v2 > > - Fixes on text format and 'Guest Data persistence' > >section - Cornelia > > > > docs/virtio-pmem.rst | 75 ++

[Qemu-devel] [PATCH v3] virtio pmem: user document

2019-08-21 Thread Pankaj Gupta
This patch documents the steps to use virtio pmem. It also documents other useful information about virtio pmem e.g use-case, comparison with Qemu NVDIMM backend and current limitations. Signed-off-by: Pankaj Gupta --- v3->v3 - Text format fixes - Cornerlia v1->v2 - Fixes on text

Re: [Qemu-devel] [PATCH v2] virtio pmem: user document

2019-08-21 Thread Pankaj Gupta
Hi Cornelia, > > This patch documents the steps to use virtio pmem. > > It also documents other useful information about > > virtio pmem e.g use-case, comparison with Qemu NVDIMM > > backend and current limitations. > > > > Signed-off-by: Pankaj Gupta >

[Qemu-devel] [PATCH v2] virtio pmem: user document

2019-08-21 Thread Pankaj Gupta
This patch documents the steps to use virtio pmem. It also documents other useful information about virtio pmem e.g use-case, comparison with Qemu NVDIMM backend and current limitations. Signed-off-by: Pankaj Gupta --- v1->v2 - Fixes on text format and 'Guest Data persistence' sect

Re: [Qemu-devel] [PATCH] virtio pmem: user document

2019-07-30 Thread Pankaj Gupta
> On Tue, 30 Jul 2019 12:16:57 +0530 > Pankaj Gupta wrote: > > > This patch documents the steps to use virtio pmem. > > It also documents other useful information about > > virtio pmem e.g use-case, comparison with Qemu NVDIMM > > backend and current

[Qemu-devel] [PATCH] virtio pmem: user document

2019-07-30 Thread Pankaj Gupta
This patch documents the steps to use virtio pmem. It also documents other useful information about virtio pmem e.g use-case, comparison with Qemu NVDIMM backend and current limitations. Signed-off-by: Pankaj Gupta --- docs/virtio-pmem.txt | 65 1

[Qemu-devel] [PATCH] virtio pmem: user document

2019-07-30 Thread Pankaj Gupta
This patch documents the steps to use virtio pmem. It also documents other useful information about virtio pmem e.g use-case, comparison with Qemu NVDIMM backend and current limitations. Signed-off-by: Pankaj Gupta --- docs/virtio-pmem.txt | 65 1

Re: [Qemu-devel] [PATCH-for-4.1 v4 1/7] virtio-balloon: Fix wrong sign extension of PFNs

2019-07-25 Thread Pankaj Gupta
); > > pa = (hwaddr) p << VIRTIO_BALLOON_PFN_SHIFT; > offset += 4; > -- > 2.21.0 Reviewed-by: Pankaj Gupta > > >

Re: [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup

2019-07-24 Thread Pankaj Gupta
Kit (PMDK), formerly known as NVML > project, home page: > http://pmem.io/pmdk/ > +[3] ndctl-create-namespace - provision or reconfigure a namespace > +http://pmem.io/ndctl/ndctl-create-namespace.html > -- Reviewed-by: Pankaj Gupta > 2.17.1 > > >

Re: [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup

2019-07-24 Thread Pankaj Gupta
of a directory to > qemu command line. o.k Thanks, Pankaj > > >> + > >> +Then the new file in /mnt could be used in "mem-path" option. > >> + > >> NVDIMM Persistence > >> ------ > >> > >>

Re: [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup

2019-07-24 Thread Pankaj Gupta
/files/technical_work/final/NVMProgrammingModel_v1.2.pdf > [2] Persistent Memory Development Kit (PMDK), formerly known as NVML > project, home page: > http://pmem.io/pmdk/ > +[3] ndctl-create-namespace - provision or reconfigure a namespace > +http://pmem.io/ndctl/ndctl-create-namespace.html > -- Looks good to me. Just a small comment above. Other than that: Reviewed-by: Pankaj Gupta > 2.17.1 > > >

Re: [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup

2019-07-24 Thread Pankaj Gupta
> > > >> > >> Persistent backend setup requires some knowledge about nvdimm and ndctl > >> tool. Some users report they may struggle to gather these knowledge and > >> have difficulty to setup it properly. > >> > >> Here we provide two examples for persistent backend and gives the link > >> to

Re: [Qemu-devel] [PATCH] docs/nvdimm: add example on persistent backend setup

2019-07-24 Thread Pankaj Gupta
> > Persistent backend setup requires some knowledge about nvdimm and ndctl > tool. Some users report they may struggle to gather these knowledge and > have difficulty to setup it properly. > > Here we provide two examples for persistent backend and gives the link > to ndctl. By doing so, user

Re: [Qemu-devel] [PATCH] pc-dimm: fix crash when invalid slot number is used

2019-07-24 Thread Pankaj Gupta
pc_dimm_get_free_slot(slot == PC_DIMM_UNASSIGNED_SLOT ? NULL : > , > machine->ram_slots, _err); > if (local_err) { > -- Reviewed-by: Pankaj Gupta > 2.18.1 > > >

Re: [Qemu-devel] [PATCH 3/3] virtio pmem: remove transational device info

2019-07-15 Thread Pankaj Gupta
> > On 12.07.19 09:35, Pankaj Gupta wrote: > > Remove transactional & non transactional device info > > for virtio pmem. > > Can you explain and add *why* ? As per upstream suggestion by Cornelia & MST, transactional devices are for legacy purpose. So, doe

Re: [Qemu-devel] [PATCH 3/3] virtio pmem: remove transational device info

2019-07-12 Thread Pankaj Gupta
> > On Fri, 12 Jul 2019 13:05:54 +0530 > Pankaj Gupta wrote: > > > Remove transactional & non transactional device info > > for virtio pmem. > > s/device info/names/ ? yes. > > > > > Signed-off-by: Pankaj Gupta > > --- > &g

Re: [Qemu-devel] [PATCH 0/3] virtio pmem: coverity fixes

2019-07-12 Thread Pankaj Gupta
> > On Fri, 12 Jul 2019 13:05:51 +0530 > Pankaj Gupta wrote: > > > This patch series two fixes for coverity and a > > transactional info removal patch. > > > > Pankaj Gupta (3): > > virtio pmem: fix wrong mem region condition > > virtio

Re: [Qemu-devel] [PATCH v2 0/1] Don't obey the kernel block device max transfer len / max segments for raw block devices

2019-07-12 Thread Pankaj Gupta
; * Manually tested to not break the scsi passthrough with a nested VM > * As Eric suggested, refactored the area around the fstat. > * Spelling/grammar fixes > > Best regards, > Maxim Levitsky > > Maxim Levitsky (1): > raw-posix.c - use max transfer length / max segement count only for > SCSI passthrough > > block/file-posix.c | 54 -- > 1 file changed, 28 insertions(+), 26 deletions(-) > > -- I am not familiar with SCSI passthrough special case. But overall looks good to me. Feel free to add: Reviewed-by: Pankaj Gupta > 2.17.2 > > >

[Qemu-devel] [PATCH 3/3] virtio pmem: remove transational device info

2019-07-12 Thread Pankaj Gupta
Remove transactional & non transactional device info for virtio pmem. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-pmem-pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c index 0da6627469..fe2af00fa1 100644 --- a/hw/vi

[Qemu-devel] [PATCH 2/3] virtio pmem: remove memdev null check

2019-07-12 Thread Pankaj Gupta
g else here. We are removing 'pmem->memdev' null check here as memdev will never be null in this function. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-pmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c index adbfb603ab

[Qemu-devel] [PATCH 0/3] virtio pmem: coverity fixes

2019-07-12 Thread Pankaj Gupta
This patch series two fixes for coverity and a transactional info removal patch. Pankaj Gupta (3): virtio pmem: fix wrong mem region condition virtio pmem: remove memdev null check virtio pmem: remove transational device info hw/virtio/virtio-pmem-pci.c | 4 +--- hw/virtio/virtio-pmem.c

[Qemu-devel] [PATCH 1/3] virtio pmem: fix wrong mem region condition

2019-07-12 Thread Pankaj Gupta
Coverity reported memory region returns zero for non-null value. This is because of wrong arguments to '?:' , fixing this. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-pmem-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio

Re: [Qemu-devel] [PULL 05/22] virtio-pmem: add virtio device

2019-07-11 Thread Pankaj Gupta
> > > > From: Pankaj Gupta > > > > This is the implementation of virtio-pmem device. Support will require > > machine changes for the architectures that will support it, so it will > > not yet be compiled. It can be unlocked with VIRTIO_PMEM_SUPPORTED per &

Re: [Qemu-devel] [PULL 08/22] virtio-pci: Proxy for virtio-pmem

2019-07-11 Thread Pankaj Gupta
Hi Peter, > > From: Pankaj Gupta > > > > We need a proxy device for virtio-pmem, and this device has to be the > > actual memory device so we can cleanly hotplug it. > > > > Forward memory device class functions either to the actual device or use >

[Qemu-devel] [PATCH v15 7/7] xfs: disable map_sync for async flush

2019-07-05 Thread Pankaj Gupta
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 Gupta Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_file.c | 9

[Qemu-devel] [PATCH v15 5/7] dax: check synchronous mapping is supported

2019-07-05 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara Signed-off-by: Pankaj

[Qemu-devel] [PATCH v15 6/7] ext4: disable map_sync for async flush

2019-07-05 Thread Pankaj Gupta
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 ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara --- fs/ext4/file.c | 10

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

2019-07-05 Thread Pankaj Gupta
' as argument so that the callers can pass the appropriate functions. Suggested-by: Mike Snitzer Signed-off-by: Pankaj Gupta Reviewed-by: Mike Snitzer --- drivers/md/dm-table.c | 24 ++-- drivers/md/dm.c | 2 +- drivers/md/dm.h | 5 - 3 files changed, 23

[Qemu-devel] [PATCH v15 3/7] libnvdimm: add dax_dev sync flag

2019-07-05 Thread Pankaj Gupta
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: Pankaj Gupta --- drivers/dax/bus.c| 2 +- drivers

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

2019-07-05 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia Acked-by: Michael S. Tsirkin Acked-by: Jakub Staron Tested-by: Jakub Staron Reviewed-by: Cornelia Huck --- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 125 +++ drivers/nvdimm

[Qemu-devel] [PATCH v15 0/7] virtio pmem driver

2019-07-05 Thread Pankaj Gupta
imm_flush() - Use 'nd_region->provider_data' for long dereferencing - Remove virtio_pmem_freeze/restore functions - Remove BSD license text with SPDX license text - Add might_sleep() in virtio_pmem_flush - [Luiz] - Make spin_lock_irqsave() narrow Pankaj Gupta (7): libnvdimm: nd_region flush

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

2019-07-05 Thread Pankaj Gupta
fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -- include

Re: [Qemu-devel] [PULL 00/22] virtio, pc, pci: features, fixes, cleanups

2019-07-05 Thread Pankaj Gupta
ers/pm215/src/qemu-for-merges/include/standard-headers/linux/virtio_pmem.h:13:10: > > > fatal error: 'linux/types.h' file not found > > > #include > > > ^~~ > > > > Sorry for this. > > Can we please apply below patch on top. I only

Re: [Qemu-devel] [PULL 00/22] virtio, pc, pci: features, fixes, cleanups

2019-07-04 Thread Pankaj Gupta
rtio_pmem.h:13:10: > fatal error: 'linux/types.h' file not found > #include > ^~~ Sorry for this. Can we please apply below patch on top. I only tested this in linux but I think this will solve the issue. Let me know if you want to resend entire series. Thank you, Pank

Re: [Qemu-devel] [PATCH v2 0/7] Qemu virtio pmem device

2019-07-02 Thread Pankaj Gupta
> >> > >> Ok, if it works, we could list those regions? and change pmem0 mode to dax > >> mode, right? > > > >You mean fs dax? > >I don't think currently we support this because raw image wont have any > >metadata. > >Will have to think if this is at all possible or how we can achieve such >

Re: [Qemu-devel] [PATCH v2 0/7] Qemu virtio pmem device

2019-07-02 Thread Pankaj Gupta
> >> > > >> >> > >> >> On Wed, Jun 19, 2019 at 03:19:00PM +0530, Pankaj Gupta wrote: > >> >> > This patch series has implementation for "virtio pmem" > >> >> > device. "virtio pmem"

Re: [Qemu-devel] [PATCH v2 0/7] Qemu virtio pmem device

2019-07-02 Thread Pankaj Gupta
> > > >> > >> On Wed, Jun 19, 2019 at 03:19:00PM +0530, Pankaj Gupta wrote: > >> > This patch series has implementation for "virtio pmem" > >> > device. "virtio pmem" is persistent memory(nvdimm) device in > >> >

Re: [Qemu-devel] [PATCH v2 4/7] virtio-pci: Proxy for virtio-pmem

2019-07-02 Thread Pankaj Gupta
> > On Tue, Jul 02, 2019 at 01:55:19PM +0200, Cornelia Huck wrote: > > On Wed, 19 Jun 2019 15:19:04 +0530 > > Pankaj Gupta wrote: > > > > > We need a proxy device for virtio-pmem, and this device has to be the > > > actual memory device so we ca

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers

2019-07-02 Thread Pankaj Gupta
- Original Message - > > On Tue, Jul 02, 2019 at 07:59:17AM -0400, Pankaj Gupta wrote: > > > > > > > > On Wed, 19 Jun 2019 15:19:03 +0530 > > > Pankaj Gupta wrote: > > > > > > > Sync linux headers f

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers

2019-07-02 Thread Pankaj Gupta
> > > > > > > > > > > > > > On Wed, 19 Jun 2019 15:19:03 +0530 > > > > > Pankaj Gupta wrote: > > > > > > > > > > > Sync linux headers for virtio pmem. > > > > > > > > &

Re: [Qemu-devel] [PATCH v2 3/7] virtio-pmem: sync linux headers

2019-07-02 Thread Pankaj Gupta
> > On Wed, 19 Jun 2019 15:19:03 +0530 > Pankaj Gupta wrote: > > > Sync linux headers for virtio pmem. > > > > Signed-off-by: Pankaj Gupta > > --- > > include/standard-headers/linux/virtio_ids.h | 1 + > > i

Re: [Qemu-devel] [PATCH v2 4/7] virtio-pci: Proxy for virtio-pmem

2019-07-02 Thread Pankaj Gupta
> > On Wed, 19 Jun 2019 15:19:04 +0530 > Pankaj Gupta wrote: > > > We need a proxy device for virtio-pmem, and this device has to be the > > actual memory device so we can cleanly hotplug it. > > > > Forward memory device class functions either to the

Re: [Qemu-devel] [PATCH v2 5/7] hmp: Handle virtio-pmem when printing memory device infos

2019-07-02 Thread Pankaj Gupta
> > On Wed, Jun 19, 2019 at 03:19:05PM +0530, Pankaj Gupta wrote: > >From: David Hildenbrand > > > >Print the memory device info just like for PCDIMM/NVDIMM. > > > >Reviewed-by: Dr. David Alan Gilbert > >Signed-off-by: David Hildenbrand > > T

<    1   2   3   4   5   6   >