Re: [PULL 0/1] target-arm queue

2021-11-23 Thread Richard Henderson
On 11/22/21 7:44 PM, Peter Maydell wrote: Apologies for sending two pullreqs today; Eric's patch came in a few hours after I sent the first one but it's definitely a release-critical fix. -- PMM The following changes since commit 89d2f9e4c63799f7f03e9180c63b7dc45fc2a04a: Merge tag 'pull-tar

Re: [RFC v2 PATCH 04/13] KVM: Add fd-based memslot data structure and utils

2021-11-23 Thread Paolo Bonzini
On 11/19/21 14:47, Chao Peng wrote: For fd-based memslot store the file references for shared fd and the private fd (if any) in the memslot structure. Since there is no 'hva' concept we cannot call hva_to_pfn() to get a pfn, instead kvm_memfd_ops is added to get_pfn/put_pfn from the memory backin

Re: [RFC v2 PATCH 09/13] KVM: Introduce kvm_memfd_invalidate_range

2021-11-23 Thread Paolo Bonzini
On 11/19/21 14:47, Chao Peng wrote: + + /* Prevent memslot modification */ + spin_lock(&kvm->mn_invalidate_lock); + kvm->mn_active_invalidate_count++; + spin_unlock(&kvm->mn_invalidate_lock); + + ret = __kvm_handle_useraddr_range(kvm, &useraddr_range); + + spin

[PULL 0/2] linux-user: Create a common rewind_if_in_safe_syscall

2021-11-23 Thread Richard Henderson
u.git tags/pull-lu-20211123 for you to fetch changes up to 07637888687bfecf3c0cc8351c5c24f29a611691: linux-user/signal.c: Create a common rewind_if_in_safe_syscall (2021-11-23 01:47:20 +0100) Create common rewind_if_in_safe_syscal

[PULL 1/2] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-23 Thread Richard Henderson
From: Warner Losh Add a new function host_signal_set_pc to set the next pc in an mcontext. The caller should ensure this is a valid PC for execution. Acked-by: Laurent Vivier Signed-off-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <202304

Re: [RFC v2 PATCH 13/13] KVM: Enable memfd based page invalidation/fallocate

2021-11-23 Thread Paolo Bonzini
On 11/19/21 14:47, Chao Peng wrote: + list_for_each_entry(kvm, &vm_list, vm_list) { + if (kvm == vm) + return false; + } + + return true; This would have to take the kvm_lock, but see my reply to patch 1. Paolo

