Re: [PATCH] block/export/fuse.c: fix musl build

2021-10-25 Thread Philippe Mathieu-Daudé
On 10/25/21 13:01, Philippe Mathieu-Daudé wrote: > On 10/22/21 11:52, Fabrice Fontaine wrote: >> Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix >> https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb >> and avoid the following build

Re: [PATCH] block/export/fuse.c: fix musl build

2021-10-25 Thread Philippe Mathieu-Daudé
On 10/22/21 11:52, Fabrice Fontaine wrote: > Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix > https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb > and avoid the following build failure on musl: > > ../block/export/fuse.c: In function

[PATCH v2] hw/i386: Rename default_bus_bypass_iommu

2021-10-25 Thread Jean-Philippe Brucker
Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine parameter definitions cannot use underscores, because keyval_dashify() transforms them to dashes and the parser doesn't find the parameter. This affects option default_bus_bypass_iommu which was introduced in the same release:

Re: [PATCH] hvf: Avoid mapping regions < PAGE_SIZE as ram

2021-10-25 Thread Philippe Mathieu-Daudé
Hi Alex, On 10/25/21 10:25, Alexander Graf wrote: > HVF has generic memory listener code that adds all RAM regions as HVF RAM > regions. However, HVF can only handle page aligned, page granule regions. > > So let's ignore regions that are not page aligned and sized. They will be > trapped as

Re: [PATCH] configure: do not duplicate CPU_CFLAGS into QEMU_LDFLAGS

2021-10-25 Thread Philippe Mathieu-Daudé
On 10/25/21 10:20, Paolo Bonzini wrote: Can we prefix with this? Since commit 4dba2789084 ("configure, meson: move CPU_CFLAGS out of QEMU_CFLAGS"), > CPU_CFLAGS is included in the link commands both during configure > and (via config-meson.cross) during meson. It need not be added >

[PATCH v4 24/25] job.h: split function pointers in JobDriver

2021-10-25 Thread Emanuele Giuseppe Esposito
The job API will be handled separately in another serie. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/qemu/job.h | 16 1 file changed, 16 insertions(+) diff --git a/include/qemu/job.h b/include/qemu/job.h index 6e67b6977f..7e9e59f4b8

[PATCH v4 21/25] block_int-common.h: split function pointers in BdrvChildClass

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/block/block_int-common.h | 51 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-10-25 Thread Stefan Hajnoczi
On Thu, Oct 21, 2021 at 05:39:28PM +0200, Christian Schoenebeck wrote: > On Freitag, 8. Oktober 2021 18:08:48 CEST Christian Schoenebeck wrote: > > On Freitag, 8. Oktober 2021 16:24:42 CEST Christian Schoenebeck wrote: > > > On Freitag, 8. Oktober 2021 09:25:33 CEST Greg Kurz wrote: > > > > On

