Re: [PATCH v2] virtio: kconfig: memory devices are PCI only

2024-09-25 Thread Pankaj Gupta
causes a > linking failure. Just curious what is required to make virtio-mem & virtio-pmem compatible with virtio-mmio? Maybe late but still: Reviewed-by: Pankaj Gupta Thanks, Pankaj > > Cc: David Hildenbrand > Reported-by: Michael Tokarev > Signed-off-by: Paolo Bonzini &g

[PATCH 2/3] i386/sev: Move SEV_COMMON null check before dereferencing

2024-06-07 Thread Pankaj Gupta
coverity #1546886 fixes: 9861405a8f ("i386/sev: Invoke launch_updata_data() for SEV class") Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 7c9df621de..f18432f58e 10

[PATCH 0/3] snp: fix coverity reported issues

2024-06-07 Thread Pankaj Gupta
Pankaj Gupta (3): i386/sev: fix unreachable code coverity issue i386/sev: Move SEV_COMMON null check before dereferencing i386/sev: Return when sev_common is null target/i386/sev.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.34.1

[PATCH 3/3] i386/sev: Return when sev_common is null

2024-06-07 Thread Pankaj Gupta
coverity #1546885 fixes: 16dcf200dc ("i386/sev: Introduce "sev-common" type to encapsulate common SEV state") Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index f18432f58e..c40

[PATCH 1/3] i386/sev: fix unreachable code coverity issue

2024-06-07 Thread Pankaj Gupta
Set 'finish->id_block_en' when block_size read. coverity #1546887 fixes: 7b34df4426 ("i386/sev: Introduce 'sev-snp-guest' object") Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i38

[PATCH v4 11/31] i386/cpu: Set SEV-SNP CPUID bit when SNP enabled

2024-05-30 Thread Pankaj Gupta
From: Michael Roth SNP guests will rely on this bit to determine certain feature support. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index bc2dceb647..914bef442c

[PATCH v4 08/31] i386/sev: Add a sev_snp_enabled() helper

2024-05-30 Thread Pankaj Gupta
From: Michael Roth Add a simple helper to check if the current guest type is SNP. Also have SNP-enabled imply that SEV-ES is enabled as well, and fix up any places where the sev_es_enabled() check is expecting a pure/non-SNP guest. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta

[PATCH v4 02/31] linux-headers: Update to current kvm/next

2024-05-30 Thread Pankaj Gupta
Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- linux-headers/asm-loongarch/bitsperlong.h | 23 ++ linux-headers/asm-loongarch/kvm.h | 4 ++ linux-headers/asm-loongarch/mman.h| 9 linux-headers/asm-riscv/kvm.h

[PATCH v4 00/31] Add AMD Secure Nested Paging (SEV-SNP) support

2024-05-30 Thread Pankaj Gupta
junction with -bios i386/kvm: Add KVM_EXIT_HYPERCALL handling for KVM_HC_MAP_GPA_RANGE i386/sev: Enable KVM_HC_MAP_GPA_RANGE hcall for SNP guests Pankaj Gupta (9): i386/sev: Replace error_report with error_setg linux-headers: Update to current kvm/next i386/sev: Move sev_launch_update to

[PATCH v4 13/31] i386/sev: Add a class method to determine KVM VM type for SNP guests

2024-05-30 Thread Pankaj Gupta
accordingly for sev-guest vs. sev-snp-guest objects and add handling for SNP. Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 458ff5040d..8ca486f5d2 100644 --- a

[PATCH v4 12/31] i386/sev: Don't return launch measurements for SEV-SNP guests

2024-05-30 Thread Pankaj Gupta
From: Michael Roth For SEV-SNP guests, launch measurement is queried from within the guest during attestation, so don't attempt to return it as part of query-sev-launch-measure. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 4 +++- 1 file chang

[PATCH v4 22/31] i386/sev: Reorder struct declarations

2024-05-30 Thread Pankaj Gupta
From: Dov Murik Move the declaration of PaddedSevHashTable before SevSnpGuest so we can add a new such field to the latter. No functional change intended. Signed-off-by: Dov Murik Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 56

[PATCH v4 01/31] i386/sev: Replace error_report with error_setg

2024-05-30 Thread Pankaj Gupta
Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index d30b68c11e..67ed32e5ea 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -952,13 +952,13 @@ static int sev_kvm_init

[PATCH v4 14/31] i386/sev: Update query-sev QAPI format to handle SEV-SNP

2024-05-30 Thread Pankaj Gupta
for launching SEV-SNP guest update their handling of query-sev appropriately). The corresponding HMP command has also been fixed up similarly. Signed-off-by: Michael Roth Co-developed-by:Pankaj Gupta Signed-off-by: Pankaj Gupta --- qapi/misc-target.json | 72 +++

[PATCH v4 29/31] hw/i386/sev: Allow use of pflash in conjunction with -bios

2024-05-30 Thread Pankaj Gupta
image. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- hw/i386/pc_sysfw.c | 47 +- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index def77a442d..7f97e62b16 100644 --- a/hw/i386

[PATCH v4 04/31] i386/sev: Introduce "sev-common" type to encapsulate common SEV state

2024-05-30 Thread Pankaj Gupta
use the name 'sev_guest' In order to enable kernel-hashes for SNP, pull it from SevGuestProperties to its parent SevCommonProperties so it will be available for both SEV and SNP. Signed-off-by: Michael Roth Co-developed-by: Dov Murik Signed-off-by: Dov Murik Ack

[PATCH v4 15/31] i386/sev: Add the SNP launch start context

2024-05-30 Thread Pankaj Gupta
From: Brijesh Singh The SNP_LAUNCH_START is called first to create a cryptographic launch context within the firmware. Signed-off-by: Brijesh Singh Signed-off-by: Michael Roth Co-developed-by: Pankaj Gupta Signed-off-by: Pankaj Gupta --- target/i386/sev.c| 39

