[PATCH] tests/avocado: fix replay-linux test

2022-08-02 Thread Pavel Dovgalyuk
Last line of the test is missing by accident. This patch fixes the script. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py |1 + 1 file changed, 1 insertion(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 40e4f6908e..e1f9981a34 100644 ---

Re: [PATCH] hw/nvme: Add helper functions for qid-db conversion

2022-08-02 Thread Klaus Jensen
On Aug 2 10:54, Klaus Jensen wrote: > On Aug 2 16:31, Jinhao Fan wrote: > > at 2:02 PM, Klaus Jensen wrote: > > > > > On Jul 28 16:07, Jinhao Fan wrote: > > >> With the introduction of shadow doorbell and ioeventfd, we need to do > > >> frequent conversion between qid and its doorbell offset. T

Re: [PATCH v1 00/40] TDX QEMU support

2022-08-02 Thread Xiaoyao Li
On 8/2/2022 5:49 PM, Daniel P. Berrangé wrote: On Tue, Aug 02, 2022 at 03:47:10PM +0800, Xiaoyao Li wrote: - CPU model We cannot create a TD with arbitrary CPU model like what for non-TDX VMs, because only a subset of features can be configured for TD. - It's recommended to use '

Re: [PATCH v4 1/1] monitor: Support specified vCPU registers

2022-08-02 Thread Darren Kenny
This looks good to me... On Tuesday, 2022-08-02 at 15:37:20 +08, zhenwei pi wrote: > Originally we have to get all the vCPU registers and parse the > specified one. To improve the performance of this usage, allow user > specified vCPU id to query registers. > > Run a VM with 16 vCPU, use bcc tool

Re: [PATCH v2 06/15] qapi: move QEMU-specific dispatch code in monitor

2022-08-02 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Make QMP-dispatch code free from QEMU-specific OOB dispatch/async > coroutine handling. This will allow to move the base code to > qemu-common, and clear other users from potential mis-ususe (QGA doesn't > have OOB or coroutine).

Re: [PATCH v2 06/15] qapi: move QEMU-specific dispatch code in monitor

2022-08-02 Thread Marc-André Lureau
Hi On Tue, Aug 2, 2022 at 3:04 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Make QMP-dispatch code free from QEMU-specific OOB dispatch/async > > coroutine handling. This will allow to move the base code to > > qemu-common, and clear ot

[PATCH 2/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Eugenio Pérez
Few steps allocate new resources, and all of the allocated can be checked to avoid trying to free an invalid one. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 303447a68e..ac18

[PATCH 0/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Eugenio Pérez
Few steps allocate new resources, and all of the allocated can be checked to avoid trying to free an invalid one. This series includes an already posted patch [1], because it must be applied on top of that. [1] https://lists.nongnu.org/archive/html/qemu-devel/2022-08/msg00089.html Eugenio Pérez

[PATCH 1/2] vdpa: Fix file descriptor leak on get features error

2022-08-02 Thread Eugenio Pérez
File descriptor vdpa_device_fd is not free in the case of returning error from vhost_vdpa_get_features. Fixing it by making all errors go to the same error path. Resolves: Coverity CID 1490785 Fixes: 8170ab3f43 ("vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs") Signed-off-by

Re: [PATCH] docs/about/removed-features: Move the -soundhw into the right section

2022-08-02 Thread Christian Schoenebeck
On Dienstag, 2. August 2022 09:56:11 CEST Thomas Huth wrote: > The note about the removal of '-soundhw' has been accidentally added > to the section of removed "linux-user mode CPUs" ... it should reside > in the section about removed "System emulator command line arguments" > instead. > > Fixes:

Re: [PATCH v4 2/4] util/qemu-sockets: Enable unix socket support on Windows

2022-08-02 Thread Marc-André Lureau
On Tue, Aug 2, 2022 at 12:39 PM Bin Meng wrote: > From: Bin Meng > > Support for the unix socket has existed both in BSD and Linux for the > longest time, but not on Windows. Since Windows 10 build 17063 [1], > the native support for the unix socket has come to Windows. Starting > this build, tw

Re: [PATCH v4 4/4] tests/unit: Update test-io-channel-socket.c for Windows

2022-08-02 Thread Marc-André Lureau
Hi On Tue, Aug 2, 2022 at 1:21 PM Bin Meng wrote: > From: Bin Meng > > Change to dynamically include the test cases by checking AF_UNIX > availability using a new helper socket_check_afunix_support(). > With such changes testing on a Windows host can be covered as well. > > Signed-off-by: Bin M

Re: Guest reboot issues since QEMU 6.0 and Linux 5.11

2022-08-02 Thread Fiona Ebner
Am 28.07.22 um 12:13 schrieb Yan Vugenfirer: > Hi Fabian, > > Can you save the dump file with QEMU monitor using dump-guest-memory or with > virsh dump? > Then you can use elf2dmp (compiled with QEMU and is found in “contrib” > folder) to covert the dump file to WinDbg format and examine the sta

Re: [PATCH 1/2] vdpa: Fix file descriptor leak on get features error

2022-08-02 Thread Laurent Vivier
On 02/08/2022 13:24, Eugenio Pérez wrote: File descriptor vdpa_device_fd is not free in the case of returning error from vhost_vdpa_get_features. Fixing it by making all errors go to the same error path. Resolves: Coverity CID 1490785 Fixes: 8170ab3f43 ("vdpa: Extract get features part from vho

Re: [PATCH 2/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Laurent Vivier
On 02/08/2022 13:24, Eugenio Pérez wrote: Few steps allocate new resources, and all of the allocated can be checked to avoid trying to free an invalid one. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/vhost-vd

Re: [PATCH v2 06/15] qapi: move QEMU-specific dispatch code in monitor

2022-08-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Aug 2, 2022 at 3:04 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Make QMP-dispatch code free from QEMU-specific OOB dispatch/async >> > coroutine handling. This will allow to move the ba

[PATCH] tests/qemu-iotests/264: Allow up to 5s for the BLOCK_JOB_CANCEL event to arrive

2022-08-02 Thread Thomas Huth
It is possible to hit the assertTrue(delta_t < 2.0) on very loaded systems. Increase the value to 5.0 to ease the situation a little bit. Signed-off-by: Thomas Huth --- See also https://lists.gnu.org/archive/html/qemu-devel/2022-07/msg03936.html tests/qemu-iotests/264 | 2 +- 1 file changed, 1

Re: Deadlock between bdrv_drain_all_begin and prepare_mmio_access

2022-08-02 Thread Kevin Wolf
Am 24.07.2022 um 23:41 hat Liang Yan geschrieben: > Hello All, > > I am facing a lock situation between main-loop thread 1 and vcpu thread 4 > when doing a qmp snapshot. QEMU is running on 6.0.x, checked the upstream > code and did not see any big change since between. Guest is a Windows 10 VM. >

Re: [PATCH 1/2] vdpa: Fix file descriptor leak on get features error

2022-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2022 at 02:07:04PM +0200, Laurent Vivier wrote: > On 02/08/2022 13:24, Eugenio Pérez wrote: > > File descriptor vdpa_device_fd is not free in the case of returning > > error from vhost_vdpa_get_features. Fixing it by making all errors go to > > the same error path. > > > > Resolves

Re: [PATCH 2/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2022 at 02:10:43PM +0200, Laurent Vivier wrote: > On 02/08/2022 13:24, Eugenio Pérez wrote: > > Few steps allocate new resources, and all of the allocated can be > > checked to avoid trying to free an invalid one. > > > > Signed-off-by: Eugenio Pérez qemu-trivial too I guess the

Re: [PATCH v2] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Harald Freudenberger
On 2022-07-19 13:43, Jason A. Donenfeld wrote: In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19-rc6. Cc:

Re: [PATCH 2/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Laurent Vivier
On 02/08/2022 14:57, Michael S. Tsirkin wrote: On Tue, Aug 02, 2022 at 02:10:43PM +0200, Laurent Vivier wrote: On 02/08/2022 13:24, Eugenio Pérez wrote: Few steps allocate new resources, and all of the allocated can be checked to avoid trying to free an invalid one. Signed-off-by: Eugenio Pére

Re: [PATCH 2/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2022 at 02:58:36PM +0200, Laurent Vivier wrote: > On 02/08/2022 14:57, Michael S. Tsirkin wrote: > > On Tue, Aug 02, 2022 at 02:10:43PM +0200, Laurent Vivier wrote: > > > On 02/08/2022 13:24, Eugenio Pérez wrote: > > > > Few steps allocate new resources, and all of the allocated can

Re: [PATCH 2/2] vdpa: Merge all net_init_vhost_vdpa error goto

2022-08-02 Thread Eugenio Perez Martin
On Tue, Aug 2, 2022 at 3:10 PM Michael S. Tsirkin wrote: > > On Tue, Aug 02, 2022 at 02:58:36PM +0200, Laurent Vivier wrote: > > On 02/08/2022 14:57, Michael S. Tsirkin wrote: > > > On Tue, Aug 02, 2022 at 02:10:43PM +0200, Laurent Vivier wrote: > > > > On 02/08/2022 13:24, Eugenio Pérez wrote: >

[PATCH for-7.1] hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses

2022-08-02 Thread Peter Maydell
In real hardware, the APB and AHB PNP data tables can be accessed with byte and halfword reads as well as word reads. Our implementation currently only handles word reads. Add support for the 8 and 16 bit accesses. Note that we only need to handle aligned accesses -- unaligned accesses should co

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-02 Thread Jason A. Donenfeld
Hi, On Tue, Aug 02, 2022 at 11:28:15AM +0800, Xiaoyao Li wrote: > > static void pc_q35_7_0_machine_options(MachineClass *m) > > { > > +PCMachineClass *pcmc = PC_MACHINE_CLASS(m); > > pc_q35_7_1_machine_options(m); > > m->alias = NULL; > > +pcmc->legacy_no_rng_seed = true; >

[PATCH] virtio: remove unnecessary host_features in ->get_features()

2022-08-02 Thread Stefan Hajnoczi
Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: move host_features") the ->get_features() function has been called with host_features as an argument. Some devices manually add host_features in ->get_features() although the features argument already contains host_features.

Re: [PATCH v1 1/1] migration: add remaining params->has_* = true in migration_instance_init()

2022-08-02 Thread Dr. David Alan Gilbert
* Leonardo Bras Soares Passos (leob...@redhat.com) wrote: > Please include: > > Fixes: 69ef1f36b0 ("migration: define 'tls-creds' and 'tls-hostname' > migration parameters") > Fixes: 1d58872a91 ("migration: do not wait for free thread") > Fixes: d2f1d29b95 ("migration: add support for a "tls-authz

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Christian Borntraeger
Am 20.07.22 um 14:08 schrieb Jason A. Donenfeld: In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19-rc6.

Re: [PATCH 8/9] scripts/qapi-gen: add -i option

2022-08-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > > On Tue, Jun 21, 2022 at 6:14 PM Markus Armbruster wrote: >> >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Replace hard-coded "qemu/osdep.h" include with a qapi-gen option to >> > specify the headers to include. This will al

[PATCH] virtio: remove unnecessary host_features in ->get_features()

2022-08-02 Thread Stefan Hajnoczi
Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: move host_features") the ->get_features() function has been called with host_features as an argument. Some devices manually add host_features in ->get_features() although the features argument already contains host_features.

Re: [PULL 0/1] riscv-to-apply queue

2022-08-02 Thread Richard Henderson
ailable in the Git repository at: g...@github.com:alistair23/qemu.git tags/pull-riscv-to-apply-20220802 for you to fetch changes up to 1eaa63429a9944265c92efdb94c02fabb231f564: linux-user/riscv: Align signal frame to 16 bytes (2022-08-02 08:5

Re: [PATCH for-7.1] Revert "migration: Simplify unqueue_page()"

2022-08-02 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 02/08/2022 10.47, Dr. David Alan Gilbert wrote: > > * Thomas Huth (th...@redhat.com) wrote: > > > This reverts commit cfd66f30fb0f735df06ff4220e5000290a43dad3. > > > > > > The simplification of unqueue_page() introduced a bug that sometimes > > > breaks

[PULL 4/7] libvduse: Pass positive value to strerror()

2022-08-02 Thread Kevin Wolf
From: Xie Yongji The value passed to strerror() should be positive. So let's fix it. Fixes: Coverity CID 1490226, 1490223 Signed-off-by: Xie Yongji Reviewed-by: Richard Henderson Reviewed-by: Markus Armbruster Message-Id: <20220706095624.328-4-xieyon...@bytedance.com> Signed-off-by: Kevin Wol

[PULL 0/7] Block layer patches

2022-08-02 Thread Kevin Wolf
The following changes since commit 60205b71421cbc529ca60b12c79e0eeace007319: Merge tag 'pull-aspeed-20220801' of https://github.com/legoater/qemu into staging (2022-08-01 13:55:11 -0700) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fe

[PULL 1/7] block/io_uring: add missing include file

2022-08-02 Thread Kevin Wolf
From: Jinhao Fan The commit "Use io_uring_register_ring_fd() to skip fd operations" uses warn_report but did not include the header file "qemu/error-report.h". This causes "error: implicit declaration of function ‘warn_report’". Include this header file. Fixes: e2848bc574 ("Use io_uring_register

[PULL 5/7] hw/block/hd-geometry: Do not override specified bios-chs-trans

2022-08-02 Thread Kevin Wolf
From: Lev Kujawski For small disk images (<4 GiB), QEMU and SeaBIOS default to the LARGE/ECHS disk translation method, but it is not uncommon for other BIOS software to use LBA in these cases as well. Some operating system boot loaders (e.g., NT 4) do not handle LARGE translations outside of fix

[PULL 2/7] libvduse: Fix the incorrect function name

2022-08-02 Thread Kevin Wolf
From: Xie Yongji In vduse_name_is_valid(), we actually check whether the name is invalid or not. So let's change the function name to vduse_name_is_invalid() to match the behavior. Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster Message-Id: <20220706095624.328-2-xieyon...@bytedance.co

[PULL 3/7] libvduse: Replace strcpy() with strncpy()

2022-08-02 Thread Kevin Wolf
From: Xie Yongji Coverity reported a string overflow issue since we copied "name" to "dev_config->name" without checking the length. This should be a false positive since we already checked the length of "name" in vduse_name_is_invalid(). But anyway, let's replace strcpy() with strncpy() (as a ge

[PULL 6/7] qemu-iotests: Discard stderr when probing devices

2022-08-02 Thread Kevin Wolf
From: Cole Robinson qemu-iotests fails in the following setup: ./configure --enable-modules --enable-smartcard \ --target-list=x86_64-softmmu,s390x-softmmu make cd build QEMU_PROG=`pwd`/s390x-softmmu/qemu-system-s390x \ ../tests/check-block.sh qcow2 ... --- /home/crobinso

[PULL 7/7] main loop: add missing documentation links to GS/IO macros

2022-08-02 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE definition, we just find that they "mark and check that the function is part of the {category} API". However, ther is no definition on what {category} API is, they are in include/block/block-*.h Ther

[PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-02 Thread Thomas Huth
The XHCI code could enter an endless loop in case the guest points QEMU to fetch TRBs from invalid memory areas. Fix it by properly checking the return value of dma_memory_read(). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/646 Signed-off-by: Thomas Huth --- hw/usb/hcd-xhci.c | 17 ++

Re: [PATCH v7 05/14] qapi: net: add stream and dgram netdevs

2022-08-02 Thread Markus Armbruster
Laurent Vivier writes: > On 02/08/2022 10:37, Markus Armbruster wrote: >> Laurent Vivier writes: >> > ... >>> diff --git a/qemu-options.hx b/qemu-options.hx >>> index 79e00916a11f..170117e1adf0 100644 >>> --- a/qemu-options.hx >>> +++ b/qemu-options.hx >>> @@ -2726,6 +2726,18 @@ DEF("netdev", H

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread David Hildenbrand
On 02.08.22 15:26, Christian Borntraeger wrote: > > > Am 20.07.22 um 14:08 schrieb Jason A. Donenfeld: >> In order for hosts running inside of TCG to initialize the kernel's >> random number generator, we should support the PRNO_TRNG instruction, >> backed in the usual way with the qemu_guest_get

Re: [PATCH] virtiofsd: Disable killpriv_v2 by default

2022-08-02 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > We are having bunch of issues with killpriv_v2 enabled by default. First > of all it relies on clearing suid/sgid bits as needed by dropping > capability CAP_FSETID. This does not work for remote filesystems like > NFS (and possibly others). > > Secondly

Re: [PATCH 0/2] migration: fix coverity nits

2022-08-02 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 21 Jul 2022 at 12:52, Peter Maydell wrote: > > > > This patchset fixes four Coverity nits in the migration code. > > The first patch is just adding an assert() to clue coverity in > > that an array index must be in-bounds. The second adds

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-02 Thread Peter Maydell
On Tue, 2 Aug 2022 at 14:53, Thomas Huth wrote: > > The XHCI code could enter an endless loop in case the guest points > QEMU to fetch TRBs from invalid memory areas. Fix it by properly > checking the return value of dma_memory_read(). It certainly makes sense to check the return value from dma_m

Re: [PATCH] target/mips: Advance pc after semihosting exception

2022-08-02 Thread Richard Henderson
On 8/1/22 23:48, Philippe Mathieu-Daudé wrote: Hi Richard, On 30/7/22 04:18, Richard Henderson wrote: Delay generating the exception until after we know the insn length, and record that length in env->error_code. Fixes: 8ec7e3c53d4 ("target/mips: Use an exception for semihosting") Resolves: ht

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-08-02 Thread Cédric Le Goater
On 7/31/22 00:06, Peter Delevoryas wrote: On Sat, Jul 30, 2022 at 11:18:33PM +0200, Cédric Le Goater wrote: On 7/29/22 19:30, Peter Delevoryas wrote: On Fri, Jul 29, 2022 at 03:25:55PM +0200, Cédric Le Goater wrote: Hello Iris, On 7/29/22 01:23, Iris Chen wrote: Hey everyone, I have been wo

Re: [PATCH] target/mips: Advance pc after semihosting exception

2022-08-02 Thread Philippe Mathieu-Daudé via
On Tue, Aug 2, 2022 at 4:11 PM Richard Henderson wrote: > On 8/1/22 23:48, Philippe Mathieu-Daudé wrote: > > Hi Richard, > > > > On 30/7/22 04:18, Richard Henderson wrote: > >> Delay generating the exception until after we know the > >> insn length, and record that length in env->error_code. > >>

Re: [PATCH] tests/avocado: fix replay-linux test

2022-08-02 Thread Philippe Mathieu-Daudé via
On Tue, Aug 2, 2022 at 12:46 PM Pavel Dovgalyuk wrote: > > Last line of the test is missing by accident. > This patch fixes the script. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/avocado/replay_linux.py |1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH for-7.1] hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses

2022-08-02 Thread Peter Maydell
On Tue, 2 Aug 2022 at 15:20, Konrad, Frederic wrote: > > Hi Peter, > > CC'ing Philippe. > > > -Original Message- > > From: Qemu-devel > bounces+fkonrad=amd@nongnu.org> On Behalf Of Peter Maydell > > Sent: 02 August 2022 14:19 > > To: qemu-devel@nongnu.org > > Cc: Fabien Chouteau ; Fre

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Christian Borntraeger
Am 02.08.22 um 15:54 schrieb David Hildenbrand: On 02.08.22 15:26, Christian Borntraeger wrote: Am 20.07.22 um 14:08 schrieb Jason A. Donenfeld: In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed

[PATCH] vdpa: do not save failed dma maps in SVQ iova tree

2022-08-02 Thread Eugenio Pérez
If a map fails for whatever reason, it must not be saved in the tree. Otherwise, qemu will try to unmap it in cleanup, leaving to more errors. Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ") Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 20 +--- 1 fil

Re: [PATCH] vdpa: do not save failed dma maps in SVQ iova tree

2022-08-02 Thread Eugenio Perez Martin
On Tue, Aug 2, 2022 at 4:41 PM Eugenio Pérez wrote: > > If a map fails for whatever reason, it must not be saved in the tree. > Otherwise, qemu will try to unmap it in cleanup, leaving to more errors. > I forgot to add: Reported-by: Lei Yang > Fixes: 34e3c94eda ("vdpa: Add custom IOTLB transla

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-02 Thread Xiaoyao Li
On 8/2/2022 9:21 PM, Jason A. Donenfeld wrote: Hi, On Tue, Aug 02, 2022 at 11:28:15AM +0800, Xiaoyao Li wrote: static void pc_q35_7_0_machine_options(MachineClass *m) { +PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_q35_7_1_machine_options(m); m->alias = NULL; +pcmc

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread David Hildenbrand
On 02.08.22 16:01, Christian Borntraeger wrote: > > > Am 02.08.22 um 15:54 schrieb David Hildenbrand: >> On 02.08.22 15:26, Christian Borntraeger wrote: >>> >>> >>> Am 20.07.22 um 14:08 schrieb Jason A. Donenfeld: In order for hosts running inside of TCG to initialize the kernel's rando

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-02 Thread Jason A. Donenfeld
Hi Xiaoyao, On Tue, Aug 02, 2022 at 10:53:07PM +0800, Xiaoyao Li wrote: > yes, with >= 7.1, pcmc->legacy_no_rng_seed = false by default, and RNG > seed is used. This is intended behavior. Being on by default is basically the whole point of it. Otherwise it's useless. > > > Either way, this sho

RE: [PATCH for-7.1] hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses

2022-08-02 Thread Konrad, Frederic
Hi Peter, CC'ing Philippe. > -Original Message- > From: Qemu-devel bounces+fkonrad=amd@nongnu.org> On Behalf Of Peter Maydell > Sent: 02 August 2022 14:19 > To: qemu-devel@nongnu.org > Cc: Fabien Chouteau ; Frederic Konrad > > Subject: [PATCH for-7.1] hw/misc/grlib_ahb_apb_pnp: Supp

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-02 Thread Jason A. Donenfeld
Hi Xiaoyao, On Tue, Aug 2, 2022 at 5:06 PM Jason A. Donenfeld wrote: > > Hi Xiaoyao, > > On Tue, Aug 02, 2022 at 10:53:07PM +0800, Xiaoyao Li wrote: > > yes, with >= 7.1, pcmc->legacy_no_rng_seed = false by default, and RNG > > seed is used. > > This is intended behavior. Being on by default is b

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Christian Borntraeger
Am 02.08.22 um 16:53 schrieb David Hildenbrand: On 02.08.22 16:01, Christian Borntraeger wrote: Am 02.08.22 um 15:54 schrieb David Hildenbrand: On 02.08.22 15:26, Christian Borntraeger wrote: Am 20.07.22 um 14:08 schrieb Jason A. Donenfeld: In order for hosts running inside of TCG to i

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread David Hildenbrand
On 02.08.22 17:15, Christian Borntraeger wrote: > > > Am 02.08.22 um 16:53 schrieb David Hildenbrand: >> On 02.08.22 16:01, Christian Borntraeger wrote: >>> >>> >>> Am 02.08.22 um 15:54 schrieb David Hildenbrand: On 02.08.22 15:26, Christian Borntraeger wrote: > > > Am 20.07.22 u

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Jason A. Donenfeld
Hi David, Christian, While this thread has your attention, I thought I'd reiterate my offer in: https://lore.kernel.org/qemu-devel/yueouwzdzbqff...@zx2c4.com/ Do either of you want to "take ownership" of this patch to bring it past the finish line, and I can provide whatever additional crypto cod

Re: [PATCH] virtio: remove unnecessary host_features in ->get_features()

2022-08-02 Thread Cornelia Huck
On Tue, Aug 02 2022, Stefan Hajnoczi wrote: > Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: > move host_features") the ->get_features() function has been called with > host_features as an argument. > > Some devices manually add host_features in ->get_features() although

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread David Hildenbrand
On 02.08.22 17:28, Jason A. Donenfeld wrote: > Hi David, Christian, > > While this thread has your attention, I thought I'd reiterate my offer in: > https://lore.kernel.org/qemu-devel/yueouwzdzbqff...@zx2c4.com/ > > Do either of you want to "take ownership" of this patch to bring it > past the fi

Re: [PULL 0/7] Block layer patches

2022-08-02 Thread Richard Henderson
On 8/2/22 06:37, Kevin Wolf wrote: The following changes since commit 60205b71421cbc529ca60b12c79e0eeace007319: Merge tag 'pull-aspeed-20220801' of https://github.com/legoater/qemu into staging (2022-08-01 13:55:11 -0700) are available in the Git repository at: git://repo.or.cz/qemu/kev

[PULL 0/5] migration queue

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 0399521e53336bd2cdc15482bca0ffd3493fdff6: Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging (2022-08-02 06:52:05 -0700) are available in the Git repository at: https://gitlab.com/dagrh/qemu.git tags/pull-

[PULL 3/5] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell Coverity complains that when we use the return value from migrate_multifd_compression() as an array index: multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; that this might overrun the array (which is declared to have size MULTIFD_COMPRESSION__MAX). Thi

[PULL 2/5] Revert "migration: Simplify unqueue_page()"

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth This reverts commit cfd66f30fb0f735df06ff4220e5000290a43dad3. The simplification of unqueue_page() introduced a bug that sometimes breaks migration on s390x hosts. The problem is not fully understood yet, but since we are already in the freeze for QEMU 7.1 and we need somethin

[PULL 1/5] migration: add remaining params->has_* = true in migration_instance_init()

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Some of params->has_* = true are missing in migration_instance_init, this causes migrate_params_check() to skip some tests, allowing some unsupported scenarios. Fix this by adding all missing params->has_* = true in migration_instance_init(). Fixes: 69ef1f36b0 ("migration: d

[PULL 4/5] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell When we use BLK_MIG_BLOCK_SIZE in expressions like block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication is done as 32 bits, because both operands are 32 bits. Coverity complains about possible overflows because we then accumulate that into a 64 bit variable. D

[PULL 5/5] virtiofsd: Disable killpriv_v2 by default

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal We are having bunch of issues with killpriv_v2 enabled by default. First of all it relies on clearing suid/sgid bits as needed by dropping capability CAP_FSETID. This does not work for remote filesystems like NFS (and possibly others). Secondly, we are noticing other issues rel

Re: [Qemu-devel] [PULL 15/36] memory: fix race between TCG and accesses to dirty bitmap

2022-08-02 Thread Peter Maydell
On Tue, 20 Aug 2019 at 08:12, Paolo Bonzini wrote: > > There is a race between TCG and accesses to the dirty log: > > vCPU thread reader thread > --- --- > TLB check -> slow path > notdirty_mem_write >

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-08-02 Thread Sean Christopherson
On Tue, Aug 02, 2022, Sean Christopherson wrote: > I think we should avoid UNMAPPABLE even on the KVM side of things for the core > memslots functionality and instead be very literal, e.g. > > KVM_HAS_FD_BASED_MEMSLOTS > KVM_MEM_FD_VALID > > We'll still need KVM_HAS_USER_UNMAPPABLE_ME

[PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-02 Thread Daniel P . Berrangé
The latest glibc 2.36 has extended sys/mount.h so that it defines the FSCONFIG_* enum constants. These are historically defined in linux/mount.h, and thus if you include both headers the compiler complains: In file included from /usr/include/linux/fs.h:19, from ../linux-user/sysca

Re: [PATCH v4 6/7] vdpa: Add virtio-net mac address via CVQ at start

2022-08-02 Thread Eugenio Perez Martin
On Mon, Aug 1, 2022 at 9:09 AM Eugenio Perez Martin wrote: > > On Mon, Jul 25, 2022 at 11:32 AM Jason Wang wrote: > > > > > > 在 2022/7/22 19:12, Eugenio Pérez 写道: > > > This is needed so the destination vdpa device see the same state a the > > > guest set in the source. > > > > > > Signed-off-by:

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Jason A. Donenfeld
On Wed, Jul 20, 2022 at 02:08:59PM +0200, Jason A. Donenfeld wrote: > +case 114: > +if (r1 & 1 || !r1 || r2 & 1 || !r2) > +tcg_s390_program_interrupt(env, PGM_SPECIFICATION, ra); This is already handled in op_msa. I'm going to remove it for v4.

[PATCH v5 01/10] vhost: stop transfer elem ownership in vhost_handle_guest_kick

2022-08-02 Thread Eugenio Pérez
It was easier to allow vhost_svq_add to handle the memory. Now that we will allow qemu to add elements to a SVQ without the guest's knowledge, it's better to handle it in the caller. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 10 -- 1 file changed, 4 insertions

[PATCH v5 00/10] NIC vhost-vdpa state restore via Shadow CVQ

2022-08-02 Thread Eugenio Pérez
CVQ of net vhost-vdpa devices can be intercepted since the work of [1]. The virtio-net device model is updated. The migration was blocked because although the state can be megrated between VMM it was not possible to restore on the destination NIC. This series add support for SVQ to inject external

[PATCH v5 04/10] vdpa: Get buffers from VhostVDPAState on vhost_vdpa_net_cvq_map_elem

2022-08-02 Thread Eugenio Pérez
There is no need to get them by parameter, since they're contained in VhostVDPAState. The only useful information was the written length in out. Simplify the function removing those. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 17 ++--- 1 file changed, 6 insertions(+), 11 de

[PATCH v5 09/10] vdpa: Add virtio-net mac address via CVQ at start

2022-08-02 Thread Eugenio Pérez
This is needed so the destination vdpa device see the same state a the guest set in the source. Signed-off-by: Eugenio Pérez --- v5: * Rename s/start/load/ * Use independent NetClientInfo to only add load callback on cvq. --- net/vhost-vdpa.c | 50

[PATCH v5 02/10] vhost: use SVQ element ndescs instead of opaque data for desc validation

2022-08-02 Thread Eugenio Pérez
Since we're going to allow SVQ to add elements without the guest's knowledge and without its own VirtQueueElement, it's easier to check if an element is a valid head checking a different thing than the VirtQueueElement. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 3 ++-

[PATCH v5 07/10] vdpa: add NetClientState->load() callback

2022-08-02 Thread Eugenio Pérez
It allows per-net client operations right after device's successful start. In particular, to load the device status. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez --- v5: Rename start / load, naming it more specifically. --- include

[PATCH v5 10/10] vdpa: Delete CVQ migration blocker

2022-08-02 Thread Eugenio Pérez
We can restore the device state in the destination via CVQ now. Remove the migration blocker. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 - hw/virtio/vhost-vdpa.c | 14 -- net/vhost-vdpa.c | 2 -- 3 files changed, 17 deletions(-) diff

Re: [PATCH 01/19] ppc/ppc405: Remove taihu machine

2022-08-02 Thread Daniel Henrique Barboza
On 8/1/22 10:10, Cédric Le Goater wrote: It has been deprecated since 7.0. Signed-off-by: Cédric Le Goater --- docs/about/deprecated.rst| 9 -- docs/system/ppc/embedded.rst | 1 - hw/ppc/ppc405_boards.c | 232 --- 3 files changed, 242 deleti

[PATCH v5 03/10] vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush

2022-08-02 Thread Eugenio Pérez
Since QEMU will be able to inject new elements on CVQ to restore the state, we need not to depend on a VirtQueueElement to know if a new element has been used by the device or not. Instead of check that, check if there are new elements only using used idx on vhost_svq_flush. Signed-off-by: Eugenio

[PATCH v5 08/10] vdpa: add net_vhost_vdpa_cvq_info NetClientInfo

2022-08-02 Thread Eugenio Pérez
Next patches will add a new info callback to restore NIC status through CVQ. Since only the CVQ vhost device is needed, create it with a new NetClientInfo. Signed-off-by: Eugenio Pérez --- v5: Create a new NetClientInfo instead of reusing the dataplane one. --- net/vhost-vdpa.c | 12 +++-

[PATCH v5 05/10] vdpa: Extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail

2022-08-02 Thread Eugenio Pérez
So we can reuse it to inject state messages. Signed-off-by: Eugenio Pérez -- v5: * Do not use an artificial !NULL VirtQueueElement * Use only out size instead of iovec dev_buffers for these functions. --- net/vhost-vdpa.c | 73 1 file changed, 49

[PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-02 Thread Eugenio Pérez
So its generic enough to accept any out sg buffer and we can inject NIC state messages. Signed-off-by: Eugenio Pérez --- v5: Accept out sg instead of dev_buffers[] --- net/vhost-vdpa.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-02 Thread Richard W.M. Jones
On Tue, Aug 02, 2022 at 12:41:34PM -0400, Daniel P. Berrangé wrote: > The latest glibc 2.36 has extended sys/mount.h so that it > defines the FSCONFIG_* enum constants. These are historically > defined in linux/mount.h, and thus if you include both headers > the compiler complains: > > In file inc

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-02 Thread Richard W.M. Jones
On Tue, Aug 02, 2022 at 07:29:29PM +0100, Richard W.M. Jones wrote: > Dan, which Fedora glibc package shows this problem? I have > glibc-2.35.9000-31.fc37.x86_64 and qemu compiled fine. (Also nbdkit > which includes linux/fs.h) It would help if I enabled a *-linux-user target ... Yes, I can repr

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Jason A. Donenfeld
On Tue, Aug 02, 2022 at 05:32:26PM +0200, David Hildenbrand wrote: > On 02.08.22 17:28, Jason A. Donenfeld wrote: > > Hi David, Christian, > > > > While this thread has your attention, I thought I'd reiterate my offer in: > > https://lore.kernel.org/qemu-devel/yueouwzdzbqff...@zx2c4.com/ > > > >

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-02 Thread Peter Maydell
On Tue, 2 Aug 2022 at 17:43, Daniel P. Berrangé wrote: > > The latest glibc 2.36 has extended sys/mount.h so that it > defines the FSCONFIG_* enum constants. These are historically > defined in linux/mount.h, and thus if you include both headers > the compiler complains: > > In file included from

[PATCH v4 0/2] MSA EXT 5 for s390x

2022-08-02 Thread Jason A. Donenfeld
In addition to the prior TRNG patch from v3, this v4 adds SHA-512 support. I know, I know, I know -- I fussed around asking if somebody would help me implement this because it was "oh so hard", and offered to do the crypto part if someone would do the rest. But then once I had the crypto part, I w

[PATCH v4 1/2] target/s390x: support PRNO_TRNG instruction

2022-08-02 Thread Jason A. Donenfeld
In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19. Cc: Thomas Huth Cc: David Hildenbrand Cc: Christian Bor

[PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-02 Thread Jason A. Donenfeld
In order to fully support MSA_EXT_5, we have to also support the SHA-512 special instructions. So implement those. The implementation began as something TweetNacl-like, and then was adjusted to be useful here. It's not very beautiful, but it is quite short and compact, which is what we're going fo

Re: [PATCH 02/19] ppc/ppc405: Introduce a PPC405 generic machine

2022-08-02 Thread Daniel Henrique Barboza
On 8/1/22 10:10, Cédric Le Goater wrote: We will use this machine as a base to define the ref405ep and possibly the PPC405 hotfoot board as found in the Linux kernel. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 31 --- 1 file changed, 28 insert

Re: [PATCH 03/19] ppc/ppc405: Move devices under the ref405ep machine

2022-08-02 Thread Daniel Henrique Barboza
On 8/1/22 10:10, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza hw/ppc/ppc405_boards.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.

Re: [PULL 0/5] migration queue

2022-08-02 Thread Richard Henderson
On 8/2/22 08:54, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" The following changes since commit 0399521e53336bd2cdc15482bca0ffd3493fdff6: Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging (2022-08-02 06:52:05 -0700) are available in the Git reposi

Re: [PATCH 05/19] ppc/ppc405: Start QOMification of the SoC

2022-08-02 Thread Daniel Henrique Barboza
On 8/1/22 10:10, Cédric Le Goater wrote: This moves all the code previously done in the ppc405ep_init() routine under ppc405_soc_realize(). Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 12 ++-- hw/ppc/ppc405_boards.c | 12 ++-- hw/ppc/ppc405_uc.c | 151 +

<    1   2   3   >