[PATCH] libvhost-user: Handling potential memory allocation failures

2022-11-08 Thread jianchunfu
Add malloc check of virtqueue element in libvhost-user. Signed-off-by: jianchunfu --- subprojects/libvhost-user/libvhost-user.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 47d2efc60f..901cd7a

Re: [PATCH] LOCK GUARDS: replace manual lock()/unlock() calls to QEMU_LOCK_GUARD()

2022-11-08 Thread Philippe Mathieu-Daudé
Hi, On 8/11/22 06:11, nyoro.ga...@gmail.com wrote: From: Samker This is patch replaces WITH_QEMU_LOCK_GUARD() call with the QEMU_LOCK_GUARD() Signed-off-by: Samker --- softmmu/physmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/softmmu/physmem.c b/softmmu/phy

Re: [PATCH v9 5/8] KVM: Register/unregister the guest private memory regions

2022-11-08 Thread Chao Peng
On Fri, Nov 04, 2022 at 09:19:31PM +, Sean Christopherson wrote: > Paolo, any thoughts before I lead things further astray? > > On Fri, Nov 04, 2022, Chao Peng wrote: > > On Thu, Nov 03, 2022 at 11:04:53PM +, Sean Christopherson wrote: > > > On Tue, Oct 25, 2022, Chao Peng wrote: > > > > @

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

2022-11-08 Thread Stefano Garzarella
On Tue, Nov 08, 2022 at 11:30:53AM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: 在 2022/11/8 10:42, Jason Wang 写道: On Tue, Nov 8, 2022 at 8:42 AM Longpeng(Mike) wrote: From: Longpeng Signed-off-by: Longpeng --- docs/system/devices/vhost-vdpa-device.rst | 43

Re: [PATCH 2/3] net: Restore printing of the help text with "-nic help"

2022-11-08 Thread Thomas Huth
On 07/11/2022 13.27, Claudio Fontana wrote: should -net and -netdev be adapted too? "-netdev help" already works just fine ... and "-net" should IMHO rather be removed than improved ;-) Thomas

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

2022-11-08 Thread Stefano Garzarella
On Tue, Nov 08, 2022 at 08:41:56AM +0800, Longpeng(Mike) wrote: 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(+) Is there a particular rea

Re: [PATCH 2/3] net: Restore printing of the help text with "-nic help"

2022-11-08 Thread Claudio Fontana
On 11/8/22 09:42, Thomas Huth wrote: > On 07/11/2022 13.27, Claudio Fontana wrote: >> should -net and -netdev be adapted too? > > "-netdev help" already works just fine ... and "-net" should IMHO rather be > removed than improved ;-) > > Thomas > I wonder if it could be done once for all, in

Re: [PATCH] libvhost-user: Handling potential memory allocation failures

2022-11-08 Thread Michael S. Tsirkin
On Tue, Nov 08, 2022 at 04:01:41PM +0800, jianchunfu wrote: > Add malloc check of virtqueue element in libvhost-user. > > Signed-off-by: jianchunfu > --- > subprojects/libvhost-user/libvhost-user.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/subprojects/libvhost-user/libvhost-u

Re: [PATCH 2/3] net: Restore printing of the help text with "-nic help"

2022-11-08 Thread Thomas Huth
On 08/11/2022 09.52, Claudio Fontana wrote: On 11/8/22 09:42, Thomas Huth wrote: On 07/11/2022 13.27, Claudio Fontana wrote: should -net and -netdev be adapted too? "-netdev help" already works just fine ... and "-net" should IMHO rather be removed than improved ;-) Thomas I wonder if

Re: [PATCH] LOCK GUARDS: replace manual lock()/unlock() calls to QEMU_LOCK_GUARD()

2022-11-08 Thread Martin Gachu
Hi Philippe, > This patch doesn't apply... > $ git grep QEMU_LOCK_GUARD origin/master -- softmmu/physmem.c > $ > On what is it based? I initially replaced lock()/unlock() calls in the softmmu/physmem.c with the more preferred WITH_QEMU_LOCK_GUARD() call. However Stefan pointed out that inste

Re: [PATCH] hw/sd/sdhci: reset data count in sdhci_buff_access_is_sequential()

2022-11-08 Thread Mauro Matteo Cascella
On Mon, Nov 7, 2022 at 8:12 PM Philippe Mathieu-Daudé wrote: > > On 7/11/22 11:35, Mauro Matteo Cascella wrote: > > Make sure to reset data_count if it's equal to (or exceeds) block_size. > > This prevents an off-by-one read / write when accessing s->fifo_buffer > > in sdhci_read_dataport / sdhci_

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Mauro Matteo Cascella
On Mon, Nov 7, 2022 at 11:12 PM Philippe Mathieu-Daudé wrote: > > When sdhci_write_block_to_card() is called to transfer data from > the FIFO to the SD bus, the data is already present in the buffer > and we have to consume it directly. > > See the description of the 'Buffer Write Enable' bit from

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-08 Thread Alex Bennée
Schspa Shi writes: > We use 32bit value for linux,initrd-[start/end], when we have > loader_start > 4GB, there will be a wrong initrd_start passed > to the kernel, and the kernel will report the following warning. > > [0.00] [ cut here ] > [0.00] initrd n

