Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-09 Thread Mike Rapoport
memfd seems a better interface to use. It's integrated by design with KVM and removing guest memory from the direct map looks like a natural enhancement to guest_memfd. Unless I'm missing something, for fast-and-dirty POC it'll be a oneliner that adds set_memory_np() to kvm_gmem_get_folio() and then figuring out what to do with virtio :) -- Sincerely yours, Mike.

[PATCH v3 1/2] vhost: Add worker backend callouts

2023-12-04 Thread Mike Christie
This adds the vhost backend callouts for the worker ioctls added in the 6.4 linux kernel commit: c1ecd8e95007 ("vhost: allow userspace to create workers") Signed-off-by: Mike Christie Reviewed-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi --- hw/virtio/vhost-backend.c

[PATCH v3 0/2] vhost-scsi: Support worker ioctls

2023-12-04 Thread Mike Christie
The following patches allow users to configure the vhost worker threads for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue pair, but for vhost-scsi we get one worker for all workqueues. This becomes a bottlneck after 2 queues are used. In the upstream linux kernel commit:

[PATCH v3 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-12-04 Thread Mike Christie
trying to send IO to more than 2 virtqueues the single thread becomes a bottlneck. This patch adds a new setting, worker_per_virtqueue, which can be set to: false: Existing behavior where we get the single worker thread. true: Create a worker per IO virtqueue. Signed-off-by: Mike Christie Reviewed

Re: [PATCH v2 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-29 Thread Mike Christie
On 11/29/23 3:30 AM, Stefano Garzarella wrote: > On Sun, Nov 26, 2023 at 06:28:34PM -0600, Mike Christie wrote: >> This adds support for vhost-scsi to be able to create a worker thread >> per virtqueue. Right now for vhost-net we get a worker thread per >> tx/rx virtqueue pai

[PATCH v2 1/2] vhost: Add worker backend callouts

2023-11-26 Thread Mike Christie
This adds the vhost backend callouts for the worker ioctls added in the 6.4 linux kernel commit: c1ecd8e95007 ("vhost: allow userspace to create workers") Signed-off-by: Mike Christie --- hw/virtio/vhost-backend.c | 28 include/hw/virtio/vhost

[PATCH v2 0/2] vhost-scsi: Support worker ioctls

2023-11-26 Thread Mike Christie
The following patches allow users to configure the vhost worker threads for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue pair, but for vhost-scsi we get one worker for all workqueues. This becomes a bottlneck after 2 queues are used. In the upstream linux kernel commit:

[PATCH v2 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-26 Thread Mike Christie
trying to send IO to more than 2 virtqueues the single thread becomes a bottlneck. This patch adds a new setting, workers_per_virtqueue, which can be set to: false: Existing behavior where we get the single worker thread. true: Create a worker per IO virtqueue. Signed-off-by: Mike Christie --- hw

Re: [PATCH 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-15 Thread Mike Christie
On 11/15/23 6:57 AM, Stefan Hajnoczi wrote: > On Wed, Nov 15, 2023 at 12:43:02PM +0100, Stefano Garzarella wrote: >> On Mon, Nov 13, 2023 at 06:36:44PM -0600, Mike Christie wrote: >>> This adds support for vhost-scsi to be able to create a worker thread >>> per virtque

Re: [PATCH 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-15 Thread Mike Christie
On 11/15/23 5:43 AM, Stefano Garzarella wrote: > On Mon, Nov 13, 2023 at 06:36:44PM -0600, Mike Christie wrote: >> This adds support for vhost-scsi to be able to create a worker thread >> per virtqueue. Right now for vhost-net we get a worker thread per >> tx/rx virtqueue pai

[PATCH 1/2] vhost: Add worker backend callouts

2023-11-13 Thread Mike Christie
This adds the vhost backend callouts for the worker ioctls added in the 6.4 linux kernel commit: c1ecd8e95007 ("vhost: allow userspace to create workers") Signed-off-by: Mike Christie --- hw/virtio/vhost-backend.c | 28 include/hw/virtio/vhost

[PATCH 0/2] vhost-scsi: Support worker ioctls

2023-11-13 Thread Mike Christie
The following patches allow users to configure the vhost worker threads for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue pair, but for vhost-scsi we get one worker for all workqueues. This becomes a bottlneck after 2 queues are used. In the upstream linux kernel commit:

[PATCH 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-13 Thread Mike Christie
trying to send IO to more than 2 virtqueues the single thread becomes a bottlneck. This patch adds a new setting, virtqueue_workers, which can be set to: 1: Existing behavior whre we get the single thread. -1: Create a worker per IO virtqueue. Signed-off-by: Mike Christie --- hw/scsi/vhost-scsi.c

Re: [PATCH v2 09/20] parallels: Make mark_used() and mark_unused() global functions

2023-10-21 Thread Mike Maslenkin
int64_t *clusters); > > -- > 2.34.1 > > Just a note: parallels_mark_unused() could be initially declared as global just because after patch 3/20 there can be compilation warning: warning: unused function 'mark_unused' [-Wunused-function] :) I do not have strong opinion about how to avoid such compilation warning in the middle of the patch series. The simplest and straightforward way is to declare this function as static in patch 4. I do not have any other objections for the series except misplaced NULL assignment. Regards, Mike.

Re: [PATCH v2 01/20] parallels: Set s->used_bmap to NULL in parallels_free_used_bitmap()

2023-10-21 Thread Mike Maslenkin
oid parallels_free_used_bitmap(BlockDriverState > *bs) > { > BDRVParallelsState *s = bs->opaque; > s->used_bmap_size = 0; > +s->used_bmap = NULL; > g_free(s->used_bmap); > } Shouldn't it be added after g_free() call? Regards, Mike.

Re: [PATCH v2 10/20] parallels: Add dirty bitmaps saving

2023-10-21 Thread Mike Maslenkin
On Thu, Oct 19, 2023 at 4:05 PM Alexander Ivanov wrote: > > Now dirty bitmaps can be loaded but there is no their saving. Add code for > dirty bitmap storage. > > Signed-off-by: Alexander Ivanov > --- > block/parallels-ext.c | 167 ++ > block/parallels.c

[PATCH] tcg: drop unused tcg_temp_free define

2023-10-14 Thread Mike Frysinger
Use of the API was removed a while back, but the define wasn't. Signed-off-by: Mike Frysinger --- include/tcg/tcg-op.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 80cfcf8104b6..3ead59e4594d 100644 --- a/include/tcg/tcg-op.h +++ b

Re: [PATCH 15/19] parallels: Remove unnecessary data_end field

2023-10-07 Thread Mike Maslenkin
On Sat, Oct 7, 2023 at 5:30 PM Alexander Ivanov wrote: > > > > On 10/7/23 13:21, Mike Maslenkin wrote: > > On Sat, Oct 7, 2023 at 1:18 PM Alexander Ivanov > > wrote: > >> > >> On 10/6/23 21:43, Mike Maslenkin wrote: > >>> On Mon,

Re: [PATCH 15/19] parallels: Remove unnecessary data_end field

2023-10-07 Thread Mike Maslenkin
On Sat, Oct 7, 2023 at 1:18 PM Alexander Ivanov wrote: > > > > On 10/6/23 21:43, Mike Maslenkin wrote: > > On Mon, Oct 2, 2023 at 12:01 PM Alexander Ivanov > > wrote: > >> Since we have used bitmap, field data_end in BDRVParallelsState is > >> r

Re: [PATCH 15/19] parallels: Remove unnecessary data_end field

2023-10-06 Thread Mike Maslenkin
e prealloc_mode; > > -- > 2.34.1 > Is it intended behavior? Run: 1. ./qemu-img create -f parallels $TEST_IMG 1T 2. dd if=/dev/zero of=$TEST_IMG oseek=12 bs=1M count=128 conv=notrunc 3. ./qemu-img check $TEST_IMG No errors were found on the image. Image end offset: 150994944 Without this patch `qemu-img check` reports: ERROR space leaked at the end of the image 145752064 139 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Image end offset: 5242880 Note: there is another issue caused by previous commits exists. g_free asserts from parallels_free_used_bitmap() because of s->used_bmap is NULL. To reproduce this crash at revision before or without patch 15/19, run commands: 1. ./qemu-img create -f parallels $TEST_IMG 1T 2. dd if=/dev/zero of=$TEST_IMG oseek=12 bs=1M count=128 conv=notrunc 3. ./qemu-img check -r leaks $TEST_IMG Regards, Mike.

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-10-01 Thread Mike Maslenkin
mproved to smth like if (strcmp(fmt, "raw") || !g_file_test(out.filename, G_FILE_TEST_EXISTS)) . And parameter "conv=notrunc" may be implemented additionally for this case. Three of above do not require "conv=" parameter from my point of view. I would be glad to hear oth

[PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-09-30 Thread Mike Maslenkin
tion image are preserved. As another visible change of `qemu-img dd` behavior is that if destination image is less than source it can finish with error (similar to "dd" utility): qemu-img: error while writing to output image file: Input/output error Signed-off-by: Mike Maslenkin --- d

[PATCH 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-09-30 Thread Mike Maslenkin
tion image are preserved. As another visible change of `qemu-img dd` behavior is that if destination image is less than source it can finish with error (similar to "dd" utility): qemu-img: error while writing to output image file: Input/output error Signed-off-by: Mike Maslenkin

Re: [PATCH 06/21] parallels: refactor path when we need to re-check image in parallels_open

2023-09-17 Thread Mike Maslenkin
^~ ../block/parallels.c:1139:18: note: remove the '||' if its condition is always false need_check = need_check || ^ ../block/parallels.c:1067:24: note: initialize the variable 'data_start' to silence this warning uint32_t data_start; ^ = 0 1 warning generated. Regards, Mike.

Re: [PATCH 18/21] parallels: naive implementation of parallels_co_pdiscard

2023-09-17 Thread Mike Maslenkin
:85:26: note: expanded from macro 'GRAPH_RDLOCK_PTR' #define GRAPH_RDLOCK_PTR TSA_GUARDED_BY(graph_lock) ^ /Users/mg/sources/qemu/include/qemu/clang-tsa.h:48:31: note: expanded from macro 'TSA_GUARDED_BY' #define TSA_GUARDED_BY(x) TSA(guarded_by(x)) Regards, Mike. On Fri

Re: [PATCH 03/21] parallels: invent parallels_opts_prealloc() helper to parse prealloc opts

2023-09-17 Thread Mike Maslenkin
t; variable as int64_t and then shift it to the right? I see here it can not be negative, but it's a common to use signed values and not to add explicit check before shifting to right In this file I takes time to ensure that initial values are not negative. Regards, Mike. > +b

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

2023-08-26 Thread Mike Maslenkin
On Wed, Aug 23, 2023 at 12:17 PM Fiona Ebner wrote: > > Am 23.08.23 um 10:47 schrieb Fiona Ebner: > > Am 17.02.23 um 22:22 schrieb Mike Maslenkin: > >> I can not tell anything about dma-reentracy issues, but yes, i would > >> start to look at check_cmd() functio

Re: [PATCH 0/3] hw/ufs: fix compilation warnings

2023-08-02 Thread Mike Maslenkin
Hello All, I'm ok with that. Regards, Mike. On Wed, Aug 2, 2023 at 3:52 AM Jeuk Kim wrote: > > On 8/2/2023 6:03 AM, Philippe Mathieu-Daudé wrote: > > Hi Mike, > > > > On 28/7/23 01:34, Mike Maslenkin wrote: > >> This patchset contains a trivial compilation f

[PATCH 3/3] hw/ufs: change ufs_process_db signature

2023-07-27 Thread Mike Maslenkin
Actually UTRLDBR is 32bit register. There is no need to pass 64bit value to ufs_process_db() function. Cc: Jeuk Kim Cc: Stefan Hajnoczi Signed-off-by: Mike Maslenkin --- hw/ufs/ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c index

[PATCH 2/3] hw/ufs: fix compilation warning

2023-07-27 Thread Mike Maslenkin
); ^~~~ Cc: Jeuk Kim Cc: Stefan Hajnoczi Signed-off-by: Mike Maslenkin --- hw/ufs/ufs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c index af32366c8504..b0656e47598e 100644 --- a/hw/ufs/ufs.c +++ b/hw/ufs/ufs.c

[PATCH 1/3] hw/ufs: fix compilation warning

2023-07-27 Thread Mike Maslenkin
Signed-off-by: Mike Maslenkin --- hw/ufs/ufs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c index 1760e0f88d70..af32366c8504 100644 --- a/hw/ufs/ufs.c +++ b/hw/ufs/ufs.c @@ -514,10 +514,10 @@ static UfsReqResult ufs_exec_scsi_cmd(UfsRequest *req

[PATCH 0/3] hw/ufs: fix compilation warnings

2023-07-27 Thread Mike Maslenkin
This patchset contains a trivial compilation fixes for UFS support applied to block-next tree. Cc: Jeuk Kim Cc: Stefan Hajnoczi Signed-off-by: Mike Maslenkin

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-11 Thread Mike Christie
What was the issue you are seeing? Was it something like you get the UA. We retry then on one of the retries the sense is not setup correctly, so the scsi error handler runs? That fails and the device goes offline? If you turn on scsi debugging you would see: [ 335.445922] sd 0:0:0:0: [sda]

Re: [PATCH qemu v5] aspeed add montblanc bmc reference from fuji

2023-07-05 Thread Mike Choi
, but NOT the arrays of _fruid data array) Thanks, Mike From: Cédric Le Goater Date: Tuesday, July 4, 2023 at 7:07 AM To: Sittisak Sinprem , Bin Huang , Tao Ren , Mike Choi Cc: qemu-devel@nongnu.org , qemu-...@nongnu.org , peter.mayd...@linaro.org , and...@aj.id.au , Joel Stanley , qemu-sta

Re: [RFC PATCH 00/19] hugetlb support for KVM guest_mem

2023-06-16 Thread Mike Kravetz
users. Your proposal here suggests modifying hugetlb so that it can be used in a new way (use case) by KVM's guest_mem. As such it really seems like something that should be done in a separate filesystem/driver/allocator. You will likely not get much support for modifying hugetlb. -- Mike Kravetz >

[PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-08 Thread Mike Kravetz
te hugetlb pages. This will require different alignment and size requirements on the UDMABUF_CREATE API. [1] https://lore.kernel.org/linux-mm/20230512072036.1027784-1-junxiao.ch...@intel.com/ Fixes: 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)") Cc: Signed-off-by: Mike K

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 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-27 Thread Mike Maslenkin
out; > +} > + > +sector = (i * s->cluster_size) >> BDRV_SECTOR_BITS; > +sector = allocate_clusters(bs, sector, s->tracks, ); > +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-26 Thread Mike Maslenkin
off << 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: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-04-13 Thread Mike Maslenkin
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? > > Could it be th

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

2023-04-13 Thread Mike Maslenkin
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: > > On

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

2023-04-11 Thread Mike Stramba
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

[PATCH] memory: avoid unnecessary iteration when updating ioeventfds

2023-02-28 Thread Longpeng(Mike)
From: Longpeng When updating ioeventfds, we need to iterate all address spaces and iterate all flat ranges of each address space. There is so much redundant process that a FlatView would be iterated for so many times during one commit (memory_region_transaction_commit). We can mark a FlatView

[PATCH v1 3/3] virtio-pci: defer to commit kvm irq routing when enable msi/msix

2023-02-28 Thread Longpeng(Mike)
From: Longpeng All unmasked vectors will be setup in msix_set_vector_notifiers(), which is a time-consuming operation because each vector need to be submit to KVM once. It's even worse if the VM has several devices and each devices has dozens of vectors. We can defer and commit the vectors in

[PATCH v1 1/3] virtio-pci: submit msi route changes in batch

2023-02-28 Thread Longpeng(Mike)
From: Longpeng The kvm_irqchip_commit_routes() is a time-intensive operation, it needs scan and update all irqfds that are already assigned during each invocation, so more vectors means need more time to process them. For virtio-pci, we can just submit once when enabling vectors of a virtio-pci

[PATCH v1 0/3] virtio-pci: optimize set_guest_notifier

2023-02-28 Thread Longpeng(Mike)
From: Longpeng This patchset optimizes the time-consuming operation in virtio_pci_set_guest_notifier, especially for the vhost-vdpa migration, the time spend on set_guest_notifier can reduce 87% in some cases. Longpeng (Mike) (3): virtio-pci: submit msi route changes in batch kvm-irqchip

[PATCH v1 2/3] kvm-irqchip: use KVMRouteChange API to update msi route

2023-02-28 Thread Longpeng(Mike)
From: Longpeng The KVMRouteChange API is added by commit 9568690868e ("kvm-irqchip: introduce new API to support route change"). We can also apply it on kvm_irqchip_update_msi_route(), there are no functional changes and we can optimize the virtio-pci core base on this change in the next patch.

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

2023-02-17 Thread Mike Maslenkin
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 additional comparison

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

2023-02-16 Thread Mike Maslenkin
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-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

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

2023-02-15 Thread Mike Rapoport
+ > 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.

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

2023-01-28 Thread Mike Frysinger
rget_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| 1 + l

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

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 v3 3/3] vdpa: commit all host notifier MRs in a single MR transaction

2022-12-26 Thread Longpeng(Mike)
From: Longpeng This allows the vhost-vdpa device to batch the setup of all its MRs of host notifiers. This significantly reduces the device starting time, e.g. the time spend on setup the host notifier MRs reduce from 423ms to 32ms for a VM with 64 vCPUs and 3 vhost-vDPA generic devices

[PATCH v3 2/3] vhost: configure all host notifiers in a single MR transaction

2022-12-26 Thread Longpeng(Mike)
From: Longpeng This allows the vhost device to batch the setup of all its host notifiers. This significantly reduces the device starting time, e.g. the time spend on enabling notifiers reduce from 376ms to 9.1ms for a VM with 64 vCPUs and 3 vhost-vDPA generic devices (vdpa_sim_blk, 64vq per

[PATCH v3 1/3] vhost: simplify vhost_dev_enable_notifiers

2022-12-26 Thread Longpeng(Mike)
From: Longpeng Simplify the error path in vhost_dev_enable_notifiers by using vhost_dev_disable_notifiers directly. Signed-off-by: Longpeng --- hw/virtio/vhost.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c

[PATCH v3 0/3] two optimizations to speed up the start time

2022-12-26 Thread Longpeng(Mike)
From: Longpeng Changes v3->v2: - cleanup the code [Philippe] Changes v2->v1: Patch-1: - remove vq_init_count [Jason] Patch-2: - new added. [Jason] v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg922499.html Longpeng (Mike) (3): vhost: simplify vhost_dev_enable_not

[PATCH 1/2] vdpa-dev: get iova range explicitly

2022-12-24 Thread Longpeng(Mike)
From: Longpeng In commit a585fad26b ("vdpa: request iova_range only once") we remove GET_IOVA_RANGE form vhost_vdpa_init, the generic vdpa device will start without iova_range populated, so the device won't work. Let's call GET_IOVA_RANGE ioctl explicitly. Fixes: a585fad26b2e6ccc ("vdpa:

[PATCH 2/2] vdpa: harden the error path if get_iova_range failed

2022-12-24 Thread Longpeng(Mike)
From: Longpeng We should stop if the GET_IOVA_RANGE ioctl failed. Signed-off-by: Longpeng --- net/vhost-vdpa.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index ffdc435d19..e65023d013 100644 --- a/net/vhost-vdpa.c +++

[PATCH 0/2] Fix the init path of generic vhost-vdpa device

2022-12-24 Thread Longpeng(Mike)
f vdpa/net. Longpeng (Mike) (2): vdpa-dev: get iova range explicitly vdpa: harden the error path if get_iova_range failed hw/virtio/vdpa-dev.c | 9 + hw/virtio/vhost-vdpa.c | 7 +++ include/hw/virtio/vhost-vdpa.h | 2 ++ net/vhost-vdpa.c

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

2022-12-15 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 v11 1/5] virtio: get class_id and pci device id by the virtio id

2022-12-15 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 v11 4/5] vdpa-dev: mark the device as unmigratable

2022-12-15 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c

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

2022-12-15 Thread Longpeng(Mike)
[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 pci device id by the virtio id

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

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

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

2022-12-15 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 +

[PATCH v2 1/2] vhost: configure all host notifiers in a single MR transaction

2022-12-06 Thread Longpeng(Mike)
From: Longpeng This allows the vhost device to batch the setup of all its host notifiers. This significantly reduces the device starting time, e.g. the time spend on enabling notifiers reduce from 376ms to 9.1ms for a VM with 64 vCPUs and 3 vhost-vDPA generic devices[1] (64vq per device) [1]

[PATCH v2 2/2] vdpa: commit all host notifier MRs in a single MR transaction

2022-12-06 Thread Longpeng(Mike)
From: Longpeng This allows the vhost-vdpa device to batch the setup of all its MRs of host notifiers. This significantly reduces the device starting time, e.g. the time spend on setup the host notifier MRs reduce from 423ms to 32ms for a VM with 64 vCPUs and 3 vhost-vDPA generic devices[1]

[PATCH v2 0/2] two optimizations to speed up the start time

2022-12-06 Thread Longpeng(Mike)
From: Longpeng Changes v2->v1: Patch-1: - remove vq_init_count [Jason] Patch-2: - new added. [Jason] v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg922499.html Longpeng (Mike) (2): vhost: configure all host notifiers in a single MR transaction vdpa: commit all h

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

2022-12-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 v10 4/5] vdpa-dev: mark the device as unmigratable

2022-12-05 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c

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

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

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

2022-12-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 +

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

2022-12-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 v10 0/5] add generic vDPA device support

2022-12-05 Thread Longpeng(Mike)
tch 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 pci device id by the virtio id vdpa: add vdpa-dev support vdpa: add vdpa-dev-pci support vdpa-dev: mark the de

[PATCH] vhost: configure all host notifiers in a single MR transaction

2022-11-18 Thread Longpeng(Mike)
From: Longpeng This allows the vhost device to batch the setup of all its host notifiers. This significantly reduces the device starting time, e.g. the vhost-vDPA generic device [1] start time reduce from 376ms to 9.1ms for a VM with 64 vCPUs and 3 vDPA device(64vq per device). [1]

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

2022-11-12 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c

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

2022-11-12 Thread Longpeng(Mike)
tch 6: - init s->num_queues [Stefano] - free s->dev.vqs [Stefano] Longpeng (Mike) (5): virtio: get class_id and pci device id by the virtio id vdpa: add vdpa-dev support vdpa: add vdpa-dev-pci support vdpa-dev: mark the device as unmigratable docs: Add generic vhost-vd

[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

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

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

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

[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

[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 0/5] add generic vDPA device support

2022-11-07 Thread Longpeng(Mike)
- 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 pci device id by the virtio id vdpa

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

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

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

[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

[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 0/4] add generic vDPA device support

2022-11-05 Thread Longpeng(Mike)
o] 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 vdpa: add vdpa-dev-pci support docs

[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

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

  1   2   3   4   5   6   7   8   9   10   >