[PATCH v4 21/31] i386/sev: Extract build_kernel_loader_hashes

2024-05-30 Thread Pankaj Gupta
From: Dov Murik Extract the building of the kernel hashes table out from sev_add_kernel_loader_hashes() to allow building it in other memory areas (for SNP support). No functional change intended. Signed-off-by: Dov Murik Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target

[PATCH v4 28/31] hw/i386: Add support for loading BIOS using guest_memfd

2024-05-30 Thread Pankaj Gupta
: Michael Roth Signed-off-by: Pankaj Gupta --- hw/i386/x86-common.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c index f41cb0a6a8..059de65f36 100644 --- a/hw/i386/x86-common.c +++ b/hw/i386/x86-common.c @@ -999,10

[PATCH v4 23/31] i386/sev: Allow measured direct kernel boot on SNP

2024-05-30 Thread Pankaj Gupta
page is reserved for SEV launch secrets which are not usable anyway on SNP. If the user disabled kernel hashes, QEMU pre-validates the kernel hashes page as a zero page. Signed-off-by: Dov Murik Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- include/hw/i386/pc.h | 2 ++ target

[PATCH v4 24/31] hw/i386/sev: Add support to encrypt BIOS when SEV-SNP is enabled

2024-05-30 Thread Pankaj Gupta
-by: Michael Roth Signed-off-by: Pankaj Gupta --- hw/i386/pc_sysfw.c| 12 +++- hw/i386/x86-common.c | 2 +- include/hw/i386/x86.h | 2 +- target/i386/sev-sysemu-stub.c | 2 +- target/i386/sev.c | 15 +++ target/i386/sev.h

[PATCH v4 18/31] hw/i386/sev: Add function to get SEV metadata from OVMF header

2024-05-30 Thread Pankaj Gupta
to retieve the SEV metadata pointer from the OVMF GUID list. Signed-off-by: Brijesh Singh Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- hw/i386/pc_sysfw.c | 4 include/hw/i386/pc.h | 26 ++ target/i386/sev.c| 31

[PATCH v4 09/31] i386/sev: Add sev_kvm_init() override for SEV class

2024-05-30 Thread Pankaj Gupta
Some aspects of the init routine SEV are specific to SEV and not applicable for SNP guests, so move the SEV-specific bits into separate class method and retain only the common functionality. Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386

[PATCH v4 31/31] i386/sev: Enable KVM_HC_MAP_GPA_RANGE hcall for SNP guests

2024-05-30 Thread Pankaj Gupta
From: Michael Roth KVM will forward GHCB page-state change requests to userspace in the form of KVM_HC_MAP_GPA_RANGE, so make sure the hypercall handling is enabled for SNP guests. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 5 + 1 file changed, 5

[PATCH v4 07/31] i386/sev: Introduce 'sev-snp-guest' object

2024-05-30 Thread Pankaj Gupta
th Acked-by: Markus Armbruster (for QAPI schema) Signed-off-by: Michael Roth Co-developed-by: Pankaj Gupta Signed-off-by: Pankaj Gupta --- docs/system/i386/amd-memory-encryption.rst | 70 +- qapi/qom.json | 57 + target/i386/sev.c

[PATCH v4 17/31] i386/sev: Set CPU state to protected once SNP guest payload is finalized

2024-05-30 Thread Pankaj Gupta
point so that QEMU don't continue trying to re-sync vCPU data during guest runtime. Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index cd47c195cd..2ca9a86bf3 100644 --

[PATCH v4 19/31] i386/sev: Add support for populating OVMF metadata pages

2024-05-30 Thread Pankaj Gupta
From: Brijesh Singh OVMF reserves various pages so they can be pre-initialized/validated prior to launching the guest. Add support for populating these pages with the expected content. Signed-off-by: Brijesh Singh Signed-off-by: Michael Roth Co-developed-by: Pankaj Gupta Signed-off-by

[PATCH v4 25/31] i386/sev: Invoke launch_updata_data() for SEV class

2024-05-30 Thread Pankaj Gupta
Add launch_update_data() in SevCommonStateClass and invoke as sev_launch_update_data() for SEV object. Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index c5c703bc8d

[PATCH v4 30/31] i386/kvm: Add KVM_EXIT_HYPERCALL handling for KVM_HC_MAP_GPA_RANGE