Re: [PATCH] LOCK GUARDS: replace manual lock()/unlock() calls to QEMU_LOCK_GUARD()

2022-11-08 Thread Alex Bennée
nyoro.ga...@gmail.com writes: > From: Samker > > This is patch replaces WITH_QEMU_LOCK_GUARD() call with the > QEMU_LOCK_GUARD() You could extend this description as to why ".. because it extends the scope of the lock to the whole function rather than the non-existent block". Otherwise: Revi

[PATCH v1 2/9] tests/avocado: improve behaviour waiting for login prompts

2022-11-08 Thread Alex Bennée
This attempts to deal with the problem of login prompts not being guaranteed to be terminated with a newline. The solution to this is to peek at the incoming data looking to see if we see an up-coming match before we fall back to the old readline() logic. The reason to mostly rely on readline is be

[PATCH v1 1/9] Run docker probe only if docker or podman are available

2022-11-08 Thread Alex Bennée
From: Stefan Weil The docker probe uses "sudo -n" which can cause an e-mail with a security warning each time when configure is run. Therefore run docker probe only if either docker or podman are available. That avoids the problematic "sudo -n" on build environments which have neither docker n

[PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Alex Bennée
The previous fix to virtio_device_started revealed a problem in its use by both the core and the device code. The core code should be able to handle the device "starting" while the VM isn't running to handle the restoration of migration state. To solve this dual use introduce a new helper for use b

[PATCH v1 for 7.2 0/9] test and doc updates

2022-11-08 Thread Alex Bennée
Hi, Its freeze o'clock so I'm reverting to collecting fixes for the tree. Most of these patches have been posted before as single patch RFCs. A couple are already scheduled through other trees so will drop out in due course. The docs update has included some feedback for the review and should be g

[PATCH v1 8/9] docs/devel: simplify the minimal checklist

2022-11-08 Thread Alex Bennée
The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer formatting of the checklist. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-Id: <20221012121152.1

[PATCH v1 7/9] docs/devel: make language a little less code centric

2022-11-08 Thread Alex Bennée
We welcome all sorts of patches. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-Id: <20221012121152.1179051-3-alex.ben...@linaro.org> --- docs/devel/submitting-a-patch.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH v1 3/9] tests/avocado/machine_aspeed.py: Reduce noise on the console for SDK tests

2022-11-08 Thread Alex Bennée
From: Cédric Le Goater The Aspeed SDK images are based on OpenBMC which starts a lot of services. The output noise on the console can break from time to time the test waiting for the logging prompt. Change the U-Boot bootargs variable to add "quiet" to the kernel command line and reduce the outp

[PATCH v1 6/9] docs/devel: add a maintainers section to development process

2022-11-08 Thread Alex Bennée
We don't currently have a clear place in the documentation to describe the roles and responsibilities of a maintainer. Lets create one so we can. I've moved a few small bits out of other files to try and keep everything in one place. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Review

[PATCH v1 9/9] docs/devel: try and improve the language around patch review

2022-11-08 Thread Alex Bennée
It is important that contributors take the review process seriously and we collaborate in a respectful way while avoiding personal attacks. Try and make this clear in the language. Signed-off-by: Alex Bennée Reviewed-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini

[PATCH v1 4/9] tests/docker: allow user to override check target

2022-11-08 Thread Alex Bennée
This is useful when trying to bisect a particular failing test behind a docker run. For example: make docker-test-clang@fedora \ TARGET_LIST=arm-softmmu \ TEST_COMMAND="meson test qtest-arm/qos-test" \ J=9 V=1 Signed-off-by: Alex Bennée --- v1 - fix s/target /target./ - CHECK_TA

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Michael S. Tsirkin
On Tue, Nov 08, 2022 at 09:23:04AM +, Alex Bennée wrote: > The previous fix to virtio_device_started revealed a problem in its > use by both the core and the device code. The core code should be able > to handle the device "starting" while the VM isn't running to handle > the restoration of mig

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Michael S. Tsirkin
On Tue, Nov 08, 2022 at 09:23:04AM +, Alex Bennée wrote: > The previous fix to virtio_device_started revealed a problem in its > use by both the core and the device code. The core code should be able > to handle the device "starting" while the VM isn't running to handle > the restoration of mig

Re: [PATCH 2/3] net: Restore printing of the help text with "-nic help"

