Re: [Qemu-devel] [BUG] VM abort after migration

2019-07-26 Thread Longpeng (Mike)
在 2019/7/10 11:57, Jason Wang 写道: > > On 2019/7/10 上午11:36, Longpeng (Mike) wrote: >> 在 2019/7/10 11:25, Jason Wang 写道: >>> On 2019/7/8 下午5:47, Dr. David Alan Gilbert wrote: >>>> * longpeng (longpe...@huawei.com) wrote: >>>>> Hi guys, >>>

Re: [PATCH] configure: Fix typo of the have_afalg variable

2020-02-03 Thread Longpeng (Mike)
t; -hava_afalg=no > +have_afalg=no > cat > $TMPC << EOF > #include > #include > Reviewed-by: Longpeng(Mike) -- Regards, Longpeng(Mike)

Re: [PATCH 7/7] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-01-15 Thread Mike Maslenkin
On Fri, Jan 13, 2023 at 7:43 PM Jonathan Cameron via wrote: > > CXL uses PCI AER Internal errors to signal to the host that an error has > occurred. The host can then read more detailed status from the CXL RAS > capability. > > For uncorrectable errors: support multiple injection in one operation

[PATCH] linux-user: fix strace build w/out munlockall

2023-01-17 Thread Mike Frysinger
Signed-off-by: Mike Frysinger --- linux-user/strace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/strace.c b/linux-user/strace.c index 9ae5a812cd71..f7912ad67f2b 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1380,6 +1380,7 @@ UNUSED static struct flags

[PATCH] configure: do not quote $PKG_CONFIG

2023-01-17 Thread Mike Frysinger
flags directly to pkg-config via the env var where this normally works elsewhere, and it used to work in the past. Signed-off-by: Mike Frysinger --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 9e407ce2e3a9..b5a19d1319a5 100755

[PATCH v2] linux-user: fix strace build w/out munlockall

2023-01-18 Thread Mike Frysinger
Signed-off-by: Mike Frysinger Reviewed-by: Philippe Mathieu-Daud?? --- linux-user/strace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 9ae5a812cd71..11a7c3df9498 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c

[PATCH] linux-user: move target_flat.h to target subdirs

2023-01-28 Thread Mike Frysinger
y other target_xxx.h header is handled. Signed-off-by: Mike Frysinger --- linux-user/aarch64/target_flat.h | 1 + linux-user/arm/target_flat.h | 1 + linux-user/{ => generic}/target_flat.h | 0 linux-user/m68k/target_flat.h | 1 + linux-user/microblaze/target_flat.h

How to write a zIPL section in IPL2 record on a raw disk

2023-04-11 Thread Mike Stramba
not find a suitable boot device (none specified) Failed to load OS from hard disk The qemu script is : qemu-system-s390x -m 16 -drive format=raw,file=test-ipl.3350.un,if=virtio -nographic I found this link re: the zipl command. https://www.ibm.com/docs/en/linux-on-systems?topic=u-modes-syntax-overview Where is that command and / or its source ? Mike

Re: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-04-13 Thread Mike Maslenkin
I observed similar behaviour in case of Windows for ARM, but there was true GSOD afterwards. When windows is starting again its hibernated state dropped and all goes fine. Best Regards, Mike On Thu, Apr 13, 2023 at 1:34 PM Fiona Ebner wrote: > > Am 12.04.23 um 14:18 schrieb Igor Mammedov: &g

