Re: [PATCH 2/2] hw/arm/virt: Warn when high memory region is disabled

2022-08-02 Thread Gavin Shan
Hi Eric, On 8/2/22 7:49 PM, Eric Auger wrote: On 8/2/22 08:45, Gavin Shan wrote: When one specific high memory region is disabled due to the PA limit, it'd better to warn user about that. The warning messages help to identify the cause in some cases. For example, PCIe device that has large

Re: [PULL 0/1] semihosting patch queue

2022-08-02 Thread Richard Henderson
://gitlab.com/rth7680/qemu.git tags/pull-semi-20220802 for you to fetch changes up to d44971e725c02e0656d2f53d4fb564f92e06aef7: target/mips: Advance pc after semihosting exception (2022-08-02 12:34:00 -0700) Fix mips semihosting regression

Re: [PATCH] hw/riscv: remove 'fdt' param from riscv_setup_rom_reset_vec()

2022-08-02 Thread Alistair Francis
On Fri, Jul 29, 2022 at 4:19 AM Daniel Henrique Barboza wrote: > > The 'fdt' param is not being used in riscv_setup_rom_reset_vec(). > Simplify the API by removing it. While we're at it, remove the redundant > 'return' statement at the end of function. > > Cc: Palmer Dabbelt > Cc: Alistair

Re: [PATCH v5 0/1] target/riscv: Add Zihintpause support

2022-08-02 Thread Alistair Francis
On Wed, Aug 3, 2022 at 9:42 AM Atish Patra wrote: > > On Sun, Jul 24, 2022 at 9:39 PM Alistair Francis wrote: > > > > On Mon, Jul 25, 2022 at 1:48 PM Dao Lu wrote: > > > > > > This patch adds RISC-V Zihintpause support. The extension is set to be > > > enabled > > > by default and opcode has

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

2022-08-02 Thread Keith Busch
On Wed, Aug 03, 2022 at 09:46:05AM +0800, Jinhao Fan wrote: > at 4:54 PM, Klaus Jensen wrote: > > > I am unsure if the compiler will transform that division into the shift > > if it can infer that the divisor is a power of two (it most likely > > will be able to). > > > > But I see no reason to

Re: [PATCH v12 1/6] target/riscv: Add sscofpmf extension support

2022-08-02 Thread Weiwei Li
在 2022/8/3 上午7:33, Atish Patra 写道: The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, and 'cofpmf' for Count OverFlow and Privilege Mode Filtering) extension allows the perf to handle overflow interrupts and filtering support. This patch provides a framework for

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

2022-08-02 Thread Jinhao Fan
With the introduction of shadow doorbell and ioeventfd, we need to do frequent conversion between qid and its doorbell offset. The original hard-coded calculation is confusing and error-prone. Add several helper functions to do this task. Signed-off-by: Jinhao Fan --- Changes since v1: - Use

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

2022-08-02 Thread Jinhao Fan
at 4:54 PM, Klaus Jensen wrote: > I am unsure if the compiler will transform that division into the shift > if it can infer that the divisor is a power of two (it most likely > will be able to). > > But I see no reason to have a potential division here when we can do > without and to me it is

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

2022-08-02 Thread Xiaoyao Li
On 8/2/2022 11:13 PM, Jason A. Donenfeld wrote: 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

Re: [PATCH] hw/riscv: remove 'fdt' param from riscv_setup_rom_reset_vec()

2022-08-02 Thread Bin Meng
On Fri, Jul 29, 2022 at 2:19 AM Daniel Henrique Barboza wrote: > > The 'fdt' param is not being used in riscv_setup_rom_reset_vec(). > Simplify the API by removing it. While we're at it, remove the redundant > 'return' statement at the end of function. > > Cc: Palmer Dabbelt > Cc: Alistair

[PULL 1/1] target/mips: Advance pc after semihosting exception

2022-08-02 Thread Richard Henderson
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: https://gitlab.com/qemu-project/qemu/-/issues/1126 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-02 Thread Gavin Shan
Hi Eric, On 8/2/22 7:41 PM, Eric Auger wrote: On 8/2/22 08:45, Gavin Shan wrote: There are 3 highmem IO regions as below. They can be disabled in two situations: (a) The specific region is disabled by user. (b) The specific region doesn't fit in the PA space. However, the base address and

[PULL 0/1] semihosting patch queue

2022-08-02 Thread Richard Henderson
The following changes since commit 430a388ef4a6e02e762a9c5f86c539f886a6a61a: Merge tag 'pull-migration-20220802c' of https://gitlab.com/dagrh/qemu into staging (2022-08-02 10:03:18 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-semi-20220802

Re: [PATCH v5 0/1] target/riscv: Add Zihintpause support

2022-08-02 Thread Atish Patra
On Sun, Jul 24, 2022 at 9:39 PM Alistair Francis wrote: > > On Mon, Jul 25, 2022 at 1:48 PM Dao Lu wrote: > > > > This patch adds RISC-V Zihintpause support. The extension is set to be > > enabled > > by default and opcode has been added to insn32.decode. > > > > Added trans_pause to exit the

[PATCH v12 5/6] target/riscv: Update the privilege field for sscofpmf CSRs