[PULL 2/2] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-23 Thread Richard Henderson
From: Warner Losh All instances of rewind_if_in_safe_syscall are the same, differing only in how the instruction point is fetched from the ucontext and the size of the registers. Use host_signal_pc and new host_signal_set_pc interfaces to fetch the pointer to the PC and adjust if needed. Delete a

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-23 Thread Paolo Bonzini
On 11/19/21 14:47, Chao Peng wrote: +static void guest_invalidate_page(struct inode *inode, + struct page *page, pgoff_t start, pgoff_t end) +{ + struct shmem_inode_info *info = SHMEM_I(inode); + + if (!info->guest_ops || !info->guest_ops->invalidate_pa

Re: [PATCH] block vvfat.c fix leak when failure occurs

2021-11-23 Thread Hanna Reitz
On 19.11.21 12:25, Daniella Lee wrote: Based on your suggestions. I made a new patch which contians: 1.format detection 2.replace calloc with g_malloc0 in enable_write_target function 3.use g_free without null pointer detection in vvfat_open function 4.delete line "ret = 0", use return ret direct

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-23 Thread Paolo Bonzini
On 11/19/21 16:39, David Hildenbrand wrote: If qmeu can put all the guest memory in a memfd and not map it, then I'd also like to see that the IOMMU can use this interface too so we can have VFIO working in this configuration. In QEMU we usually want to (and must) be able to access guest memory

[PATCH v3 1/1] target/riscv: Fix PMP propagation for tlb

2021-11-23 Thread LIU Zhiwei
Only the pmp index that be checked by pmp_hart_has_privs can be used by pmp_get_tlb_size to avoid an error pmp index. Before modification, we may use an error pmp index. For example, we check address 0x4fc, and the size 0x4 in pmp_hart_has_privs. If there is an pmp rule, valid range is [0x4fc, 0x5

Re: [RFC v2 PATCH 13/13] KVM: Enable memfd based page invalidation/fallocate

2021-11-23 Thread Paolo Bonzini
On 11/23/21 02:06, Chao Peng wrote: Maybe the kvm has to be tagged with a sequential id that incremented every allocation. This id can be checked here. Sounds like a sequential id will be needed, no existing fields in struct kvm can work for this. There's no need to new concepts when there's a

Re: [PATCH v2 0/5] Check PMP rules num before propagation

2021-11-23 Thread LIU Zhiwei
As I have found another similar error in PMP, and we can fix it at the same time. I have sent a patch named "target/riscv: Fix PMP propagation for tlb". This patch set should be dropped. Thanks, Zhiwei Drop this patch set. On 2021/11/22 下午7:02, LIU Zhiwei wrote: In this patch set, fix pmp p

[PATCH] microvm: use MachineState->dumpdtb

2021-11-23 Thread Gerd Hoffmann
There already is a machine property to dumb the device tree for debugging purposes, and the helper function qemu_fdt_dumpdtb() implementing the dumbing. Make microvm use it for consistency. Signed-off-by: Gerd Hoffmann --- hw/i386/microvm-dt.c | 9 + 1 file changed, 1 insertion(+), 8 de

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

2021-11-23 Thread Christian Borntraeger
Am 17.11.21 um 16:23 schrieb Collin Walling: The CPNC portion of the diag318 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 CPN

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

2021-11-23 Thread Thomas Huth
On 23/11/2021 10.28, Christian Borntraeger wrote: Am 17.11.21 um 16:23 schrieb Collin Walling: The CPNC portion of the diag318 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

Re: [PATCH v5 1/6] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-11-23 Thread Daniel P . Berrangé
On Mon, Nov 22, 2021 at 08:18:09PM -0300, Leonardo Bras Soares Passos wrote: > Hello Daniel, > Thanks for the feedback! > > On Fri, Nov 12, 2021 at 7:13 AM Daniel P. Berrangé > wrote: > > > > On Fri, Nov 12, 2021 at 02:10:36AM -0300, Leonardo Bras wrote: > > > -int qio_channel_writev_all(QIOChan

Re: [PATCH v5 3/6] QIOChannelSocket: Implement io_writev_zerocopy & io_flush_zerocopy for CONFIG_LINUX

2021-11-23 Thread Daniel P . Berrangé
On Tue, Nov 23, 2021 at 01:46:44AM -0300, Leonardo Bras Soares Passos wrote: > Hello Daniel, > > On Fri, Nov 12, 2021 at 7:54 AM Daniel P. Berrangé > wrote: > [...] > > > @@ -561,12 +577,15 @@ static ssize_t > > > qio_channel_socket_writev_flags(QIOChannel *ioc, > > > retry: > > > ret =

Re: [RFC PATCH 07/12] qapi: Allow defining QOM classes

2021-11-23 Thread Markus Armbruster
Kevin Wolf writes: > Signed-off-by: Kevin Wolf > --- > scripts/qapi/expr.py | 28 +- > scripts/qapi/schema.py | 66 ++ > 2 files changed, 93 insertions(+), 1 deletion(-) Missing: docs/devel/qapi-code-gen.rst update. I understand why, b

Re: [RFC PATCH v3] hw/nvme:Adding Support for namespace management

2021-11-23 Thread Lukasz Maniak
On Wed, Nov 10, 2021 at 04:56:29PM +0530, Naveen wrote: > From: Naveen Nagar > > This patch supports namespace management : create and delete operations > This patch has been tested with the following command and size of image > file for unallocated namespaces is taken as 0GB. ns_create will look

Re: [PATCH 1/1] MAINTAINERS: update email address of Christian Borntraeger

2021-11-23 Thread Halil Pasic
On Tue, 23 Nov 2021 10:55:11 +0100 Christian Borntraeger wrote: > My borntrae...@de.ibm.com email is just a forwarder to the > linux.ibm.com address. Let us remove the extra hop to avoid > a potential source of errors. > > While at it, add the relevant email addresses to mailmap. > > Signed-off

Re: [PATCH v7 31/31] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2021-11-23 Thread Richard Henderson
On 11/22/21 11:42 AM, WANG Xuerui wrote: Normally this would be based on qemu/debian10 or qemu/ubuntu2004, but after a week-long struggle, I still cannot build stage2 gcc with the known-good LoongArch toolchain sources, so I chose the least-resistance path with Gentoo as base image. As this image

Re: [PULL 0/7] Python patches

2021-11-23 Thread Richard Henderson
On 11/23/21 3:37 AM, John Snow wrote: The following changes since commit 89d2f9e4c63799f7f03e9180c63b7dc45fc2a04a: Merge tag 'pull-target-arm-20211122' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2021-11-22 16:35:54 +0100) are available in the Git repository at: ht

Re: [PATCH v1 9/9] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI

2021-11-23 Thread Francisco Iglesias
Hi Edgar, Thank you for having a look at the series! I made the updates in v2! Best regards, Francisco Iglesias On [2021 Nov 19] Fri 18:16:23, Edgar E. Iglesias wrote: > On Wed, Nov 17, 2021 at 02:18:41PM +, Francisco Iglesias wrote: > > Connect Micron Xccela mt35xu01g flashes to the OSPI fl

[PATCH v2 05/10] hw/dma/xlnx_csu_dma: Implement the DMA control interface

2021-11-23 Thread Francisco Iglesias
Implement the DMA control interface for allowing control of DMA operations from inside models that contain instances of (and reuse) the Xilinx CSU DMA. Signed-off-by: Francisco Iglesias Reviewed-by: Edgar E. Iglesias --- hw/dma/xlnx_csu_dma.c | 32 inclu

[PATCH v2 06/10] hw/ssi: Add a model of Xilinx Versal's OSPI flash memory controller

2021-11-23 Thread Francisco Iglesias
Add a model of Xilinx Versal's OSPI flash memory controller. Signed-off-by: Francisco Iglesias Reviewed-by: Edgar E. Iglesias --- hw/ssi/meson.build|1 + hw/ssi/xlnx-versal-ospi.c | 1892 + include/hw/ssi/xlnx-versal-ospi.h | 86

[PATCH v2 04/10] hw/dma: Add the DMA control interface

2021-11-23 Thread Francisco Iglesias
Add an interface for controlling DMA models that are reused with other models. This allows a controlling model to start transfers through the DMA while reusing the DMA's handling of transfer state and completion signaling. Signed-off-by: Francisco Iglesias Reviewed-by: Edgar E. Iglesias --- hw/

[PATCH v2 03/10] include/hw/dma/xlnx_csu_dma: Include ptimer.h and stream.h in the header

2021-11-23 Thread Francisco Iglesias
Include ptimer.h and stream.h in the header for being able to build and reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn and ptimer_state is in the header). Signed-off-by: Francisco Iglesias --- include/hw/dma/xlnx_csu_dma.h | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v2 09/10] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI

2021-11-23 Thread Francisco Iglesias
Connect Micron Xccela mt35xu01g flashes to the OSPI flash memory controller. Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-versal-virt.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index d2f55e29b6..47f591

[PATCH v2 08/10] hw/block/m25p80: Add support for Micron Xccela flash mt35xu01g

2021-11-23 Thread Francisco Iglesias
Add support for Micron Xccela flash mt35xu01g. Signed-off-by: Francisco Iglesias Reviewed-by: Edgar E. Iglesias --- hw/block/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index b77503dc84..c6bf3c6bfa 100644 --- a/hw/block/m25p80.c +++ b/hw/

[PATCH v2 10/10] MAINTAINERS: Add an entry for Xilinx Versal OSPI

2021-11-23 Thread Francisco Iglesias
List myself as maintainer for the Xilinx Versal OSPI controller. Signed-off-by: Francisco Iglesias --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d3879aa3c1..8c2b01a282 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -963,6 +963,12 @@ F: h

Re: [PATCH] MAINTAINERS: Remove me as a reviewer for the build and test/avocado

2021-11-23 Thread Philippe Mathieu-Daudé
On 11/22/21 20:11, Willian Rampazzo wrote: > Remove me as a reviewer for the Build and test automation and the > Integration Testing with the Avocado Framework and add Beraldo > Leal. Thank you Willian for your QEMU contributions and reviews, they helped the community in having a better idea of wh

[PATCH v2 07/10] hw/arm/xlnx-versal: Connect the OSPI flash memory controller model

2021-11-23 Thread Francisco Iglesias
Connect the OSPI flash memory controller model (including the source and destination DMA). Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-versal.c | 87 include/hw/arm/xlnx-versal.h | 20 ++ 2 files changed, 107 insertions(+) diff

Re: [PATCH v2 03/10] include/hw/dma/xlnx_csu_dma: Include ptimer.h and stream.h in the header

2021-11-23 Thread Philippe Mathieu-Daudé
On 11/23/21 11:34, Francisco Iglesias wrote: > Include ptimer.h and stream.h in the header for being able to build and > reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn > and ptimer_state is in the header). > > Signed-off-by: Francisco Iglesias > --- > include/hw/dma/xl

Re: [PATCH v2 01/10] hw/misc: Add a model of Versal's PMC SLCR

2021-11-23 Thread Edgar E. Iglesias
On Tue, Nov 23, 2021 at 10:34:19AM +, Francisco Iglesias wrote: > Add a model of Versal's PMC SLCR (system-level control registers). Acked-by: Edgar E. Iglesias > > Signed-off-by: Francisco Iglesias > Signed-off-by: Edgar E. Iglesias > --- > hw/misc/meson.build|

Re: [PATCH v2 09/10] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI

2021-11-23 Thread Edgar E. Iglesias
On Tue, Nov 23, 2021 at 10:34:27AM +, Francisco Iglesias wrote: > Connect Micron Xccela mt35xu01g flashes to the OSPI flash memory > controller. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Francisco Iglesias > --- > hw/arm/xlnx-versal-virt.c | 23 +++ > 1 file

Re: [PATCH v2 10/10] MAINTAINERS: Add an entry for Xilinx Versal OSPI

2021-11-23 Thread Edgar E. Iglesias
On Tue, Nov 23, 2021 at 10:34:28AM +, Francisco Iglesias wrote: > List myself as maintainer for the Xilinx Versal OSPI controller. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Francisco Iglesias > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/MAI

Re: [PATCH v2 03/10] include/hw/dma/xlnx_csu_dma: Include ptimer.h and stream.h in the header

2021-11-23 Thread Edgar E. Iglesias
On Tue, Nov 23, 2021 at 10:34:21AM +, Francisco Iglesias wrote: > Include ptimer.h and stream.h in the header for being able to build and > reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn > and ptimer_state is in the header). Reviewed-by: Edgar E. Iglesias > > Sig