[PATCH v4 22/25] block_int-common.h: assertions in the callers of BdrvChildClass function pointers

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- block.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block.c b/block.c index 40c4729b8d..da80e89ad4 100644 --- a/block.c +++ b/block.c @@ -1462,6 +1462,7 @@ const BdrvChildClass child_of_bds = {

Re: [PATCH 1/3] file-posix: add `aio-max-batch` option

2021-10-25 Thread Stefano Garzarella
On Thu, Oct 21, 2021 at 04:18:41PM +0100, Stefan Hajnoczi wrote: On Thu, Sep 23, 2021 at 04:30:58PM +0200, Stefano Garzarella wrote: Commit d7ddd0a161 ("linux-aio: limit the batch size using `aio-max-batch` parameter") added a way to limit the batch size of Linux AIO backend for the entire AIO

[PATCH v4 23/25] block-backend-common.h: split function pointers in BlockDevOps

2021-10-25 Thread Emanuele Giuseppe Esposito
Assertions in the callers of the funciton pointrs are already added by previous patches. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/sysemu/block-backend-common.h | 28 ++- 1 file changed, 23 insertions(+), 5 deletions(-) diff

[PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 94bff5c757..40c4729b8d 100644 --- a/block.c +++ b/block.c @@ -1074,6 +1074,7 @@ int

[PATCH v4 18/25] block/coroutines: I/O API

2021-10-25 Thread Emanuele Giuseppe Esposito
block coroutines functions run in different aiocontext, and are not protected by the BQL. Therefore are I/O. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- block/coroutines.h | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v4 19/25] block_int-common.h: split function pointers in BlockDriver

2021-10-25 Thread Emanuele Giuseppe Esposito
Similar to the header split, also the function pointers in BlockDriver can be split in I/O and global state. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/block/block_int-common.h | 458 --- 1 file changed, 237 insertions(+), 221

[PATCH v4 15/25] assertions for blockdev.h global state API

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- block/block-backend.c | 3 +++ blockdev.c| 15 +++ 2 files changed, 18 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index

[PATCH v4 16/25] include/block/snapshot: global state API + assertions

2021-10-25 Thread Emanuele Giuseppe Esposito
Snapshots run also under the BQL lock, so they all are in the global state API. The aiocontext lock that they hold is currently an overkill and in future could be removed. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- block/snapshot.c

[PATCH v4 17/25] block/copy-before-write.h: global state API + assertions

2021-10-25 Thread Emanuele Giuseppe Esposito
copy-before-write functions always run under BQL lock. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- block/copy-before-write.c | 2 ++ block/copy-before-write.h | 7 +++ 2 files changed, 9 insertions(+) diff --git

[PATCH v4 10/25] assertions for blockjob_int.h

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- blockjob.c | 4 1 file changed, 4 insertions(+) diff --git a/blockjob.c b/blockjob.c index 4bad1408cb..fbd6c7d873 100644 --- a/blockjob.c +++ b/blockjob.c @@ -83,6 +83,7 @@ BlockJob *block_job_get(const char *id)

[PATCH v4 14/25] include/systemu/blockdev.h: global state API

2021-10-25 Thread Emanuele Giuseppe Esposito
blockdev functions run always under the BQL lock. Signed-off-by: Emanuele Giuseppe Esposito --- include/sysemu/blockdev.h | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index 960b54d320..b07f15df09

[PATCH v4 11/25] include/block/blockjob.h: global state API

2021-10-25 Thread Emanuele Giuseppe Esposito
blockjob functions run always under the BQL lock. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/block/blockjob.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index d200f33c10..fa0c3f7a47

[PATCH v4 25/25] job.h: assertions in the callers of JobDriver funcion pointers

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- job.c | 9 + 1 file changed, 9 insertions(+) diff --git a/job.c b/job.c index dbfa67bb0a..94b142684f 100644 --- a/job.c +++ b/job.c @@ -380,6 +380,8 @@ void job_ref(Job *job) void job_unref(Job *job) { +

[PATCH v4 13/25] include/sysemu/blockdev.h: move drive_add and inline drive_def

2021-10-25 Thread Emanuele Giuseppe Esposito
drive_add is only used in softmmu/vl.c, so it can be a static function there, and drive_def is only a particular use case of qemu_opts_parse_noisily, so it can be inlined. Also remove drive_mark_claimed_by_board, as it is only defined but not implemented (nor used) anywhere. This also helps

[PATCH v4 12/25] assertions for blockob.h global state API

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- blockjob.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/blockjob.c b/blockjob.c index fbd6c7d873..4982f6a2b5 100644 --- a/blockjob.c +++ b/blockjob.c @@ -61,6 +61,7 @@ static bool is_block_job(Job

[PATCH v4 06/25] include/block/block_int: split header into I/O and global state API

2021-10-25 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 v4 09/25] include/block/blockjob_int.h: split header into I/O and GS API

2021-10-25 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

[PATCH v4 07/25] assertions for block_int global state API

2021-10-25 Thread Emanuele Giuseppe Esposito
Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- block.c | 17 + block/backup.c | 1 + block/block-backend.c | 3 +++ block/commit.c | 2 ++ block/dirty-bitmap.c| 1 +

[PATCH v4 05/25] block/block-backend.c: assertions for block-backend

2021-10-25 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 Reviewed-by: Stefan Hajnoczi --- block/block-backend.c | 90

[PATCH v4 08/25] block: introduce assert_bdrv_graph_writable

2021-10-25 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.

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

2021-10-25 Thread Emanuele Giuseppe Esposito
Currently, block layer APIs like block-backend.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

[PATCH v4 03/25] assertions for block global state API

2021-10-25 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 Reviewed-by: Stefan Hajnoczi --- block.c| 136

[PATCH v4 02/25] include/block/block: split header into I/O and global state API

2021-10-25 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. It is not easy to understand which function is part of which group (I/O vs GS), and this patch aims to clarify it. The "GS"

[PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-10-25 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

[PATCH] Add a comment about endian-ness of capabilities recorded in pci config space

2021-10-25 Thread Ani Sinha
Values in PCI configuration space are written in little endian format. This includes capability values recorded in pci config space for pci bridges etc. Add comment to remind developers to make sure the values are written in little endian for all platforms and that the code must be endian safe.

[PATCH v4 01/25] main-loop.h: introduce qemu_in_main_thread()

2021-10-25 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

Re: [PATCH v4] isa-applesmc: provide OSK forwarding on Apple hosts

2021-10-25 Thread Alexander Graf
On 22.10.21 18:14, Vladislav Yaroshchuk wrote: On Apple hosts we can read AppleSMC OSK key directly from host's SMC and forward this value to QEMU Guest. Usage: `-device isa-applesmc,hostosk=on` Apple licence allows use and run up to two additional copies or instances of macOS operating

Re: [PULL 0/1] Block patches

2021-10-25 Thread Stefan Hajnoczi
On Thu, Oct 21, 2021 at 03:08:56PM -0700, Richard Henderson wrote: > On 10/21/21 10:41 AM, Stefan Hajnoczi wrote: > > The following changes since commit afc9fcde55296b83f659de9da3cdf044812a6eeb: > > > >Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into > > staging (2021-10-20

Re: [PATCH] block/export/fuse.c: fix musl build

2021-10-25 Thread Fabrice Fontaine
Le lun. 25 oct. 2021 à 11:33, Kevin Wolf a écrit : > > Am 22.10.2021 um 11:52 hat Fabrice Fontaine geschrieben: > > Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix > > https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb > > and avoid the

Re: [PATCH v3] target/riscv: fix VS interrupts forwarding to HS

2021-10-25 Thread Jose Martins
> From your last response I thought you sent a different series that > replaces this patch. If that's not the case do you mind sending this > patch again? I already sent the patch series here: https://lists.gnu.org/archive/html/qemu-devel/2021-06/msg00553.html. I got confused, I should have

Re: [PATCH] block/export/fuse.c: fix musl build

2021-10-25 Thread Kevin Wolf
Am 22.10.2021 um 11:52 hat Fabrice Fontaine geschrieben: > Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix > https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb > and avoid the following build failure on musl: > > ../block/export/fuse.c:

Re: [PATCH v6 00/15] target/riscv: Rationalize XLEN and operand length

2021-10-25 Thread LIU Zhiwei
On 2021/10/22 下午11:50, Richard Henderson wrote: On 10/22/21 1:26 AM, LIU Zhiwei wrote: As the specification said, "PC bits above XLEN are ignored, and when the PC is written, it is sign-extended to fill the widest supported XLEN." We still need special process of PC for exceptions or jump

Re: [PATCH] Trim some trailing space from human-readable output

2021-10-25 Thread Laurent Vivier
Le 25/10/2021 à 11:12, Markus Armbruster a écrit : Nominating for qemu-trivial. Tweaking the subject to monitor: Trim some trailing space from human-readable output as Philippe suggested would be nice. Markus Armbruster writes: I noticed -cpu help printing enough trailing spaces to

Re: [PATCH] Trim some trailing space from human-readable output

2021-10-25 Thread Markus Armbruster
Nominating for qemu-trivial. Tweaking the subject to monitor: Trim some trailing space from human-readable output as Philippe suggested would be nice. Markus Armbruster writes: > I noticed -cpu help printing enough trailing spaces to make the output > at least 84 characters wide. Looks

[PATCH] hvf: Avoid mapping regions < PAGE_SIZE as ram

2021-10-25 Thread Alexander Graf
HVF has generic memory listener code that adds all RAM regions as HVF RAM regions. However, HVF can only handle page aligned, page granule regions. So let's ignore regions that are not page aligned and sized. They will be trapped as MMIO instead. Signed-off-by: Alexander Graf ---

[PATCH] configure: do not duplicate CPU_CFLAGS into QEMU_LDFLAGS

2021-10-25 Thread Paolo Bonzini
CPU_CFLAGS is included in the link commands both during configure and (via config-meson.cross) during meson. It need not be added separately to QEMU_LDFLAGS. Signed-off-by: Paolo Bonzini --- configure | 53 ++--- 1 file changed, 14 insertions(+),

[PATCH] configure: remove useless NPTL probe

2021-10-25 Thread Paolo Bonzini
Using a linuxthreads system with a recent QEMU will have bigger problems than just not having NPTL. Remove the unnecessary check. Signed-off-by: Paolo Bonzini --- configure | 19 --- 1 file changed, 19 deletions(-) diff --git a/configure b/configure index

Re: gitlab/cirrus auth token failure

2021-10-25 Thread Daniel P . Berrangé
On Sun, Oct 24, 2021 at 06:15:38PM -0700, Richard Henderson wrote: > On 10/24/21 12:42 AM, Paolo Bonzini wrote: > > On 22/10/21 20:31, Richard Henderson wrote: > > > Hi Daniel, you win the cookie because you committed cirrus.yml. > > > > > > I should have reported this before the weekend, but at

Re: [PATCH 3/9] qapi: Eliminate QCO_NO_OPTIONS for a slight simplification

2021-10-25 Thread Juan Quintela
Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 2/9] qapi: Mark unstable QMP parts with feature 'unstable'

2021-10-25 Thread Juan Quintela
Markus Armbruster wrote: > Add special feature 'unstable' everywhere the name starts with 'x-', > except for InputBarrierProperties member x-origin and > MemoryBackendProperties member x-use-canonical-path-for-ramblock-id, > because these two are actually stable. > > Signed-off-by: Markus

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-25 Thread Juan Quintela
Markus Armbruster wrote: > By convention, names starting with "x-" are experimental. The parts > of external interfaces so named may be withdrawn or changed > incompatibly in future releases. > > Drawback: promoting something from experimental to stable involves a > name change. Client code

Re: [PATCH] block/export/fuse.c: fix musl build

2021-10-25 Thread Fabrice Fontaine
Le lun. 25 oct. 2021 à 08:31, Michael Tokarev a écrit : > > 22.10.2021 12:52, Fabrice Fontaine пишет: > > Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix > > https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb > > and avoid the following

Re: [PATCH v8 65/78] target/riscv: rvv-1.0: relax RV_VLEN_MAX to 1024-bits

2021-10-25 Thread Alistair Francis
On Fri, Oct 15, 2021 at 6:43 PM wrote: > > From: Frank Chang > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair > > -- > --- > target/riscv/cpu.h | 2 +- > target/riscv/insn_trans/trans_rvv.c.inc | 4 ++-- > target/riscv/vector_helper.c|

Re: [PATCH v8 72/78] target/riscv: set mstatus.SD bit when writing fp CSRs

2021-10-25 Thread Alistair Francis
On Fri, Oct 15, 2021 at 6:44 PM wrote: > > From: Frank Chang > > Signed-off-by: Frank Chang Hey Frank, You will need to rebase this on the latest master branch. Alistair > --- > target/riscv/csr.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git

Re: [PATCH] block/export/fuse.c: fix musl build

2021-10-25 Thread Michael Tokarev
22.10.2021 12:52, Fabrice Fontaine пишет: Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb and avoid the following build failure on musl: ../block/export/fuse.c: In function

Re: [PATCH v8 61/78] target/riscv: rvv-1.0: floating-point/integer type-convert instructions

2021-10-25 Thread Alistair Francis
On Fri, Oct 15, 2021 at 6:43 PM wrote: > > From: Frank Chang > > Add the following instructions: > > * vfcvt.rtz.xu.f.v > * vfcvt.rtz.x.f.v > > Also adjust GEN_OPFV_TRANS() to accept multiple floating-point rounding > modes. > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis

Re: [PATCH v8 51/78] target/riscv: rvv-1.0: floating-point slide instructions

2021-10-25 Thread Alistair Francis
On Fri, Oct 15, 2021 at 6:38 PM wrote: > > From: Frank Chang > > Add the following instructions: > > * vfslide1up.vf > * vfslide1down.vf > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/helper.h | 7 ++ >

Re: [PATCH v8 43/78] target/riscv: rvv-1.0: integer add-with-carry/subtract-with-borrow

2021-10-25 Thread Alistair Francis
On Fri, Oct 15, 2021 at 6:26 PM wrote: > > From: Frank Chang > > * Only do carry-in or borrow-in if is masked (vm=0). > * Remove clear function from helper functions as the tail elements > are unchanged in RVV 1.0. > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair >

<    1   2   3