2022-08-02 Thread Atish Patra
The sscofpmf extension was ratified as a part of priv spec v1.12. Mark the csr_ops accordingly. Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis Signed-off-by: Atish Patra --- target/riscv/csr.c | 90 ++ 1 file changed, 60 insertions(+), 30

[PATCH v12 3/6] target/riscv: Add few cache related PMU events

2022-08-02 Thread Atish Patra
From: Atish Patra Qemu can monitor the following cache related PMU events through tlb_fill functions. 1. DTLB load/store miss 3. ITLB prefetch miss Increment the PMU counter in tlb_fill function. Reviewed-by: Alistair Francis Tested-by: Heiko Stuebner Signed-off-by: Atish Patra

[PATCH v12 4/6] hw/riscv: virt: Add PMU DT node to the device tree

2022-08-02 Thread Atish Patra
Qemu virt machine can support few cache events and cycle/instret counters. It also supports counter overflow for these events. Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine capabilities. There are some dummy nodes added for testing as well. Acked-by: Alistair Francis

[PATCH v12 6/6] target/riscv: Remove additional priv version check for mcountinhibit

2022-08-02 Thread Atish Patra
With .min_priv_version, additiona priv version check is uncessary for mcountinhibit read/write functions. Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Atish Patra --- target/riscv/csr.c | 8 1 file changed, 8 deletions(-) diff --git a/target/riscv/csr.c

[PATCH v12 1/6] target/riscv: Add sscofpmf extension support

2022-08-02 Thread Atish Patra
The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, and 'cofpmf' for Count OverFlow and Privilege Mode Filtering) extension allows the perf to handle overflow interrupts and filtering support. This patch provides a framework for programmable counters to leverage the extension.

[PATCH v12 2/6] target/riscv: Simplify counter predicate function

2022-08-02 Thread Atish Patra
All the hpmcounters and the fixed counters (CY, IR, TM) can be represented as a unified counter. Thus, the predicate function doesn't need handle each case separately. Simplify the predicate function so that we just handle things differently between RV32/RV64 and S/HS mode. Reviewed-by: Bin Meng

[PATCH v12 0/6] Improve PMU support

2022-08-02 Thread Atish Patra
The latest version of the SBI specification includes a Performance Monitoring Unit(PMU) extension[1] which allows the supervisor to start/stop/configure various PMU events. The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, and 'cofpmf' for Count OverFlow and Privilege Mode

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

2022-08-02 Thread Iris Chen
Thanks everyone for the insightful feedback! This is really helpful for me. I am taking a look at all the comments now and will investigate into it. Best, Iris

installing qemu on linux

2022-08-02 Thread Herrera Vidales, Victor
Good Morning, My name is Victor Herrera and I am attempting to install qemu on linux, I am trying to run CAN Bus well in the process of reseaching all these things. I am research assistant with the University of Texas at El Paso. I tried the link provided in the git repository, but there is an

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

2022-08-02 Thread BALATON Zoltan
On Tue, 2 Aug 2022, Daniel Henrique Barboza wrote: 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

Re: [PATCH v11 2/6] target/riscv: Simplify counter predicate function

2022-08-02 Thread Atish Kumar Patra
On Wed, Jul 27, 2022 at 5:56 PM Weiwei Li wrote: > > 在 2022/7/28 上午5:40, Atish Kumar Patra 写道: > > > > On Wed, Jul 27, 2022 at 1:35 AM Weiwei Li wrote: > >> >> 在 2022/7/27 下午2:49, Atish Patra 写道: >> > All the hpmcounters and the fixed counters (CY, IR, TM) can be >> represented >> > as a

Re: [PATCH 1/1] vfio-user: update submodule to latest

2022-08-02 Thread Stefan Hajnoczi
On Tue, 2 Aug 2022 at 05:44, Daniel P. Berrangé wrote: > On Mon, Aug 01, 2022 at 09:24:04PM -0400, Jagannathan Raman wrote: > > Update libvfio-user submodule to the latest > > > > Signed-off-by: Jagannathan Raman > > --- > > subprojects/libvfio-user | 2 +- > > 1 file changed, 1 insertion(+), 1

Re: [PATCH 04/19] ppc/ppc405: Introduce a PPC405 SoC

2022-08-02 Thread Daniel Henrique Barboza
On 8/1/22 10:10, Cédric Le Goater wrote: It is an initial model to start QOMification of the PPC405 board. Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza hw/ppc/ppc405.h| 17 ++ hw/ppc/ppc405_boards.c | 29 ++-

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

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

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

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

[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

[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

[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

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

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 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

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

[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

[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 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 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:

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

[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(-)

[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. ---

[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 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 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

[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

[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

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.

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. > > > > > >

[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

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

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 >

[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

[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.

[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:

[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

[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).

[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

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:

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

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()

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

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

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

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

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:

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

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

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; +

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

[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

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

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 ;

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] 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: [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

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:

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

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

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). > >

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

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",

[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

[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

[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 ... ---

[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

[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:

[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

[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

[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

[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

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 > > >

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

2022-08-02 Thread Richard Henderson
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:56:49 +1000

[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 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

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 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

  1   2   3   >