2024-05-30 Thread Pankaj Gupta
Signed-off-by: Pankaj Gupta --- target/i386/kvm/kvm.c| 55 target/i386/kvm/kvm_i386.h | 1 + target/i386/kvm/trace-events | 1 + 3 files changed, 57 insertions(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 6c864e4611

[PATCH v4 03/31] memory: Introduce memory_region_init_ram_guest_memfd()

2024-05-30 Thread Pankaj Gupta
From: Xiaoyao Li Introduce memory_region_init_ram_guest_memfd() to allocate private guset memfd on the MemoryRegion initialization. It's for the use case of TDVF, which must be private on TDX case. Signed-off-by: Xiaoyao Li Signed-off-by: Michael Roth Signed-off-by: Pankaj Gupta --- in

[PATCH v4 20/31] i386/sev: Add support for SNP CPUID validation

2024-05-30 Thread Pankaj Gupta
Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 164 +- 1 file changed, 162 insertions(+), 2 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 504f641038..4388ffe867 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -214,6

[PATCH v4 05/31] i386/sev: Move sev_launch_update to separate class method

2024-05-30 Thread Pankaj Gupta
: Pankaj Gupta --- target/i386/sev.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 79eb21c7d0..3bdb88f2ed 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -69,6 +69,8 @@ struct SevCommonState { struct

[PATCH v4 06/31] i386/sev: Move sev_launch_finish to separate class method

2024-05-30 Thread Pankaj Gupta
: Pankaj Gupta --- target/i386/sev.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 3bdb88f2ed..c141f4fed4 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -71,6 +71,7 @@ struct SevCommonStateClass

[PATCH v4 16/31] i386/sev: Add handling to encrypt/finalize guest launch data

2024-05-30 Thread Pankaj Gupta
-off-by: Michael Roth Co-developed-by: Pankaj Gupta Signed-off-by: Pankaj Gupta --- target/i386/sev.c| 112 ++- target/i386/trace-events | 2 + 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index

[PATCH v4 27/31] hw/i386/sev: Use guest_memfd for legacy ROMs

2024-05-30 Thread Pankaj Gupta
running existing SNP guest kernels. Signed-off-by: Michael Roth [pankaj: Added sev_snp_enabled() check] Signed-off-by: Pankaj Gupta --- hw/i386/pc.c | 14 ++ hw/i386/pc_sysfw.c | 13 ++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c b

[PATCH v4 26/31] i386/sev: Invoke launch_updata_data() for SNP class

2024-05-30 Thread Pankaj Gupta
Invoke as sev_snp_launch_update_data() for SNP object. Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index 7a0c2ee10f..7d2f67e2f3 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c

[PATCH v4 10/31] i386/sev: Add snp_kvm_init() override for SNP class

2024-05-30 Thread Pankaj Gupta
SNP does not support SMM and requires guest_memfd for private guest memory, so add SNP specific kvm_init() functionality in snp_kvm_init() class method. Signed-off-by: Michael Roth Co-developed-by: Pankaj Gupta Signed-off-by: Pankaj Gupta --- target/i386/sev.c | 23 ++- 1

Re: [RESEND PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-10-19 Thread Pankaj Gupta
oryBackend *hostmem = dimm->hostmem; > > -error_setg(errp, "'unarmed' property must be off since memdev %s " > +error_setg(errp, "'unarmed' property must be on since memdev %s " > "is read-only", > object_get_canonical_path_component(OBJECT(hostmem))); > return; With the suggested minor change. Reviewed-by: Pankaj Gupta

Re: [PATCH v12 4/8] qmp: add QMP command x-query-virtio-status

2022-02-10 Thread Pankaj Gupta
uot;: false, > +#"name": "virtio-crypto", > +#"started": true, > +#"device-id": 20, > +#"backend-features": 0, > +#"start-on-kick": false, > +#"isr": 1, > +#"broken": false, > +#"status": 15, > +#"num-vqs": 2, > +#"guest-features": 5100273664, > +#"host-features": 6325010432, > +#"use-guest-notifier-mask": true, > +#"vm-running": true, > +#"queue-sel": 1, > +#"disabled": false, > +#"vhost-started": false, > +#"use-started": true > +# } > +#} > +# > +# 2. Poll for the status of virtio-net (vhost-net is active) > +# > +# -> { "execute": "x-query-virtio-status", > +# "arguments": { "path": > "/machine/peripheral-anon/device[1]/virtio-backend" } > +#} > +# <- { "return": { > +#"device-endian": "little", > +#"bus-name": "", > +#"disabled-legacy-check": false, > +#"name": "virtio-net", > +#"started": true, > +#"device-id": 1, > +#"vhost-dev": { > +# "n-tmp-sections": 4, > +# "n-mem-sections": 4, > +# "max-queues": 1, > +# "backend-cap": 2, > +# "log-size": 0, > +# "backend-features": 0, > +# "nvqs": 2, > +# "protocol-features": 0, > +# "vq-index": 0, > +# "log-enabled": false, > +# "acked-features": 5100306432, > +# "features": 13908344832 > +#}, > +#"backend-features": 6337593319, > +#"start-on-kick": false, > +#"isr": 1, > +#"broken": false, > +#"status": 15, > +#"num-vqs": 3, > +#"guest-features": 5111807911, > +#"host-features": 6337593319, > +#"use-guest-notifier-mask": true, > +#"vm-running": true, > +#"queue-sel": 2, > +#"disabled": false, > +#"vhost-started": true, > +#"use-started": true > +# } > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-status', > + 'data': { 'path': 'str' }, > + 'returns': 'VirtioStatus', > + 'features': [ 'unstable' ] } Reviewed-by: Pankaj Gupta

Re: [PATCH v12 3/8] qmp: add QMP command x-query-virtio

2022-02-10 Thread Pankaj Gupta
[ > +#{ > +#"path": "/machine/peripheral-anon/device[4]/virtio-backend", > +#"name": "virtio-input" > +#}, > +#{ > +#"path": "/machine/peripheral/crypto0/virtio-backend", > +#"name": "virtio-crypto" > +#}, > +#{ > +#"path": "/machine/peripheral-anon/device[2]/virtio-backend", > +#"name": "virtio-scsi" > +#}, > +#{ > +#"path": "/machine/peripheral-anon/device[1]/virtio-backend", > +#"name": "virtio-net" > +#}, > +#{ > +#"path": "/machine/peripheral-anon/device[0]/virtio-backend", > +#"name": "virtio-serial" > +#} > +# ] > +#} > +# > +## > + > +{ 'command': 'x-query-virtio', > + 'returns': [ 'VirtioInfo' ], > + 'features': [ 'unstable' ] } > diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c > index 7f103ea..fd00ee2 100644 > --- a/tests/qtest/qmp-cmd-test.c > +++ b/tests/qtest/qmp-cmd-test.c > @@ -103,6 +103,7 @@ static bool query_is_ignored(const char *cmd) > "query-gic-capabilities", /* arm */ > /* Success depends on target-specific build configuration: */ > "query-pci", /* CONFIG_PCI */ > +"x-query-virtio", /* CONFIG_VIRTIO */ > /* Success depends on launching SEV guest */ > "query-sev-launch-measure", > /* Success depends on Host or Hypervisor SEV support */ Reviewed-by: Pankaj Gupta

Re: [PATCH v12 1/8] virtio: drop name parameter for virtio_init()

2022-02-10 Thread Pankaj Gupta
gt; b/include/hw/virtio/vhost-vsock-common.h > index d8b565b..076b7ab 100644 > --- a/include/hw/virtio/vhost-vsock-common.h > +++ b/include/hw/virtio/vhost-vsock-common.h > @@ -44,7 +44,7 @@ int vhost_vsock_common_start(VirtIODevice *vdev); > void vhost_vsock_common_stop(VirtIODevice *vdev); > int vhost_vsock_common_pre_save(void *opaque); > int vhost_vsock_common_post_load(void *opaque, int version_id); > -void vhost_vsock_common_realize(VirtIODevice *vdev, const char *name); > +void vhost_vsock_common_realize(VirtIODevice *vdev); > void vhost_vsock_common_unrealize(VirtIODevice *vdev); > uint64_t vhost_vsock_common_get_features(VirtIODevice *vdev, uint64_t > features, > Error **errp); > diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h > index 2179b75..afff9e1 100644 > --- a/include/hw/virtio/virtio-gpu.h > +++ b/include/hw/virtio/virtio-gpu.h > @@ -22,6 +22,7 @@ > #include "sysemu/vhost-user-backend.h" > > #include "standard-headers/linux/virtio_gpu.h" > +#include "standard-headers/linux/virtio_ids.h" > #include "qom/object.h" > > #define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base" > @@ -37,8 +38,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUGL, VIRTIO_GPU_GL) > #define TYPE_VHOST_USER_GPU "vhost-user-gpu" > OBJECT_DECLARE_SIMPLE_TYPE(VhostUserGPU, VHOST_USER_GPU) > > -#define VIRTIO_ID_GPU 16 > - > struct virtio_gpu_simple_resource { > uint32_t resource_id; > uint32_t width; > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index f095637..2a0be70 100644 > --- a/include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -165,8 +165,8 @@ struct VirtioDeviceClass { > void virtio_instance_init_common(Object *proxy_obj, void *data, > size_t vdev_size, const char *vdev_name); > > -void virtio_init(VirtIODevice *vdev, const char *name, > - uint16_t device_id, size_t config_size); > +void virtio_init(VirtIODevice *vdev, uint16_t device_id, size_t config_size); > + > void virtio_cleanup(VirtIODevice *vdev); > > void virtio_error(VirtIODevice *vdev, const char *fmt, ...) GCC_FMT_ATTR(2, > 3); Reviewed-by: Pankaj Gupta

Re: [PATCH v2] migration/rdma: set the REUSEADDR option for destination

2022-02-08 Thread Pankaj Gupta
> +ERROR(errp, "Error: could not set REUSEADDR option"); > +goto err_dest_init_bind_addr; > +} > for (e = res; e != NULL; e = e->ai_next) { > inet_ntop(e->ai_family, > &((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof > ip); Reviewed-by: Pankaj Gupta

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> > > > migration/rdma.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > > > index c7c7a384875b..2e223170d06d 100644 > > > > --- a/migration/rdma.c > > > > +++ b/migration/rdma.c > > > > @@ -4238,7 +4238,7 @@ void r

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> > > So it can handle more incoming requests. > > > > > > Signed-off-by: Jack Wang > > > --- > > > migration/rdma.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > > index c7c7a384875b..2e223170d06d 100644 > > > --- a/m

Re: [PATCH 2/2] migration/rdma: set the REUSEADDR option for destination

2022-02-01 Thread Pankaj Gupta
> > > This allow address could be reused to avoid rdma_bind_addr error > > > out. > > > > Seems we are proposing to allow multiple connections on same source ip > > port pair? > according to the man page, it's more about the destination side which > is the incoming side.[1] By source here I meant

Re: [PATCH 2/2] migration/rdma: set the REUSEADDR option for destination

2022-02-01 Thread Pankaj Gupta
> This allow address could be reused to avoid rdma_bind_addr error > out. Seems we are proposing to allow multiple connections on same source ip port pair? > > Signed-off-by: Jack Wang > --- > migration/rdma.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/migration/rdma.c b/mig

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> So it can handle more incoming requests. > > Signed-off-by: Jack Wang > --- > migration/rdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index c7c7a384875b..2e223170d06d 100644 > --- a/migration/rdma.c > +++ b/migration/rdma.c

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
> > I mean, that would be fundamentally broken, because the fsync() would > > corrupt the file. So I assume in a sane environment, the dst could only > > have stale clean pagecache pages. And we'd have to get rid of these to > > re-read everything from file. > > >>> > > >>> In c

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
> I mean, that would be fundamentally broken, because the fsync() would > corrupt the file. So I assume in a sane environment, the dst could only > have stale clean pagecache pages. And we'd have to get rid of these to > re-read everything from file. > >>> > >>> In case of write

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
> >> I mean, that would be fundamentally broken, because the fsync() would > >> corrupt the file. So I assume in a sane environment, the dst could only > >> have stale clean pagecache pages. And we'd have to get rid of these to > >> re-read everything from file. > > > > In case of write back cache

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
Thank you David for replying! > > From: Pankaj Gupta > > > > > Enable live migration support for virtio-pmem device. > > Tested this: with live migration on same host. > > > > Need suggestion on below points to support virtio-pmem live migration > > be

Re: [PATCH v1] util/oslib-posix: Fix missing unlock in the error path of os_mem_prealloc()

2022-01-11 Thread Pankaj Gupta
zini > Cc: Michael S. Tsirkin > Cc: Pankaj Gupta > Cc: Daniel P. Berrangé > Cc: Michal Privoznik > Signed-off-by: David Hildenbrand > --- > util/oslib-posix.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/util/oslib-posix.c b/util/oslib-posix.c > i

[RFC] virtio_pmem: enable live migration support

2021-12-31 Thread Pankaj Gupta
From: Pankaj Gupta > Enable live migration support for virtio-pmem device. Tested this: with live migration on same host. Need suggestion on below points to support virtio-pmem live migration between two separate host systems: - There is still possibility of stale page cache page at

Re: [PATCH v1 3/3] virtio-mem: Set "unplugged-inaccessible=auto" for the 6.2 machine on x86

2021-12-08 Thread Pankaj Gupta
CESSIBLE_PROP, > VirtIOMEM, > -unplugged_inaccessible, ON_OFF_AUTO_OFF), > +unplugged_inaccessible, ON_OFF_AUTO_AUTO), > #endif > DEFINE_PROP_END_OF_LIST(), > }; With correction in commit message pointed by Michal. Reviewed-by: Pankaj Gupta

[PATCH v2] docs/nvdimm: Update nvdimm option value in machine example

2021-09-23 Thread Pankaj Gupta
Update nvdimm option value in example command from "-machine pc,nvdimm" to "-machine pc,nvdimm=on" as former complains with the below error: "qemu-system-x86_64: -machine pc,nvdimm: Expected '=' after parameter 'nvdimm'" Reviewed-by: Laur

Re: [PATCH] docs/nvdimm: Update nvdimm option value in machine example

2021-09-23 Thread Pankaj Gupta
; Thanks, > Laurent > > >> Update nvdimm option value in example command from "-machine pc,nvdimm" > >> to "-machine pc,nvdimm=on" as former complains with the below error: > >> > >> "qemu-system-x86_64: -machine pc,nvdimm: Expe

Re: [PATCH] docs/nvdimm: Update nvdimm option value in machine example

2021-09-23 Thread Pankaj Gupta
ping > Update nvdimm option value in example command from "-machine pc,nvdimm" > to "-machine pc,nvdimm=on" as former complains with the below error: > > "qemu-system-x86_64: -machine pc,nvdimm: Expected '=' after parameter > 'nvdimm'

Re: [PATCH for-6.2 v5 06/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-08-16 Thread Pankaj Gupta
gt; DEFINE_CCW_MACHINE(6_1, "6.1", false); > > diff --git a/include/hw/boards.h b/include/hw/boards.h > index 463a5514f9..2ae039b74f 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -247,6 +247,7 @@ struct MachineClass { > bool nvdimm_supported; > bool numa_mem_supported; > bool auto_enable_numa; > +bool smp_prefer_sockets; > const char *default_ram_id; > > HotplugHandler *(*get_hotplug_handler)(MachineState *machine, > diff --git a/qemu-options.hx b/qemu-options.hx > index 06f819177e..451d2cd817 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -238,7 +238,8 @@ SRST > Historically preference was given to the coarsest topology parameters > when computing missing values (ie sockets preferred over cores, which > were preferred over threads), however, this behaviour is considered > -liable to change. > +liable to change. Prior to 6.2 the preference was sockets over cores > +over threads. Since 6.2 the preference is cores over sockets over > threads. > ERST > > DEF("numa", HAS_ARG, QEMU_OPTION_numa, > -- Reviewed-by: Pankaj Gupta

Re: [PATCH for-6.2 v5 06/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-08-16 Thread Pankaj Gupta
> On 2021/8/14 0:30, Pankaj Gupta wrote: > >> In the real SMP hardware topology world, it's much more likely that > >> we have high cores-per-socket counts and few sockets totally. While > >> the current preference of sockets over cores in smp parsing results

Re: [PATCH for-6.2 v5 06/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-08-13 Thread Pankaj Gupta
> In the real SMP hardware topology world, it's much more likely that > we have high cores-per-socket counts and few sockets totally. While > the current preference of sockets over cores in smp parsing results > in a virtual cpu topology with low cores-per-sockets counts and a > large number of soc

Re: [PATCH for-6.2 v4 06/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-08-06 Thread Pankaj Gupta
> >> In the real SMP hardware topology world, it's much more likely that > >> we have high cores-per-socket counts and few sockets totally. While > >> the current preference of sockets over cores in smp parsing results > >> in a virtual cpu topology with low cores-per-sockets counts and a > >> larg

Re: [PATCH-for-6.1 v2] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-05 Thread Pankaj Gupta
ED | RAM_RESIZEABLE | RAM_PREALLOC | >RAM_NORESERVE)) == 0); > assert(!host ^ (ram_flags & RAM_PREALLOC)); > -- > 2.31.1 Reviewed-by: Pankaj Gupta > >

Re: [PATCH for-6.2 v4 02/14] machine: Uniformly use maxcpus to calculate the omitted parameters

2021-08-05 Thread Pankaj Gupta
dies * sockets); > -threads = threads > 0 ? threads : 1; > -} else if (sockets * dies * cores * threads < cpus) { > +threads = maxcpus / (sockets * dies * cores); > +} > + > +if (sockets * dies * cores * threads < cpus) { > error_setg(errp, "cpu topology: " > "sockets (%u) * dies (%u) * cores (%u) * threads (%u) < " > "smp_cpus (%u)", > @@ -750,8 +752,6 @@ static void pc_smp_parse(MachineState *ms, > SMPConfiguration *config, Error **err > return; > } > > -maxcpus = maxcpus > 0 ? maxcpus : cpus; > - > if (maxcpus < cpus) { > error_setg(errp, "maxcpus must be equal to or greater than smp"); > return; Reviewed-by: Pankaj Gupta

Re: [PATCH for-6.2 v4 04/14] machine: Improve the error reporting of smp parsing

2021-08-05 Thread Pankaj Gupta
rror_setg(errp, "Invalid CPU topology deprecated: " > +error_setg(errp, "Invalid CPU topology: " > + "maxcpus must be equal to or greater than smp: " > "sockets (%u) * dies (%u) * cores (%u) * threads (%u) " > - "!= maxcpus (%u)", > - sockets, dies, cores, threads, > - maxcpus); > + "== maxcpus (%u) < smp_cpus (%u)", > + sockets, dies, cores, threads, maxcpus, cpus); > return; > } > Reviewed-by: Pankaj Gupta

Re: [PATCH for-6.2 v4 12/14] machine: Put all sanity-check in the generic SMP parser

2021-08-05 Thread Pankaj Gupta
goto out_free; > +qapi_free_SMPConfiguration(config); > } > - > -/* sanity-check smp_cpus and max_cpus against mc */ > -if (ms->smp.cpus < mc->min_cpus) { > -error_setg(errp, "Invalid SMP CPUs %d. The min CPUs " > - "supported by machine '%s' is %d", > - ms->smp.cpus, > - mc->name, mc->min_cpus); > -} else if (ms->smp.max_cpus > mc->max_cpus) { > -error_setg(errp, "Invalid SMP CPUs %d. The max CPUs " > - "supported by machine '%s' is %d", > - ms->smp.max_cpus, > - mc->name, mc->max_cpus); > -} > - > -out_free: > -qapi_free_SMPConfiguration(config); > } > > static void machine_class_init(ObjectClass *oc, void *data) Looks good. Reviewed-by: Pankaj Gupta

Re: [PATCH for-6.2 v4 06/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-08-05 Thread Pankaj Gupta
> In the real SMP hardware topology world, it's much more likely that > we have high cores-per-socket counts and few sockets totally. While > the current preference of sockets over cores in smp parsing results > in a virtual cpu topology with low cores-per-sockets counts and a > large number of soc

Re: [PATCH v2 4/6] util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE

2021-07-28 Thread Pankaj Gupta
return false; > +} > touch_fn = do_madv_populate_write_pages; > } else { > touch_fn = do_touch_pages; Reviewed-by: Pankaj Gupta

Re: [PATCH v2 3/6] util/oslib-posix: Don't create too many threads with small memory or little pages

2021-07-28 Thread Pankaj Gupta
t; @@ -546,7 +554,7 @@ static bool touch_all_pages(char *area, size_t hpagesize, > size_t numpages, > { > static gsize initialized = 0; > MemsetContext context = { > -.num_threads = get_memset_num_threads(smp_cpus), > +.num_threads = get_memset_num_threads(hpagesize, numpages, smp_cpus), > }; > size_t numpages_per_thread, leftover; > void *(*touch_fn)(void *); Reviewed-by: Pankaj Gupta

Re: [PATCH for-6.2 v3 07/11] machine: Use ms instead of global current_machine in sanity-check

2021-07-27 Thread Pankaj Gupta
'%s' is %d", > - current_machine->smp.max_cpus, > + ms->smp.max_cpus, > mc->name, mc->max_cpus); > } > Reviewed-by: Pankaj Gupta

[PATCH] docs/nvdimm: Update nvdimm option value in machine example

2021-07-26 Thread Pankaj Gupta
Update nvdimm option value in example command from "-machine pc,nvdimm" to "-machine pc,nvdimm=on" as former complains with the below error: "qemu-system-x86_64: -machine pc,nvdimm: Expected '=' after parameter 'nvdimm'" Signed-off-by: Pankaj Gup

Re: [PATCH for-6.2 v2 00/11] machine: smp parsing fixes and improvement

2021-07-21 Thread Pankaj Gupta
> > On Mon, Jul 19 2021, Yanan Wang wrote: > > > >> Hi, > >> > >> This is v2 of the series [1] that I have posted to introduce some smp > >> parsing > >> fixes and improvement, much more work has been processed compared to RFC > >> v1. > >> > >> [1] https://lists.gnu.org/archive/html/qemu-devel/

Re: [PATCH 11/16] microvm: Drop dead error handling in microvm_machine_state_init()

2021-07-20 Thread Pankaj Gupta
te *x86ms = X86_MACHINE(machine); > -Error *local_err = NULL; > > microvm_memory_init(mms); > > x86_cpus_init(x86ms, CPU_VERSION_LATEST); > -if (local_err) { > -error_report_err(local_err); > - exit(1); > -} > > microvm_devices_init(mms); > } > -- > 2.31.1 Reviewed-by: Pankaj Gupta

Re: [PATCH 16/16] vl: Don't continue after -smp help.

2021-07-20 Thread Pankaj Gupta
opts_list->implied_opt_name, &help, > &error_fatal); > if (help) { > qemu_opts_print_help(opts_list, true); > - return; > +exit(0); > } > opts = qdict_new(); > qdict_put(opts, propname, prop); > -- Reviewed-by: Pankaj Gupta

Re: [PATCH 10/16] migration: Handle migration_incoming_setup() errors consistently

2021-07-20 Thread Pankaj Gupta
_process_incoming(QIOChannel *ioc, > Error **errp) > return; > } > > -if (migration_incoming_setup(f, &local_err)) { > -error_propagate(errp, local_err); > +if (!migration_incoming_setup(f, errp)) { > return; > } > Reviewed-by: Pankaj Gupta

Re: [PATCH v1 0/3] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-20 Thread Pankaj Gupta
> > > > Cc: Paolo Bonzini > > Cc: "Michael S. Tsirkin" > > Cc: Igor Mammedov > > Cc: Eduardo Habkost > > Cc: Dr. David Alan Gilbert > > Cc: Marek Kedzierski > > Cc: Pankaj Gupta > > > > David Hildenbran

Re: [PATCH v1 0/3] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-20 Thread Pankaj Gupta
ichael S. Tsirkin" > Cc: Igor Mammedov > Cc: Eduardo Habkost > Cc: Dr. David Alan Gilbert > Cc: Marek Kedzierski > Cc: Pankaj Gupta > > David Hildenbrand (3): > util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc() > util/oslib-posix: Introduce and

Re: [PATCH for-6.2 v2 06/11] hw: Add compat machines for 6.2

2021-07-19 Thread Pankaj Gupta
-DEFINE_CCW_MACHINE(6_1, "6.1", true); > +DEFINE_CCW_MACHINE(6_1, "6.1", false); > > static void ccw_machine_6_0_instance_options(MachineState *machine) > { > diff --git a/include/hw/boards.h b/include/hw/boards.h > index b6161cee88..2832f0f8aa 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -354,6 +354,9 @@ struct MachineState { > } \ > type_init(machine_initfn##_register_types) > > +extern GlobalProperty hw_compat_6_1[]; > +extern const size_t hw_compat_6_1_len; > + > extern GlobalProperty hw_compat_6_0[]; > extern const size_t hw_compat_6_0_len; > > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index 88dffe7517..97b4ab79b5 100644 > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -196,6 +196,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, > size_t flash_size); > void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, > const CPUArchIdList *apic_ids, GArray *entry); > > +extern GlobalProperty pc_compat_6_1[]; > +extern const size_t pc_compat_6_1_len; > + > extern GlobalProperty pc_compat_6_0[]; > extern const size_t pc_compat_6_0_len; > > -- Reviewed-by: Pankaj Gupta

Re: [PATCH] hw/net/net_tx_pkt: Fix crash detected by fuzzer

2021-07-18 Thread Pankaj Gupta
t->raw[i].iov_base, > pkt->raw[i].iov_len, > - DMA_DIRECTION_TO_DEVICE, 0); > +if (pkt->max_raw_frags > 0) { > +assert(pkt->raw); > +for (i = 0; i < pkt->raw_frags; i++) { > + assert(pkt->raw[i].iov_base); > +pci_dma_unmap(pkt->pci_dev, pkt->raw[i].iov_base, > + pkt->raw[i].iov_len, DMA_DIRECTION_TO_DEVICE, 0); > +} > } > pkt->raw_frags = 0; > Reviewed-by: Pankaj Gupta

Re: [PATCH v3 2/3] memory: add memory_region_is_mapped_shared()

2021-07-14 Thread Pankaj Gupta
b/softmmu/memory.c > @@ -1811,6 +1811,12 @@ bool memory_region_is_ram_device(MemoryRegion *mr) > return mr->ram_device; > } > > +bool memory_region_is_mapped_shared(MemoryRegion *mr) > +{ > +return memory_access_is_direct(mr, false) && > + (mr->ram_block->flags & RAM_SHARED); > +} > + > uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr) > { > uint8_t mask = mr->dirty_log_mask; Reviewed-by: Pankaj Gupta

Re: [PATCH v3 1/3] tests/qtest/vhost-user-test: use share=on with memfd

2021-07-14 Thread Pankaj Gupta
quot; \ > -" -numa node,memdev=mem" > +"share=on -numa node,memdev=mem" > #define QEMU_CMD_CHR" -chardev socket,id=%s,path=%s%s" > #define QEMU_CMD_NETDEV " -netdev vhost-user,id=hs0,chardev=%s,vhostforce" > Reviewed-by: Pankaj Gupta

Re: [PATCH v2 3/4] qemu-options: tweak to show that CPU count is optional

2021-07-13 Thread Pankaj Gupta
Simulate an SMP system with n CPUs. On the PC target, up to 255 CPUs > are supported. On Sparc32 target, Linux limits the number of usable > CPUs to 4. For the PC target, the number of cores per die, the > -- Reviewed-by: Pankaj Gupta

Re: [PATCH v2 4/4] qemu-options: rewrite help for -smp options

2021-07-13 Thread Pankaj Gupta
rs > +must be specified. Values for any omitted parameters will be computed > +from those which are given. Historically preference was given to the > +coarsest topology parameters when computing missing values (ie sockets > +preferred over cores, which were preferred over threads), however, this > +behaviour is considered liable to change. > ERST > > DEF("numa", HAS_ARG, QEMU_OPTION_numa, > -- Reviewed-by: Pankaj Gupta

Re: [PATCH v2 1/4] docs: fix typo s/Intel/AMD/ in CPU model notes

2021-07-13 Thread Pankaj Gupta
ation of the host CPUs in use. In a deployment with a > mixture of host CPU models between machines, if live migration > -- Reviewed-by: Pankaj Gupta

Re: [PATCH v2 2/4] qemu-options: re-arrange CPU topology options

2021-07-13 Thread Pankaj Gupta
xcpus][,sockets=sockets][,dies=dies][,cores=cores][,threads=threads]`` > Simulate an SMP system with n CPUs. On the PC target, up to 255 CPUs > are supported. On Sparc32 target, Linux limits the number of usable > CPUs to 4. For the PC target, the number of cores per die, the > -- Reviewed-by: Pankaj Gupta

Re: [RFC PATCH 6/6] machine: Tweak the order of topology members in struct CpuTopology

2021-07-12 Thread Pankaj Gupta
processors on the machine > */ > typedef struct CpuTopology { > unsigned int cpus; > +unsigned int sockets; > unsigned int dies; > unsigned int cores; > unsigned int threads; > -unsigned int sockets; > unsigned int max_cpus; > } CpuTopology; Reviewed-by: Pankaj Gupta

Re: [PATCH] io_uring: move LuringState typedef to block/aio.h

2021-07-12 Thread Pankaj Gupta
O_URING > -typedef struct LuringState LuringState; > LuringState *luring_init(Error **errp); > void luring_cleanup(LuringState *s); > int coroutine_fn luring_co_submit(BlockDriverState *bs, LuringState *s, int > fd, > -- Reviewed-by: Pankaj Gupta

Re: [PATCH 2/4] qemu-options: re-arrange CPU topology options

2021-07-12 Thread Pankaj Gupta
smp > [cpus=]n[,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,cores=cores][,threads=threads]`` > Simulate an SMP system with n CPUs. On the PC target, up to 255 CPUs > are supported. On Sparc32 target, Linux limits the number of usable > CPUs to 4. For the PC target, the number of cores per die, the Looks cleaner. With the nit mentioned by Dan: Reviewed-by: Pankaj Gupta

Re: [PATCH v1] vfio: Fix CID 1458134 in vfio_register_ram_discard_listener()

2021-07-12 Thread Pankaj Gupta
more than 31 bit. > > Let's use 1ULL instead and make sure we're not shifting by more than 63 > bit by asserting that any bit in container->pgsizes is set. > > Fixes: CID 1458134 > Cc: Alex Williamson > Cc: Eduardo Habkost > Cc: "Michael S. Tsirkin"

Re: [PATCH 1/2] numa: Report expected initiator

2021-07-09 Thread Pankaj Gupta
uot; PRIu16 ")", > + props->node_id, > numa_info[props->node_id].initiator); > return; > } > numa_info[props->node_id].has_cpu = true; Reviewed-by: Pankaj Gupta

Re: [PATCH v2] remote/memory: Replace share parameter with ram_flags

2021-07-08 Thread Pankaj Gupta
gion], > sysmem_info->offsets[region], > errp); > Reviewed-by: Pankaj Gupta

Re: [PATCH] Fix libpmem configuration option

2021-07-07 Thread Pankaj Gupta
bpmem=disabled > + --enable-libpmem) libpmem="enabled" >;; > - --disable-libpmem) libpmem=enabled > + --disable-libpmem) libpmem="disabled" >;; >--enable-xkbcommon) xkbcommon="enabled" >;; Reviewed-by: Pankaj Gupta