Re: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-04-13 Thread Mike Maslenkin
I couldn't reproduce problem as well. On Thu, Apr 13, 2023 at 3:10 PM Fiona Ebner wrote: > > Am 13.04.23 um 13:46 schrieb Mike Maslenkin: > > Sorry for the noise, but just curious, how did you shutdown Windows? > > Did you use 'shutdown /s' or just press power button?

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-26 Thread Mike Maslenkin
<< BDRV_SECTOR_BITS; > +return off / s->cluster_size; > +} > + I guess there should be: off -= le32_to_cpu(s->header->data_off) << BDRV_SECTOR_BITS Regards, Mike.

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-27 Thread Mike Maslenkin
+goto out; > +} > + > +sector = (i * s->cluster_size) >> BDRV_SECTOR_BITS; > +sector = allocate_clusters(bs, sector, s->tracks, &n); > +if (sector < 0) { > +res->check_errors++; > +ret = sector; > +goto out; > +} I can not understand how index in a BAT table related to s->cluster_size. Probably there should be "cluster_index" used? Anyway, looks like both cause uint32 truncation as result of ({i,cluster_index} * s->cluster_size) Regards, Mike.

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-28 Thread Mike Maslenkin
der->data_off=2048, and res->image_end_offset = 1048576, so: static uint32_t host_cluster_index(BDRVParallelsState *s, int64_t 1048576) { off = 1048576 - le32_to_cpu(2048) << 9; return 0 / 1048576; } Could you check this case? Regards, Mike. On Thu, Apr 27, 2023 at 3:29 PM Alexande

Re: [PATCH v4 02/12] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-02-08 Thread Mike Rapoport
anted to look into it [1]. > > We'll most certainly need a way to limit/control the amount of > unswappable + unmovable ("worse than mlock" memory) a user/process can > consume via this mechanism. I think the accounting can be handled in notify_fallocate() and notify_invalidate_page(). > [1] > https://lkml.kernel.org/r/20211122135933.arjxpl7wyskkw...@box.shutemov.name > > -- > Thanks, > > David / dhildenb -- Sincerely yours, Mike.

Re: [PATCH v4 04/12] mm/shmem: Support memfile_notifier

