Re: [PATCH v6 0/6] tests/acceptance: Add bFLT loader linux-user test

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/5/21 15:34, Philippe Mathieu-Daudé wrote: > Philippe Mathieu-Daudé (6): > tests/acceptance: Extract QemuBaseTest from Test > tests/acceptance: Make pick_default_qemu_bin() more generic > tests/acceptance: Introduce QemuUserTest base class > tests/acceptance: Share useful helpers from

Re: [PATCH v2 1/2] tests/acceptance: introduce new check-avocado tartget

2021-11-08 Thread Thomas Huth
On 05/11/2021 16.53, Willian Rampazzo wrote: This introduces a new `make` target, `check-avocado`, and adds a deprecation message about the `check-acceptance` target. This is a preparation for renaming the `tests/acceptance` folder to `tests/avocado`. The plan is to remove the call to the `che

Re: [PATCH v2 0/2] tests/acceptance: rename tests acceptance to tests avocado

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/5/21 16:53, Willian Rampazzo wrote: > In the discussion about renaming the `tests/acceptance` [1], the > conclusion was that the folders inside `tests` are related to the > framework running the tests and not directly related to the type of > the tests. > > This changes the folder to `tests/

Re: [PATCH] macfb: fix a memory leak (CID 1465231)

2021-11-08 Thread Mark Cave-Ayland
On 05/11/2021 16:52, Laurent Vivier wrote: Rewrite the function using g_string_append_printf() rather than g_strdup_printf()/g_strconcat(). Fixes: df8abbbadf74 ("macfb: add common monitor modes supported by the MacOS toolbox ROM") Cc: mark.cave-ayl...@ilande.co.uk Reported-by: Peter Maydell S

Re: [PATCH] s390x: kvm: adjust diag318 resets to retain data

2021-11-08 Thread Christian Borntraeger
Am 05.11.21 um 23:46 schrieb Collin Walling: The CPNC portion of the diag 318 data is erroneously reset during an initial CPU reset caused by SIGP. Let's go ahead and relocate the diag318_info field within the CPUS390XState struct such that it is only zeroed during a clear reset. This way, the