Re: [PATCH v1 1/2] migration/postcopy-ram: define type for "struct PostcopyNotifyData"

2021-07-07 Thread Pankaj Gupta
struct PostcopyNotifyData { > enum PostcopyNotifyReason reason; > Error **errp; > -}; > +} PostcopyNotifyData; > > void postcopy_add_notifier(NotifierWithReturn *nn); > void postcopy_remove_notifier(NotifierWithReturn *n); > -- Reviewed-by: Pankaj Gupta

Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-05-03 Thread Pankaj Gupta
+CC Danpb > >>> Marc-André, I'd like your opinion for this one, in particular the use of > >>> g_source_remove(). > >>> > >> > >> My opinion isn't really worth much, my review would have a bit more value. > >> > >> GSource has indeed some peculiar lifetime management, that I got wrong in > >> the

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

2021-05-03 Thread Pankaj Gupta
> > The proposal that "sync-dax=unsafe" for non-PPC architectures, is a > > fundamental misrepresentation of how this is supposed to work. Rather > > than make "sync-dax" a first class citizen of the device-description > > interface I'm proposing that you make this a separate device-type. > > This

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-12 Thread Pankaj Gupta
*chr, bool pretty, Error > **errp) > } else { > qemu_chr_fe_set_handlers(&mon->common.chr, monitor_can_read, > monitor_qmp_read, monitor_qmp_event, > - NULL, &mon->common, NULL, true); > + monitor_qmp_change, &mon->common, NULL, > true); > monitor_list_append(&mon->common); > } > } Overall patch looks good to me. Reviewed-by: Pankaj Gupta

