Re: [PATCH] deprecation: x86 default machine types

2022-03-03 Thread Daniel P . Berrangé
On Wed, Mar 02, 2022 at 07:38:52PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Tue, Mar 01, 2022 at 07:54:32PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Declare the intent to require a machi

Re: [PATCH v1 1/2] s390x/tcg: Implement Vector-Enhancements Facility 2 for s390x

2022-03-03 Thread Richard Henderson
On 3/2/22 17:22, David Miller wrote: resolves: https://gitlab.com/qemu-project/qemu/-/issues/738 implements: VECTOR LOAD ELEMENTS REVERSED (VLER) VECTOR LOAD BYTE REVERSED ELEMENTS (VLBR) VECTOR LOAD BYTE REVERSED ELEMENT (VLEBRH, VLEBRF, VLEBRG) VECTOR LOAD BYTE

Re: [PATCH] block/nbd.c: Fixed IO request coroutine not being wakeup when kill NBD server.

2022-03-03 Thread Vladimir Sementsov-Ogievskiy
03.03.2022 05:21, Rao Lei wrote: During the stress test, the IO request coroutine has a probability that it can't be awakened when the NBD server is killed. The GDB statck is as follows: (gdb) bt 0 0x7f2ff990cbf6 in __ppoll (fds=0x55575de85000, nfds=1, timeout=, sigmask=0x0) at ../sysdeps/u

Re: [PATCH v2 02/14] vhost: Add Shadow VirtQueue kick forwarding capabilities

2022-03-03 Thread Eugenio Perez Martin
On Thu, Mar 3, 2022 at 8:12 AM Jason Wang wrote: > > > 在 2022/3/2 上午2:49, Eugenio Perez Martin 写道: > > On Mon, Feb 28, 2022 at 3:57 AM Jason Wang wrote: > >> 在 2022/2/27 下午9:40, Eugenio Pérez 写道: > >>> At this mode no buffer forwarding will be performed in SVQ mode: Qemu > >>> will just forward t

Re: [PATCH v2 0/3] Enable vhost-user to be used on BSD systems

2022-03-03 Thread Stefan Hajnoczi
On Wed, Mar 02, 2022 at 07:03:15PM +0100, Sergio Lopez wrote: > Since QEMU is already able to emulate ioeventfd using pipefd, we're already > pretty close to supporting vhost-user on non-Linux systems. > > This two patches bridge the gap by: > > 1. Adding a new event_notifier_get_wfd() to return

Re: [SPAM] [PATCH] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-03 Thread Greg Kurz
On Wed, 2 Mar 2022 19:30:39 +0100 Christian Schoenebeck wrote: > API doc comments in QEMU are supposed to be in kerneldoc format, so drop > occurrences of "@c" which is Doxygen format for fixed-width text. > > Link: > https://lore.kernel.org/qemu-devel/cafeaca89+enom6x19oef53kd2dwkhn5sn21va0d7y

Re: [PATCH v3 14/14] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-03 Thread Eugenio Perez Martin
On Thu, Mar 3, 2022 at 7:09 AM Markus Armbruster wrote: > > Eugenio Pérez writes: > > > Finally offering the possibility to enable SVQ from the command line. > > > > Signed-off-by: Eugenio Pérez > > --- > > qapi/net.json| 5 - > > net/vhost-vdpa.c | 48 +

RE: [PATCH v2 2/4] target/nios2: Exteral Interrupt Controller (EIC)

2022-03-03 Thread Amir Gonnen
> This looks wrong. Of course, so does nios2_cpu_set_irq, from which you've > cribbed this. > For our purposes, I think simply re-using env->regs[CR_IPENDING] as the > external hw > request word is the right thing to do. But we need to update RDCTL to > compute the > correct value from CR_IP

[PATCH v2] qga: Introduce NVMe disk bus type

2022-03-03 Thread zhenwei pi
Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU, a NVMe disk get exposed in guest side. Support NVMe disk bus type and implement posix version. Test PCI passthrough case: ~#virsh qemu-agent-command buster '{"execute":"guest-get-disks"}' | jq ... { "name": "/dev/nvm

Re: [PATCH v2] qga: Introduce NVMe disk bus type

2022-03-03 Thread Marc-André Lureau
On Thu, Mar 3, 2022 at 2:01 PM zhenwei pi wrote: > Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU, > a NVMe disk get exposed in guest side. Support NVMe disk bus type and > implement posix version. > > Test PCI passthrough case: > ~#virsh qemu-agent-command buster '{"execute

Re: [PATCH v5 01/12] target/riscv: Fix PMU CSR predicate function

2022-03-03 Thread Atish Kumar Patra
On Wed, Mar 2, 2022 at 9:22 PM Alistair Francis wrote: > > On Sat, Feb 19, 2022 at 10:34 AM Atish Patra wrote: > > > > From: Atish Patra > > > > The predicate function calculates the counter index incorrectly for > > hpmcounterx. Fix the counter index to reflect correct CSR number. > > > > Fixes