[PATCH v2 00/10] Xilinx Versal's PMC SLCR and OSPI support

2021-11-23 Thread Francisco Iglesias
Hi, This series attempts to add support for Xilinx Versal's PMC SLCR (system-level control registers) and OSPI flash memory controller to Xilinx Versal virt machine. The series start with adding a model of Versal's PMC SLCR and connecting the model to the Versal virt machine. The series then adds

[PATCH v2 02/10] hw/arm/xlnx-versal: Connect Versal's PMC SLCR

2021-11-23 Thread Francisco Iglesias
Connect Versal's PMC SLCR (system-level control registers) model. Signed-off-by: Francisco Iglesias Reviewed-by: Edgar E. Iglesias --- hw/arm/xlnx-versal.c | 18 ++ include/hw/arm/xlnx-versal.h | 6 ++ 2 files changed, 24 insertions(+) diff --git a/hw/arm/xlnx-vers

[PATCH v2 01/10] hw/misc: Add a model of Versal's PMC SLCR

2021-11-23 Thread Francisco Iglesias
Add a model of Versal's PMC SLCR (system-level control registers). Signed-off-by: Francisco Iglesias Signed-off-by: Edgar E. Iglesias --- hw/misc/meson.build|5 +- hw/misc/xlnx-versal-pmc-iou-slcr.c | 1445 include/hw/misc/xlnx-ve