Re: [PATCH] virtio-pmem: fix virtio_pmem_resp assign problem

2021-03-17 Thread Pankaj Gupta
-47,7 +47,7 @@ static int worker_cb(void *opaque) > err = 1; > } > > -virtio_stw_p(req_data->vdev, &req_data->resp.ret, err); > +virtio_stl_p(req_data->vdev, &req_data->resp.ret, err); > > return 0; > } Thanks! Reviewed-by: Pankaj Gupta

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

2021-03-02 Thread Pankaj Gupta
rote: > > > > > -Original Message----- > > From: Pankaj Gupta > > Sent: Monday, March 1, 2021 2:22 PM > > To: Moger, Babu > > Cc: Pankaj Gupta ; Paolo Bonzini > > ; richard.hender...@linaro.org; Eduardo Habkost > > ; Qemu Developers > > Subject: Re:

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

2021-03-02 Thread Pankaj Gupta
> Pankaj, Sure. > > I will add signoff from you if it is fine with you. Sure. Thank you! > > Signed-off-by: Pankaj Gupta Please use: Pankaj Gupta Thanks, Pankaj

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

2021-03-01 Thread Pankaj Gupta
> > Hi Babu, > > > > I tried to test below patch for AMD EPYC Rome CPU and I got below error [1]: > > > > Also, I noticed SSBD CPU flag for guest was still available even without > > this > > patch, I noticed that for the guest, AMD_SSBD not got set. > > > > Guest: > > 0x8008 0x00: eax=0x3

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

2021-03-01 Thread Pankaj Gupta
Hi Babu, I tried to test below patch for AMD EPYC Rome CPU and I got below error [1]: Also, I noticed SSBD CPU flag for guest was still available even without this patch, I noticed that for the guest, AMD_SSBD not got set. Guest: 0x8008 0x00: eax=0x3028 ebx=0x9205 ecx=0x2003 edx=

  1   2   3   4   5   6   >