[PULL 2/3] build-sys: disable vhost-user-gpu if !opengl

2022-08-17 Thread marcandre . lureau
From: Marc-André Lureau vhost-user-gpu uses epoxy/glflush and thus requires opengl. Signed-off-by: Marc-André Lureau Message-Id: <20220628132315.664026-1-marcandre.lur...@redhat.com> --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build i

[PULL 0/3] Fixes for QEMU 7.1-rc4

2022-08-17 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit c7208a6e0d049f9e8af15df908168a79b1f99685: Update version for v7.1.0-rc3 release (2022-08-16 20:45:19 -0500) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.git tags/fixes-pull-request for you to fetch

Re: [PATCH for-7.2 v2 15/20] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-17 Thread David Gibson
On Mon, Aug 15, 2022 at 07:48:14PM -0300, Daniel Henrique Barboza wrote: > > > On 8/8/22 01:21, David Gibson wrote: > > On Fri, Aug 05, 2022 at 06:39:43AM -0300, Daniel Henrique Barboza wrote: > > > Reading the FDT requires that the user saves the fdt_blob and then use > > > 'dtc' to read the con

Re: [PATCH v2 2/4] hw/virtio: gracefully handle unset vhost_dev vdev

2022-08-17 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Thu, Jul 28, 2022 at 02:55:01PM +0100, Alex Bennée wrote: >> I've noticed asserts firing because we query the status of vdev after >> a vhost connection is closed down. Rather than faulting on the NULL >> indirect just quietly reply false. >> >> Signed-off-by:

Re: [PATCH 2/2] hw/mips/boston: Pack fdt in fdt filter

2022-08-17 Thread David Gibson
On Tue, Aug 16, 2022 at 12:46:46PM +0100, Jiaxun Yang wrote: > > > > 2022年8月16日 01:44,Philippe Mathieu-Daudé 写道: > > > > On 13/8/22 18:27, Jiaxun Yang wrote: > >> FDT can be awfully fat after series of modifications in fdt > >> filter. Just pack it up before add to ram. > >> Signed-off-by: Jiax

Re: [PATCH for-7.2 v3 20/20] hmp, device_tree.c: add 'info fdt ' support

2022-08-17 Thread David Gibson
On Tue, Aug 16, 2022 at 02:34:28PM -0300, Daniel Henrique Barboza wrote: > 'info fdt' is only able to print full nodes so far. It would be good to > be able to also print single properties, since ometimes we just want > to verify a single value from the FDT. > > libfdt does not have support to fin

Re: [RFC PATCH 01/13] target/ppc: define PPC_INTERRUPT_* values directly

2022-08-17 Thread David Gibson
On Mon, Aug 15, 2022 at 01:20:07PM -0300, Matheus Ferst wrote: > This enum defines the bit positions in env->pending_interrupts for each > interrupt. However, except for the comparison in kvmppc_set_interrupt, > the values are always used as (1 << PPC_INTERRUPT_*). Define them > directly like that

Re: [PATCH for-7.2 v3 16/20] device_tree.c: support string array prop in fdt_format_node()

2022-08-17 Thread David Gibson
On Tue, Aug 16, 2022 at 02:34:24PM -0300, Daniel Henrique Barboza wrote: > To support printing string properties in 'info fdt' we need to determine > whether a void data might contain a string array. > > We do that by casting the void data to a string array and: > > - check if the array finishes

Re: [PATCH for-7.2 v3 18/20] device_node.c: enable 'info fdt' to print subnodes

2022-08-17 Thread David Gibson
On Tue, Aug 16, 2022 at 02:34:26PM -0300, Daniel Henrique Barboza wrote: > Printing subnodes of a given node will allow us to show a whole subtree, > which the additional perk of 'info fdt /' being able to print the whole > FDT. > > Since we're now printing more than one subnode, change 'fdt_info'

Re: [PATCH for-7.2 v3 10/20] hw/ppc: set machine->fdt in spapr machine

2022-08-17 Thread David Gibson
On Tue, Aug 16, 2022 at 02:34:18PM -0300, Daniel Henrique Barboza wrote: > The pSeries machine never bothered with the common machine->fdt > attribute. We do all the FDT related work using spapr->fdt_blob. > > We're going to introduce HMP commands to read and save the FDT, which > will rely on set

Re: [PATCH v3] dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies

2022-08-17 Thread Priyankar Jain
Hi Marc, Could you please merge this in master? I see this commit is missing in master, although it was approved long back. Thanks, Priyankar Jain On 26/11/21 7:45 pm, Priyankar Jain wrote: The purpose of dbus_get_proxies to construct the proxies corresponding to the IDs registered to dbus-vm

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-17 Thread Michael Roth
On Tue, Aug 16, 2022 at 03:38:08PM +, Sean Christopherson wrote: > On Tue, Aug 16, 2022, Gupta, Pankaj wrote: > > > > > > > Actually the current version allows you to delay the allocation to a > > > > > later time (e.g. page fault time) if you don't call fallocate() on the > > > > > private fd

[ANNOUNCE] QEMU 7.1.0-rc3 is now available

2022-08-17 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fourth release candidate for the QEMU 7.1 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-7.1.0-rc3.tar.xz http://downl

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-17 Thread Hugh Dickins
On Wed, 6 Jul 2022, Chao Peng wrote: > This is the v7 of this series which tries to implement the fd-based KVM > guest private memory. Here at last are my reluctant thoughts on this patchset. fd-based approach for supporting KVM guest private memory: fine. Use or abuse of memfd and shmem.c: mist

Re: [PATCH for-7.1 3/4] target/loongarch: rename the TCG CPU "la464" to "qemu64-v1.00"