Re: [PATCH v2 2/4] target/nios2: Exteral Interrupt Controller (EIC)

2022-03-03 Thread Peter Maydell
On Thu, 3 Mar 2022 at 09:54, Amir Gonnen wrote: > > > This looks wrong. Of course, so does nios2_cpu_set_irq, from which you've > > cribbed this. > > > For our purposes, I think simply re-using env->regs[CR_IPENDING] as the > > external hw > > request word is the right thing to do. But we nee

[PATCH] qemu-binfmt-conf.sh: allow elf EI_ABIVERSION=1 for mips

2022-03-03 Thread Andreas K . Hüttel
With the command line flag -mplt and a recent toolchain, ELF binaries generated by gcc can obtain EI_ABIVERSION=1, see below, which makes, e.g., gcc three-stage bootstrap in a mips-unknown-linux-gnu qemu-user chroot fail since the binfmt-misc magic does not match anymore. qemu executes these binar

[PATCH] introduce dirty ring size for guestperf tool

2022-03-03 Thread huangy81
From: Hyman Huang(黄勇) Dirtylimit implementation has been reviewed in the past few months, if things go well, it will be merged in the near future, which is the first step to implement a new live migration feature. For more details refer to: https://lore.kernel.org/qemu-devel/cover.1646247968.git

[PATCH] migration: Introduce dirtylimit capability

2022-03-03 Thread huangy81
From: Hyman Huang(黄勇) Signed-off-by: Hyman Huang(黄勇) --- migration/migration.c | 19 +++ migration/migration.h | 1 + migration/ram.c | 24 qapi/migration.json | 36 +++- 4 files changed, 75 insertions(+), 5 delet

Re: [PATCH] migration: Introduce dirtylimit capability

2022-03-03 Thread Hyman Huang
"Sent by accident, please ignore, I'll send v1 when ready." 在 2022/3/3 18:45, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) Signed-off-by: Hyman Huang(黄勇) --- migration/migration.c | 19 +++ migration/migration.h | 1 + migration/ram.c | 24

[PATCH v1] introduce dirty ring size for guestperf tool

2022-03-03 Thread huangy81
From: Hyman Huang(黄勇) v1: -original version sent by accident, send the right patch Dirtylimit implementation has been reviewed in the past few months, if things go well, it will be merged in the near future, which is the first step to implement a new live migration feature. For more details refe

Re: [PATCH] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-03 Thread Christian Schoenebeck
On Donnerstag, 3. März 2022 10:53:32 CET Greg Kurz wrote: > On Wed, 2 Mar 2022 19:30:39 +0100 > > Christian Schoenebeck wrote: > > API doc comments in QEMU are supposed to be in kerneldoc format, so drop > > occurrences of "@c" which is Doxygen format for fixed-width text. > > > > Link: > > http

[PATCH v1] tests/migration: Introduce dirty-ring-size option into guestperf

2022-03-03 Thread huangy81
From: Hyman Huang(黄勇) Guestperf tool does not enable diry ring feature when test migration by default. To support dirty ring migration performance test, introduce dirty-ring-size option into guestperf tools, which ranges in [1024, 65536]. To set dirty ring size with 4096 during migration test:

Re: [PATCH v5 16/16] iotests/image-fleecing: test push backup with fleecing

2022-03-03 Thread Hanna Reitz
On 28.02.22 12:39, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 120 ++-- tests/qemu-iotests/tests/image-fleecing.out | 63 ++ 2 files changed, 151 insertions(+), 32 deletions(-) di

Re: [PATCH v4 00/14] Initial support for machine creation via QMP

2022-03-03 Thread Damien Hedde
Ping ! It would be good to have some feedback on 1st and 2nd part. Thanks, Damien On 2/23/22 10:06, Damien Hedde wrote: Hi, This series adds initial support to build a machine using QMP/QAPI commands. With this series, one can start from the 'none' machine, create cpus, sysbus devices, memory

Re: [PATCH v5 11/16] block: introduce snapshot-access block driver

2022-03-03 Thread Hanna Reitz
On 28.02.22 12:39, Vladimir Sementsov-Ogievskiy wrote: The new block driver simply utilizes snapshot-access API of underlying block node. In further patches we want to use it like this: [guest] [NBD export] || | root |

Re: [PATCH v5 11/16] block: introduce snapshot-access block driver

2022-03-03 Thread Hanna Reitz
On 03.03.22 12:05, Hanna Reitz wrote: On 28.02.22 12:39, Vladimir Sementsov-Ogievskiy wrote: The new block driver simply utilizes snapshot-access API of underlying block node. In further patches we want to use it like this: [guest]   [NBD export]     |  

Re: [PATCH v2 0/6] hw/nvme: enhanced protection information (64-bit guard)