Re: [PATCH v5 06/18] target/riscv: array for the 64 upper bits of 128-bit registers

2021-11-23 Thread Frédéric Pétrot
On 23/11/2021 07:09, Alistair Francis wrote: On Sat, Nov 13, 2021 at 1:07 AM Frédéric Pétrot wrote: +static bool rv128_needed(void *opaque) +{ +RISCVCPU *cpu = opaque; +CPURISCVState *env = &cpu->env; + +return env->misa_mxl_max == MXL_RV128; +} I think it would just be better to

Re: [PATCH v2 07/10] hw/arm/xlnx-versal: Connect the OSPI flash memory controller model

2021-11-23 Thread Edgar E. Iglesias
On Tue, Nov 23, 2021 at 10:34:25AM +, Francisco Iglesias wrote: > Connect the OSPI flash memory controller model (including the source and > destination DMA). Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 87 > ++

Re: [PATCH v5 06/18] target/riscv: array for the 64 upper bits of 128-bit registers

2021-11-23 Thread Alistair Francis
On Tue, Nov 23, 2021 at 8:58 PM Frédéric Pétrot wrote: > > On 23/11/2021 07:09, Alistair Francis wrote: > > On Sat, Nov 13, 2021 at 1:07 AM Frédéric Pétrot > > wrote: > >> +static bool rv128_needed(void *opaque) > >> +{ > >> +RISCVCPU *cpu = opaque; > >> +CPURISCVState *env = &cpu->env; >

[PATCH-for-6.2 1/2] hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued

2021-11-23 Thread Philippe Mathieu-Daudé
If asked for DMA request and no data is available, simply wait for data to be queued, do not abort. This fixes: $ cat << EOF | \ qemu-system-i386 -nographic -M q35,accel=qtest -serial none \ -monitor none -qtest stdio -trace lsi* \ -drive if=none,id=drive0,file=null-co://,file.re

[PATCH-for-6.2 2/2] tests/qtest: Add fuzz-lsi53c895a-test

2021-11-23 Thread Philippe Mathieu-Daudé
Without the previous commit, this test triggers: $ make check-qtest-x86_64 [...] Running test qtest-x86_64/fuzz-lsi53c895a-test qemu-system-x86_64: hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion `s->current' failed. ERROR qtest-x86_64/fuzz-lsi53c895a-test - too few tests run (expected

[PATCH-for-6.2 0/2] hw/scsi/lsi53c895a: Fix guest-triggerable assert() in lsi_do_dma()

2021-11-23 Thread Philippe Mathieu-Daudé
Trivial fix for this long due bug. Philippe Mathieu-Daudé (2): hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued tests/qtest: Add fuzz-lsi53c895a-test hw/scsi/lsi53c895a.c | 3 +- tests/qtest/fuzz-lsi53c895a-test.c | 52 ++ MAIN

Re: [PATCH-for-6.2 1/2] hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued

2021-11-23 Thread Laurent Vivier
On 23/11/2021 12:17, Philippe Mathieu-Daudé wrote: If asked for DMA request and no data is available, simply wait for data to be queued, do not abort. This fixes: $ cat << EOF | \ qemu-system-i386 -nographic -M q35,accel=qtest -serial none \ -monitor none -qtest stdio -trace lsi*

Re: [PATCH-for-6.2 2/2] tests/qtest: Add fuzz-lsi53c895a-test

2021-11-23 Thread Laurent Vivier
On 23/11/2021 12:17, Philippe Mathieu-Daudé wrote: Without the previous commit, this test triggers: $ make check-qtest-x86_64 [...] Running test qtest-x86_64/fuzz-lsi53c895a-test qemu-system-x86_64: hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion `s->current' failed. ERROR qtest-

[PATCH v3] hw/virtio/vhost: Fix typo in comment.

2021-11-23 Thread lagarcia
From: Leonardo Garcia Signed-off-by: Leonardo Garcia Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 437347ad01..20913cf8fb 100644 --- a/hw/vir

Re: [PATCH] docs: Minor updates on the powernv documentation.

2021-11-23 Thread Leonardo Augusto Guimarães Garcia
On 11/18/21 06:03, Cédric Le Goater wrote: > On 11/17/21 21:16, lagar...@linux.ibm.com wrote: >> From: Leonardo Garcia >> >> Signed-off-by: Leonardo Garcia >> --- >>   docs/system/ppc/powernv.rst | 56 +++-- >>   1 file changed, 29 insertions(+), 27 deletions(-) >>

[PATCH v2] docs: Minor updates on the powernv documentation.

2021-11-23 Thread lagarcia
From: Leonardo Garcia Signed-off-by: Leonardo Garcia --- docs/system/ppc/powernv.rst | 57 +++-- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/docs/system/ppc/powernv.rst b/docs/system/ppc/powernv.rst index 86186b7d2c..eda4219a27 100644 --- a/do

[PATCH] hw/arm/virt: Extend nested and mte checks to hvf

2021-11-23 Thread Alexander Graf
The virt machine has properties to enable MTE and Nested Virtualization support. However, its check to ensure the backing accel implementation supports it today only looks for KVM and bails out if it finds it. Extend the checks to HVF as well as it does not support either today. Reported-by: saar

Re: [PATCH] hw/arm/virt: Extend nested and mte checks to hvf

2021-11-23 Thread Peter Maydell
On Tue, 23 Nov 2021 at 12:29, Alexander Graf wrote: > > The virt machine has properties to enable MTE and Nested Virtualization > support. However, its check to ensure the backing accel implementation > supports it today only looks for KVM and bails out if it finds it. > > Extend the checks to HVF

Re: [PULL 0/2] linux-user: Create a common rewind_if_in_safe_syscall

2021-11-23 Thread Richard Henderson
repository at: https://gitlab.com/rth7680/qemu.git tags/pull-lu-20211123 for you to fetch changes up to 07637888687bfecf3c0cc8351c5c24f29a611691: linux-user/signal.c: Create a common rewind_if_in_safe_syscall (2021-11-23 01:4

Re: [qemu-web PATCH v2] Add Sponsors page

2021-11-23 Thread Stefan Hajnoczi
On Thu, Nov 18, 2021 at 01:29:12PM +0100, Philippe Mathieu-Daudé wrote: > Add a page listing QEMU sponsors. > > For now, only mention Fosshost which requested to be listed: > https://lists.gnu.org/archive/html/qemu-devel/2021-06/msg05381.html > > Cc: Thomas Markey > Resolves: https://gitlab.com/

Re: [RFC PATCH 08/12] qapi: Create qom-config:... type for classes

2021-11-23 Thread Markus Armbruster
Kevin Wolf writes: > For every class that has a 'config' definition, a corresponding > 'qom-config:$QOM_TYPE' type is automatically created that contains the > configuration for the class and all of its parent classes. > > Signed-off-by: Kevin Wolf I assume $QOM_TYPE stands for the class's name

[PATCH] chardev: delete QemuOpts when a chardev is removed

2021-11-23 Thread Paolo Bonzini
QEMU cannot add a chardev with the same id as a previously unplugged device. The root cause of this issue is that the QemuOpts is still registered, causing qemu_opts_create to fail. Remove the QemuOpts when a character device is removed. Signed-off-by: Paolo Bonzini --- chardev/char.c | 15

Re: [RFC PATCH v2 0/5] virtio: early detect 'modern' virtio

2021-11-23 Thread Halil Pasic
On Fri, 12 Nov 2021 15:57:44 +0100 Halil Pasic wrote: > This is an early RFC for a transport specific early detecton of > modern virtio, which is most relevant for transitional devices on big > endian platforms, when drivers access the config space before > FEATURES_OK is set. [..] Ping! @Mich

Re: [RFC PATCH 09/12] qapi/qom: Convert rng-backend/random to class

2021-11-23 Thread Markus Armbruster
Kevin Wolf writes: > Signed-off-by: Kevin Wolf > --- > qapi/qom.json | 22 -- > 1 file changed, 16 insertions(+), 6 deletions(-) > > diff --git a/qapi/qom.json b/qapi/qom.json > index ccd1167808..a167e91f67 100644 > --- a/qapi/qom.json > +++ b/qapi/qom.json > @@ -721,6 +721,

Re: [RFC PATCH-for-6.2 v3] qdev-monitor: Only allow full --global .= option

2021-11-23 Thread Paolo Bonzini
On 11/22/21 15:32, Markus Armbruster wrote: qemu-system-x86_64: warning: global cfi.pflash01.secure has invalid class name what's going on here ? Off-the-cuff guess: cfi.pflash01.secure=on gets parsed as driver=cfi property=pflash01.secure value=on Once again our "anything

Re: [PATCH] chardev: delete QemuOpts when a chardev is removed

2021-11-23 Thread Marc-André Lureau
On Tue, Nov 23, 2021 at 5:11 PM Paolo Bonzini wrote: > QEMU cannot add a chardev with the same id as a previously unplugged > device. > The root cause of this issue is that the QemuOpts is still registered, > causing qemu_opts_create to fail. Remove the QemuOpts when a character > device is remo

Re: [PATCH-for-6.2 v3 1/2] hw/block/fdc: Kludge missing floppy drive to fix CVE-2021-20196

2021-11-23 Thread Hanna Reitz
On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: Guest might select another drive on the bus by setting the DRIVE_SEL bit of the DIGITAL OUTPUT REGISTER (DOR). The current controller model doesn't expect a BlockBackend to be NULL. A simple way to fix CVE-2021-20196 is to create an empty BlockBack

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Hanna Reitz
On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: From: Alexander Bulekov Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get: AddressSanitizer:DEADLYSIGNAL ===

[PATCH 0/2 for 6.2] Fix compiler warnings on Fedora 35 / CLang

2021-11-23 Thread Daniel P . Berrangé
Current QEMU git master caused compiler warnings on Fedora 35 when using CLang. It is expected to affect any distro with CLang >= 13.0.0 Since QEMU builds with -Werror by default we should fix these warnings before release, as this version of QEMU will increasing trigger the warnings as more distr

[PATCH 2/2] spice: Update QXLInterface for spice >= 0.15.0

2021-11-23 Thread Daniel P . Berrangé
From: John Snow spice updated the spelling (and arguments) of "attache_worker" in 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations compilations from reporting build errors. See also: https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed43b022439448492cb9 S

[PATCH 1/2] ui: avoid compiler warnings from unused clipboard info variable

2021-11-23 Thread Daniel P . Berrangé
With latest clang 13.0.0 we get ../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,-Wunused-but-set-variable] g_autoptr(QemuClipboardInfo) old = NULL; ^ The compiler can't tell that we only declared this variable in order to get the side

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Philippe Mathieu-Daudé
On 11/23/21 14:42, Hanna Reitz wrote: > On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: >> From: Alexander Bulekov >> >> Without the previous commit, when running 'make check-qtest-i386' >> with QEMU configured with '--enable-sanitizers' we get: >> >>    AddressSanitizer:DEADLYSIGNAL >>    ==

