Re: [PATCH v6 6/8] KVM: Handle page fault for private memory

2022-06-24 Thread Nikunj A. Dadhania
On 5/19/2022 9:07 PM, Chao Peng wrote: > A page fault can carry the information of whether the access if private > or not for KVM_MEM_PRIVATE memslot, this can be filled by architecture > code(like TDX code). To handle page faut for such access, KVM maps the > page only when this private property m

Re: [PATCH v3 38/51] target/arm: Enable SME for -cpu max

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:51, Richard Henderson wrote: > > Note that SME remains effectively disabled for user-only, > because we do not yet set CPACR_EL1.SMEN. This needs to > wait until the kernel ABI is implemented. > > Signed-off-by: Richard Henderson > --- > docs/system/arm/emulation.rst |

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-06-24 Thread Michael Roth
On Fri, Jun 24, 2022 at 04:54:26PM +0800, Chao Peng wrote: > On Thu, Jun 23, 2022 at 05:59:49PM -0500, Michael Roth wrote: > > On Fri, May 20, 2022 at 06:31:02PM +, Sean Christopherson wrote: > > > On Fri, May 20, 2022, Andy Lutomirski wrote: > > > > The alternative would be to have some kind o

Re: [PATCH v3 36/51] target/arm: Implement SCLAMP, UCLAMP

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:55, Richard Henderson wrote: > > Signed-off-by: Richard Henderson Same commit message remark. Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 37/51] target/arm: Reset streaming sve state on exception boundaries

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:14, Richard Henderson wrote: > > We can handle both exception entry and exception return by > hooking into aarch64_sve_change_el. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) >

Re: [PATCH qemu v2] ppc: Define SETFIELD for the ppc target

2022-06-24 Thread Daniel Henrique Barboza
On 6/22/22 02:08, Alexey Kardashevskiy wrote: It keeps repeating, move it to the header. This uses __builtin_ffsl() to allow using the macros in #define. This is not using the QEMU's FIELD macros as this would require changing all such macros found in skiboot (the PPC PowerNV firmware). Sign