2022-11-08 Thread Claudio Fontana
On 11/8/22 09:59, Thomas Huth wrote: > On 08/11/2022 09.52, Claudio Fontana wrote: >> On 11/8/22 09:42, Thomas Huth wrote: >>> On 07/11/2022 13.27, Claudio Fontana wrote: should -net and -netdev be adapted too? >>> >>> "-netdev help" already works just fine ... and "-net" should IMHO rather be

Re: [PATCH v9 5/8] KVM: Register/unregister the guest private memory regions

2022-11-08 Thread Chao Peng
On Tue, Nov 08, 2022 at 09:35:06AM +0800, Yuan Yao wrote: > On Tue, Oct 25, 2022 at 11:13:41PM +0800, Chao Peng wrote: > > Introduce generic private memory register/unregister by reusing existing > > SEV ioctls KVM_MEMORY_ENCRYPT_{UN,}REG_REGION. It differs from SEV case > > by treating address in

Re: [PATCH 2/3] net: Restore printing of the help text with "-nic help"

2022-11-08 Thread Claudio Fontana
On 11/4/22 13:57, Thomas Huth wrote: > Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions > (it showed the available netdev backends), but this feature got broken during > some refactoring in version 6.0. Let's restore the old behavior, and while > we're at it, let's also p

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-08 Thread Francesco Cagnin
Mads, thanks for the review and feedbacks. I worked on this a few months ago but only managed to have it published now, I'm sorry for work being done twice. I'll add support for SSTEP_NOIRQ as you suggested. For multi-core systems there's no particular issue, just I'm not familiar with all of the

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Tue, Nov 08, 2022 at 09:23:04AM +, Alex Bennée wrote: >> The previous fix to virtio_device_started revealed a problem in its >> use by both the core and the device code. The core code should be able >> to handle the device "starting" while the VM isn't runn

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Michael S. Tsirkin
On Tue, Nov 08, 2022 at 10:23:15AM +, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Tue, Nov 08, 2022 at 09:23:04AM +, Alex Bennée wrote: > >> The previous fix to virtio_device_started revealed a problem in its > >> use by both the core and the device code. The core code s

Re: [PATCH v10 1/9] s390x/cpu topology: core_id sets s390x CPU topology

2022-11-08 Thread Pierre Morel
On 11/7/22 19:04, Janis Schoetterl-Glausch wrote: On Fri, 2022-10-28 at 11:30 +0200, Pierre Morel wrote: On 10/27/22 22:20, Janis Schoetterl-Glausch wrote: On Wed, 2022-10-26 at 10:34 +0200, Pierre Morel wrote: On 10/25/22 21:58, Janis Schoetterl-Glausch wrote: On Wed, 2022-10-12 at 18:2

Re: [PULL v3 3/7] hw/loongarch: Load FDT table into dram memory space

2022-11-08 Thread Richard Henderson
On 11/5/22 14:28, Song Gao wrote: From: Xiaojuan Yang Load FDT table into dram memory space, and the addr is 2 MiB. Since lowmem region starts from 0, FDT base address is located at 2 MiB to avoid NULL pointer access. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <2022102801400

Re: [PATCH v1 4/9] tests/docker: allow user to override check target

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 10:23, Alex Bennée wrote: This is useful when trying to bisect a particular failing test behind a docker run. For example: make docker-test-clang@fedora \ TARGET_LIST=arm-softmmu \ TEST_COMMAND="meson test qtest-arm/qos-test" \ J=9 V=1 Signed-off-by: Alex Bennée -

Re: [PATCH v2] migration: check magic value for deciding the mapping of channels