Re: [PATCH 2/2] spice: Update QXLInterface for spice >= 0.15.0

2021-11-23 Thread Richard Henderson
On 11/23/21 2:43 PM, Daniel P. Berrangé wrote: From: John Snow spice updated the spelling (and arguments) of "attache_worker" in 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations compilations from reporting build errors. See also: https://gitlab.freedesktop.org/spice/spice/-/c

Re: [PATCH 1/2] ui: avoid compiler warnings from unused clipboard info variable

2021-11-23 Thread Richard Henderson
On 11/23/21 2:43 PM, Daniel P. Berrangé wrote: With latest clang 13.0.0 we get ../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,-Wunused-but-set-variable] g_autoptr(QemuClipboardInfo) old = NULL; ^ The compiler can't tell that we o

Re: [PATCH-for-6.2 v3 1/2] hw/block/fdc: Kludge missing floppy drive to fix CVE-2021-20196

2021-11-23 Thread Philippe Mathieu-Daudé
On 11/23/21 14:33, Hanna Reitz wrote: > On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: >> Guest might select another drive on the bus by setting the >> DRIVE_SEL bit of the DIGITAL OUTPUT REGISTER (DOR). >> The current controller model doesn't expect a BlockBackend >> to be NULL. A simple way to

Re: [PATCH-for-6.2 0/2] hw/scsi/lsi53c895a: Fix guest-triggerable assert() in lsi_do_dma()