2022-03-03 Thread Klaus Jensen
On Mar 1 06:54, Keith Busch wrote: > On Tue, Mar 01, 2022 at 11:44:22AM +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > This adds support for one possible new protection information format > > introduced in TP4068 (and integrated in NVMe 2.0): the 64-bit CRC guard > > and 48-bit refere

Re: [PATCH] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-03 Thread Greg Kurz
On Thu, 03 Mar 2022 11:55:36 +0100 Christian Schoenebeck wrote: > On Donnerstag, 3. März 2022 10:53:32 CET Greg Kurz wrote: > > On Wed, 2 Mar 2022 19:30:39 +0100 > > > > Christian Schoenebeck wrote: > > > API doc comments in QEMU are supposed to be in kerneldoc format, so drop > > > occurrences

Re: [PATCH v2 10/14] vdpa: Add custom IOTLB translations to SVQ

2022-03-03 Thread Eugenio Perez Martin
On Thu, Mar 3, 2022 at 8:33 AM Jason Wang wrote: > > > 在 2022/3/1 下午4:50, Eugenio Perez Martin 写道: > > On Mon, Feb 28, 2022 at 8:37 AM Jason Wang wrote: > >> > >> 在 2022/2/27 下午9:41, Eugenio Pérez 写道: > >>> Use translations added in VhostIOVATree in SVQ. > >>> > >>> Only introduce usage here, not

[PATCH 2/2] target/arm/translate-neon: Simplify align field check for VLD3

2022-03-03 Thread Peter Maydell
For VLD3 (single 3-element structure to one lane), there is no alignment specification and the alignment bits in the instruction must be zero. This is bit [4] for the size=0 and size=1 cases, and bits [5:4] for the size=2 case. We do this check correctly in VLDST_single(), but we write it a bit o

[PATCH 0/2] target/arm: Check Neon VLD1/VST1 stride bits are zero

2022-03-03 Thread Peter Maydell
In the Neon VLD*/VST* "load/store single N-element structure to/from one lane" instructions the encodings include bits to specify a "stride" value, which specifies the separation between the Neon registers which hold the different elements of the structure. For VLD1/VST1 there is only a single ele

[PATCH 1/2] target/arm/translate-neon: UNDEF if VLD1/VST1 stride bits are non-zero