2022-08-17 Thread maobibo
在 2022/8/18 10:31, WANG Xuerui 写道: > On 2022/8/17 21:26, Richard Henderson wrote: >> On 8/17/22 04:10, WANG Xuerui wrote: >>>  From my own experiences, different use cases care about different aspects >>> of the CPU, and that IMO is an argument in favor of providing both >>> (high-fidelity mod

Re: [PATCH 7/7] target/riscv: Honour -semihosting-config userspace=on and enable=on

2022-08-17 Thread Alistair Francis
On Tue, Aug 16, 2022 at 5:11 AM Peter Maydell wrote: > > The riscv target incorrectly enabled semihosting always, whether the > user asked for it or not. Call semihosting_enabled() passing the > correct value to the is_userspace argument, which fixes this and also > handles the userspace=on argum

Re: [PATCH 1/7] semihosting: Allow optional use of semihosting from userspace

2022-08-17 Thread Alistair Francis
On Tue, Aug 16, 2022 at 5:03 AM Peter Maydell wrote: > > Currently our semihosting implementations generally prohibit use of > semihosting calls in system emulation from the guest userspace. This > is a very long standing behaviour justified originally "to provide > some semblance of security" (s

Re: [PATCH v1] target/riscv: Add xicondops in ISA entry

2022-08-17 Thread Alistair Francis
On Tue, Aug 16, 2022 at 2:54 PM Rahul Pathak wrote: > > XVentanaCondOps is Ventana custom extension. Add > its extension entry in the ISA Ext array > > Signed-off-by: Rahul Pathak Reviewed-by: Alistair Francis Alistair > --- > > This patch is based on branch riscv-to-apply.next (Alistair qemu

Re: [PATCH for-7.1 3/4] target/loongarch: rename the TCG CPU "la464" to "qemu64-v1.00"

2022-08-17 Thread WANG Xuerui
On 2022/8/17 21:26, Richard Henderson wrote: On 8/17/22 04:10, WANG Xuerui wrote:  From my own experiences, different use cases care about different aspects of the CPU, and that IMO is an argument in favor of providing both (high-fidelity models named after actual product model names, and virt

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-17 Thread Kirill A. Shutemov
On Fri, Aug 05, 2022 at 07:55:38PM +0200, Paolo Bonzini wrote: > On 7/21/22 11:44, David Hildenbrand wrote: > > > > Also, I*think* you can place pages via userfaultfd into shmem. Not > > sure if that would count "auto alloc", but it would certainly bypass > > fallocate(). > > Yeah, userfaultfd_r

Re: [PATCH 4/8] migration: Implement dirty-limit convergence algo

2022-08-17 Thread Peter Xu
On Sat, Jul 23, 2022 at 03:49:16PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Implement dirty-limit convergence algo for live migration, > which is kind of like auto-converge algo but using dirty-limit > instead of cpu throttle to make migration convergent. > > Signed-off

Re: [PATCH 2/8] qapi/migration: Introduce vcpu-dirty-limit parameters

2022-08-17 Thread Peter Xu
On Sat, Jul 23, 2022 at 03:49:14PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce "vcpu-dirty-limit" migration parameter used > to limit dirty page rate during live migration. > > "vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are > two dirty-limit-related migra

Re: [PATCH 1/8] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2022-08-17 Thread Peter Xu
On Sat, Jul 23, 2022 at 03:49:13PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce "x-vcpu-dirty-limit-period" migration experimental > parameter, which is used to make dirtyrate calculation period > configurable. > > Signed-off-by: Hyman Huang(黄勇) > --- > migratio

Re: [PATCH v3 8/8] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov --- v2: Fix an incorrect usage of WITH_QEMU_LOCK_GUARD. v3: Fix commit message. block/parallels.c | 26 --

Re: [PATCH v3 7/8] parallels: Move statistic collection to a separate function

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vla

Re: [PATCH v3 6/8] parallels: Move check of leaks to a separate function

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- v2: No change. v3: Fix commit message. block/parallels.c |

Re: [RFC v3 5/8] block: add BlockRAMRegistrar

2022-08-17 Thread Stefan Hajnoczi
On Thu, Jul 14, 2022 at 11:30:11AM +0200, Hanna Reitz wrote: > On 08.07.22 06:17, Stefan Hajnoczi wrote: > > Emulated devices and other BlockBackend users wishing to take advantage > > of blk_register_buf() all have the same repetitive job: register > > RAMBlocks with the BlockBackend using RAMBloc

Re: [RFC v3 4/8] block: add BDRV_REQ_REGISTERED_BUF request flag

2022-08-17 Thread Stefan Hajnoczi
On Thu, Jul 14, 2022 at 10:54:12AM +0200, Hanna Reitz wrote: > On 08.07.22 06:17, Stefan Hajnoczi wrote: > > Block drivers may optimize I/O requests accessing buffers previously > > registered with bdrv_register_buf(). Checking whether all elements of a > > request's QEMUIOVector are within previou

Re: [PATCH v3 5/8] parallels: Move check of cluster outside image to a separate function

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vl

Re: [PATCH v3 4/8] parallels: Move check of unclean image to a separate function

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vla

[PULL 12/12] virtio-pci: don't touch pci on virtio reset

2022-08-17 Thread Michael S. Tsirkin
virtio level reset should not affect pci express registers such as PM, error or link. Fixes: 27ce0f3afc ("hw/virtio: fix Power Management Control Register for PCI Express virtio devices") Fixes: d584f1b9ca ("hw/virtio: fix Link Control Register for PCI Express virtio devices") Fixes: c2cabb3422

[PULL 11/12] tests: acpi: silence applesmc warning about invalid key

2022-08-17 Thread Michael S. Tsirkin
From: Igor Mammedov OSK value is irrelevant for ACPI test case. Supply fake OSK explicitly to prevent QEMU complaining about invalid key when it fallbacks to default_osk. Suggested-by: Daniel P. Berrangé Signed-off-by: Igor Mammedov Message-Id: <20220728133713.1369596-1-imamm...@redhat.com> Re

[PULL 06/12] hw/cxl: Fix memory leak in error paths

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron Use g_autofree to free the CXLFixedWindow structure if an error occurs in configuration before we have added to the list (via g_steal_pointer()) Fix Coverity CID: 1488872 Reported-by: Peter Maydell Signed-off-by: Jonathan Cameron Message-Id: <20220808122051.14822-2-jona

[PULL 10/12] hw/cxl: Correctly handle variable sized mailbox input payloads.

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron A placeholder of ~0 is used to indicate variable payload size. Whilst the checks for output payload correctly took this into account, those for input payload did not. This results in failure of the Set LSA command. Fixes: 464e14ac43 ("hw/cxl/device: Implement basic mailbo

[PULL 07/12] hw/cxl: Fix wrong query of target ports

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron Two issues were present in this code: 1) Check on which register to look in was inverted. 2) Both branches use the _LO register. Whilst here moved to extract32() rather than hand rolling the field extraction as simpler and hopefully less error prone. Fixes Coverity CID: 1

[PULL 05/12] x86: disable rng seeding via setup_data

2022-08-17 Thread Michael S. Tsirkin
From: Gerd Hoffmann Causes regressions when doing direct kernel boots with OVMF. At this point in the release cycle the only sensible action is to just disable this for 7.1 and sort it properly in the 7.2 devel cycle. Cc: Jason A. Donenfeld Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard

[PULL 04/12] hw/virtio: fix vhost_user_read tracepoint

2022-08-17 Thread Michael S. Tsirkin
From: Alex Bennée As reads happen in the callback we were never seeing them. We only really care about the header so move the tracepoint to when the header is complete. Fixes: 6ca6d8ee9d (hw/virtio: add vhost_user_[read|write] trace points) Signed-off-by: Alex Bennée Acked-by: Jason Wang Messa

[PULL 09/12] hw/cxl: Fix Get LSA input payload size which should be 8 bytes.

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron Get LSA needs 4 byte offset and 4 byte length arguments. CXL rev 2.0 Table 178. Fixes: 3ebe676a34 ("hw/cxl/device: Implement get/set Label Storage Area (LSA)") Signed-off-by: Jonathan Cameron Message-Id: <20220817145759.32603-3-jonathan.came...@huawei.com> Reviewed-by: Mi

[PULL 01/12] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-17 Thread Michael S. Tsirkin
From: Stefan Hajnoczi As soon as virtio_scsi_data_plane_start() attaches host notifiers the IOThread may start virtqueue processing. There is a race between IOThread virtqueue processing and virtio_scsi_data_plane_start() because it only assigns s->dataplane_started after attaching host notifiers

[PULL 08/12] hw/cxl: Add stub write function for RO MemoryRegionOps entries.

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron There is no checking on the availability of a write callback. Hence QEMU crashes if a write does occur to one of these regions. Discovered whilst chasing a Linux kernel bug that incorrectly wrote into one of these regions. Fixes: 6364adacdf ("hw/cxl/device: Implement the

[PULL 02/12] hw/virtio: gracefully handle unset vhost_dev vdev

2022-08-17 Thread Michael S. Tsirkin
From: Alex Bennée I've noticed asserts firing because we query the status of vdev after a vhost connection is closed down. Rather than faulting on the NULL indirect just quietly reply false. Signed-off-by: Alex Bennée Message-Id: <20220728135503.1060062-3-alex.ben...@linaro.org> Reviewed-by: Mi

[PULL 00/12] pc,virtio: fixes

2022-08-17 Thread Michael S. Tsirkin
The following changes since commit c7208a6e0d049f9e8af15df908168a79b1f99685: Update version for v7.1.0-rc3 release (2022-08-16 20:45:19 -0500) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to 9afb4177

[PULL 03/12] hw/virtio: handle un-configured shutdown in virtio-pci

2022-08-17 Thread Michael S. Tsirkin
From: Alex Bennée The assert() protecting against leakage is a little aggressive and causes needless crashes if a device is shutdown without having been configured. In this case no descriptors are lost because none have been assigned. Signed-off-by: Alex Bennée Message-Id: <20220728135503.10600

Re: [PATCH v3 3/8] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2022-08-17 Thread Denis V. Lunev
On 17.08.2022 21:48, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but c

Re: [PATCH v3 1/8] parallels: Out of image offset in BAT leads to image inflation

2022-08-17 Thread Denis V. Lunev
On 17.08.2022 21:43, Vladimir Sementsov-Ogievskiy wrote: On 8/17/22 22:27, Denis V. Lunev wrote: On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset i

Re: [PATCH v3 3/8] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but call parallels_set_bat_entry() helper and bdrv_co_flush() f

Re: [PATCH v3 1/8] parallels: Out of image offset in BAT leads to image inflation

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/17/22 22:27, Denis V. Lunev wrote: On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the

Re: [PATCH v3 1/8] parallels: Out of image offset in BAT leads to image inflation

2022-08-17 Thread Denis V. Lunev
On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image

Re: [PATCH v3 2/8] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Vladimir Sementsov-Ogievskiy --- v2: A new patch - a part of a splitted patch. v3: Fix commit message.

Re: [PATCH v3 1/8] parallels: Out of image offset in BAT leads to image inflation

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/15/22 12:02, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definite

Re: [PATCH v2 00/31] QOMify PPC4xx devices and minor clean ups

2022-08-17 Thread BALATON Zoltan
On Wed, 17 Aug 2022, BALATON Zoltan wrote: Hello, This is based on gitlab.com/danielhb/qemu/tree/ppc-7.2 This series contains the rest of Cédric's OOM'ify patches modified according my review comments and some other clean ups I've noticed along the way. v2 now also includes the sdram changes a

[PATCH v3 21/31] hw/ppc/sam3460ex: Remove PPC405 dependency from sam460ex

2022-08-17 Thread BALATON Zoltan
Now that shared PPC4xx devices are separated from PPC405 ones we can drop this depencency. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater --- v3: Also remove now unneeded #include hw/ppc/Kconfig| 1 - hw/ppc/sam460ex.c | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/pp

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-17 Thread Vladimir Sementsov-Ogievskiy
On 8/16/22 15:52, Emanuele Giuseppe Esposito wrote:   } @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)> assert(!job->txn);     if (job->driver->free) { +    AioContext *aio_context = job->aio_context;   job_unlock(); +    /* FIXME: aiocontext lock is r

Re: [PATCH v4] target/ppc: Fix host PVR matching for KVM

2022-08-17 Thread Daniel Henrique Barboza
On 7/30/22 22:33, Nicholas Piggin wrote: ppc_cpu_compare_class_pvr_mask() should match the best CPU class in the family, because it is used by the KVM subsystem to find the host CPU class. Since commit 03ae4133ab8 ("target-ppc: Add pvr_match() callback"), it matches any class in the family (th

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-17 Thread Ilya Leoshkevich
On Wed, 2022-08-17 at 11:23 -0500, Richard Henderson wrote: > On 8/17/22 10:05, Ilya Leoshkevich wrote: > > Hi, > > > > I noticed that when we get a SEGV due to jumping to non-readable > > memory, sometimes si_addr and program counter in siginfo_t are > > slightly > > off. I tracked this down to t

[PATCH v3 31/31] ppc4xx_sdram: QOM'ify

2022-08-17 Thread BALATON Zoltan
Change the ppc4xx_sdram model to a QOM class derived from the PPC4xx-dcr-device and name it ppc4xx-sdram-ddr. This is mostly modelling the DDR SDRAM controller found in the 440EP (used on the bamboo board) but also backward compatible with the older DDR controllers on some 405 SoCs so we also use i

Re: [PULL 0/9] pc,virtio: fixes

2022-08-17 Thread Michael S. Tsirkin
On Wed, Aug 17, 2022 at 12:12:03PM -0400, Michael S. Tsirkin wrote: > The following changes since commit c7208a6e0d049f9e8af15df908168a79b1f99685: > > Update version for v7.1.0-rc3 release (2022-08-16 20:45:19 -0500) > > are available in the Git repository at: > > git://git.kernel.org/pub/sc

[PATCH 2/2] tests/tcg/ppc64le: Added an underflow with UE=1 test

2022-08-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Added a test to see if the adjustment is being made correctly when an underflow occurs and UE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- This patch will also fail without the underflow with UE set bugfix Message-Id:<20220805141522.412864-3-luc

[PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test

2022-08-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Added a test to see if the adjustment is being made correctly when an overflow occurs and OE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- The prctl patch is not ready yet, so this patch does as Richard Henderson suggested and check the fp regist

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-08-17 Thread Victor Toso
On Wed, Jul 06, 2022 at 10:48:06AM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 06, 2022 at 10:37:54AM +0100, Daniel P. Berrangé wrote: > > On Wed, Jul 06, 2022 at 04:28:16AM -0500, Andrea Bolognani wrote: > > > You're right, that is undesirable. What about something like this? > > > > > > type

Re: [BUG] cxl can not create region

2022-08-17 Thread Jonathan Cameron via
On Thu, 11 Aug 2022 17:46:55 -0700 Dan Williams wrote: > Dan Williams wrote: > > Bobo WL wrote: > > > Hi Dan, > > > > > > Thanks for your reply! > > > > > > On Mon, Aug 8, 2022 at 11:58 PM Dan Williams > > > wrote: > > > > > > > > What is the output of: > > > > > > > > cxl list -MDTu

[PULL 08/10] hw/cxl: Correctly handle variable sized mailbox input payloads.

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron A placeholder of ~0 is used to indicate variable payload size. Whilst the checks for output payload correctly took this into account, those for input payload did not. This results in failure of the Set LSA command. Fixes: 464e14ac43 ("hw/cxl/device: Implement basic mailbo

[PATCH] target/s390x: Fix CLFIT and CLGIT immediate size

2022-08-17 Thread Ilya Leoshkevich
I2 is 16 bits, not 32. Found by running valgrind's none/tests/s390x/traps. Fixes: 1c2687518235 ("target-s390: Implement COMPARE AND TRAP") Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/tcg/

[PULL 02/10] hw/virtio: gracefully handle unset vhost_dev vdev

2022-08-17 Thread Michael S. Tsirkin
From: Alex Bennée I've noticed asserts firing because we query the status of vdev after a vhost connection is closed down. Rather than faulting on the NULL indirect just quietly reply false. Signed-off-by: Alex Bennée Message-Id: <20220728135503.1060062-3-alex.ben...@linaro.org> Reviewed-by: Mi

[PULL 06/10] hw/cxl: Add stub write function for RO MemoryRegionOps entries.

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron There is no checking on the availability of a write callback. Hence QEMU crashes if a write does occur to one of these regions. Discovered whilst chasing a Linux kernel bug that incorrectly wrote into one of these regions. Fixes: 6364adacdf ("hw/cxl/device: Implement the

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-17 Thread Richard Henderson
On 8/17/22 10:05, Ilya Leoshkevich wrote: Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before the end of a page, while in reality they

[PULL 05/10] x86: disable rng seeding via setup_data

2022-08-17 Thread Michael S. Tsirkin
From: Gerd Hoffmann Causes regressions when doing direct kernel boots with OVMF. At this point in the release cycle the only sensible action is to just disable this for 7.1 and sort it properly in the 7.2 devel cycle. Cc: Jason A. Donenfeld Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard

[PULL 01/10] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-17 Thread Michael S. Tsirkin
From: Stefan Hajnoczi As soon as virtio_scsi_data_plane_start() attaches host notifiers the IOThread may start virtqueue processing. There is a race between IOThread virtqueue processing and virtio_scsi_data_plane_start() because it only assigns s->dataplane_started after attaching host notifiers

[PATCH for-7.2] hw/usb/hcd-xhci: Check whether DMA accesses fail

2022-08-17 Thread Thomas Huth
If a guest sets up bad descriptors, it could force QEMU to access non-existing memory regions. Thus we should check the return value of dma_memory_read/write() to make sure that these errors don't go unnoticed. Signed-off-by: Thomas Huth --- hw/usb/hcd-xhci.c | 64 +++

[PULL 09/10] tests: acpi: silence applesmc warning about invalid key

2022-08-17 Thread Michael S. Tsirkin
From: Igor Mammedov OSK value is irrelevant for ACPI test case. Supply fake OSK explicitly to prevent QEMU complaining about invalid key when it fallbacks to default_osk. Suggested-by: Daniel P. Berrangé Signed-off-by: Igor Mammedov Message-Id: <20220728133713.1369596-1-imamm...@redhat.com> Re

Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup

2022-08-17 Thread Richard Henderson
On 8/17/22 09:07, Ilya Leoshkevich wrote: Oh my.  Well, we could (1) revert that patch because the premise is wrong, (2) go with your per-tb clearing, (3) clear the whole thing with cpu_tb_jmp_cache_clear Ideally we'd have some benchmark numbers to inform the choice... FWIW 6f1653180f570 stil

[PULL 10/10] virtio-pci: don't touch pci on virtio reset

2022-08-17 Thread Michael S. Tsirkin
virtio level reset should not affect pci express registers such as PM, error or link. Fixes: 27ce0f3afc ("hw/virtio: fix Power Management Control Register for PCI Express virtio devices") Fixes: d584f1b9ca ("hw/virtio: fix Link Control Register for PCI Express virtio devices") Fixes: c2cabb3422

[PULL 07/10] hw/cxl: Fix Get LSA input payload size which should be 8 bytes.

2022-08-17 Thread Michael S. Tsirkin
From: Jonathan Cameron Get LSA needs 4 byte offset and 4 byte length arguments. CXL rev 2.0 Table 178. Fixes: 3ebe676a34 ("hw/cxl/device: Implement get/set Label Storage Area (LSA)") Signed-off-by: Jonathan Cameron Message-Id: <20220817145759.32603-3-jonathan.came...@huawei.com> Reviewed-by: Mi

[PULL 00/10] pc,virtio: fixes

2022-08-17 Thread Michael S. Tsirkin
The following changes since commit c7208a6e0d049f9e8af15df908168a79b1f99685: Update version for v7.1.0-rc3 release (2022-08-16 20:45:19 -0500) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to 019d2530

[PULL 04/10] hw/virtio: fix vhost_user_read tracepoint

2022-08-17 Thread Michael S. Tsirkin
From: Alex Bennée As reads happen in the callback we were never seeing them. We only really care about the header so move the tracepoint to when the header is complete. Fixes: 6ca6d8ee9d (hw/virtio: add vhost_user_[read|write] trace points) Signed-off-by: Alex Bennée Acked-by: Jason Wang Messa

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-17 Thread Peter Maydell
On Wed, 17 Aug 2022 at 15:49, Nikita Ivanov wrote: > > Well... > > What exactly is still under discussion? In my perspective, the main pitfalls > have been resolved: > > 0. All possible places where TFR() macro could be applied are covered. > 1. Macro has been renamed in order to be more transpar

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-08-17 Thread Victor Toso
Hi, On Wed, Jul 06, 2022 at 04:28:16AM -0500, Andrea Bolognani wrote: > On Tue, Jul 05, 2022 at 05:35:26PM +0100, Daniel P. Berrangé wrote: > > On Tue, Jul 05, 2022 at 08:45:30AM -0700, Andrea Bolognani wrote: > > > All this string manipulation looks sketchy. Is there some reason that > > > I'm no

[PULL 03/10] hw/virtio: handle un-configured shutdown in virtio-pci

2022-08-17 Thread Michael S. Tsirkin
From: Alex Bennée The assert() protecting against leakage is a little aggressive and causes needless crashes if a device is shutdown without having been configured. In this case no descriptors are lost because none have been assigned. Signed-off-by: Alex Bennée Message-Id: <20220728135503.10600

[PATCH 09/10] iotests: Refactor tests of parallels images checks (131)

2022-08-17 Thread Alexander Ivanov
Replace hardcoded numbers by variables. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/131 | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/qemu-iotests/131 b/tests/qemu-iotests/131 index a847692b4c..601546c84c 100755 --- a/tests/q

[PATCH 08/10] iotests: Add test for BAT entries duplication check

2022-08-17 Thread Alexander Ivanov
Fill the image with a pattern and write another pattern in the second cluster. Corrupt the image and check if the pattern changes. Repair the image and check the patterns on guest and host sides. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 31 +

[PATCH 06/10] iotests: Add out-of-image check test for parallels format

2022-08-17 Thread Alexander Ivanov
Fill the image with a pattern to generate entries in the BAT, set the first BAT entry outside the image, try to read the corrupted image, repair and check for zeroes in the first cluster. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 78 +++

[PATCH 07/10] iotests: Add leak check test for parallels format

2022-08-17 Thread Alexander Ivanov
Write a pattern to the last cluster, extend the image by 1 claster, repair and check that the last cluster still has the same pattern. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 27 +++ tests/qemu-iotests/tests/parallels-checks.out | 22 ++

[PATCH 00/10] parallels: Add duplication check, refactor, fix bugs

2022-08-17 Thread Alexander Ivanov
This patchset depends on the patchset [PATCH v3 0/8] parallels: Refactor the code of images checks and fix a bug Fix an incorrect condition in out-of-image check and incorrect data end calculation in parallels_open(). Add parallels_handle_leak() and highest_offset() helpers. Add checking and rep

[PATCH 10/10] iotests: Fix cluster size in parallels images tests (131)

2022-08-17 Thread Alexander Ivanov
In this test cluster size is 64k, but modern tools generate images with cluster size 1M. Calculate cluster size using track field from image header. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/131 | 5 - tests/qemu-iotests/131.out | 44 +++---

[PATCH 05/10] parallels: Use highest_offset() helper in leak check

2022-08-17 Thread Alexander Ivanov
Deduplicate code by using highest_offset() helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index bd129f44fa..93d21804f2 100644 --- a/block/parallels.c +++ b/block/paral

[PATCH 04/10] parallels: Add checking and repairing duplicate offsets in BAT

2022-08-17 Thread Alexander Ivanov
Cluster offsets must be unique among all BAT entries. Find duplicate offsets in the BAT. If a duplicated offset is found fix it by copying the content of the relevant cluster to a new allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to dedu

[PATCH 01/10] parallels: Incorrect condition in out-of-image check

2022-08-17 Thread Alexander Ivanov
All the offsets in the BAT must be at least one cluster away from the end of the data area. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c i

[PATCH 02/10] parallels: Incorrect data end calculation in parallels_open

2022-08-17 Thread Alexander Ivanov
The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains an offset, in sectors, from the start of the

[PATCH 1/2] target/riscv: rvv-1.0: Simplify vfwredsum code

2022-08-17 Thread Yang Liu
Remove duplicate code by wrapping vfwredsum_vs's OP function. Signed-off-by: Yang Liu --- target/riscv/vector_helper.c | 56 +++- 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index a96f

[PATCH 03/10] parallels: Create parallels_handle_leak() to truncate excess clusters

2022-08-17 Thread Alexander Ivanov
This helper will be reused in the next patch for duplications check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 83 ++- 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index ce04a4da71.

[PATCH v2 29/31] ppc440_bamboo: Add missing 4 MiB valid memory size

2022-08-17 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_bamboo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 2aac8a3fe9..2bd5e41140 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -51,7 +51,7 @@ #define PPC

Re: [PATCH 00/22] QOMify PPC4xx devices and minor clean ups

2022-08-17 Thread BALATON Zoltan
On Tue, 16 Aug 2022, Cédric Le Goater wrote: On 8/13/22 17:34, BALATON Zoltan wrote: Hello, This is mased on gitlab.com/danielhb/qemu/tree/ppc-7.2 This series contains the rest of Cédric's patches modified according my review comments and some other small clean ups I've noticed along the way.

[PATCH v2 24/31] ppc4xx: Fix code style problems reported by checkpatch

2022-08-17 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/ppc/ppc405_uc.c | 5 +++-- hw/ppc/ppc440_bamboo.c | 27 ++-- hw/ppc/ppc440_uc.c | 3 ++- hw/ppc/ppc4xx_devs.c | 48 +++--- hw/ppc/ppc4xx_pci.c| 31 +-- 5 files chan

RE: AST2600 support in QEMU

2022-08-17 Thread Amit Kumar (Engrg-SW)
Hi Dan, Responding on behalf of Shivi. >> "So what does the "PCIe RC support" means? the BMC will be the PCIe RC?" Yes, BMC will be the PCIe RC to control downstream PCIe devices (end-points). - Amit -Original Message- From: Dan Zhang Sent: 15 August 2022 11:18 To: Cédric Le Goater C

[PATCH 2/2] target/riscv: rvv-1.0: vf[w]redsum distinguish between ordered/unordered

2022-08-17 Thread Yang Liu
Starting with RVV1.0, the original vf[w]redsum_vs instruction was renamed to vf[w]redusum_vs. The distinction between ordered and unordered is also more consistent with other instructions, although there is no difference in implementation between the two for QEMU. Signed-off-by: Yang Liu --- tar

[PATCH v2 31/31] ppc4xx_sdram: QOM'ify

2022-08-17 Thread BALATON Zoltan
Change the ppc4xx_sdram model to a QOM class derived from the PPC4xx-dcr-device and name it ppc4xx-sdram-ddr. This is mostly modelling the DDR SDRAM controller found in the 440EP (used on the bamboo board) but also backward compatible with the older DDR controllers on some 405 SoCs so we also use i

[PATCH v2 20/31] ppc405: Move machine specific code to ppc405_boards.c

2022-08-17 Thread BALATON Zoltan
These are only used by the board code so move out from the shared SoC model and put it in the boards file. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater --- hw/ppc/ppc405.h| 38 - hw/ppc/ppc405_boards.c | 375 +++-- hw/ppc/ppc405_uc

[PATCH v2 16/31] ppc/ppc405: Use an embedded PPCUIC model in SoC state

2022-08-17 Thread BALATON Zoltan
From: Cédric Le Goater Signed-off-by: Cédric Le Goater [balaton: Simplify sysbus device casts for readability] Signed-off-by: BALATON Zoltan --- hw/ppc/ppc405.h| 3 ++- hw/ppc/ppc405_uc.c | 28 ++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/h

[PATCH v2 23/31] ppc/ppc4xx: Fix sdram trace events

2022-08-17 Thread BALATON Zoltan
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: BALATON Zoltan --- hw/ppc/ppc4xx_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index 37e3b87c2e..27ebbb2ffc 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/

[PATCH v2 28/31] ppc4xx: Use Ppc4xxSdramBank in ppc4xx_sdram_banks()

2022-08-17 Thread BALATON Zoltan
Change ppc4xx_sdram_banks() to take one Ppc4xxSdramBank array instead of the separate arrays and adjust ppc4xx_sdram_init() and ppc440_sdram_init() accordingly as well as machines using these. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc405.h | 4 +--- hw/ppc/ppc405_uc.c | 10 +

  1   2   >