2021-11-23 Thread Paolo Bonzini
On 11/23/21 12:17, Philippe Mathieu-Daudé wrote: Trivial fix for this long due bug. Philippe Mathieu-Daudé (2): hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued tests/qtest: Add fuzz-lsi53c895a-test hw/scsi/lsi53c895a.c | 3 +- tests/qtest/fuzz-lsi5

Re: [PATCH 1/2] ui: avoid compiler warnings from unused clipboard info variable

2021-11-23 Thread Philippe Mathieu-Daudé
On 11/23/21 14:43, Daniel P. Berrangé wrote: > With latest clang 13.0.0 we get > > ../ui/clipboard.c:47:34: error: variable 'old' set but not used > [-Werror,-Wunused-but-set-variable] > g_autoptr(QemuClipboardInfo) old = NULL; > ^ > > The compiler can't tell

Re: [PATCH] hw/arm/virt: Extend nested and mte checks to hvf

2021-11-23 Thread Alexander Graf
On 23.11.21 13:34, Peter Maydell wrote: On Tue, 23 Nov 2021 at 12:29, Alexander Graf wrote: The virt machine has properties to enable MTE and Nested Virtualization support. However, its check to ensure the backing accel implementation supports it today only looks for KVM and bails out if it f

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Hanna Reitz
On 23.11.21 14:49, Philippe Mathieu-Daudé wrote: On 11/23/21 14:42, Hanna Reitz wrote: On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: From: Alexander Bulekov Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get:    Addres

Re: [RFC PATCH 10/12] qapi: Generate QOM config marshalling code