2022-03-03 Thread Peter Maydell
For VLD1/VST1 (single element to one lane) we are only accessing one register, and so the 'stride' is meaningless. The bits that would specify stride (insn bit [4] for size=1, bit [6] for size=2) are specified to be zero in the encoding (which would correspond to a stride of 1 for VLD2/VLD3/VLD4 e

Re: [PATCH v3 0/4] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG

2022-03-03 Thread Jean-Philippe Brucker
Hello, On Mon, Feb 14, 2022 at 12:43:52PM +, Jean-Philippe Brucker wrote: > Replace the VIRTIO_IOMMU_F_BYPASS feature with > VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch > global bypass on and off. > > Add a boot-bypass option, which defaults to 'on' to be in line

Re: [PATCH 1/2] target/arm/translate-neon: UNDEF if VLD1/VST1 stride bits are non-zero

2022-03-03 Thread Peter Maydell
On Thu, 3 Mar 2022 at 11:37, Peter Maydell wrote: > > For VLD1/VST1 (single element to one lane) we are only accessing one > register, and so the 'stride' is meaningless. The bits that would > specify stride (insn bit [4] for size=1, bit [6] for size=2) are This should say "bit [5] for size=1".

Re: [PATCH v5 15/16] iotests/image-fleecing: add test case with bitmap

2022-03-03 Thread Hanna Reitz
On 28.02.22 12:39, Vladimir Sementsov-Ogievskiy wrote: Note that reads zero areas (not dirty in the bitmap) fails, that's correct. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 32 ++-- tests/qemu-iotests/tests/image-fleecing.out | 84 +

Re: [PATCH v3 14/14] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-03 Thread Markus Armbruster
Eugenio Perez Martin writes: > On Thu, Mar 3, 2022 at 7:09 AM Markus Armbruster wrote: >> >> Eugenio Pérez writes: >> >> > Finally offering the possibility to enable SVQ from the command line. >> > >> > Signed-off-by: Eugenio Pérez >> > --- >> > qapi/net.json| 5 - >> > net/vhost-vdp

[PATCH v3 0/4] Enable vhost-user to be used on BSD systems

2022-03-03 Thread Sergio Lopez
Since QEMU is already able to emulate ioeventfd using pipefd, we're already pretty close to supporting vhost-user on non-Linux systems. This two patches bridge the gap by: 1. Adding a new event_notifier_get_wfd() to return wfd on the places where the peer is expected to write to the notifier.

[PATCH v3 1/4] event_notifier: add event_notifier_get_wfd()

2022-03-03 Thread Sergio Lopez
event_notifier_get_fd(const EventNotifier *e) always returns EventNotifier's read file descriptor (rfd). This is not a problem when the EventNotifier is backed by a an eventfd, as a single file descriptor is used both for reading and triggering events (rfd == wfd). But, when EventNotifier is backe

[PATCH v3 3/4] configure, meson: allow enabling vhost-user on all POSIX systems

2022-03-03 Thread Sergio Lopez
With the possibility of using a pipe pair via qemu_pipe() as a replacement on operating systems that doesn't support eventfd, vhost-user can also work on all POSIX systems. This change allows enabling vhost-user on all non-Windows platforms and makes libvhost_user (which still depends on eventfd)

Re: [PATCH v18 7/7] softmmu/dirtylimit: Implement dirty page rate limit

2022-03-03 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Implement dirtyrate calculation periodically basing on > dirty-ring and throttle virtual CPU until it reachs the quota > dirty page rate given by user. > > Introduce qmp commands "set-vcpu-dirty-limit", > "cancel-vcpu-dirty-limit", "que

[PATCH v3 2/4] vhost: use wfd on functions setting vring call fd

2022-03-03 Thread Sergio Lopez
When ioeventfd is emulated using qemu_pipe(), only EventNotifier's wfd can be used for writing. Use the recently introduced event_notifier_get_wfd() function to obtain the fd that our peer must use to signal the vring. Signed-off-by: Sergio Lopez --- hw/virtio/vhost.c | 6 +++--- 1 file changed

[PATCH v3 4/4] docs: vhost-user: add subsection for non-Linux platforms

2022-03-03 Thread Sergio Lopez
Add a section explaining how vhost-user is supported on platforms other than Linux. Signed-off-by: Sergio Lopez --- docs/interop/vhost-user.rst | 18 ++ 1 file changed, 18 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index edc3ad84a3..590a

Re: [PATCH v7 00/31] block layer: split block APIs in global state and I/O

2022-03-03 Thread Emanuele Giuseppe Esposito
Thank you for the script! > > Error: bdrv_get_full_backing_filename() is IO_CODE(), but calls > GLOBAL_STATE_CODE() code >bdrv_get_full_backing_filename() -> bdrv_make_absolute_filename() -> > bdrv_dirname() -> GLOBAL_STATE_CODE() So this was something you caught in the first pass of r

Re: [PATCH v5 0/4] tls: add macros for coroutine-safe TLS variables

2022-03-03 Thread Kevin Wolf
Am 22.02.2022 um 15:01 hat Stefan Hajnoczi geschrieben: > v5: > - Added explicit "#include "qemu/coroutine-tls.h" in patch 4 [Philippe] > - Updated patch 1 commit description and comments to describe the current > noinline plus asm volatile approach [Peter] > v4: > - Dropped '[RFC]'. > - Dropped

Re: [PATCH v18 7/7] softmmu/dirtylimit: Implement dirty page rate limit

2022-03-03 Thread Hyman Huang
在 2022/3/3 20:02, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit",

Re: [PATCH] 9pfs: move qemu_dirent_dup() from osdep -> 9p-util

2022-03-03 Thread Christian Schoenebeck
On Dienstag, 1. März 2022 21:33:49 CET Christian Schoenebeck wrote: > Function qemu_dirent_dup() is currently only used by 9pfs server, so move > it from project global header osdep.h to 9pfs specific header 9p-util.h. > > Link: > https://lore.kernel.org/qemu-devel/CAFEAcA_=HAUNomKD2wurSVaAHa5mrk2

Re: [PATCH] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-03 Thread Christian Schoenebeck
On Mittwoch, 2. März 2022 19:30:39 CET Christian Schoenebeck wrote: > API doc comments in QEMU are supposed to be in kerneldoc format, so drop > occurrences of "@c" which is Doxygen format for fixed-width text. > > Link: > https://lore.kernel.org/qemu-devel/CAFEAcA89+ENOM6x19OEF53Kd2DWkhN5SN21Va0D

Re: [PATCH 5/9] tests/avocado/linux_ssh_mips_malta.py: add missing accel (tcg) tag

2022-03-03 Thread Cleber Rosa
Philippe Mathieu-Daudé writes: > On 25/2/22 22:01, Cleber Rosa wrote: >> Being explicit about the accelerator used on these tests is a good >> thing in itself, but it will also be used in the filtering rules >> applied on "make check-avocado". >> Signed-off-by: Cleber Rosa >> --- >> tests/av

Re: [PATCH] gdbstub.c: add support for info proc mappings

2022-03-03 Thread Alex Bennée
Disconnect3d writes: > This commit adds support for `info proc mappings` and a few other commands > into > the QEMU user-mode emulation gdbstub. > > For that, support for the following GDB remote protocol commands has been > added: > * vFile:setfs: pid > * vFile:open: filename, flags, mode >

Re: [PATCH] tests/Makefile.include: Let "make clean" remove the TCG tests, too

2022-03-03 Thread Alex Bennée
Thomas Huth writes: > "make clean" should clear all binaries that have been built, but so > far it left the TCG tests still in place. Let's make sure that they > are now removed, too. Queued to for-7.0/misc-bits, thanks. -- Alex Bennée

Re: [PATCH v5 15/16] iotests/image-fleecing: add test case with bitmap

2022-03-03 Thread Hanna Reitz
On 03.03.22 12:44, Hanna Reitz wrote: On 28.02.22 12:39, Vladimir Sementsov-Ogievskiy wrote: Note that reads zero areas (not dirty in the bitmap) fails, that's correct. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   tests/qemu-iotests/tests/image-fleecing | 32 ++--   tests/qemu-iote

Re: propagating vmgenid outward and upward

2022-03-03 Thread Michael S. Tsirkin
On Wed, Mar 02, 2022 at 05:32:07PM +0100, Jason A. Donenfeld wrote: > Hi Michael, > > On Wed, Mar 02, 2022 at 11:22:46AM -0500, Michael S. Tsirkin wrote: > > > Because that 16 byte read of vmgenid is not atomic. Let's say you read > > > the first 8 bytes, and then the VM is forked. > > > > But at

Re: [PATCH v2] qga: Introduce NVMe disk bus type

2022-03-03 Thread Philippe Mathieu-Daudé
On 3/3/22 10:58, zhenwei pi wrote: Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU, a NVMe disk get exposed in guest side. Support NVMe disk bus type and implement posix version. Test PCI passthrough case: ~#virsh qemu-agent-command buster '{"execute":"guest-get-disks"}' | j

Re: [PATCH v4 11/14] softmmu/memory: add memory_region_try_add_subregion function

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:12, Damien Hedde wrote: Hi Philippe, I suppose it is ok if I change your mail in the reviewed by ? No, the email is fine (git tools should take care of using the correct email via the .mailmap entry, see commit 90f285fd83). Thanks, Damien On 2/23/22 10:07, Damien Hedde wrote:

Re: [PATCH v5 0/4] tls: add macros for coroutine-safe TLS variables

2022-03-03 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 01:07:54PM +0100, Kevin Wolf wrote: > Am 22.02.2022 um 15:01 hat Stefan Hajnoczi geschrieben: > > v5: > > - Added explicit "#include "qemu/coroutine-tls.h" in patch 4 [Philippe] > > - Updated patch 1 commit description and comments to describe the current > > noinline plus

Re: [PATCH] block/nbd.c: Fixed IO request coroutine not being wakeup when kill NBD server.

2022-03-03 Thread Rao, Lei
On 3/3/2022 5:25 PM, Vladimir Sementsov-Ogievskiy wrote: 03.03.2022 05:21, Rao Lei wrote: During the stress test, the IO request coroutine has a probability that it can't be awakened when the NBD server is killed. The GDB statck is as follows: (gdb) bt 0  0x7f2ff990cbf6 in __ppoll (fds=0

[PATCH 4/6] 9pfs/9p-util.h: convert Doxygen -> kerneldoc format

2022-03-03 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-util.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/9p-util.h b/hw/9

[PATCH 2/6] 9pfs/codir.c: convert Doxygen -> kerneldoc format

2022-03-03 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck --- hw/9pfs/codir.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/9

[PATCH 1/6] 9pfs/9p.h: convert Doxygen -> kerneldoc format

2022-03-03 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Based-on: Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/9pfs/9p.h b/h

[PATCH 5/6] 9pfs/coth.h: drop Doxygen format on v9fs_co_run_in_worker()

2022-03-03 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so drop Doxygen format used on v9fs_co_run_in_worker() macro. Signed-off-by: Christian Schoenebeck --- hw/9pfs/coth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h index f83

[PATCH 3/6] 9pfs/9p.c: convert Doxygen -> kerneldoc format

2022-03-03 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 62 +--- 1 file changed, 35 insertions(+), 27 deletions(-)

[PATCH 0/6] 9pfs: convert Doxygen -> kerneldoc format

2022-03-03 Thread Christian Schoenebeck
This patch set converts occurrences of API doc comments from Doxygen format into kerneldoc format. No behaviour change whatsoever. Christian Schoenebeck (6): 9pfs/9p.h: convert Doxygen -> kerneldoc format 9pfs/codir.c: convert Doxygen -> kerneldoc format 9pfs/9p.c: convert Doxygen -> kerneld

[PATCH 6/6] fsdev/p9array.h: convert Doxygen -> kerneldoc format

2022-03-03 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck --- fsdev/p9array.h | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --gi

Re: [PATCH v3 4/4] docs: vhost-user: add subsection for non-Linux platforms

2022-03-03 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 12:59:11PM +0100, Sergio Lopez wrote: > Add a section explaining how vhost-user is supported on platforms > other than Linux. > > Signed-off-by: Sergio Lopez > --- > docs/interop/vhost-user.rst | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/

Re: [PATCH v4 07/14] none-machine: add the NoneMachineState structure

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:06, Damien Hedde wrote: The none machine was using the parent state structure. We'll need a custom state to add a field in the following commit. Signed-off-by: Damien Hedde --- hw/core/null-machine.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-

Re: [PATCH v3 0/4] Enable vhost-user to be used on BSD systems

2022-03-03 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 12:59:07PM +0100, Sergio Lopez wrote: > Since QEMU is already able to emulate ioeventfd using pipefd, we're already > pretty close to supporting vhost-user on non-Linux systems. > > This two patches bridge the gap by: > > 1. Adding a new event_notifier_get_wfd() to return

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-03-03 Thread Eric Auger
Hi Stefan, On 2/8/22 6:58 PM, Eric Auger wrote: > Hi Stefan, > > On 2/8/22 6:16 PM, Stefan Berger wrote: >> >> On 2/8/22 08:38, Eric Auger wrote: >>> Representing the CRB cmd/response buffer as a standard >>> RAM region causes some trouble when the device is used >>> with VFIO. Indeed VFIO attemp

Re: [PATCH v4 08/14] none-machine: add 'ram-addr' property

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:07, Damien Hedde wrote: Add the property to configure a the base address of the ram. The default value remains zero. This commit is needed to use the 'none' machine as a base, and subsequently to dynamically populate it using qapi commands. Having a non null 'ram' is really hard to

Re: [PATCH v4 09/14] none-machine: allow cold plugging sysbus devices

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:07, Damien Hedde wrote: Allow plugging any sysbus device on this machine (the sysbus devices still need to be 'user-creatable'). This commit is needed to use the 'none' machine as a base, and subsequently to dynamically populate it with sysbus devices using qapi commands. Note tha

Re: [PULL 00/18] migration queue

2022-03-03 Thread Peter Maydell
On Wed, 2 Mar 2022 at 18:32, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit 64ada298b98a51eb2512607f6e6180cb330c47b1: > > Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220302' into > staging (2022-03-02 12:38:46 +0

Re: [PATCH v6 12/19] vfio-user: IOMMU support for remote device

2022-03-03 Thread Jag Raman
> On Mar 2, 2022, at 11:49 AM, Stefan Hajnoczi wrote: > > On Mon, Feb 28, 2022 at 07:54:38PM +, Jag Raman wrote: >> >> >>> On Feb 22, 2022, at 5:40 AM, Stefan Hajnoczi wrote: >>> >>> On Thu, Feb 17, 2022 at 02:48:59AM -0500, Jagannathan Raman wrote: +struct RemoteIommuElem {

[PATCH v2 1/4] util/thread-pool: Fix thread pool freeing locking

2022-03-03 Thread Nicolas Saenz Julienne
Upon freeing a thread pool we need to get rid of any remaining worker. This is achieved by setting the thread pool's topping flag, waking the workers up, and waiting for them to exit one by one. The problem is that currently all this process happens with the thread pool lock held, effectively block

[PATCH v2 0/4] util/thread-pool: Expose minimun and maximum size

2022-03-03 Thread Nicolas Saenz Julienne
As discussed on the previous RFC[1] the thread-pool's dynamic thread management doesn't play well with real-time and latency sensitive systems. This series introduces a set of controls that'll permit achieving more deterministic behaviours, for example by fixing the pool's size. We first introduce

Re: [PATCH v4 12/14] add sysbus-mmio-map qapi command

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:07, Damien Hedde wrote: This command allows to map an mmio region of sysbus device onto the system memory. Its behavior mimics the sysbus_mmio_map() function apart from the automatic unmap (the C function unmaps the region if it is already mapped). For the qapi function we consider

[PATCH v2 3/4] util/main-loop: Introduce the main loop into QOM

2022-03-03 Thread Nicolas Saenz Julienne
'event-loop-base' provides basic property handling for all 'AioContext' based event loops. So let's define a new 'MainLoopClass' that inherits from it. This will permit tweaking the main loop's properties through qapi as well as through the command line using the '-object' keyword[1]. Only one inst

Re: [PATCH v4 03/14] vl: support machine-initialized target in phase_until()

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:06, Damien Hedde wrote: phase_until() now supports the following transitions: + accel-created -> machine-initialized + machine-initialized -> machine-ready As a consequence we can now support the use of qmp_exit_preconfig() from phases _accel-created_ and _machine-initialized_. Th

[PATCH v2 2/4] Introduce event-loop-base abstract class

2022-03-03 Thread Nicolas Saenz Julienne
Introduce the 'event-loop-base' abstract class, it'll hold the properties common to all event loops and provide the necessary hooks for their creation and maintenance. Then have iothread inherit from it. EventLoopBaseClass is defined as user creatable and provides a hook for its children to attach

Re: [PATCH v4 01/14] machine: add phase_get() and document phase_check()/advance()

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:06, Damien Hedde wrote: phase_get() returns the current phase, we'll use it in next commit. Signed-off-by: Damien Hedde --- include/hw/qdev-core.h | 19 +++ hw/core/qdev.c | 5 + 2 files changed, 24 insertions(+) Reviewed-by: Philippe Mathieu-Dau

Re: [PATCH v4 04/14] qapi/device_add: compute is_hotplug flag

2022-03-03 Thread Philippe Mathieu-Daudé
On 23/2/22 10:06, Damien Hedde wrote: Instead of checking the phase everytime, just store the result in a flag. We will use more of it in the following commit. Signed-off-by: Damien Hedde --- softmmu/qdev-monitor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Phi

Re: [PATCH v2 6/9] tcg/aarch64: Support TCG_TARGET_SIGNED_ADDR32

2022-03-03 Thread Peter Maydell
On Sun, 27 Feb 2022 at 02:10, Richard Henderson wrote: > > AArch64 has both sign and zero-extending addressing modes, which > means that either treatment of guest addresses is equally efficient. > Enabling this for AArch64 gives us testing of the feature in CI. > > Signed-off-by: Richard Henderson

Re: SPI support for the virt platform

2022-03-03 Thread Jonathan Cameron via
On Mon, 28 Feb 2022 23:26:05 -0300 Marcelo Schmitt wrote: > Hi, > > I'd like to know the opinion of the QEMU community on some topics. > > In 2021, a pair of patch sets for drivers of the Linux IIO subsystem was > proposed based on some QEMU hacks that added virtual devices with which > it was

[PATCH v2 4/4] util/event-loop-base: Introduce options to set the thread pool size

2022-03-03 Thread Nicolas Saenz Julienne
The thread pool regulates itself: when idle, it kills threads until empty, when in demand, it creates new threads until full. This behaviour doesn't play well with latency sensitive workloads where the price of creating a new thread is too high. For example, when paired with qemu's '-mlock', or usi

Re: [PATCH v2 4/9] accel/tcg: Add guest_base_signed_addr32 for user-only

2022-03-03 Thread Peter Maydell
On Sun, 27 Feb 2022 at 02:08, Richard Henderson wrote: > > While the host may prefer to treat 32-bit addresses as signed, > there are edge cases of guests that cannot be implemented with > addresses 0x7fff_ and 0x8000_ being non-consecutive. > > Therefore, default to guest_base_signed_addr

Re: [PATCH v4 13/14] hw/mem/system-memory: add a memory sysbus device

2022-03-03 Thread Philippe Mathieu-Daudé
+Mark / Daniel / Markus / Alex for design. On 25/2/22 16:31, Damien Hedde wrote: On 2/25/22 12:38, Igor Mammedov wrote: On Thu, 24 Feb 2022 12:43:21 +0100 Damien Hedde wrote: On 2/24/22 10:55, Igor Mammedov wrote: On Wed, 23 Feb 2022 11:19:49 +0100 Damien Hedde wrote: On 2/23/22 10:44, Igo

[PATCH v8 04/31] assertions for block global state API

2022-03-03 Thread Emanuele Giuseppe Esposito
All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito --- block.c| 124 +

[PATCH v8 08/31] block/block-backend.c: assertions for block-backend

2022-03-03 Thread Emanuele Giuseppe Esposito
All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito --- block/block-backend.c | 78 ++

Re: [PATCH v2 3/9] accel/tcg: Support TCG_TARGET_SIGNED_ADDR32 for softmmu

2022-03-03 Thread Peter Maydell
On Sun, 27 Feb 2022 at 02:08, Richard Henderson wrote: > > When TCG_TARGET_SIGNED_ADDR32 is set, adjust the tlb addend to > allow the 32-bit guest address to be sign extended within the > 64-bit host register instead of zero extended. > > This will simplify tcg hosts like MIPS, RISC-V, and LoongAr

[PATCH v8 01/31] main-loop.h: introduce qemu_in_main_thread()

2022-03-03 Thread Emanuele Giuseppe Esposito
When invoked from the main loop, this function is the same as qemu_mutex_iothread_locked, and returns true if the BQL is held. When invoked from iothreads or tests, it returns true only if the current AioContext is the Main Loop. This essentially just extends qemu_mutex_iothread_locked to work als

[PATCH v8 10/31] block.c: assertions to the block layer permissions API

2022-03-03 Thread Emanuele Giuseppe Esposito
Now that we "covered" the three main cases where the permission API was being used under BQL (fuse, amend and invalidate_cache), we can safely assert for the permission functions implemented in block.c Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 12 1 file changed, 12 in

[PATCH v8 12/31] assertions for block_int global state API

2022-03-03 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 15 +++ block/backup.c | 1 + block/block-backend.c | 3 +++ block/commit.c | 2 ++ block/dirty-bitmap.c| 1 + block/io.c |

[PATCH v8 00/31] block layer: split block APIs in global state and I/O

2022-03-03 Thread Emanuele Giuseppe Esposito
Currently, block layer APIs like block.h contain a mix of functions that are either running in the main loop and under the BQL, or are thread-safe functions and run in iothreads performing I/O. The functions running under BQL also take care of modifying the block graph, by using drain and/or aio_co

[PATCH v8 02/31] main loop: macros to mark GS and I/O functions

2022-03-03 Thread Emanuele Giuseppe Esposito
Righ now, IO_CODE and IO_OR_GS_CODE are nop, as there isn't really a way to check that a function is only called in I/O. On the other side, we can use qemu_in_main_thread() to check if we are in the main loop. The usage of macros makes easy to extend them in the future without making changes in al

[PATCH v8 11/31] include/block/block_int: split header into I/O and global state API

2022-03-03 Thread Emanuele Giuseppe Esposito
Similarly to the previous patch, split block_int.h in block_int-io.h and block_int-global-state.h block_int-common.h contains the structures shared between the two headers, and the functions that can't be categorized as I/O or global state. Assertions are added in the next patch. Signed-off-by:

[PATCH v8 03/31] include/block/block: split header into I/O and global state API

2022-03-03 Thread Emanuele Giuseppe Esposito
block.h currently contains a mix of functions: some of them run under the BQL and modify the block layer graph, others are instead thread-safe and perform I/O in iothreads. Some others can only be called by either the main loop or the iothread running the AioContext (and not other iothreads), and u

[PATCH v8 14/31] block: introduce assert_bdrv_graph_writable

2022-03-03 Thread Emanuele Giuseppe Esposito
We want to be sure that the functions that write the child and parent list of a bs are under BQL and drain. BQL prevents from concurrent writings from the GS API, while drains protect from I/O. TODO: drains are missing in some functions using this assert. Therefore a proper assertion will fail. B

[PATCH v8 07/31] include/sysemu/block-backend: split header into I/O and global state (GS) API

2022-03-03 Thread Emanuele Giuseppe Esposito
Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove "block/block.h" include as it seems it is not necessary anymore, together with "qemu/iov.h" block-backend-common.h contains the structures shared between the two hea

[PATCH v8 05/31] IO_CODE and IO_OR_GS_CODE for block I/O API

2022-03-03 Thread Emanuele Giuseppe Esposito
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with IO_OR_GS_CODE. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 38 ++- block/dirty-bitmap.c | 1 + block/io.c | 43 ++-- i

[PATCH v8 13/31] IO_CODE and IO_OR_GS_CODE for block_int I/O API

2022-03-03 Thread Emanuele Giuseppe Esposito
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with IO_OR_GS_CODE. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 14 +- block/block-backend.c| 2 ++ block/dirty-bitmap.c | 3 +++ block/io.c | 13

[PATCH v8 15/31] include/block/blockjob_int.h: split header into I/O and GS API

2022-03-03 Thread Emanuele Giuseppe Esposito
Since the I/O functions are not many, keep a single file. Also split the function pointers in BlockJobDriver. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/block/blockjob_int.h | 28 1 file changed, 28 insertions(+) diff --git a

[PATCH v8 16/31] GS and IO CODE macros for blockjob_int.h

2022-03-03 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- blockjob.c | 5 + 1 file changed, 5 insertions(+) diff --git a/blockjob.c b/blockjob.c index 10815a89fe..d79a52d204 100644 --- a/blockjob.c +++ b/blockjob.c @@ -84,6 +84,7 @@ BlockJob *block_job_get(const char *id) void block_job_free(Job *job)

[PATCH v8 18/31] include/block/blockjob.h: global state API

2022-03-03 Thread Emanuele Giuseppe Esposito
blockjob functions run always under the BQL lock. Signed-off-by: Emanuele Giuseppe Esposito --- include/block/blockjob.h | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 87fbb3985f..6525e1

[PATCH v8 06/31] block/export/fuse.c: allow writable exports to take RESIZE permission

2022-03-03 Thread Emanuele Giuseppe Esposito
Allow writable exports to get BLK_PERM_RESIZE permission from creation, in fuse_export_create(). In this way, there is no need to give the permission in fuse_do_truncate(), which might be run in an iothread. Permissions should be set only in the main thread, so in any case if an iothread tries to

[PATCH v8 28/31] block_int-common.h: assertions in the callers of BdrvChildClass function pointers

2022-03-03 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 5afdbe3060..01811d6519 100644 --- a/block.c +++ b/block.c @@ -1497,7 +1497,7 @@ const BdrvChildClass child_of_bds = { AioContext *bdrv_chi

  1   2   3   4   >