Re: [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/6/21 21:32, Laurent Vivier wrote: > Le 05/11/2021 à 12:30, Gerd Hoffmann a écrit : >> From: Dongwon Kim >> >> If guest fb is backed by dmabuf (blob-resource), the texture bound to the >> old context needs to be recreated in case the egl is re-initialized (e.g. >> new window for vc is created

Re: Artificially target-dependend compiles

2021-11-08 Thread Markus Armbruster
Markus Armbruster writes: [...] > I just ran into an instance that may be clearer. > > The "rocker" device is target-independent (hw/net/meson.build adds it to > softmmu_ss), but linked only for selected targets (hw/net/Kconfig has > depends on PCI && MSI_NONBROKEN). > > This makes our build mac

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Mark Cave-Ayland
On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote: On 11/5/21 19:26, Philippe Mathieu-Daudé wrote: On 11/5/21 18:13, Richard Henderson wrote: On 11/5/21 7:30 AM, Gerd Hoffmann wrote: The following changes since commit b1fd92137e4d485adeec8e9f292f928ff335b76c:    Merge remote-tracking branch

Re: [PATCH v2 1/2] tests/acceptance: introduce new check-avocado tartget

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 08:59, Thomas Huth wrote: > On 05/11/2021 16.53, Willian Rampazzo wrote: >> This introduces a new `make` target, `check-avocado`, and adds a >> deprecation message about the `check-acceptance` target. This is >> a preparation for renaming the `tests/acceptance` folder to >>   `tests/avoc

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Philippe Mathieu-Daudé
+Thomas & Daniel for Travis-CI On 11/8/21 09:12, Mark Cave-Ayland wrote: > On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote: >> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote: >>> On 11/5/21 18:13, Richard Henderson wrote: On 11/5/21 7:30 AM, Gerd Hoffmann wrote: > The following changes

Re: [PATCH 12/15] hw/nvme: Initialize capability structures for primary/secondary controllers

2021-11-08 Thread Klaus Jensen
On Nov 5 15:04, Łukasz Gieryk wrote: > On Fri, Nov 05, 2021 at 09:46:28AM +0100, Łukasz Gieryk wrote: > > On Thu, Nov 04, 2021 at 04:48:43PM +0100, Łukasz Gieryk wrote: > > > On Wed, Nov 03, 2021 at 01:07:31PM +0100, Klaus Jensen wrote: > > > > On Oct 7 18:24, Lukasz Maniak wrote: > > > > > From:

[RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available

2021-11-08 Thread Philippe Mathieu-Daudé
Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl") we get on Ubuntu 18.04.4 LTS and Debian Buster (oldstable): $ ../configure --enable-virglrenderer [...] ui/gtk-egl.c: In function 'gd_egl_refresh': ui/gtk-egl.c:159:13: error: implicit

Re: [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available

2021-11-08 Thread Laurent Vivier
Le 08/11/2021 à 09:31, Philippe Mathieu-Daudé a écrit : Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl") we get on Ubuntu 18.04.4 LTS and Debian Buster (oldstable): $ ../configure --enable-virglrenderer [...] ui/gtk-egl.c: In func

Re: [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available

2021-11-08 Thread Paolo Bonzini
On 11/8/21 09:31, Philippe Mathieu-Daudé wrote: Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl") we get on Ubuntu 18.04.4 LTS and Debian Buster (oldstable): $ ../configure --enable-virglrenderer [...] ui/gtk-egl.c: In function 'gd

Re: Chardev: delete the QemuOpts reserved in vm_config_groups

2021-11-08 Thread Marc-André Lureau
Hi On Sat, Nov 6, 2021 at 10:41 PM ぷ风过无痕?? <787738...@qq.com> wrote: > > We have found that qemu cannot plug in the previously unplugged device. > start qemu with the following command: > ./qemu-system-x86_64 -enable-kvm -m 8192 -smp 16 \ >-object > memory-backend-file,id=mem,size=819

[PATCH 0/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

2021-11-08 Thread Paolo Bonzini
Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links tests, as they are supposed to be independent of the specific sets of compilation flags used to build the programs. However, the user can still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option to specify -I or

Re: [PULL 00/11] Sphinx patches

2021-11-08 Thread Marc-André Lureau
Hi On Fri, Nov 5, 2021 at 10:07 PM Richard Henderson wrote: > > On 11/5/21 9:32 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > The following changes since commit 18e356a53a2926a15343b914db64324d63748f25: > > > >Merge remote-tracking branch > > 'remotes/stsquad/ta

[PATCH 0/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

2021-11-08 Thread Paolo Bonzini
Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links tests, as they are supposed to be independent of the specific sets of compilation flags used to build the programs. However, the user can still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option to specify -I or

[PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars

2021-11-08 Thread Paolo Bonzini
User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS, or --extra-cflags/extra-cxxflags/--extra-ldflags on the command line. QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved for flags detected by configure, so do not add to them and clear them at the beginning of the script. Signed-off-

[PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status

2021-11-08 Thread Paolo Bonzini
CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include -L or -I options), so they should be kept from the invocation of configure to the subsequent reinvocations via config.status. Signed-off-by: Paolo Bonzini --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --

[PATCH 3/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

2021-11-08 Thread Paolo Bonzini
Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links tests, as they are supposed to be independent of the specific sets of compilation flags used to build the programs. However, the user can still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option to specify -I or

[PATCH 1/4] configure: simplify calls to meson_quote

2021-11-08 Thread Paolo Bonzini
meson_quote assumes a non-empty argument list, and incorrectly returns a one-entry array if passed nothing. Move the check for an empty argument list from the invocations to the function itself. Signed-off-by: Paolo Bonzini --- configure | 9 + 1 file changed, 5 insertions(+), 4 deletio

[PULL v2 00/11] Sphinx patches

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 63ed851de474b1e2458cb9b4ba6e02a88f72c25c: Merge remote-tracking branch 'remotes/juanquintela/tags/migration-20211106-pull-request' into staging (2021-11-06 19:43:42 -0400) are available in the Git repository at: g...@gitlab.com:m

[PULL v2 01/11] docs/sphinx: add loaded modules to generated depfile

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- docs/sphinx/depfile.py | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py index 277fdf0f5680..b6fb926

[PULL v2 04/11] tests/qapi-schema/meson: add depfile to sphinx doc

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- tests/qapi-schema/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build index df5acfd08b6b..d91d972af25e 10

[PULL v2 03/11] docs/sphinx: add templates files to generated depfile

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- docs/conf.py | 2 +- docs/sphinx/depfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ff6e92c6e2e6..edc2bf8fc

[PULL v2 02/11] docs/sphinx: add static files to generated depfile

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- docs/sphinx/depfile.py | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py index b6fb926df11d..99539adb4892 100644 --- a/docs/sph

Re: [PATCH 1/4] configure: simplify calls to meson_quote

2021-11-08 Thread Thomas Huth
On 08/11/2021 09.43, Paolo Bonzini wrote: meson_quote assumes a non-empty argument list, and incorrectly returns a one-entry array if passed nothing. Move the check for an empty argument list from the invocations to the function itself. Signed-off-by: Paolo Bonzini --- configure | 9 +---

[PULL v2 07/11] docs/sphinx: set navigation_with_keys=True

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Allow navigating to the previous/next page using the keyboard's left and right arrows. I wish this would be the default, and that the themes would provide more key navigation, but that doesn't seem on the roadmap. Signed-off-by: Marc-André Lureau Reviewed-by: John Snow

[PULL v2 05/11] meson: drop sphinx_extn_depends

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Module dependencies is now handled by depfile.py. Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- docs/meson.build | 9 + tests/qapi-schema/meson.build | 1 - 2 files changed, 1 insertion(+), 9 deletions(-)

[PULL v2 06/11] meson: drop sphinx_template_files

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau Static files dependencies is now handled by depfile.py. Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- docs/meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index 34fda6853d9e

[PULL v2 08/11] docs/sphinx: add 's' keyboard binding to focus search

2021-11-08 Thread marcandre . lureau
From: Marc-André Lureau This is pretty ubiquitous. ('/' is already taken by some browsers for quick search) Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- docs/conf.py | 4 docs/sphinx-static/custom.js | 9 + 2 files change

[PULL v2 09/11] docs: remove non-reference uses of single backticks

2021-11-08 Thread marcandre . lureau
From: John Snow The single backtick markup in ReST is the "default role". Currently, Sphinx's default role is called "content". Sphinx suggests you can use the "Any" role instead to turn any single-backtick enclosed item into a cross-reference. This is useful for things like autodoc for Python d

[PULL v2 10/11] docs: (further) remove non-reference uses of single backticks

2021-11-08 Thread marcandre . lureau
From: John Snow The series rotted already. Here's the new changes. Signed-off-by: John Snow Reviewed-by: Damien Hedde [ extra backticks fixes ] Signed-off-by: Marc-André Lureau Message-Id: <20211004215238.1523082-3-js...@redhat.com> --- docs/devel/build-system.rst | 16 docs

Re: [PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status

2021-11-08 Thread Thomas Huth
On 08/11/2021 09.43, Paolo Bonzini wrote: CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include -L or -I options), so they should be kept from the invocation of configure to the subsequent reinvocations via config.status. Signed-off-by: Paolo Bonzini --- configure | 3

Re: [PATCH 3/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

2021-11-08 Thread Thomas Huth
On 08/11/2021 09.43, Paolo Bonzini wrote: Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links tests, as they are supposed to be independent of the specific sets of compilation flags used to build the programs. However, the user can still use CFLAGS or the toolchain file's LANG

[PULL v2 11/11] docs/sphinx: change default role to "any"

2021-11-08 Thread marcandre . lureau
From: John Snow This interprets single-backtick syntax in all of our Sphinx docs as a cross-reference to *something*, including Python symbols. >From here on out, new uses of `backticks` will cause a build failure if the target cannot be referenced. Signed-off-by: John Snow Reviewed-by: Eduard

Re: [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars

2021-11-08 Thread Thomas Huth
On 08/11/2021 09.43, Paolo Bonzini wrote: User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS, or --extra-cflags/extra-cxxflags/--extra-ldflags on the command line. QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved for flags detected by configure, so do not add to them and clear them

Re: [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 09:43, Paolo Bonzini wrote: > User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS, > or --extra-cflags/extra-cxxflags/--extra-ldflags on the > command line. > > QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved > for flags detected by configure, so do not add to them > and cl

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote: > +Thomas & Daniel for Travis-CI > > On 11/8/21 09:12, Mark Cave-Ayland wrote: > > On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote: > >> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote: > >>> On 11/5/21 18:13, Richard Henders

Re: [PATCH v2 1/2] tests/acceptance: introduce new check-avocado tartget

2021-11-08 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 08:59:51AM +0100, Thomas Huth wrote: > On 05/11/2021 16.53, Willian Rampazzo wrote: > > This introduces a new `make` target, `check-avocado`, and adds a > > deprecation message about the `check-acceptance` target. This is > > a preparation for renaming the `tests/acceptance`

Re: [PATCH 09/13] target/riscv: Adjust vector address with ol

2021-11-08 Thread LIU Zhiwei
On 2021/11/1 下午7:35, Richard Henderson wrote: On 11/1/21 6:01 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei ---   target/riscv/insn_trans/trans_rvv.c.inc |  8   target/riscv/internals.h    |  1 +   target/riscv/vector_helper.c    | 54 +   3 fi

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Gerd Hoffmann
> > >> +#ifdef CONFIG_GBM > > >>   if (vc->gfx.guest_fb.dmabuf) { > > >>   egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf); > > >>   gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf); > > >>   } > > >> +#endif > I don't know what Mark sees a problem on

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 10:22, Daniel P. Berrangé wrote: > On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote: >> +Thomas & Daniel for Travis-CI >> >> On 11/8/21 09:12, Mark Cave-Ayland wrote: >>> On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote: On 11/5/21 19:26, Philippe Mathieu-Daud

Re: [PATCH 10/13] target/riscv: Adjust scalar reg in vector with ol

2021-11-08 Thread LIU Zhiwei
On 2021/11/2 上午12:33, Richard Henderson wrote: On 11/1/21 6:01 AM, LIU Zhiwei wrote: @@ -2677,6 +2677,7 @@ static bool trans_vmv_s_x(DisasContext *s, arg_vmv_s_x *a)   /* This instruction ignores LMUL and vector register groups */   int maxsz = s->vlen >> 3;   TCGv_i64

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Mark Cave-Ayland
On 08/11/2021 09:22, Daniel P. Berrangé wrote: On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote: +Thomas & Daniel for Travis-CI On 11/8/21 09:12, Mark Cave-Ayland wrote: On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote: On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:

[PATCH] vhost-user-scsi: fix Kconfig dependencies

2021-11-08 Thread Paolo Bonzini
VIRTIO_PCI is a hard dependency for CONFIG_VHOST_USER_SCSI; if virtio-pci is not included, linking fails due to missing virtio_pci_types_register. Adjust the Kconfig dependencies. Signed-off-by: Paolo Bonzini --- hw/scsi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

Re: [PULL 0/6] Egl 20211105 patches

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 10:41, Mark Cave-Ayland wrote: > On 08/11/2021 09:22, Daniel P. Berrangé wrote: > >> On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote: >>> +Thomas & Daniel for Travis-CI >>> >>> On 11/8/21 09:12, Mark Cave-Ayland wrote: On 05/11/2021 18:49, Philippe Mathieu-Da

Re: [PATCH v2 1/2] tests/acceptance: introduce new check-avocado tartget

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 10:24, Daniel P. Berrangé wrote: > On Mon, Nov 08, 2021 at 08:59:51AM +0100, Thomas Huth wrote: >> On 05/11/2021 16.53, Willian Rampazzo wrote: >>> This introduces a new `make` target, `check-avocado`, and adds a >>> deprecation message about the `check-acceptance` target. This is >>> a

Re: [PATCH] vhost-user-scsi: fix Kconfig dependencies

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 10:47, Paolo Bonzini wrote: > VIRTIO_PCI is a hard dependency for CONFIG_VHOST_USER_SCSI; if virtio-pci > is not included, linking fails due to missing virtio_pci_types_register. > Adjust the Kconfig dependencies. > > Signed-off-by: Paolo Bonzini > --- > hw/scsi/Kconfig | 4 ++-- > 1

Re: [PATCH 5/7] block: Pass BdrvChild ** to replace_child_noperm

2021-11-08 Thread Hanna Reitz
On 05.11.21 16:15, Kevin Wolf wrote: Am 04.11.2021 um 11:38 hat Hanna Reitz geschrieben: bdrv_replace_child_noperm() modifies BdrvChild.bs, and can potentially set it to NULL. That is dangerous, because BDS parents generally assume that their children's .bs pointer is never NULL. We therefore

Re: [PATCH 6/7] block: Let replace_child_noperm free children

2021-11-08 Thread Hanna Reitz
On 05.11.21 16:41, Kevin Wolf wrote: Am 04.11.2021 um 11:38 hat Hanna Reitz geschrieben: In most of the block layer, especially when traversing down from other BlockDriverStates, we assume that BdrvChild.bs can never be NULL. When it becomes NULL, it is expected that the corresponding BdrvChild

Re: Artificially target-dependend compiles

2021-11-08 Thread Paolo Bonzini
On 11/8/21 09:09, Markus Armbruster wrote: Simply not poisoning the CONFIG_FOO when the FOO code is actually target-independent avoids the target-dependency, but also messes up introspection: new the FOO stuff is present for all targets when*any* of them has it. This cure feels worse than the d

Re: [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars

2021-11-08 Thread Paolo Bonzini
On 11/8/21 10:17, Philippe Mathieu-Daudé wrote: -QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" +QEMU_CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2021-11-08 Thread Stefan Hajnoczi
On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > these patches add the support for configure interrupt > > These codes are all tested in vp-vdpa (support configure interrupt) > vdpa_sim (not support configure interrupt), virtio tap device > > test in virtio-pci bus and virtio-mmio bus

Re: [PATCH] vhost-user-scsi: fix Kconfig dependencies

2021-11-08 Thread Paolo Bonzini
On 11/8/21 10:53, Philippe Mathieu-Daudé wrote: config VHOST_USER_SCSI bool +default y # Only PCI devices are provided for now -default y if VIRTIO_PCI -depends on VIRTIO && VHOST_USER && LINUX +depends on VIRTIO_PCI && VHOST_USER && LINUX But there is no PCI call t

Re: [PATCH 3/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

2021-11-08 Thread Paolo Bonzini
On 11/8/21 10:11, Thomas Huth wrote: +    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $optarg" I'd rather drop that EXTRA_CXXFLAGS line here - I think that calls for trouble otherwise if a user is trying to add a C compiler option that is not supported in C++ mode. If the users have some options that nee

Re: [PATCH 11/13] target/riscv: Switch context in exception return

2021-11-08 Thread LIU Zhiwei
On 2021/11/2 上午12:43, Richard Henderson wrote: On 11/1/21 6:01 AM, LIU Zhiwei wrote: After excpetion return, we should give a xlen view of context in new priveledge, including the general registers, pc, and CSRs. Signed-off-by: LIU Zhiwei ---   target/riscv/helper.h |

[PATCH v3 0/2] accel/tcg: Fix monitor deadlock

2021-11-08 Thread Greg Kurz
Commit 7bed89958bfb ("device_core: use drain_call_rcu in in qmp_device_add") introduced a regression in QEMU 6.0 : passing device_add without argument hangs the monitor. This was reported against qemu-system-mips64 with TGC, but I could consistently reproduce it with other targets (x86 and ppc64).

[PATCH v3 2/2] accel/tcg: Register a force_rcu notifier

2021-11-08 Thread Greg Kurz
A TCG vCPU doing a busy loop systematicaly hangs the QEMU monitor if the user passes 'device_add' without argument. This is because drain_cpu_all() which is called from qmp_device_add() cannot return if readers don't exit read-side critical sections. That is typically what busy-looping TCG vCPUs do

[PATCH v3 1/2] rcu: Introduce force_rcu notifier

2021-11-08 Thread Greg Kurz
The drain_rcu_call() function can be blocked as long as an RCU reader stays in a read-side critical section. This is typically what happens when a TCG vCPU is executing a busy loop. It can deadlock the QEMU monitor as reported in https://gitlab.com/qemu-project/qemu/-/issues/650 . This can be avoi

Re: [PATCH v2 1/2] tests/acceptance: introduce new check-avocado tartget

2021-11-08 Thread Willian Rampazzo
On Mon, Nov 8, 2021 at 6:49 AM Philippe Mathieu-Daudé wrote: > > On 11/8/21 10:24, Daniel P. Berrangé wrote: > > On Mon, Nov 08, 2021 at 08:59:51AM +0100, Thomas Huth wrote: > >> On 05/11/2021 16.53, Willian Rampazzo wrote: > >>> This introduces a new `make` target, `check-avocado`, and adds a > >

Re: [PATCH] tests/avocado: Remove p7zip binary availability check

2021-11-08 Thread Joaquin de Andres
On 11/6/21 10:10, Philippe Mathieu-Daudé wrote: The single use of the 7z binary has been removed in commit a30e114f3 ("tests/acceptance: remove Armbian 19.11.3 test for orangepi-pc"), we don't need to check for this binary availability anymore. Signed-off-by: Philippe Mathieu-Daudé --- Based-on

Re: [PATCH] docs/about/deprecated: Remove empty 'related binaries' section

2021-11-08 Thread Joaquin de Andres
On 11/5/21 15:26, Philippe Mathieu-Daudé wrote: Commit 497a30dbb06 ("qemu-img: Require -F with -b backing image") removed the content of the "Related binaries" section but forgot to remove the section title. Since it is now empty, remove it too. Signed-off-by: Philippe Mathieu-Daudé --- docs/

Re: [PATCH v3 03/12] vfio-user: define vfio-user-server object

2021-11-08 Thread Kevin Wolf
Am 06.11.2021 um 07:34 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 05.11.2021 um 11:08 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 04.11.2021 um 13:13 hat Markus Armbruster geschrieben: > >> >> The old syntax almost always has its quirks. Idea

Re: [PATCH 13/13] target/riscv: Enable uxl field write

2021-11-08 Thread LIU Zhiwei
On 2021/11/2 上午1:01, Richard Henderson wrote: On 11/1/21 6:01 AM, LIU Zhiwei wrote:   mask |= MSTATUS_MPV | MSTATUS_GVA; +    if ((val ^ mstatus) & MSTATUS64_UXL) { +    mask |= MSTATUS64_UXL; +    } Why do you need the conditional here? Why is this not just     mask

Re: [PATCH] tests/avocado: Remove p7zip binary availability check

2021-11-08 Thread Willian Rampazzo
On Sat, Nov 6, 2021 at 3:14 PM Philippe Mathieu-Daudé wrote: > > The single use of the 7z binary has been removed in commit a30e114f3 > ("tests/acceptance: remove Armbian 19.11.3 test for orangepi-pc"), > we don't need to check for this binary availability anymore. > > Signed-off-by: Philippe Math

Re: [PATCH v3 03/12] vfio-user: define vfio-user-server object

2021-11-08 Thread Peter Krempa
On Mon, Nov 08, 2021 at 13:05:10 +0100, Kevin Wolf wrote: > Am 06.11.2021 um 07:34 hat Markus Armbruster geschrieben: > > Kevin Wolf writes: > > > Am 05.11.2021 um 11:08 hat Markus Armbruster geschrieben: > > >> Kevin Wolf writes: > > >> > Am 04.11.2021 um 13:13 hat Markus Armbruster geschrieben:

Re: [PATCH] audio: Add sndio backend

2021-11-08 Thread Christian Schoenebeck
On Sonntag, 7. November 2021 06:19:26 CET Brad Smith wrote: > audio: Add sndio backend > > Add a sndio backend. Hi Brad! > sndio is the native API used by OpenBSD, although it has been ported to > other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). > > The C code is from Ale

[PATCH 0/2] microvm: fix Coverity warnings

2021-11-08 Thread Gerd Hoffmann
Gerd Hoffmann (2): microvm: add missing g_free() call microvm: check g_file_set_contents() return value hw/i386/microvm-dt.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.31.1

[PATCH 1/2] microvm: add missing g_free() call

2021-11-08 Thread Gerd Hoffmann
Fixes: CID 1465240 Signed-off-by: Gerd Hoffmann --- hw/i386/microvm-dt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c index 875ba9196394..ad4e48e5fe60 100644 --- a/hw/i386/microvm-dt.c +++ b/hw/i386/microvm-dt.c @@ -143,6 +143,8 @@ static void

[PATCH 2/2] microvm: check g_file_set_contents() return value

2021-11-08 Thread Gerd Hoffmann
Fixes: CID 1465239 Signed-off-by: Gerd Hoffmann --- hw/i386/microvm-dt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c index ad4e48e5fe60..774e0bc7fef3 100644 --- a/hw/i386/microvm-dt.c +++ b/hw/i386/microvm-dt.c @@ -334,7 +334

[PATCH] hw/acpi: Set memory regions to native endian as a work around

2021-11-08 Thread BALATON Zoltan
When using ACPI on big endian machine (such as ppc/pegasos2 which has a VT8231 south bridge with ACPI) writes to ACPI registers come out byte swapped. This may be caused by a bug in memory subsystem but until that is fixed setting the ACPI memory regions to native endian makes it usable for big end

Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around

2021-11-08 Thread Michael S. Tsirkin
On Mon, Nov 08, 2021 at 02:05:42PM +0100, BALATON Zoltan wrote: > When using ACPI on big endian machine (such as ppc/pegasos2 which has > a VT8231 south bridge with ACPI) writes to ACPI registers come out > byte swapped. This may be caused by a bug in memory subsystem but > until that is fixed sett

[PATCH v2 5/6] target/i386/sev: Perform padding calculations at compile-time

2021-11-08 Thread Dov Murik
In sev_add_kernel_loader_hashes, the sizes of structs are known at compile-time, so calculate needed padding at compile-time. No functional change intended. Signed-off-by: Dov Murik Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé --- target/i386/sev.c | 28

[PATCH v2 4/6] target/i386/sev: Fail when invalid hashes table area detected

2021-11-08 Thread Dov Murik
Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot", 2021-09-30) introduced measured direct boot with -kernel, using an OVMF-designated hashes table which QEMU fills. However, no checks are performed on the validity of the hashes area designated by OVMF.

[PATCH v2 1/6] qapi/qom, target/i386: sev-guest: Introduce kernel-hashes=on|off option

2021-11-08 Thread Dov Murik
Introduce new boolean 'kernel-hashes' option on the sev-guest object. It will be used to to decide whether to add the hashes of kernel/initrd/cmdline to SEV guest memory when booting with -kernel. The default value is 'off'. Signed-off-by: Dov Murik --- qapi/qom.json | 7 ++- target/i38

[PATCH v2 3/6] target/i386/sev: Rephrase error message when no hashes table in guest firmware

2021-11-08 Thread Dov Murik
Signed-off-by: Dov Murik --- target/i386/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index e3abbeef68..c71d23654f 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -1232,7 +1232,8 @@ bool sev_add_kernel_loader_hashes(Se

[PATCH v2 6/6] target/i386/sev: Replace qemu_map_ram_ptr with address_space_map

2021-11-08 Thread Dov Murik
Use address_space_map/unmap and check for errors. Signed-off-by: Dov Murik --- target/i386/sev.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 2e3a6e8ff8..12f28e878c 100644 --- a/target/i386/sev.c +++ b/target/i3

[PATCH v2 2/6] target/i386/sev: Add kernel hashes only if sev-guest.kernel-hashes=on

2021-11-08 Thread Dov Murik
Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot", 2021-09-30) introduced measured direct boot with -kernel, using an OVMF-designated hashes table which QEMU fills. However, if OVMF doesn't designate such an area, QEMU would completely abort the VM lau

[PATCH v2 0/6] SEV: add kernel-hashes=on for measured -kernel launch

2021-11-08 Thread Dov Murik
Tom Lendacky and Brijesh Singh reported two issues with launching SEV guests with the -kernel QEMU option when an old [1] or wrongly configured [2] OVMF images are used. To fix these issues, these series "hides" the whole kernel hashes additions behind a kernel-hashes=on option (with default value

Re: [PATCH v2 3/6] target/i386/sev: Rephrase error message when no hashes table in guest firmware

2021-11-08 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:37PM +, Dov Murik wrote: > Signed-off-by: Dov Murik > --- > target/i386/sev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/i386/sev.c b/target/i386/sev.c > index e3abbeef68..c71d23654f 100644 > --- a/target/i386/sev.c > +++ b

Re: [PATCH 12/15] hw/nvme: Initialize capability structures for primary/secondary controllers

2021-11-08 Thread Łukasz Gieryk
On Mon, Nov 08, 2021 at 09:25:58AM +0100, Klaus Jensen wrote: > On Nov 5 15:04, Łukasz Gieryk wrote: > > On Fri, Nov 05, 2021 at 09:46:28AM +0100, Łukasz Gieryk wrote: > > > On Thu, Nov 04, 2021 at 04:48:43PM +0100, Łukasz Gieryk wrote: > > > > On Wed, Nov 03, 2021 at 01:07:31PM +0100, Klaus Jense

Re: [PATCH] spapr_numa.c: FORM2 table handle nodes with no distance info

2021-11-08 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of November 8, 2021 2:22 pm: > Daniel Henrique Barboza writes: > >> On 11/5/21 10:51, Nicholas Piggin wrote: >>> A configuration that specifies multiple nodes without distance info >>> results in the non-local points in the FORM2 matrix having a distance o

Re: [PATCH v4 00/10] target/arm: Fix insn exception priorities

2021-11-08 Thread Peter Maydell
On Wed, 3 Nov 2021 at 04:04, Richard Henderson wrote: > > Raise pc alignment faults. > Fix single-step and pc-align priority over breakpoints. > Not yet fixing insn abort priority over breakpoints. Do you have a view on whether we should put this into 6.2 or hold it for 7.0 ? -- PMM

Re: Qemu and ARM secure state.

2021-11-08 Thread Alex Bennée
Jean-Christophe DUBOIS writes: > One small question/remark: > > According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) > document (chapter 5) PSCI calls can only be issued by > "normal world" (EL1 or EL2). Therefore, should we be adding a test for the > current secure state

Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around

2021-11-08 Thread Paolo Bonzini
On 11/8/21 14:05, BALATON Zoltan wrote: When using ACPI on big endian machine (such as ppc/pegasos2 which has a VT8231 south bridge with ACPI) writes to ACPI registers come out byte swapped. This may be caused by a bug in memory subsystem but until that is fixed setting the ACPI memory regions to

[PULL 06/10] configure: simplify calls to meson_quote

2021-11-08 Thread Paolo Bonzini
meson_quote assumes a non-empty argument list, and incorrectly returns a one-entry array if passed nothing. Move the check for an empty argument list from the invocations to the function itself. Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 9 + 1 file changed,

[PULL 02/10] target-i386: mmu: fix handling of noncanonical virtual addresses

2021-11-08 Thread Paolo Bonzini
mmu_translate is supposed to return an error code for page faults; it is not able to handle other exceptions. The #GP case for noncanonical virtual addresses is not handled correctly, and incorrectly raised as a page fault with error code 1. Since it cannot happen for nested page tables, move it

[PULL 00/10] Misc QEMU bugfixes for 6.2 hard freeze

2021-11-08 Thread Paolo Bonzini
The following changes since commit 63ed851de474b1e2458cb9b4ba6e02a88f72c25c: Merge remote-tracking branch 'remotes/juanquintela/tags/migration-20211106-pull-request' into staging (2021-11-06 19:43:42 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/fo

[PULL 01/10] target-i386: mmu: use pg_mode instead of HF_LMA_MASK

2021-11-08 Thread Paolo Bonzini
Correctly look up the paging mode of the hypervisor when it is using 64-bit mode but the guest is not. Fixes: 68746930ae ("target/i386: use mmu_translate for NPT walk", 2021-05-11) Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/excp_helper.c | 4 ++-- 1 file c

[PULL 03/10] hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands

2021-11-08 Thread Paolo Bonzini
From: Mauro Matteo Cascella This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-sta...@nongnu.org Reported-by: Alexander Bulekov Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pages in a table") Fixes: #546 Report

[PULL 07/10] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status

2021-11-08 Thread Paolo Bonzini
CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include -L or -I options), so they should be kept from the invocation of configure to the subsequent reinvocations via config.status. Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 3 +++ 1 file changed

[PULL 10/10] ui/gtk-egl: Fix build failure when libgbm is not available

2021-11-08 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl") we get on Ubuntu 18.04.4 LTS and Debian Buster (oldstable): $ ../configure --enable-virglrenderer [...] ui/gtk-egl.c: In function 'gd_egl_refresh': ui/gt

[PULL 04/10] meson: perform snappy test with the C++ compiler if used

2021-11-08 Thread Paolo Bonzini
Snappy is written in C++ and as such needs to link against libstdc++. When linking statically, this means that the compile test cannot succeed unless performed with a C++ compiler. Do so if link_language is set to C++; if it is C, the test will usually fail and snappy will be disabled. Signed-of

[PULL 09/10] configure: ignore preexisting QEMU_*FLAGS envvars

2021-11-08 Thread Paolo Bonzini
User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS, or --extra-cflags/extra-cxxflags/--extra-ldflags on the command line. QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved for flags detected by configure, so do not add to them and clear them at the beginning of the script. Reviewed-by

Re: [PATCH 1/2] microvm: add missing g_free() call

2021-11-08 Thread Philippe Mathieu-Daudé
On 11/8/21 14:07, Gerd Hoffmann wrote: > Fixes: CID 1465240 > Signed-off-by: Gerd Hoffmann > --- > hw/i386/microvm-dt.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

[PULL 08/10] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

2021-11-08 Thread Paolo Bonzini
Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links tests, as they are supposed to be independent of the specific sets of compilation flags used to build the programs. However, the user can still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option to specify -I or

[PULL 05/10] docs: adjust for demise of scripts/create_config

2021-11-08 Thread Paolo Bonzini
The config-host.h, $TARGET_NAME-config-target.h, $TARGET_NAME-config-devices.h files are now generated by configure_file() rather than scripts/create_config. Adjust he relevant paragraph in docs/devel/build-system.rst, and take the occasion to fix a preexisting confusion of *.h vs *.mak. Reported

Re: [PATCH v2 3/6] target/i386/sev: Rephrase error message when no hashes table in guest firmware

2021-11-08 Thread Dov Murik
On 08/11/2021 15:53, Daniel P. Berrangé wrote: > On Mon, Nov 08, 2021 at 01:48:37PM +, Dov Murik wrote: >> Signed-off-by: Dov Murik >> --- >> target/i386/sev.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/target/i386/sev.c b/target/i386/sev.c >> index e3abb

  1   2   3   >