2021-11-23 Thread Markus Armbruster
Kevin Wolf writes: > Signed-off-by: Kevin Wolf > --- > backends/rng-random.c | 17 ++-- > backends/rng.c| 17 ++-- > scripts/qapi/main.py | 2 + > scripts/qapi/qom.py | 91 +++ > qapi/meson.build | 3 ++ > 5 files changed, 104 in

Re: [PATCH] docs: Introducing pseries documentation.

2021-11-23 Thread Leonardo Augusto Guimarães Garcia
On 11/17/21 20:30, David Gibson wrote: > On Wed, Nov 17, 2021 at 05:14:30PM -0300, lagar...@linux.ibm.com wrote: >> From: Leonardo Garcia >> >> The purpose of this document is to substitute the content currently >> available in the QEMU wiki at [0]. This initial version does contain >> some additi

Re: [RFC v2 PATCH 09/13] KVM: Introduce kvm_memfd_invalidate_range

2021-11-23 Thread Chao Peng
On Tue, Nov 23, 2021 at 09:46:34AM +0100, Paolo Bonzini wrote: > On 11/19/21 14:47, Chao Peng wrote: > > + > > + /* Prevent memslot modification */ > > + spin_lock(&kvm->mn_invalidate_lock); > > + kvm->mn_active_invalidate_count++; > > + spin_unlock(&kvm->mn_invalidate_lock); > > + > > +

Re: [RFC v2 PATCH 04/13] KVM: Add fd-based memslot data structure and utils

2021-11-23 Thread Chao Peng
On Tue, Nov 23, 2021 at 09:41:34AM +0100, Paolo Bonzini wrote: > On 11/19/21 14:47, Chao Peng wrote: > > For fd-based memslot store the file references for shared fd and the > > private fd (if any) in the memslot structure. Since there is no 'hva' > > concept we cannot call hva_to_pfn() to get a pf

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-23 Thread Chao Peng
On Tue, Nov 23, 2021 at 10:06:02AM +0100, Paolo Bonzini wrote: > On 11/19/21 16:39, David Hildenbrand wrote: > > > If qmeu can put all the guest memory in a memfd and not map it, then > > > I'd also like to see that the IOMMU can use this interface too so we > > > can have VFIO working in this conf

Re: [PATCH] MAINTAINERS: Remove me as a reviewer for the build and test/avocado

2021-11-23 Thread Willian Rampazzo
On Tue, Nov 23, 2021 at 7:37 AM Philippe Mathieu-Daudé wrote: > > On 11/22/21 20:11, Willian Rampazzo wrote: > > Remove me as a reviewer for the Build and test automation and the > > Integration Testing with the Avocado Framework and add Beraldo > > Leal. > > Thank you Willian for your QEMU contri

Re: Possible reward for fuzzer bug fixes? Secure Open Source Rewards Program

2021-11-23 Thread Thomas Huth
On 28/10/2021 16.48, Alexander Bulekov wrote: Recently a pilot for the Secure Open Source Rewards program was announced [1]. Currently this program is run by the Linux Foundation and sponsored by the Google Open Source Security Team. The page mentions that patches for issues discovered by OSS-Fu

Re: [RFC v2 PATCH 13/13] KVM: Enable memfd based page invalidation/fallocate

2021-11-23 Thread Chao Peng
On Tue, Nov 23, 2021 at 10:09:28AM +0100, Paolo Bonzini wrote: > On 11/23/21 02:06, Chao Peng wrote: > > > Maybe the kvm has to be tagged with a sequential id that incremented every > > > allocation. This id can be checked here. > > Sounds like a sequential id will be needed, no existing fields in

[PATCH 1/1] MAINTAINERS: update email address of Christian Borntraeger

2021-11-23 Thread Christian Borntraeger
My borntrae...@de.ibm.com email is just a forwarder to the linux.ibm.com address. Let us remove the extra hop to avoid a potential source of errors. While at it, add the relevant email addresses to mailmap. Signed-off-by: Christian Borntraeger --- .mailmap| 1 + MAINTAINERS | 6 +++--- 2 fi

Re: [PATCH 1/1] MAINTAINERS: update email address of Christian Borntraeger

2021-11-23 Thread Christian Borntraeger
Am 23.11.21 um 10:55 schrieb Christian Borntraeger: My borntrae...@de.ibm.com email is just a forwarder to the linux.ibm.com address. Let us remove the extra hop to avoid a potential source of errors. While at it, add the relevant email addresses to mailmap. Signed-off-by: Christian Borntrae

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-23 Thread David Hildenbrand
On 23.11.21 10:06, Paolo Bonzini wrote: > On 11/19/21 16:39, David Hildenbrand wrote: >>> If qmeu can put all the guest memory in a memfd and not map it, then >>> I'd also like to see that the IOMMU can use this interface too so we >>> can have VFIO working in this configuration. >> >> In QEMU we u

Re: [RFC PATCH 02/12] qom: Create object_configure()

2021-11-23 Thread Markus Armbruster
Kevin Wolf writes: > This renames object_set_properties_from_qdict() to object_configure() > and removes the QDict parameter from it: With visit_next_struct_member() > it can set all properties without looking at the keys of the QDict. > > Signed-off-by: Kevin Wolf > --- > qom/object_interfaces