Re: [PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-06-24 Thread Peter Maydell
On Fri, 24 Jun 2022 at 13:39, Jonathan Cameron wrote: > > On Fri, 24 Jun 2022 11:48:47 +0100 > Peter Maydell wrote: > > > > This seems to be missing code to advertise the new devices in the > > device tree. > > Intentionally. I am not aware of any current interest > in defining DT support CXL or

Re: [PATCH v3 35/51] target/arm: Implement REVD

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:57, Richard Henderson wrote: > > Signed-off-by: Richard Henderson Again, commit message could note that this is an SVE insn that's only present with SME implemented. Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 34/51] target/arm: Implement PSEL

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:14, Richard Henderson wrote: > > Signed-off-by: Richard Henderson Would be helpful to note in the commit message that this is an SVE instruction that operates using the SVE vector length but that it is present only if SME is implemented. > +static bool trans_PSEL(Disas

Re: [PATCH qemu] spapr/ddw: Implement 64bit query extension

2022-06-24 Thread Daniel Henrique Barboza
On 6/23/22 04:31, Alexey Kardashevskiy wrote: PAPR 2.8 (2018) defines an extension to return 64bit value for the largest TCE block in "ibm,query-pe-dma-window". Recent Linux kernels support this already. This adds the extension and supports the older format. This advertises a bigger window f

Re: [PATCH qemu v3] ppc/spapr: Implement H_WATCHDOG

2022-06-24 Thread Daniel Henrique Barboza
On 6/22/22 02:10, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=303120 This was tested b

Re: [PATCH qemu v2] spapr/ddw: Reset DMA when the last non-default window is removed

2022-06-24 Thread Daniel Henrique Barboza
On 6/22/22 02:29, Alexey Kardashevskiy wrote: PAPR+/LoPAPR says: === The platform must restore the default DMA window for the PE on a call to the ibm,remove-pe-dma-window RTAS call when all of the following are true: a. The call removes the last DMA window remaining for the PE. b. The DMA

Re: [PATCH v3 33/51] target/arm: Implement SME integer outer product

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:29, Richard Henderson wrote: > > This is SMOPA, SUMOPA, USMOPA_s, UMOPA, for both Int8 and Int16. > > Signed-off-by: Richard Henderson > --- > target/arm/helper-sme.h| 16 > target/arm/sme.decode | 10 + > target/arm/sme_helper.c| 82 ++

Re: [PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-06-24 Thread Jonathan Cameron via
On Fri, 24 Jun 2022 11:48:47 +0100 Peter Maydell wrote: > On Thu, 16 Jun 2022 at 15:20, Jonathan Cameron > wrote: > > > > Code based on i386/pc enablement. > > The memory layout places space for 16 host bridge register regions after > > the GIC_REDIST2 in the extended memmap. > > The CFMWs are p

Re: [PATCH v3 30/51] target/arm: Implement FMOPA, FMOPS (non-widening)

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:07, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > +void HELPER(sme_fmopa_s)(void *vza, void *vzn, void *vzm, void *vpn, > + void *vpm, void *vst, uint32_t desc) > +{ > +intptr_t row, col, oprsz = simd_maxsz(desc); > +uin

Re: [PATCH 3/3] target/ppc: Check page dir/table base alignment

2022-06-24 Thread Leandro Lupori
On 6/23/22 18:34, Richard Henderson wrote: [E-MAIL EXTERNO] Não clique em links ou abra anexos, a menos que você possa confirmar o remetente e saber que o conteúdo é seguro. Em caso de e-mail suspeito entre imediatamente em contato com o DTI. On 6/23/22 07:26, Leandro Lupori wrote: On 6/21/22

Re: [PATCH v2 1/2] vhost: add method vhost_set_vring_err

2022-06-24 Thread Roman Kagan
On Thu, Jun 23, 2022 at 07:13:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: > From: Konstantin Khlebnikov > > Kernel and user vhost may report virtqueue errors via eventfd. > This is only reliable way to get notification about protocol error. ^^^ the > > Signed-off-by: Konstan

Re: [PATCH 0/2] Make local migration with TAP network device possible

2022-06-24 Thread Stefan Hajnoczi
Thanks! I will be offline for the next week. Feel free to progress this series without my review. Stefan On Fri, Jun 24, 2022, 11:53 Andrey Ryabinin wrote: > > > On 6/15/22 16:10, Stefan Hajnoczi wrote: > > On Tue, Jun 14, 2022 at 02:18:41PM +0300, Andrey Ryabinin wrote: > >> Hi > >> > >> Thes

Re: [PATCH 1/2] chardev: don't set O_NONBLOCK on SCM_RIGHTS file descriptors.

2022-06-24 Thread Daniel P . Berrangé
On Fri, Jun 24, 2022 at 02:00:15PM +0300, Andrey Ryabinin wrote: > > > On 6/15/22 16:12, Stefan Hajnoczi wrote: > > On Tue, Jun 14, 2022 at 02:18:42PM +0300, Andrey Ryabinin wrote: > >> This reverts commit 9b938c7262e4 ("chardev: clear O_NONBLOCK on SCM_RIGHTS > >> file descriptors"). > >> File

Re: [PATCH 1/2] chardev: don't set O_NONBLOCK on SCM_RIGHTS file descriptors.

2022-06-24 Thread Andrey Ryabinin
On 6/15/22 16:12, Stefan Hajnoczi wrote: > On Tue, Jun 14, 2022 at 02:18:42PM +0300, Andrey Ryabinin wrote: >> This reverts commit 9b938c7262e4 ("chardev: clear O_NONBLOCK on SCM_RIGHTS >> file descriptors"). >> File descriptor passed to QEMU via 'getfd' QMP command always >> changed to blockin

Re: [PATCH 0/2] Make local migration with TAP network device possible

2022-06-24 Thread Andrey Ryabinin
On 6/15/22 16:10, Stefan Hajnoczi wrote: > On Tue, Jun 14, 2022 at 02:18:41PM +0300, Andrey Ryabinin wrote: >> Hi >> >> These couple patches aims to make possible local migration (within one host) >> on the same TAP device used by source and destination QEMU >> >> The scenario looks like this >

Re: [PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-06-24 Thread Peter Maydell
On Thu, 16 Jun 2022 at 15:20, Jonathan Cameron wrote: > > Code based on i386/pc enablement. > The memory layout places space for 16 host bridge register regions after > the GIC_REDIST2 in the extended memmap. > The CFMWs are placed above the extended memmap. > > Only create the CEDT table if cxl=o

Re: [PATCH v11 2/2] qtest/cxl: Add aarch64 virt test for CXL

2022-06-24 Thread Peter Maydell
On Thu, 16 Jun 2022 at 15:20, Jonathan Cameron wrote: > > Add a single complex case for aarch64 virt machine. > > Signed-off-by: Jonathan Cameron > --- > tests/qtest/cxl-test.c | 48 + > tests/qtest/meson.build | 1 + > 2 files changed, 40 insertions(+),

Re: [PATCH] Updating gdbstub to allow safe multithreading in usermode emulation

2022-06-24 Thread Peter Maydell
On Sat, 28 May 2022 at 21:11, Ben Cohen wrote: > > I was testing some multi-threaded code in qemu's usermode and ran into > issues with the gdbstub because the user mode qemu emulation spawns new > threads when the process tries to make a new thread but the gdbstub does > not handle the threads we

Re: [PATCH v3 26/51] target/arm: Implement SME LD1, ST1

2022-06-24 Thread Peter Maydell
On Thu, 23 Jun 2022 at 21:36, Richard Henderson wrote: > On 6/23/22 04:41, Peter Maydell wrote: > > We now have several rather long functions that are > > pretty complicated and pretty similar handling the various > > SVE and SME loads and stores. Is there really no hope for > > sharing code ? > >

Re: [PATCH 1/2] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid()

2022-06-24 Thread Thomas Huth
On 24/06/2022 11.20, Christian Borntraeger wrote: Am 24.06.22 um 10:50 schrieb Thomas Huth: The s390-ccw bios fails to boot if the boot disk is a virtio-blk disk with a sector size of 4096. For example:   dasdfmt -b 4096 -d cdl -y -p -M quick /dev/dasdX   fdasd -a /dev/dasdX   install a guest

[PULL 2/3] linux-user: Add partial support for MADV_DONTNEED

2022-06-24 Thread Laurent Vivier
From: Ilya Leoshkevich Currently QEMU ignores madvise(MADV_DONTNEED), which break apps that rely on this for zeroing out memory [1]. Improve the situation by doing a passthrough when the range in question is a host-page-aligned anonymous mapping. This is based on the patches from Simon Hausmann

[PULL 3/3] linux-user: Adjust child_tidptr on set_tid_address() syscall

2022-06-24 Thread Laurent Vivier
From: Helge Deller Keep track of the new child tidptr given by a set_tid_address() syscall. Do not call the host set_tid_address() syscall because we are emulating the behaviour of writing to child_tidptr in the exit() path. Signed-off-by: Helge Deller Reviewed-by: Richard Henderson Reviewed-b

Re: [RFC PATCH v4 04/11] qapi: net: add stream and dgram netdevs

2022-06-24 Thread Markus Armbruster
Laurent Vivier writes: > Copied from socket netdev file and modified to use SocketAddress > to be able to introduce new features like unix socket. > > "udp" and "mcast" are squashed into dgram netdev, multicast is detected > according to the IP address type. > "listen" and "connect" modes are man

[PULL 1/3] linux-user/x86_64: Fix ELF_PLATFORM

2022-06-24 Thread Laurent Vivier
From: Richard Henderson We had been using the i686 platform string for x86_64. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1041 Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220603213801.64738-1-richard.hender...@linaro.org> Signed-off-by: Laurent Vivi

[PULL 0/3] Linux user for 7.1 patches

2022-06-24 Thread Laurent Vivier
-user pull request 20220624 Helge Deller (1): linux-user: Adjust child_tidptr on set_tid_address() syscall Ilya Leoshkevich (1): linux-user: Add partial support for MADV_DONTNEED Richard Henderson (1): linux-user/x86_64: Fix EL

[PATCH] virtio-iommu: Fix migration regression

2022-06-24 Thread Zhenzhong Duan
We also need to switch to the right address space on dest side after loading the device status. DMA to wrong address space is destructive. Fixes: 3facd774962fd ("virtio-iommu: Add bypass mode support to assigned device") Suggested-by: Eric Auger Signed-off-by: Zhenzhong Duan --- hw/virtio/virt

Re: [RFC PATCH v4 04/11] qapi: net: add stream and dgram netdevs

2022-06-24 Thread Markus Armbruster
Laurent Vivier writes: > Copied from socket netdev file and modified to use SocketAddress > to be able to introduce new features like unix socket. > > "udp" and "mcast" are squashed into dgram netdev, multicast is detected > according to the IP address type. > "listen" and "connect" modes are man

Re: [PATCH v4 44/53] semihosting: Cleanup chardev init

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Rename qemu_semihosting_connect_chardevs to > qemu_semihosting_chardev_init; pass the result > directly to qemu_semihosting_console_init. > > Store the chardev in SemihostingConsole instead > of SemihostingConfig, which lets us drop > semihostin

Re: [PATCH v6 6/8] KVM: Handle page fault for private memory

2022-06-24 Thread Chao Peng
On Fri, Jun 24, 2022 at 09:28:23AM +0530, Nikunj A. Dadhania wrote: > On 5/19/2022 9:07 PM, Chao Peng wrote: > > A page fault can carry the information of whether the access if private > > or not for KVM_MEM_PRIVATE memslot, this can be filled by architecture > > code(like TDX code). To handle page

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-06-24 Thread Chao Peng
On Thu, Jun 23, 2022 at 05:59:49PM -0500, Michael Roth wrote: > On Fri, May 20, 2022 at 06:31:02PM +, Sean Christopherson wrote: > > On Fri, May 20, 2022, Andy Lutomirski wrote: > > > The alternative would be to have some kind of separate table or bitmap > > > (part > > > of the memslot?) that

Re: [PATCH kvm-unit-tests] MAINTAINERS: Change drew's email address

2022-06-24 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 1/2] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid()

2022-06-24 Thread Christian Borntraeger
Am 24.06.22 um 10:50 schrieb Thomas Huth: The s390-ccw bios fails to boot if the boot disk is a virtio-blk disk with a sector size of 4096. For example: dasdfmt -b 4096 -d cdl -y -p -M quick /dev/dasdX fdasd -a /dev/dasdX install a guest onto /dev/dasdX1 using virtio-blk qemu-system-s

Re: [PATCH v4 43/53] semihosting: Expand qemu_semihosting_console_inc to read

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Allow more than one character to be read at one time. > Will be used by m68k and nios2 semihosting for stdio. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 12 +++- > linux-user

[PATCH 0/2] Fix booting from non-DASD disks with sector size of 4096

2022-06-24 Thread Thomas Huth
The s390-ccw bios fails to boot from non-DASD disks that have a sector size of 4096. Fix it by relaxing the check for the disk geometries. Thomas Huth (2): pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid() pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi()

[PATCH 1/2] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid()

2022-06-24 Thread Thomas Huth
The s390-ccw bios fails to boot if the boot disk is a virtio-blk disk with a sector size of 4096. For example: dasdfmt -b 4096 -d cdl -y -p -M quick /dev/dasdX fdasd -a /dev/dasdX install a guest onto /dev/dasdX1 using virtio-blk qemu-system-s390x -nographic -hda /dev/dasdX1 The bios then bai

[PATCH 2/2] pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi()

2022-06-24 Thread Thomas Huth
The virtio_assume_scsi() function is very questionable: First, it is only called for virtio-blk, and not for virtio-scsi, so the naming is already quite confusing. Second, it is called if we detected a "invalid" IPL disk, trying to fix it by blindly setting a sector size of 512. This of course won'

[PATCH v3 10/12] ppc/pnv: remove pecc->rp_model

2022-06-24 Thread Daniel Henrique Barboza
The attribute is unused. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4_pec.c | 2 -- include/hw/pci-host/pnv_phb4.h | 1 - 2 files changed, 3 deletions(-) diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c index 0ef66b9a9b..8dc363d69c 100644 --- a/hw/pci-

[PATCH v3 02/12] ppc/pnv: add PnvPHB base/proxy device

2022-06-24 Thread Daniel Henrique Barboza
The PnvPHB device is going to be the base device for all other powernv PHBs. It consists of a device that has the same user API as the other PHB, namely being a PCIHostBridge and having chip-id and index properties. It also has a 'backend' pointer that will be initialized with the PHB implementatio

[PATCH v3 12/12] ppc/pnv: move attach_root_port helper to pnv-phb.c

2022-06-24 Thread Daniel Henrique Barboza
The helper is only used in this file. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 24 hw/ppc/pnv.c | 25 - include/hw/ppc/pnv.h | 1 - 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/hw/pci-host/p

Re: [PATCH v11 0/2] arm/virt: CXL support via pxb_cxl

2022-06-24 Thread Jonathan Cameron via
On Thu, 16 Jun 2022 15:19:48 +0100 Jonathan Cameron via wrote: > Previously patches 40 and 41 of > [PATCH v10 00/45] CXl 2.0 emulation Support > https://lore.kernel.org/qemu-devel/20220429144110.25167-45-jonathan.came...@huawei.com/#r > > Now the base CXL support including for x86/pc is upstream

[PATCH v3 07/12] ppc/pnv: remove pnv-phb3-root-port

2022-06-24 Thread Daniel Henrique Barboza
The unified pnv-phb-root-port can be used in its place. There is no ABI breakage in doing so because no official QEMU release introduced user creatable pnv-phb3-root-port devices. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 2 +- hw/pci-host/pnv_phb3.c |

[PATCH v3 01/12] ppc/pnv: add PHB3 bus init helper

2022-06-24 Thread Daniel Henrique Barboza
The PnvPHB3 bus init consists of initializing the pci_io and pci_mmio regions, registering it via pci_register_root_bus() and then setup the iommu. We'll want to init the bus from outside pnv_phb3.c when the bus is removed from the PnvPHB3 device and put into a new parent PnvPHB device. The new pn

[PATCH v3 04/12] ppc/pnv: add PHB4 bus init helper

2022-06-24 Thread Daniel Henrique Barboza
Similar to what we already did for the PnvPHB3 device, let's add a helper to init the bus when using a PnvPHB4. This helper will be used by PnvPHb when PnvPHB4 turns into a backend. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 2 ++ hw/pci-host/pnv_phb4.c

[PATCH v3 11/12] ppc/pnv: remove PnvPHB4.version

2022-06-24 Thread Daniel Henrique Barboza
It's unused. Signed-off-by: Daniel Henrique Barboza --- include/hw/pci-host/pnv_phb4.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h index 61a0cb9989..20aa4819d3 100644 --- a/include/hw/pci-host/pnv_phb4.h +++ b/include/hw/pc

[PATCH v3 09/12] ppc/pnv: remove root port name from pnv_phb_attach_root_port()

2022-06-24 Thread Daniel Henrique Barboza
We support only a single root port, PNV_PHB_ROOT_PORT. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 7 +-- hw/ppc/pnv.c | 9 + include/hw/ppc/pnv.h | 3 +-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/hw/pci-host/pnv_phb.c b/hw/pci-

Re: [RFC PATCH v4 03/11] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-06-24 Thread Markus Armbruster
Laurent Vivier writes: > As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field > of Netdev structure can collides with "type" field of SocketAddress), > we introduce a way to bypass qemu_opts_parse_noisily() and use directly > visit_type_Netdev() to parse the backend parameters.

Re: [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Change 'ret' to uint64_t. This resolves a FIXME in the > m68k and nios2 semihosting that we've lost data. > Change 'err' to int. There is nothing target-specific > about the width of the errno value. > > Signed-off-by: Richard Henderson > ---

[PATCH v3 06/12] ppc/pnv: add pnv-phb-root-port device

2022-06-24 Thread Daniel Henrique Barboza
We have two very similar root-port devices, pnv-phb3-root-port and pnv-phb4-root-port. Both consist of a wrapper around the PCIESlot device that, until now, has no additional attributes. The main difference between the PHB3 and PHB4 root ports is that pnv-phb4-root-port has the pnv_phb4_root_port_

[PATCH v3 08/12] ppc/pnv: remove pnv-phb4-root-port

2022-06-24 Thread Daniel Henrique Barboza
The unified pnv-phb-root-port can be used instead. The phb4-root-port device isn't exposed to the user in any official QEMU release so there's no ABI breakage in removing it. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 4 +- hw/pci-host/pnv_phb4.c | 85 --

[PULL 10/14] build: improve -fsanitize-coverage-allowlist check

2022-06-24 Thread Paolo Bonzini
From: Alexander Bulekov The sancov filter check still fails when unused arguments are treated as errors. To work around that, add a SanitizerCoverage flag to the build-check. Fixes: aa4f3a3b88 ("build: fix check for -fsanitize-coverage-allowlist") Signed-off-by: Alexander Bulekov Message-Id: <2

[PATCH v3 03/12] ppc/pnv: turn PnvPHB3 into a PnvPHB backend

2022-06-24 Thread Daniel Henrique Barboza
We need a handful of changes that needs to be done in a single swoop to turn PnvPHB3 into a PnvPHB backend. In the PnvPHB3, since the PnvPHB device implements PCIExpressHost and will hold the PCI bus, change PnvPHB3 parent to TYPE_DEVICE. There are a couple of instances in pnv_phb3.c that needs to

Re: [PATCH v4 42/53] semihosting: Pass CPUState to qemu_semihosting_console_inc

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > We don't need CPUArchState, and we do want the CPUState of the > thread performing the operation -- use this instead of current_cpu. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/

[PATCH v3 05/12] ppc/pnv: turn PnvPHB4 into a PnvPHB backend

2022-06-24 Thread Daniel Henrique Barboza
Change the parent type of the PnvPHB4 device to TYPE_PARENT since the PCI bus is going to be initialized by the PnvPHB parent. Functions that needs to access the bus via a PnvPHB4 object can do so via the phb4->phb_base pointer. pnv_phb4_pec now creates a PnvPHB object. The powernv9 machine class

[PULL 14/14] accel: kvm: Fix memory leak in find_stats_descriptors

2022-06-24 Thread Paolo Bonzini
From: Miaoqian Lin This function doesn't release descriptors in one error path, result in memory leak. Call g_free() to release it. Fixes: cc01a3f4cadd ("kvm: Support for querying fd-based stats") Signed-off-by: Miaoqian Lin Message-Id: <20220624063159.57411-1-linmq...@gmail.com> Signed-off-by:

[PATCH v3 00/12] powernv: introduce pnv-phb base/proxy devices

2022-06-24 Thread Daniel Henrique Barboza
Hi, This is the version 3 of the pnv-phb proxy device which has the following main differences from v2: - it's rebased on top of "[PATCH v3 0/8] pnv-phb related cleanups" - it doesn't have any patches related to user-created devices There is no user visible change made here yet. We're making dev

Re: [PATCH v4 41/53] semihosting: Fix docs comment for qemu_semihosting_console_inc

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > The implementation of qemu_semihosting_console_inc does not > defer to gdbstub, but only reads from the fifo in console.c. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 9 - > 1

[PULL 08/14] tests/tcg: compile system emulation tests as freestanding

2022-06-24 Thread Paolo Bonzini
System emulation tests do not run in a hosted environment, since they do not link with libc. They should only use freestanding headers (float.h, limits.h, stdarg.h, stddef.h, stdbool.h, stdint.h, stdalign.h, stdnoreturn.h) and should be compiled with -ffreestanding in order to use the compiler imp

[PULL 01/14] tests/vm: do not specify -bios option

2022-06-24 Thread Paolo Bonzini
When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarantee that the one in the source tree works with the QEMU that is being used for the installation. Just remove th

Re: [PATCH v6 7/8] KVM: Enable and expose KVM_MEM_PRIVATE

2022-06-24 Thread Chao Peng
On Thu, Jun 23, 2022 at 05:07:51PM -0500, Michael Roth wrote: ... > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > > index db9d39a2d3a6..f93ac7cdfb53 100644 > > --- a/virt/kvm/kvm_main.c > > +++ b/virt/kvm/kvm_main.c > > @@ -843,6 +843,73 @@ static int kvm_init_mmu_notifier(struct kvm *

RE: [PATCH 1/3] virtio-iommu: Add bypass mode support to assigned device

2022-06-24 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Friday, June 24, 2022 12:52 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jean-phili...@linaro.org; >pbonz...@redhat.com; Zhang, Yu C ; Dong, >Chuanxiao ; Zhang, Tina > >Subject: Re: [PATCH 1/3] virtio-iommu: Add bypass m

[PULL 00/14] (Mostly) build system changes for 2022-06-24

2022-06-24 Thread Paolo Bonzini
The following changes since commit 2b049d2c8dc01de750410f8f1a4eac498c04c723: Merge tag 'pull-aspeed-20220622' of https://github.com/legoater/qemu into staging (2022-06-22 07:27:06 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you t

[PULL 12/14] audio/dbus: fix building

2022-06-24 Thread Paolo Bonzini
From: Marc-André Lureau Commit c9c847481 broken dbus audio module compilation with bad 'CONFIG_GIO' usage. Furthermore, it implied extra dependency on audio module which aren't necessary. The problem was that 'dbus_display' is not correctly automatically set on MacOS, because opengl dependency w

[PULL 13/14] meson.build: Require a recent version of libpng

2022-06-24 Thread Paolo Bonzini
From: Thomas Huth According to https://gitlab.com/qemu-project/qemu/-/issues/1080#note_998088246 QEMU does not compile with older versions of libpng, so we should check for a good version in meson.build. According to repology.org, our supported host target operating systems ship these versions:

[PULL 00/14] (Mostly) build system changes for 2022-06-24

2022-06-24 Thread Paolo Bonzini
The following changes since commit 2b049d2c8dc01de750410f8f1a4eac498c04c723: Merge tag 'pull-aspeed-20220622' of https://github.com/legoater/qemu into staging (2022-06-22 07:27:06 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you t

[PULL 11/14] fuzz: only use generic-fuzz targets on oss-fuzz

2022-06-24 Thread Paolo Bonzini
From: Alexander Bulekov The non-generic-fuzz targets often time-out, or run out of memory. Additionally, they create unreproducible bug-reports. It is possible that this is resulting in failing coverage-reports on OSS-Fuzz. In the future, these test-cases should be fixed, or removed. Reviewed-by

[PULL 07/14] configure: write EXTRA_CFLAGS for all sub-Makefiles

2022-06-24 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index c9feb1a924..0fd2838e82 100755 --- a/configure +++ b/configure @@ -2090,6 +2090,7 @@ probe_target_compiler() { } write_target_makefile() { + echo "E

[PULL 06/14] configure: allow more host/target combos to use the host compiler

2022-06-24 Thread Paolo Bonzini
Add more pairs of bi-arch compilers, so that it is not necessary to have e.g. both little-endian and big-endian ARM compilers. Signed-off-by: Paolo Bonzini --- configure | 4 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 8f3401a23e..c9feb1a924 100755 --- a/config

[PULL 05/14] configure, pc-bios/vof: pass cross CFLAGS correctly

2022-06-24 Thread Paolo Bonzini
Use the flags passed to the configure script for the ppc cross compiler, which in fact default to those that are needed to get the 32-bit ISA. Add the endianness flag so that it remains possible to use a ppc64le compiler to compile VOF. Signed-off-by: Paolo Bonzini --- configure| 13

[PULL 04/14] configure, pc-bios/s390-ccw: pass cross CFLAGS correctly

2022-06-24 Thread Paolo Bonzini
QEMU_CFLAGS is not available in pc-bios/s390-ccw/netboot.mak, but the Makefile needs to access the flags passed to the configure script for the s390x cross compiler. Fix everything and rename QEMU_CFLAGS to EXTRA_CFLAGS for consistency with tests/tcg. Reviewed-by: Thomas Huth Signed-off-by: Paol

Re: [PATCH v4 38/53] semihosting: Create semihost_sys_{stat,fstat}

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > These syscalls will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 7 ++ > semihosting/syscalls.c | 137

[PULL 03/14] configure, pc-bios/optionrom: pass cross CFLAGS correctly

2022-06-24 Thread Paolo Bonzini
The optionrom build is disregarding the flags passed to the configure script via --cross-cflags-i386. Pass it down and add it to the Makefile. This will make it possible to get the -m32 flag from $target_cflags to force a 32-bit build on 64-bit hosts, instead of supplying manually the arcane -Wa,

[PULL 09/14] build: try both native and cross compilers for linux-user tests

2022-06-24 Thread Paolo Bonzini
Configure is trying to fall back on cross compilers for targets that can have bi-arch or bi-endian toolchains, but there are many corner cases where just checking the name can go wrong. For example, the RHEL ppc64le compiler is bi-arch and bi-endian, but multilibs are disabled. Therefore it cannot

[PATCH v3 1/2] hw/pci-host/pam.c: Fully support RE^WE semantics of i440FX PAM

2022-06-24 Thread Lev Kujawski
The Programmable Attribute Registers (PAM) of QEMU's emulated i440FX chipset now fully support the exclusive Read Enable (RE) and Write Enable (WE) modes by forwarding reads of the applicable PAM region to RAM and writes to the bus or vice versa, respectively. This chipset functionality is often u

[PULL 02/14] pc-bios/optionrom: use -m16 unconditionally

2022-06-24 Thread Paolo Bonzini
Remove support for .code16gcc, all supported platforms have -m16. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- pc-bios/optionrom/Makefile| 15 +-- pc-bios/optionrom/code16gcc.h | 3 --- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 pc-b

Re: [PATCH v4 39/53] semihosting: Create semihost_sys_gettimeofday

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This syscall will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/syscalls.c | 42 ++

Re: [PATCH v4 38/53] semihosting: Create semihost_sys_{stat,fstat}

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > These syscalls will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 7 ++ > semihosting/syscalls.c | 137

Re: [PATCH] meson.build: Require a recent version of libpng

2022-06-24 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] accel: kvm: Fix memory leak in find_stats_descriptors

2022-06-24 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v3 2/2] tests/qtest/i440fx-test.c: Enable full test of i440FX PAM operation

2022-06-24 Thread Lev Kujawski
With the prior patch in this series adding support for RE^WE PAM semantics, the '#ifndef BROKEN' segments of test_i440fx_pam can now be enabled. Additionally: - Verify that changing attributes does not affect the initial contents of the PAM region; - Verify that that the first new mask is writte

Re: [PATCH] audio/dbus: fix building

2022-06-24 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2] fuzz: only use generic-fuzz targets on oss-fuzz

2022-06-24 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v4 37/53] semihosting: Split out semihost_sys_system

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_SYSTEM to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/arm-compat-semi.c | 12 +- >

Re: [PATCH v4 35/53] semihosting: Split out semihost_sys_remove

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_REMOVE to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/arm-compat-semi.c | 13 +--

Re: [PATCH v4 36/53] semihosting: Split out semihost_sys_rename

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_RENAME to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 4 +++ > semihosting/arm-compat-semi.c | 21 +---

RE: [PATCH 0/3] Add bypass mode support to assigned device

2022-06-24 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Friday, June 24, 2022 12:52 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jean-phili...@linaro.org; >pbonz...@redhat.com; Zhang, Yu C ; Dong, >Chuanxiao ; Zhang, Tina > >Subject: Re: [PATCH 0/3] Add bypass mode

Re: [PATCH 4/9] hw/arm/aspeed: add Qualcomm Firework machine and FRU device

2022-06-24 Thread Cédric Le Goater
On 6/23/22 16:11, Jae Hyun Yoo wrote: On 6/22/2022 11:43 PM, Cédric Le Goater wrote: On 6/22/22 19:28, Jae Hyun Yoo wrote: From: Graeme Gregory Add base for Qualcomm Firework machine and add its FRU device which is defined by DC-SCM to be fixed address 0x50. Signed-off-by: Graeme Gregory --

Re: [PATCH v4 34/53] semihosting: Split out semihost_sys_flen

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > The ARM-specific SYS_FLEN isn't really something that can be > reused by other semihosting apis, but there are parts that can > reused for the implementation of semihost_sys_fstat. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel

Re: [PATCH v2 6/8] aspeed: Add fby35 skeleton

2022-06-24 Thread Cédric Le Goater
On 6/24/22 02:36, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater Thanks, C. --- MAINTAINERS| 1 + hw/arm/fby35.c | 54 ++ hw/arm/meson.build | 3 ++- 3 files changed, 57 insertions(+),

<    1   2   3