2022-11-08 Thread manish.mishra
On 07/11/22 10:21 pm, manish.mishra wrote: Current logic assumes that channel connections on the destination side are always established in the same order as the source and the first one will always be the main channel followed by the multifid or post-copy preemption channel. This may not be al

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-08 Thread Gerd Hoffmann
> >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > >> > index 566accf7e6..5bf5465a21 100644 > >> > --- a/hw/i386/pc.c > >> > +++ b/hw/i386/pc.c > >> > @@ -1061,7 +1061,6 @@ void pc_memory_init(PCMachineState *pcms, > >> > hwaddr cxl_size = MiB; > >> > > >> > cxl_base = pc_get_cxl_r

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Tue, Nov 08, 2022 at 10:23:15AM +, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Tue, Nov 08, 2022 at 09:23:04AM +, Alex Bennée wrote: >> >> The previous fix to virtio_device_started revealed a problem in its >> >> use by both the

Re: [PATCH v1 2/9] tests/avocado: improve behaviour waiting for login prompts

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 10:23, Alex Bennée wrote: This attempts to deal with the problem of login prompts not being guaranteed to be terminated with a newline. The solution to this is to peek at the incoming data looking to see if we see an up-coming match before we fall back to the old readline() logic. The

[PULL 1/5] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property"

2022-11-08 Thread Thomas Huth
From: Cédric Le Goater This reverts commit 59d1ce44396e3ad2330dc3261ff3da7ad3a16184. The "zpcii-disable" machine property is redundant with the "interpret" zPCI device property. Remove it for clarification. Signed-off-by: Cédric Le Goater Message-Id: <20221107161349.1032730-2-...@kaod.org> Rev

[PULL 2/5] s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines

2022-11-08 Thread Thomas Huth
From: Cédric Le Goater zPCI enhancement features (interpretation and forward assist) were recently introduced to improve performance on PCI passthrough devices. To maintain the same behaviour on older Z machines, deactivate the features with the associated properties. Signed-off-by: Cédric Le Go

[PULL 0/5] s390x fix and white space cleanup

2022-11-08 Thread Thomas Huth
The following changes since commit 524fc737431d240f9d9f10aaf381003092868bac: util/log: Ignore per-thread flag if global file already there (2022-11-07 16:00:02 -0500) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2022-11-08 for you to fetch cha

[PULL 5/5] hw/usb: fix tab indentation

2022-11-08 Thread Thomas Huth
From: Amarjargal Gundjalam The TABs should be replaced with spaces, to make sure that we have a consistent coding style with an indentation of 4 spaces everywhere. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/370 Signed-off-by: Amarjargal Gundjalam Message-Id: <6c993f57800f8fef7a910

Re: [PATCH v4 4/4] hw/usb: fix tab indentation

2022-11-08 Thread Thomas Huth
On 02/11/2022 07.51, Thomas Huth wrote: On 31/10/2022 20.10, Amarjargal Gundjalam wrote: On 26/10/22 00:22, Thomas Huth wrote: On 25/10/2022 16.28, Amarjargal Gundjalam wrote: The TABs should be replaced with spaces, to make sure that we have a consistent coding style with an indentation of 4

Re: [PATCH 2/2] target/mips: Correct check for CABS instructions

2022-11-08 Thread Jiaxun Yang
在 2022/11/7 22:35, Philippe Mathieu-Daudé 写道: On 2/11/22 17:57, Jiaxun Yang wrote: Accroading to "MIPS Architecture for Programmers Volume IV-c: The MIPS-3D Application-Specific Extension to the MIPS64 Architecture" (MD00099). CABS.cond.fmt belongs to MIPS-3D ASE, and it has nothing to do w

Re: [PATCH 1/2] target/mips: Don't check COP1X for 64 bit FP mode

2022-11-08 Thread Jiaxun Yang
在 2022/11/7 23:29, Philippe Mathieu-Daudé 写道: On 7/11/22 23:47, Philippe Mathieu-Daudé wrote: On 2/11/22 17:57, Jiaxun Yang wrote: Some implementations (i.e. Loongson-2F) may decide to implement a 64 bit FPU without implmenting COP1X instructions. As the eligibility of 64 bit FP instructio

Re: GTK clipboard implementation causing regression, falling through the cracks?

2022-11-08 Thread Gerd Hoffmann
On Mon, Oct 24, 2022 at 12:49:19PM +0200, Claudio Fontana wrote: > Hi all, > > the GTK clipboard implementation seems to be causing some stability issues > (guest CPUs stuck), > > Gerd can you take a look? Sorry, no. Just back online from sick leave, no bandwidth for that right now. Easy way

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-08 Thread Mads Ynddal
> On 8 Nov 2022, at 11.09, Francesco Cagnin wrote: > > Mads, thanks for the review and feedbacks. I worked on this a few months > ago but only managed to have it published now, I'm sorry for work being > done twice. > > I'll add support for SSTEP_NOIRQ as you suggested. > > For multi-core sys

Re: [PATCH v9 6/8] KVM: Update lpage info when private/shared memory are mixed

2022-11-08 Thread Yuan Yao
On Tue, Oct 25, 2022 at 11:13:42PM +0800, Chao Peng wrote: > When private/shared memory are mixed in a large page, the lpage_info may > not be accurate and should be updated with this mixed info. A large page > has mixed pages can't be really mapped as large page since its > private/shared pages ar

[PATCH 04/13] block: Remove drained_end_counter

2022-11-08 Thread Kevin Wolf
drained_end_counter is unused now, nobody changes its value any more. It can be removed. In cases where we had two almost identical functions that only differed in whether the caller passes drained_end_counter, or whether they would poll for a local drained_end_counter to reach 0, these become a s

[PATCH 00/13] block: Simplify drain

2022-11-08 Thread Kevin Wolf
I'm aware that exactly nobody has been looking forward to a series with this title, but it has to be. The way drain works means that we need to poll in bdrv_replace_child_noperm() and that makes things rather messy with Emanuele's multiqueue work because you must not poll while you hold the graph l

[PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn

2022-11-08 Thread Kevin Wolf
Polling during bdrv_drained_end() can be problematic (and in the future, we may get cases for bdrv_drained_begin() where polling is forbidden, and we don't care about already in-flight requests, but just want to prevent new requests from arriving). The .bdrv_drained_begin/end callbacks running in

[PATCH 12/13] block: Don't poll in bdrv_replace_child_noperm()

2022-11-08 Thread Kevin Wolf
In order to make sure that bdrv_replace_child_noperm() doesn't have to poll any more, get rid of the bdrv_parent_drained_begin_single() call. This is possible now because we can require that the child is already drained when the function is called (it better be, having in-flight requests while mod

[PATCH 11/13] block: Remove ignore_bds_parents parameter from drain functions

2022-11-08 Thread Kevin Wolf
ignore_bds_parents is now ignored, so we can just remove it. Signed-off-by: Kevin Wolf --- include/block/block-io.h | 10 ++ block.c | 4 +-- block/io.c | 78 +++- 3 files changed, 32 insertions(+), 60 deletions(-) diff --g

[PATCH 13/13] block: Remove poll parameter from bdrv_parent_drained_begin_single()

2022-11-08 Thread Kevin Wolf
All callers of bdrv_parent_drained_begin_single() pass poll=false now, so we don't need the parameter any more. Signed-off-by: Kevin Wolf --- include/block/block-io.h | 5 ++--- block.c | 4 ++-- block/io.c | 7 ++- 3 files changed, 6 insertions(+), 10 deletion

[PATCH 05/13] block: Inline bdrv_drain_invoke()

2022-11-08 Thread Kevin Wolf
bdrv_drain_invoke() has now two entirely separate cases that share no code any more and are selected depending on a bool parameter. Each case has only one caller. Just inline the function. Signed-off-by: Kevin Wolf --- block/io.c | 23 ++- 1 file changed, 6 insertions(+), 17

[PATCH 10/13] block: Call drain callbacks only once

2022-11-08 Thread Kevin Wolf
We only need to call both the BlockDriver's callback and the parent callbacks when going from undrained to drained or vice versa. A second drain section doesn't make a difference for the driver or the parent, they weren't supposed to send new requests before and after the second drain. One thing t

[PATCH 01/13] qed: Don't yield in bdrv_qed_co_drain_begin()

2022-11-08 Thread Kevin Wolf
We want to change .bdrv_co_drained_begin() back to be a non-coroutine callback, so in preparation, avoid yielding in its implementation. Because we increase bs->in_flight and bdrv_drained_begin() polls, the behaviour is unchanged. Signed-off-by: Kevin Wolf --- block/qed.c | 20 +

[PATCH 09/13] block: Remove subtree drains

2022-11-08 Thread Kevin Wolf
Subtree drains are not used any more. Remove them. After this, BdrvChildClass.attach/detach() don't poll any more. Signed-off-by: Kevin Wolf --- include/block/block-io.h | 18 +-- include/block/block_int-common.h | 1 - include/block/block_int-io.h | 12 -- block.c

Re: [PATCH v3 4/4] hw/nvme: add polling support

2022-11-08 Thread John Levon
On Fri, Nov 04, 2022 at 07:32:12AM +0100, Klaus Jensen wrote: > On Nov 3 21:19, Jinhao Fan wrote: > > On 11/3/2022 8:10 PM, Klaus Jensen wrote: > > > I agree that the spec is a little unclear on this point. In any case, in > > > Linux, when the driver has decided that the sq tail must be updated,

[PATCH 02/13] test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end()

2022-11-08 Thread Kevin Wolf
We want to change .bdrv_co_drained_begin/end() back to be non-coroutine callbacks, so in preparation, avoid yielding in their implementation. This does almost the same as the existing logic in bdrv_drain_invoke(), by creating and entering coroutines internally. However, since the test case is by f

[PATCH 08/13] stream: Replace subtree drain with a single node drain

2022-11-08 Thread Kevin Wolf
The subtree drain was introduced in commit b1e1af394d9 as a way to avoid graph changes between finding the base node and changing the block graph as necessary on completion of the image streaming job. The block graph could change between these two points because bdrv_set_backing_hd() first drains

[PATCH 07/13] block: Don't use subtree drains in bdrv_drop_intermediate()

2022-11-08 Thread Kevin Wolf
Instead of using a subtree drain from the top node (which also drains child nodes of base that we're not even interested in), use a normal drain for base, which automatically drains all of the parents, too. Signed-off-by: Kevin Wolf --- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH 06/13] block: Drain invidual nodes during reopen

2022-11-08 Thread Kevin Wolf
bdrv_reopen() and friends use subtree drains as a lazy way of covering all the nodes they touch. Turns out that this lazy way is a lot more complicated than just draining the nodes individually, even not accounting for the additional complexity in the drain mechanism itself. Simplify the code by s

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-08 Thread Schspa Shi
Alex Bennée writes: > Schspa Shi writes: > >> We use 32bit value for linux,initrd-[start/end], when we have >> loader_start > 4GB, there will be a wrong initrd_start passed >> to the kernel, and the kernel will report the following warning. >> >> [0.00] [ cut here ]--

Re: [PATCH] KVM: Add system call KVM_VERIFY_MSI to verify MSI vector

2022-11-08 Thread Marc Zyngier
On Tue, 08 Nov 2022 08:08:57 +, chenxiang wrote: > > From: Xiang Chen > > Currently the numbers of MSI vectors come from register PCI_MSI_FLAGS > which should be power-of-2, but in some scenaries it is not the same as > the number that driver requires in guest, for example, a PCI driver wan

[PATCH v2 2/5] target/riscv: Update VS timer whenever htimedelta changes

2022-11-08 Thread Anup Patel
The htimedelta[h] CSR has impact on the VS timer comparison so we should call riscv_timer_write_timecmp() whenever htimedelta changes. Fixes: 3ec0fe18a31f ("target/riscv: Add vstimecmp suppor") Signed-off-by: Anup Patel Reviewed-by: Alistair Francis --- target/riscv/csr.c | 16

[PATCH v2 0/5] Nested virtualization fixes for QEMU

2022-11-08 Thread Anup Patel
This series mainly includes fixes discovered while developing nested virtualization running on QEMU. These patches can also be found in the riscv_nested_fixes_v2 branch at: https://github.com/avpatel/qemu.git Changes since v1: - Added Alistair's Reviewed-by tags to appropriate patches - Added d

[PATCH v2 1/5] target/riscv: Typo fix in sstc() predicate

2022-11-08 Thread Anup Patel
We should use "&&" instead of "&" when checking hcounteren.TM and henvcfg.STCE bits. Fixes: 3ec0fe18a31f ("target/riscv: Add vstimecmp suppor") Signed-off-by: Anup Patel Reviewed-by: Alistair Francis --- target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targ

[PATCH v2 3/5] target/riscv: Don't clear mask in riscv_cpu_update_mip() for VSTIP

2022-11-08 Thread Anup Patel
Instead of clearing mask in riscv_cpu_update_mip() for VSTIP, we should call riscv_cpu_update_mip() with mask == 0 from timer_helper.c for VSTIP. Fixes: 3ec0fe18a31f ("target/riscv: Add vstimecmp suppor") Signed-off-by: Anup Patel Reviewed-by: Alistair Francis --- target/riscv/cpu_helper.c |

[PATCH v2 5/5] target/riscv: Ensure opcode is saved for all relevant instructions

2022-11-08 Thread Anup Patel
We should call decode_save_opc() for all relevant instructions which can potentially generate a virtual instruction fault or a guest page fault because generating transformed instruction upon guest page fault expects opcode to be available. Without this, hypervisor will see transformed instruction

[PATCH v2 4/5] target/riscv: No need to re-start QEMU timer when timecmp == UINT64_MAX

2022-11-08 Thread Anup Patel
The time CSR will wrap-around immediately after reaching UINT64_MAX so we don't need to re-start QEMU timer when timecmp == UINT64_MAX in riscv_timer_write_timecmp(). Signed-off-by: Anup Patel Reviewed-by: Alistair Francis --- target/riscv/time_helper.c | 24 1 file cha

Re: [PULL v3 3/7] hw/loongarch: Load FDT table into dram memory space

2022-11-08 Thread gaosong
在 2022/11/8 下午6:41, Richard Henderson 写道: On 11/5/22 14:28, Song Gao wrote: From: Xiaojuan Yang Load FDT table into dram memory space, and the addr is 2 MiB. Since lowmem region starts from 0, FDT base address is located at 2 MiB to avoid NULL pointer access. Signed-off-by: Xiaojuan Yang A

[PATCH 1/1] target/loongarch: Fix loongarch fdt addr confict

2022-11-08 Thread Song Gao
Fix LoongArch check-tcg error: TESThello on loongarch64 qemu-system-loongarch64: Some ROM regions are overlapping These ROM regions might have been loaded by direct user request or by default. They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest mem

Re: [PATCH 1/1] target/loongarch: Fix loongarch fdt addr confict

2022-11-08 Thread Richard Henderson
On 11/9/22 00:02, Song Gao wrote: Fix LoongArch check-tcg error: TESThello on loongarch64 qemu-system-loongarch64: Some ROM regions are overlapping These ROM regions might have been loaded by direct user request or by default. They could be BIOS/firmware images, a guest kernel, initrd or s

Re: [PULL v3 00/81] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-08 Thread Igor Mammedov
On Mon, 7 Nov 2022 07:30:03 -0500 "Michael S. Tsirkin" wrote: > On Mon, Nov 07, 2022 at 05:43:44AM -0500, Stefan Hajnoczi wrote: > > Hi Michael and Igor, > > Looks like the ACPI commits broken the virtio-vga module: > > > > >>> QTEST_QEMU_IMG=./qemu-img MALLOC_PERTURB_=60 > > >>> G_TEST_DBUS_

Re: [PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-11-08 Thread Igor Mammedov
On Mon, 7 Nov 2022 17:51:11 -0500 "Michael S. Tsirkin" wrote: > From: Igor Mammedov > > Signed-off-by: Igor Mammedov > Message-Id: <20221017102146.2254096-3-imamm...@redhat.com> > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > --- > tests/qtest/bios-tables-test-allowe

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-08 Thread Peter Maydell
On Tue, 8 Nov 2022 at 12:52, Schspa Shi wrote: > Alex Bennée writes: > > There is a whole comment in boot.c talking about keeping initrd within > > lowmem: > > > > /* > > * We want to put the initrd far enough into RAM that when the > > * kernel is uncompressed it will not clobber t

Re: [QEMU][PATCH v2 5/5] MAINTAINERS: Include canfd tests under Xilinx CAN

2022-11-08 Thread Francisco Iglesias
On [2022 Oct 21] Fri 22:47:46, Vikram Garhwal wrote: > Signed-off-by: Vikram Garhwal > Reviewed-by: Peter Maydell Reviewed-by: Francisco Iglesias > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 538af2885c..a642026

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Peter Maydell
On Sun, 30 Oct 2022 at 22:29, Philippe Mathieu-Daudé wrote: > > The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad: > > Merge tag 'dump-pull-request' of https://gitlab.com/marcandre.lureau/qemu > into staging (2022-10-26 10:53:49 -0400) > > are available in the Git repo

[PATCH v3 0/2] util/log: Always send errors to logfile when daemonized

2022-11-08 Thread Greg Kurz
When QEMU is started with `--daemonize -D ${logfile} -d ${some_log_item}`, error logs from error_report() and friends go to ${logfile}, but if QEMU is started with `-daemonize -D ${logfile}` and no `-d`, the file isn't even created and all logs go to /dev/null. This inconsistency is quite confusin

[PATCH v3 1/2] util/log: do not close and reopen log files when flags are turned off

2022-11-08 Thread Greg Kurz
From: Paolo Bonzini log_append makes sure that if you turn off the logging (which clears log_flags and makes need_to_open_file false) the old log is not overwritten. The usecase is that if you remove or move the file QEMU will not keep writing to the old file. However, this is not always the de

[PATCH v3 2/2] util/log: Always send errors to logfile when daemonized

2022-11-08 Thread Greg Kurz
When QEMU is started with `-daemonize`, all stdio descriptors get redirected to `/dev/null`. This basically means that anything printed with error_report() and friends is lost. Current logging code allows to redirect to a file with `-D` but this requires to enable some logging item with `-d` as we

Re: [PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-11-08 Thread Ani Sinha
On Tue, Nov 8, 2022 at 7:09 PM Ani Sinha wrote: > > On Tue, Nov 8, 2022 at 7:06 PM Igor Mammedov wrote: > > > > On Mon, 7 Nov 2022 17:51:11 -0500 > > "Michael S. Tsirkin" wrote: > > > > > From: Igor Mammedov > > > > > > Signed-off-by: Igor Mammedov > > > Message-Id: <20221017102146.2254096-3-i

Re: [PATCH v3 4/4] hw/nvme: add polling support

2022-11-08 Thread Klaus Jensen
On Nov 8 12:39, John Levon wrote: > On Fri, Nov 04, 2022 at 07:32:12AM +0100, Klaus Jensen wrote: > > > On Nov 3 21:19, Jinhao Fan wrote: > > > On 11/3/2022 8:10 PM, Klaus Jensen wrote: > > > > I agree that the spec is a little unclear on this point. In any case, in > > > > Linux, when the drive

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

2022-11-08 Thread Philippe Mathieu-Daudé
On 7/11/22 18:34, Daniel P. Berrangé wrote: On Mon, Nov 07, 2022 at 06:32:01PM +0100, Andrew Jones wrote: On Mon, Nov 07, 2022 at 04:19:10PM +, Daniel P. Berrangé wrote: On Mon, Nov 07, 2022 at 03:50:44PM +, Alex Bennée wrote: Sunil V L writes: On Mon, Nov 07, 2022 at 01:06:38PM +0

[PATCH] checkpatch: typo fix

2022-11-08 Thread Michael S. Tsirkin
remove inline #inline - it's an obvious typo. Should just be remove inline. Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bc7d4780ec..6ecabfb2b5 100755 --- a/scri

Re: [PATCH v2 0/3] block: Start/end drain on correct AioContext

2022-11-08 Thread Kevin Wolf
Am 07.11.2022 um 16:13 hat Hanna Reitz geschrieben: > Hi, > > v1 cover letter: > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00389.html > > bdrv_replace_child_noperm() drains the child via > bdrv_parent_drained_{begin,end}_single(). When it removes a child, the > bdrv_parent_drai

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-08 Thread Peter Maydell
On Tue, 8 Nov 2022 at 13:54, Peter Maydell wrote: > > On Tue, 8 Nov 2022 at 12:52, Schspa Shi wrote: > > Alex Bennée writes: > > > There is a whole comment in boot.c talking about keeping initrd within > > > lowmem: > > > > > > /* > > > * We want to put the initrd far enough into RAM th

Re: [PATCH v3 09/30] nbd/server: Clean up abuse of BlockExportOptionsNbd member @arg

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/4/22 19:06, Markus Armbruster wrote: block-export-add argument @name defaults to the value of argument @node-name. nbd_export_create() implements this by copying @node_name to @name. It leaves @has_node_name false, violating the "has_node_name == !!node_name" invariant. Unclean. Falls ap

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 14:59, Peter Maydell wrote: On Sun, 30 Oct 2022 at 22:29, Philippe Mathieu-Daudé wrote: The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad: Merge tag 'dump-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2022-10-26 10:53:49 -0400

Re: [PATCH v2 0/3] block: Start/end drain on correct AioContext

2022-11-08 Thread Kevin Wolf
Am 08.11.2022 um 15:13 hat Kevin Wolf geschrieben: > Am 07.11.2022 um 16:13 hat Hanna Reitz geschrieben: > > Hi, > > > > v1 cover letter: > > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00389.html > > > > bdrv_replace_child_noperm() drains the child via > > bdrv_parent_drained_{be

Re: [QEMU][PATCH v2 4/5] tests/qtest: Introduce tests for Xilinx VERSAL CANFD controller

2022-11-08 Thread Francisco Iglesias
On [2022 Oct 21] Fri 22:47:45, Vikram Garhwal wrote: > The QTests perform three tests on the Xilinx VERSAL CANFD controller: > Tests the CANFD controllers in loopback. > Tests the CANFD controllers in normal mode with CAN frame. > Tests the CANFD controllers in normal mode with CANFD fr

[PATCH] qapi/block-core: Fix BlockdevOptionsNvmeIoUring @path description

2022-11-08 Thread Alberto Faria
The nvme-io_uring BlockDriver's path option must point at the character device of an NVMe namespace, not at an image file. Fixes: fd66dbd424f5 ("blkio: add libblkio block driver") Suggested-by: Stefano Garzarella Signed-off-by: Alberto Faria --- qapi/block-core.json | 2 +- 1 file changed, 1 in

Re: [PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-11-08 Thread Igor Mammedov
On Tue, 8 Nov 2022 08:49:01 -0500 "Michael S. Tsirkin" wrote: > On Tue, Nov 08, 2022 at 02:36:41PM +0100, Igor Mammedov wrote: > > On Mon, 7 Nov 2022 17:51:11 -0500 > > "Michael S. Tsirkin" wrote: > > > > > From: Igor Mammedov > > > > > > Signed-off-by: Igor Mammedov > > > Message-Id: <202

Re: [PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-11-08 Thread Michael S. Tsirkin
On Tue, Nov 08, 2022 at 02:36:41PM +0100, Igor Mammedov wrote: > On Mon, 7 Nov 2022 17:51:11 -0500 > "Michael S. Tsirkin" wrote: > > > From: Igor Mammedov > > > > Signed-off-by: Igor Mammedov > > Message-Id: <20221017102146.2254096-3-imamm...@redhat.com> > > Reviewed-by: Michael S. Tsirkin >

Re: [PATCH v2 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: It seems that bdrv_open_driver() forgot to create a coroutine where to call bs->drv->bdrv_co_drain_begin(), a callback marked as coroutine_fn. Because there is no active I/O at this point, the coroutine should end right after entering, so the c

Re: [PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-11-08 Thread Ani Sinha
On Tue, Nov 8, 2022 at 7:06 PM Igor Mammedov wrote: > > On Mon, 7 Nov 2022 17:51:11 -0500 > "Michael S. Tsirkin" wrote: > > > From: Igor Mammedov > > > > Signed-off-by: Igor Mammedov > > Message-Id: <20221017102146.2254096-3-imamm...@redhat.com> > > Reviewed-by: Michael S. Tsirkin > > Signed-o

[PATCH for-7.2] block/blkio: Set BlockDriver::has_variable_length to false

2022-11-08 Thread Alberto Faria
Setting it to true can cause the device size to be queried from libblkio in otherwise fast paths, degrading performance. Set it to false and require users to refresh the device size explicitly instead. Fixes: 4c8f4fda0504 ("block/blkio: Tolerate device size changes") Suggested-by: Kevin Wolf Sign

Re: [PATCH v2 2/9] block-copy: add missing coroutine_fn annotations

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: These functions end up calling bdrv_common_block_status_above(), a generated_co_wrapper function. generated_co_wrapper is not a coroutine_fn. Сonversely it's a function that do a class coroutine wrapping - start a coroutine and do POLL to wai

  1   2   3   >