Re: [PATCH 1/1] MAINTAINERS: update email address of Christian Borntraeger

2021-11-23 Thread Thomas Huth
On 23/11/2021 16.17, Christian Borntraeger wrote: Am 23.11.21 um 10:55 schrieb Christian Borntraeger: My borntrae...@de.ibm.com email is just a forwarder to the linux.ibm.com address. Let us remove the extra hop to avoid a potential source of errors. While at it, add the relevant email addres

Re: [PATCH-for-6.2 1/2] hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)

2021-11-23 Thread Hanna Reitz
On 18.11.21 12:57, Philippe Mathieu-Daudé wrote: Per the 82078 datasheet, if the end-of-track (EOT byte in the FIFO) is more than the number of sectors per side, the command is terminated unsuccessfully: Patch looks OK to me (can’t believe I’ve looked into the spec...), just one question (note

[PULL 0/3] Block patches

2021-11-23 Thread Hanna Reitz
The following changes since commit 73e0f70e097b7c92a5ce16ee35b53afe119b20d7: Merge tag 'pull-lu-20211123' of https://gitlab.com/rth7680/qemu into staging (2021-11-23 11:33:14 +0100) are available in the Git repository at: https://gitlab.com/hreitz/qemu.git tags/pull-block-2021-

[PULL 1/3] block/vvfat.c fix leak when failure occurs

2021-11-23 Thread Hanna Reitz
From: Daniella Lee Function vvfat_open called function enable_write_target and init_directories, and these functions malloc new memory for BDRVVVFATState::qcow_filename, BDRVVVFATState::used_clusters, and BDRVVVFATState::cluster_buff. When the specified folder does not exist ,it may contains mem

[PULL 3/3] iotests/149: Skip on unsupported ciphers

2021-11-23 Thread Hanna Reitz
Whenever qemu-img or qemu-io report that some cipher is unsupported, skip the whole test, because that is probably because qemu has been configured with the gnutls crypto backend. We could taylor the algorithm list to what gnutls supports, but this is a test that is run rather rarely anyway (becau

[PULL 2/3] iotests: Use aes-128-cbc

2021-11-23 Thread Hanna Reitz
Our gnutls crypto backend (which is the default as of 8bd0931f6) supports neither twofish-128 nor the CTR mode. CBC and aes-128 are supported by all of our backends (as far as I can tell), so use aes-128-cbc in our iotests. (We could also use e.g. aes-256-cbc, but the different key sizes would le

Re: [RFC PATCH 00/12] QOM/QAPI integration part 1

2021-11-23 Thread Markus Armbruster
Kevin Wolf writes: > This series adds QOM class definitions to the QAPI schema, introduces > a new TypeInfo.instance_config() callback that configures the object at > creation time (instead of setting properties individually) and is > separate from runtime property setters (which often used to be

Re: [PATCH-for-6.2 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-3507

2021-11-23 Thread Alexander Bulekov
On 28 1257, Philippe Mathieu-Daudé wrote: > Add the reproducer from https://gitlab.com/qemu-project/qemu/-/issues/339 > > Without the previous commit, when running 'make check-qtest-i386' > with QEMU configured with '--enable-sanitizers' we get: > > ==4028352==ERROR: AddressSanitizer: heap-

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Alexander Bulekov
On 211123 1449, Philippe Mathieu-Daudé wrote: > On 11/23/21 14:42, Hanna Reitz wrote: > > On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: > >> From: Alexander Bulekov > >> > >> Without the previous commit, when running 'make check-qtest-i386' > >> with QEMU configured with '--enable-sanitizers' w

Re: [PATCH-for-6.2 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-3507

2021-11-23 Thread Hanna Reitz
On 18.11.21 12:57, Philippe Mathieu-Daudé wrote: Add the reproducer from https://gitlab.com/qemu-project/qemu/-/issues/339 Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get: ==4028352==ERROR: AddressSanitizer: heap-buffer

Re: [RFC PATCH v3 0/5] QMP support for cold-plugging devices

2021-11-23 Thread Damien Hedde
On 11/20/21 10:00, Markus Armbruster wrote: Damien Hedde writes: Hi all, This series adds support for cold-plugging devices using QMP commands. It is a step towards machine configuration using QMP, but it does not allow the user to add more devices than he could do with the CLI options bef

[for-6.2] hw/intc/arm_gicv3: Update cached state after acknowledging LPI

2021-11-23 Thread Peter Maydell
In gicv3_redist_lpi_pending() we update cs->hpplpi to indicate the new highest priority pending LPI after changing the requested LPI pending bit. However the overall highest priority pending interrupt information won't be updated unless we call gicv3_redist_update(). We do that from the callsite i

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-23 Thread Jason Gunthorpe
On Tue, Nov 23, 2021 at 10:06:02AM +0100, Paolo Bonzini wrote: > I think it's great that memfd hooks are usable by more than one subsystem, > OTOH it's fair that whoever needs it does the work---and VFIO does not need > it for confidential VMs, yet, so it should be fine for now to have a single >

  1   2   3   >