2022-02-08 Thread Mike Rapoport
t **list, >struct memfile_pfn_ops **ops) > { > - return -EOPNOTSUPP; > + int ret = -EOPNOTSUPP; > +#ifdef CONFIG_SHMEM > + ret = shmem_get_memfile_notifier_info(inode, list, ops); > +#endif This looks backwards. Can we have some register method for memory backing store and call it from shmem.c? > + return ret; > } > > int memfile_register_notifier(struct inode *inode, -- Sincerely yours, Mike.

Re: [PATCH v4 00/12] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-02-08 Thread Mike Rapoport
| 1 + > mm/memfd.c | 20 +++- > mm/memfile_notifier.c| 99 > mm/shmem.c | 121 +++- > virt/kvm/kvm_main.c | 188 +++ > 16 files changed, 614 insertions(+), 41 deletions(-) > create mode 100644 include/linux/memfile_notifier.h > create mode 100644 mm/memfile_notifier.c > > -- > 2.17.1 > > -- Sincerely yours, Mike.

[PATCH v2 00/10] add generic vDPA device support

2022-01-17 Thread Longpeng(Mike)
6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (10): virtio: get class_id and pci device id by the virtio id update linux headers vdpa: add the infrastructure of vdpa-dev vdpa-dev: implement the instance_init/class_init interface vdpa-dev:

[PATCH v2 02/10] update linux headers

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Update linux headers to 5.xxx(kernel part is not merged yet) To support generic vdpa deivce, we need add the following ioctls: - VHOST_VDPA_GET_CONFIG_SIZE: get the configuration size. - VHOST_VDPA_GET_VQS_NUM: get the count of supported virtqueues. Signed-off-by: Longpeng ---

[PATCH v2 03/10] vdpa: add the infrastructure of vdpa-dev

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Add the infrastructure of vdpa-dev (the generic vDPA device), we can add a generic vDPA device as follow: -device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 hw/virtio/meson.build| 2 ++ hw/virti

[PATCH v2 04/10] vdpa-dev: implement the instance_init/class_init interface

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Implements the .instance_init and the .class_init interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev-pci.c | 52 ++- hw/virtio/vdpa-dev.c | 81 +++- include/hw/virtio/vdpa-dev.h | 5 +++ 3 files changed, 134

[PATCH v2 06/10] vdpa-dev: implement the unrealize interface

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Implements the .unrealize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index bd28cf7a15..e5691d02bb 100644 --- a/hw/virtio/vdpa

[PATCH v2 10/10] vdpa-dev: mark the device as unmigratable

2022-01-17 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 99722c88a1..65511243f9 1006

[PATCH v2 07/10] vdpa-dev: implement the get_config/set_config interface

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Implements the .get_config and .set_config interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index e5691d02bb..cef0a58012 100644 --- a/hw/vir

[PATCH v2 08/10] vdpa-dev: implement the get_features interface

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Implements the .get_features interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index cef0a58012..7bf07fef9b 100644 --- a/hw/virtio/vdpa-dev.c +++ b/h

[PATCH v2 05/10] vdpa-dev: implement the realize interface

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Implements the .realize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 101 +++ include/hw/virtio/vdpa-dev.h | 8 +++ 2 files changed, 109 insertions(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index b1037

[PATCH v2 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 77 +

[PATCH v2 09/10] vdpa-dev: implement the set_status interface

2022-01-17 Thread Longpeng(Mike)
From: Longpeng Implements the .set_status interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 100 ++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 7bf07fef9b..99722c88a1 100644

[PATCH v5 2/6] vfio: move re-enabling INTX out of the common helper

2021-11-03 Thread Longpeng(Mike)
Move re-enabling INTX out, and the callers should decide to re-enable it or not. Signed-off-by: Longpeng(Mike) --- hw/vfio/pci.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index dd30806..d5e542b 100644 --- a/hw/vfio/pci.c

[PATCH v5 4/6] kvm: irqchip: extract kvm_irqchip_add_deferred_msi_route

2021-11-03 Thread Longpeng(Mike)
Extract a common helper that add MSI route for specific vector but does not commit immediately. Signed-off-by: Longpeng(Mike) --- accel/kvm/kvm-all.c | 15 +-- include/sysemu/kvm.h | 6 ++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-all.c b

[PATCH v5 5/6] Revert "vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration"

2021-11-03 Thread Longpeng(Mike)
ned-off-by: Longpeng(Mike) --- hw/vfio/pci.c | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 1ff84e6..69ad081 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -569,9 +569,6 @@ static void vfio_msix_vector_release(PCIDe

[PATCH v5 0/6] optimize the downtime for vfio migration

2021-11-03 Thread Longpeng(Mike)
: - fix several typos and grammatical errors [Alex, Philippe] - split fixups and cleanups into separate patches [Alex, Philippe] - introduce kvm_irqchip_add_deferred_msi_route to minimize code changes[Alex] - enable the optimization in msi setup path[Alex] Longpeng (Mike) (6):

[PATCH v5 1/6] vfio: simplify the conditional statements in vfio_msi_enable

2021-11-03 Thread Longpeng(Mike)
It's unnecessary to test against the specific return value of VFIO_DEVICE_SET_IRQS, since any positive return is an error indicating the number of vectors we should retry with. Signed-off-by: Longpeng(Mike) --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v5 3/6] vfio: simplify the failure path in vfio_msi_enable

2021-11-03 Thread Longpeng(Mike)
Use vfio_msi_disable_common to simplify the error handling in vfio_msi_enable. Signed-off-by: Longpeng(Mike) --- hw/vfio/pci.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d5e542b..1ff84e6 100644 --- a/hw/vfio/pci.c

[PATCH v5 6/6] vfio: defer to commit kvm irq routing when enable msi/msix

2021-11-03 Thread Longpeng(Mike)
s that already assigned and need to process in this round. The optimization can be applied to msi type too. Signed-off-by: Longpeng(Mike) --- hw/vfio/pci.c | 123 -- hw/vfio/pci.h | 1 + 2 files changed, 95 insertions(+), 29 deletions(-) diff -

[PATCH v4 1/4] linux-headers: Update headers to Linux 5.18-rc6

2022-05-10 Thread Longpeng(Mike)
From: Longpeng Update headers to 5.18-rc6. I need latest vhost changes. Signed-off-by: Longpeng --- linux-headers/linux/vhost.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c998860d7b..5d99e7c242 100644 --- a/linux-h

[PATCH v4 0/4] add generic vDPA device support

2022-05-10 Thread Longpeng(Mike)
6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (4): linux-headers: Update headers to Linux 5.18-rc6 virtio: get class_id and pci device id by the virtio id vdpa: add vdpa-dev support vdpa: add vdpa-dev-pci support hw/virtio/Kconfig

[PATCH v4 2/4] virtio: get class_id and pci device id by the virtio id

2022-05-10 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 77 +

[PATCH v4 4/4] vdpa: add vdpa-dev-pci support

2022-05-10 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 101 +++ 2 files changed, 102 insertions

[PATCH v4 3/4] vdpa: add vdpa-dev support

2022-05-10 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev. Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev.c | 385 +++ include/hw/virtio/vdpa-dev.h | 43 4 files changed, 434 insertions(+) create

[PATCH v5 3/4] vdpa: add vdpa-dev support

2022-05-11 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev

[PATCH v5 0/4] add generic vDPA device support

2022-05-11 Thread Longpeng(Mike)
get_u32 as a common function to make the code clearer [Stefan] - fix the misleading description of 'dc->desc' [Stefano] Patch 5: - check returned number of virtqueues [Stefan] Patch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano]

[PATCH v5 1/4] linux-headers: Update headers to Linux 5.18-rc6

2022-05-11 Thread Longpeng(Mike)
From: Longpeng Update headers to 5.18-rc6. I need latest vhost changes. Signed-off-by: Longpeng --- linux-headers/linux/vhost.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c998860d7b..5d99e7c242 100644 --- a/linux-h

[PATCH v5 4/4] vdpa: add vdpa-dev-pci support

2022-05-11 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 101 +++ 2 files changed, 102 insertions

[PATCH v5 2/4] virtio: get class_id and pci device id by the virtio id

2022-05-11 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 77 +

[PATCH v6 0/4] add generic vDPA device support

2022-05-13 Thread Longpeng(Mike)
eck returned number of virtqueues [Stefan] Patch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (4): linux-headers: Update headers to Linux 5.18-rc6 virtio: get class_id and pci device id by the virtio id vdpa: add vdpa-dev support vdpa: a

[PATCH v6 1/4] linux-headers: Update headers to Linux 5.18-rc6

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Update headers to 5.18-rc6. I need latest vhost changes. Signed-off-by: Longpeng --- linux-headers/linux/vhost.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c998860d7b..5d99e7c242 100644 --- a/linux-h

[PATCH v6 3/4] vdpa: add vdpa-dev support

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev

[PATCH v6 2/4] virtio: get class_id and pci device id by the virtio id

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 101

[PATCH v6 resend 4/4] vdpa: add vdpa-dev-pci support

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +++

[PATCH v6 4/4] vdpa: add vdpa-dev-pci support

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +++

[PATCH v6 resend 1/4] linux-headers: Update headers to Linux 5.18-rc6

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Update headers to 5.18-rc6. I need latest vhost changes. Signed-off-by: Longpeng --- linux-headers/linux/vhost.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c998860d7b..5d99e7c242 100644 --- a/linux-h

[PATCH v6 resend 3/4] vdpa: add vdpa-dev support

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev

[PATCH v6 resend 0/4] add generic vDPA device support

2022-05-13 Thread Longpeng(Mike)
number of virtqueues [Stefan] Patch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (4): linux-headers: Update headers to Linux 5.18-rc6 virtio: get class_id and pci device id by the virtio id vdpa: add vdpa-dev support vdpa: add vdpa-dev-

[PATCH v6 resend 2/4] virtio: get class_id and pci device id by the virtio id

2022-05-13 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 88 +

[RFC 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the deivce which is specificed by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 93 +++

[RFC 00/10] add generic vDPA device support

2022-01-04 Thread Longpeng(Mike)
uawei.com/ Longpeng (Mike) (10): virtio: get class_id and pci device id by the virtio id vhost: add 3 commands for vhost-vdpa vdpa: add the infrastructure of vdpa-dev vdpa-dev: implement the instance_init/class_init interface vdpa-dev: implement the realize interface vdpa-dev: imp

[RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Longpeng(Mike)
From: Longpeng To support generic vdpa deivce, we need add the following ioctls: - GET_VECTORS_NUM: the count of vectors that supported - GET_CONFIG_SIZE: the size of the virtio config space - GET_VQS_NUM: the count of virtqueues that exported Signed-off-by: Longpeng --- linux-headers/linux/vh

[RFC 04/10] vdpa-dev: implement the instance_init/class_init interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .instance_init and the .class_init interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev-pci.c | 80 +++- hw/virtio/vdpa-dev.c | 68 +- include/hw/virtio/vdpa-dev.h | 2 + 3 files changed

[RFC 05/10] vdpa-dev: implement the realize interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .realize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 114 +++ include/hw/virtio/vdpa-dev.h | 8 +++ 2 files changed, 122 insertions(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 79011

[RFC 03/10] vdpa: add the infrastructure of vdpa-dev

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Add the infrastructure of vdpa-dev (the generic vDPA device), we can add a generic vDPA device as follow: -device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 hw/virtio/meson.build| 2 ++ hw/virti

[RFC 07/10] vdpa-dev: implement the get_config/set_config interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .get_config and .set_config interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 4e4dd3d201..4f97a7521b 100644 --- a/hw/vir

[RFC 06/10] vdpa-dev: implement the unrealize interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .unrealize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 2d534d837a..4e4dd3d201 100644 --- a/hw/virtio/vdpa-d

[RFC 10/10] vdpa-dev: mark the device as unmigratable

2022-01-04 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 64649bfb5a..0644aace22 1006

[RFC 09/10] vdpa-dev: implement the set_status interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .set_status interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 100 ++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 32b3117c4b..64649bfb5a 100644

[RFC 08/10] vdpa-dev: implement the get_features interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .get_features interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 4f97a7521b..32b3117c4b 100644 --- a/hw/virtio/vdpa-dev.c +++ b/h

[RFC 1/2] sem-posix: remove the posix semaphore support

2022-02-21 Thread Longpeng(Mike)
remove CONFIG_SEM_TIMEDWAIT in this way? No, because some systems (e.g. mac os) mark the sem_xxx API as deprecated. So maybe remove the usage of POSIX semaphore and turn to use the pthread variant for all systems looks better. Signed-off-by: Longpeng(Mike) --- include/qemu/thread-posix.h | 4

[RFC 2/2] sem-posix: use monotonic clock instead

2022-02-21 Thread Longpeng(Mike)
Use CLOCK_MONOTONIC, so the timeout isn't affected by changes to the system time. It depends on the pthread_condattr_setclock(), while some systems(e.g. mac os) do not support it, the behavior won't change in these systems. Signed-off-by: Longpeng(Mike) --- include/qemu/thread-po

[RFC 0/2] qemu-sem-posix: use monotonic clock instead

2022-02-21 Thread Longpeng(Mike)
realtime clock, this could make sure we would not be affected by the system time anymore. Longpeng (Mike) (2): sem-posix: remove the posix semaphore support sem-posix: use monotonic clock instead include/qemu/thread-posix.h | 5 +-- meson.build | 12 ++- util/qemu-thread

[PATCH v2 2/3] sem-posix: use monotonic clock instead

2022-02-22 Thread Longpeng(Mike)
Use CLOCK_MONOTONIC, so the timeout isn't affected by changes to the system time. It depends on the pthread_condattr_setclock(), while some systems(e.g. mac os) does not support it, so the behavior won't change in these systems. Signed-off-by: Longpeng(Mike) --- meson.build

[PATCH v2 1/3] sem-posix: remove the posix semaphore support

2022-02-22 Thread Longpeng(Mike)
remove CONFIG_SEM_TIMEDWAIT in this way? No, because some systems (e.g. mac os) mark the sem_xxx API as deprecated. So maybe remove the usage of POSIX semaphore and turn to use the pthread variant for all systems looks better. Signed-off-by: Longpeng(Mike) --- include/qemu/thread-posix.h | 4

[PATCH v2 0/3] qemu-sem-posix: use monotonic clock instead

2022-02-22 Thread Longpeng(Mike)
realtime clock, this could make sure we would not be affected by the system time anymore. Changes v1(RFC) -> v2: Patch 2: - clean the code [Paolo] - use pthread_condattr_setclock when initializing qemu-cond. [Paolo] Patch 3: - new added, make the qemu-sem code neater. [Longpeng] Longpeng (M

[PATCH v2 3/3] sem-posix: refactor qemu-sem with qemu-cond and qemu-mutex

2022-02-22 Thread Longpeng(Mike)
Now, qemu-sem is based on the pthread_cond only, we can use qemu-cond and qemu-mutex to make the code neater and the mutex trace can be supported in qemu-sem naturally. Signed-off-by: Longpeng(Mike) --- include/qemu/thread-posix.h | 5 +-- util/qemu-thread-posix.c| 103

[PATCH resend 0/2] kvm/msi: do explicit commit when adding msi routes

2022-02-22 Thread Longpeng(Mike)
From: Longpeng This patchset moves the call to kvm_irqchip_commit_routes() out of kvm_irqchip_add_msi_route(). An optimization of vfio migration [1] depends on this changes. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg00968.html Longpeng (Mike) (2): kvm-irqchip: introduce

[PATCH resend 1/2] kvm-irqchip: introduce new API to support route change

2022-02-22 Thread Longpeng(Mike)
From: Longpeng Paolo suggested adding the new API to support route changes [1]. We should invoke kvm_irqchip_begin_route_changes() before changing the routes, increasing the KVMRouteChange.changes if the routes are changed, and commit the changes at last. [1] https://lists.gnu.org/archive/html

[PATCH resend 2/2] kvm/msi: do explicit commit when adding msi routes

2022-02-22 Thread Longpeng(Mike)
From: Longpeng We invoke the kvm_irqchip_commit_routes() for each addition to MSI route table, which is not efficient if we are adding lots of routes in some cases. This patch lets callers invoke the kvm_irqchip_commit_routes(), so the callers can decide how to optimize. [1] https://lists.gnu.o

Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM

2023-02-15 Thread Mike Rapoport
3 + > mm/restrictedmem.c | 318 + > virt/kvm/Kconfig | 6 + > virt/kvm/kvm_main.c| 469 + > 23 files changed, 1323 insertions(+), 93 deletions(-) > create mode 100644 include/linux/restrictedmem.h > create mode 100644 mm/restrictedmem.c -- Sincerely yours, Mike.

Re: Lost partition tables on ide-hd + ahci drive

2023-02-16 Thread Mike Maslenkin
Does additional comparison make a sense here: check for LBA == 0 and then check MBR signature bytes. Additionally it’s easy to check buffer_is_zero() result or even print FIS contents under these conditions. Data looks like a part of guest memory of 64bit Windows. On Wed, Feb 15, 2023 at 1:53 PM F

Re: Lost partition tables on ide-hd + ahci drive

2023-02-16 Thread Mike Maslenkin
from guest OS. In other cases it can be caused by misconfigured IDE registers state or broken FIS memory area. On Thu, Feb 16, 2023 at 6:25 PM Fiona Ebner wrote: > > Am 16.02.23 um 15:17 schrieb Mike Maslenkin: > > Does additional comparison make a sense here: check for LBA == 0 and &

Re: Lost partition tables on ide-hd + ahci drive

2023-02-17 Thread Mike Maslenkin
or Count = 1. I thought about race with IDE reset where registers initialized with value SATA_SIGNATURE_DISK = 0x0101, but this means LBA=1 as well... Regards, Mike On Fri, Feb 17, 2023 at 4:40 PM Fiona Ebner wrote: > > Am 16.02.23 um 15:17 schrieb Mike Maslenkin: > > Does additio

[PATCH v7 2/4] vdpa: add vdpa-dev support

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + h

[PATCH v7 1/4] virtio: get class_id and pci device id by the virtio id

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 88 +++

[PATCH v7 0/4] add generic vDPA device support

2022-11-05 Thread Longpeng(Mike)
of 'dc->desc' [Stefano] Patch 5: - check returned number of virtqueues [Stefan] Patch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (4): virtio: get class_id and pci device id by the virtio id vdpa: add vdpa-dev support vd

[PATCH v7 3/4] vdpa: add vdpa-dev-pci support

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +

[PATCH v7 4/4] docs: Add generic vhost-vdpa device documentation

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Signed-off-by: Longpeng --- docs/system/devices/vhost-vdpa-device.rst | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 docs/system/devices/vhost-vdpa-device.rst diff --git a/docs/system/devices/vhost-vdpa-device.rst b/docs/system/devices/vhost-

[PATCH v7 resend 0/4] add generic vDPA device support

2022-11-05 Thread Longpeng(Mike)
of 'dc->desc' [Stefano] Patch 5: - check returned number of virtqueues [Stefan] Patch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (4): virtio: get class_id and pci device id by the virtio id vdpa: add vdpa-dev support vd

[PATCH v7 resend 1/4] virtio: get class_id and pci device id by the virtio id

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 88 +++

[PATCH v7 resend 2/4] vdpa: add vdpa-dev support

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + h

[PATCH v7 resend 4/4] docs: Add generic vhost-vdpa device documentation

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Signed-off-by: Longpeng --- docs/system/devices/vhost-vdpa-device.rst | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 docs/system/devices/vhost-vdpa-device.rst diff --git a/docs/system/devices/vhost-vdpa-device.rst b/docs/system/devices/vhost-

[PATCH v7 resend 3/4] vdpa: add vdpa-dev-pci support

2022-11-05 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +

Re: [PATCH] hw/riscv: virt: Remove size restriction for pflash

2022-11-06 Thread Mike Maslenkin
Hello Sunil! What about virt_machine_done() function? kernel_entry variable still points to the second flash started from virt_memmap[VIRT_FLASH].size / 2. On Sun, Nov 6, 2022 at 5:41 PM Sunil V L wrote: > > The pflash implementation currently assumes fixed size of the > backend storage. Due to

[PATCH v8 2/5] vdpa: add vdpa-dev support

2022-11-07 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + h

[PATCH v8 0/5] add generic vDPA device support

2022-11-07 Thread Longpeng(Mike)
he code clearer [Stefan] - fix the misleading description of 'dc->desc' [Stefano] Patch 5: - check returned number of virtqueues [Stefan] Patch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (5): virtio: get class_id and pc

[PATCH v8 3/5] vdpa: add vdpa-dev-pci support

2022-11-07 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +

[PATCH v8 5/5] docs: Add generic vhost-vdpa device documentation

2022-11-07 Thread Longpeng(Mike)
From: Longpeng Signed-off-by: Longpeng --- docs/system/devices/vhost-vdpa-device.rst | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 docs/system/devices/vhost-vdpa-device.rst diff --git a/docs/system/devices/vhost-vdpa-device.rst b/docs/system/devices/vhost-

[PATCH v8 4/5] vdpa-dev: mark the device as unmigratable

2022-11-07 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 2885d06cbe..62d83d3423 1006

[PATCH v8 1/5] virtio: get class_id and pci device id by the virtio id

2022-11-07 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 88 +++

[PATCH v9 5/5] docs: Add generic vhost-vdpa device documentation

2022-11-12 Thread Longpeng(Mike)
From: Longpeng Signed-off-by: Longpeng --- .../devices/vhost-vdpa-generic-device.rst | 46 +++ 1 file changed, 46 insertions(+) create mode 100644 docs/system/devices/vhost-vdpa-generic-device.rst diff --git a/docs/system/devices/vhost-vdpa-generic-device.rst b/docs/syste

[PATCH v9 2/5] vdpa: add vdpa-dev support

2022-11-12 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + h

[PATCH v9 3/5] vdpa: add vdpa-dev-pci support

2022-11-12 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +

[PATCH v9 1/5] virtio: get class_id and pci device id by the virtio id

2022-11-12 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 88 +++

<    1   2   3   4   5   6   7   8   9   10   >