Re: Time to introduce a migration protocol negotiation (Re: [PATCH v2 00/25] migration: Postcopy Preemption)

2022-03-18 Thread Peter Xu
On Wed, Mar 16, 2022 at 11:00:53AM +, Daniel P. Berrangé wrote: > On Wed, Mar 16, 2022 at 06:40:08PM +0800, Peter Xu wrote: > > On Wed, Mar 16, 2022 at 09:59:28AM +, Daniel P. Berrangé wrote: > > > On Wed, Mar 16, 2022 at 11:30:59AM +0800, Peter Xu wrote: > > > > On Tue, Mar 15, 2022 at 11:

Re: [PATCH 1/2] intel-iommu: update root_scalable before switching as during post_load

2022-03-18 Thread Peter Xu
On Thu, Mar 17, 2022 at 04:05:21PM +0800, Jason Wang wrote: > We need check whether passthrough is enabled during > vtd_switch_address_space() by checking the context entries. This > requires the root_scalable to be set correctly otherwise we may try to > check legacy rsvd bits instead of scalable

Re: [PATCH 2/2] intel-iommu: update iq_dw during post load

2022-03-18 Thread Peter Xu
On Thu, Mar 17, 2022 at 04:05:22PM +0800, Jason Wang wrote: > We need to update iq_dw according to the DMA_IRQ_REG during post > load. Otherwise we may get wrong IOTLB invalidation descriptor after > migration. > > Fixes: fb43cf739e ("intel_iommu: scalable mode emulation") > Signed-off-by: Jason W

Re: [PATCH v4 0/7] target/riscv: Initial support for the Sdtrig extension via M-mode CSRs

2022-03-18 Thread Alistair Francis
On Tue, Mar 15, 2022 at 5:17 PM Bin Meng wrote: > > > This adds initial support for the Sdtrig extension via the Trigger Module, > as defined in the RISC-V Debug Specification [1]. > > Only "Address / Data Match" trigger (type 2) is implemented as of now, > which is mainly used for hardware breakp

Re: [PATCH v7 00/46] CXl 2.0 emulation Support

2022-03-18 Thread Mark Cave-Ayland
On 17/03/2022 16:47, Jonathan Cameron via wrote: Ah great! As you've already noticed my particular case was performing partial decoding on a memory region, but there are no issues if you need to dispatch to another existing address space such as PCI/IOMMU. Creating a separate address space per

[PATCH v2 1/3] linux-headers: Sync the linux headers

2022-03-18 Thread Chenyi Qiang
Signed-off-by: Chenyi Qiang --- linux-headers/asm-x86/kvm.h | 4 linux-headers/linux/kvm.h | 29 - 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index 2da3316bb5..d8ef0d993e 100644 ---

[PATCH v2 0/3] Enable notify VM exit

2022-03-18 Thread Chenyi Qiang
Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The corresponding KVM patch series is available at https://lore.kernel.org/lkml/20220318074955.22428

[PATCH v2 2/3] i386: kvm: Save&restore triple fault event

2022-03-18 Thread Chenyi Qiang
For the direct triple faults, i.e. hardware detected and KVM morphed to VM-Exit, KVM will never lose them. But for triple faults sythesized by KVM, e.g. the RSM path, if KVM exits to userspace before the request is serviced, userspace coud migrate the VM and lose the triple fault. A new flag KVM_V

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-18 Thread Stefano Garzarella
On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wrote: Am 17.03.2022 um 17:26 schrieb Stefano Garzarella : Commit d24f80234b ("block/rbd: increase dynamically the image size") added a workaround to support growing images (eg. qcow2), resizing the image before write operations that exc

[PATCH v2 3/3] i386: Add notify VM exit support

2022-03-18 Thread Chenyi Qiang
There are cases that malicious virtual machine can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and IRQ) can be delivered. It leads the CPU to be unavailable to host or other VMs. Not

comparison of coroutine backends

2022-03-18 Thread Paolo Bonzini
Hi all, based on the previous discussions here is a comparison of the various possibilities for implementing coroutine backends in QEMU and the respective advantages and disadvantages. I'm adding a third possibility for stackless coroutines, which is to use the LLVM/clang builtins. I believe th

[PATCH] aspeed: Add eMMC Boot Controller stub

2022-03-18 Thread Joel Stanley
Guest code (u-boot) pokes at this on boot. No functionality is required for guest code to work correctly, but it helps to document the region being read from. Signed-off-by: Joel Stanley --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast2600.c | 6 ++ 2 files changed, 7 insertions(

Re: [PATCH v22 0/7] Add vmnet.framework based network backend

2022-03-18 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki Thank you for this great work! On 2022/03/18 2:28, Vladislav Yaroshchuk wrote: macOS provides networking API for VMs called 'vmnet.framework': https://developer.apple.com/documentation/vmnet We can provide its support as the new QEMU networ

Re: [PATCH] aspeed: Add eMMC Boot Controller stub

2022-03-18 Thread Cédric Le Goater
On 3/18/22 10:22, Joel Stanley wrote: Guest code (u-boot) pokes at this on boot. No functionality is required for guest code to work correctly, but it helps to document the region being read from. Signed-off-by: Joel Stanley --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast2600.c

Re: [PATCH v2 1/3] hw/arm/virt: Fix CPU's default NUMA node ID

2022-03-18 Thread Igor Mammedov
On Fri, 18 Mar 2022 14:23:34 +0800 "wangyanan (Y)" wrote: > Hi Gavin, > > On 2022/3/3 11:11, Gavin Shan wrote: > > The default CPU-to-NUMA association is given by > > mc->get_default_cpu_node_id() > > when it isn't provided explicitly. However, the CPU topology isn't fully > > considered in the

Re: [PATCH v7 00/46] CXl 2.0 emulation Support

2022-03-18 Thread Jonathan Cameron via
On Fri, 18 Mar 2022 08:14:58 + Mark Cave-Ayland wrote: > On 17/03/2022 16:47, Jonathan Cameron via wrote: > > >> Ah great! As you've already noticed my particular case was performing > >> partial > >> decoding on a memory region, but there are no issues if you need to > >> dispatch to > >>

[PATCH trivial 1/1] hw/pci/pci.c: Fix typos of "Firewire", and of "controller" on same line

2022-03-18 Thread Rebecca Cran
Signed-off-by: Rebecca Cran --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 5cb1232e271d..dae9119bfe5f 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1697,7 +1697,7 @@ static const pci_class_desc pci_class_descriptions[] =

Re: [PULL 15/22] x86: Grant AMX permission for guest

2022-03-18 Thread Michal Prívozník
On 3/16/22 16:57, Peter Krempa wrote: > On Tue, Mar 08, 2022 at 12:34:38 +0100, Paolo Bonzini wrote: >> From: Yang Zhong >> >> Kernel allocates 4K xstate buffer by default. For XSAVE features >> which require large state component (e.g. AMX), Linux kernel >> dynamically expands the xstate buffer o

Re: [PATCH trivial 1/1] hw/pci/pci.c: Fix typos of "Firewire", and of "controller" on same line

2022-03-18 Thread Peter Maydell
On Fri, 18 Mar 2022 at 10:14, Rebecca Cran wrote: > > Signed-off-by: Rebecca Cran > --- > hw/pci/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/pci/pci.c b/hw/pci/pci.c > index 5cb1232e271d..dae9119bfe5f 100644 > --- a/hw/pci/pci.c > +++ b/hw/pci/pci.c > @@ -16

Re: [PATCH v3 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-18 Thread Peter Maydell
On Wed, 16 Mar 2022 at 03:53, Andrew Deason wrote: > > On older Solaris releases (before Solaris 11), we didn't get a > prototype for madvise, and so util/osdep.c provides its own prototype. > Some time between the public Solaris 11.4 release and Solaris 11.4.42 > CBE, we started getting an madvis

Re: [PATCH v3 0/3] Fixes for building on Solaris 11.4.42 CBE

2022-03-18 Thread Peter Maydell
On Wed, 16 Mar 2022 at 08:55, Michael S. Tsirkin wrote: > > On Tue, Mar 15, 2022 at 10:52:24PM -0500, Andrew Deason wrote: > > With these minor fixes, I can build qemu on Solaris 11.4.42 CBE > > (Oracle's new rolling release thing), using '--disable-rdma > > --enable-modules --disable-dbus-display

Re: [PATCH v3 0/6] hw/arm: zynqmp: Add CRF and APU control to support PSCI

2022-03-18 Thread Peter Maydell
On Thu, 17 Mar 2022 at 19:21, Edgar E. Iglesias wrote: > > On Thu, Mar 17, 2022 at 8:15 PM Peter Maydell > wrote: >> >> On Wed, 16 Mar 2022 at 16:46, Edgar E. Iglesias >> wrote: >> > >> > From: "Edgar E. Iglesias" >> > >> > This adds the necessary modeling to support some of our firmware >> >

Re: [PATCH] linux-user: Clean up arg_start/arg_end confusion

2022-03-18 Thread Peter Maydell
On Tue, 15 Mar 2022 at 22:47, Richard Henderson wrote: > > We had two sets of variables: arg_start/arg_end, and > arg_strings/env_strings. In linuxload.c, we set the > first pair to the bounds of the argv strings, but in > elfload.c, we set the first pair to the bounds of the > argv pointers and

Re: [PATCH v3 1/9] hvf: move memory related functions from hvf-accel-ops.c to hvf-mem.c

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > Signed-off-by: Yan-Jie Wang > --- > accel/hvf/hvf-accel-ops.c | 220 + > accel/hvf/hvf-mem.c | 252 ++ > accel/hvf/meson.build | 1 + > include/sysemu/hvf_int.h |

Re: aarch64 efi boot failures with qemu 6.0+

2022-03-18 Thread Lorenzo Pieralisi
On Tue, Jul 27, 2021 at 12:14:48PM +0200, Ard Biesheuvel wrote: > (+ Lorenzo) > > On Tue, 27 Jul 2021 at 12:07, Michael S. Tsirkin wrote: > > > > On Tue, Jul 27, 2021 at 11:50:23AM +0200, Ard Biesheuvel wrote: > > > On Tue, 27 Jul 2021 at 11:30, Michael S. Tsirkin wrote: > > > > > > > > On Tue,

[PATCH] x86/amx: compatible with older kernel release

2022-03-18 Thread Yang Zhong
The AMX KVM introduced one new ARCH_GET_XCOMP_SUPP system attribute API to get host side supported_xcr0 and latest Qemu can decide if it can request dynamically enabled XSAVE features permission. But this implementation(19db68ca68) did not consider older kernel release. This patch can avoid to read

Re: [PATCH for-7.1] hw: Add compat machines for 7.1

2022-03-18 Thread Laurent Vivier
Le 16/03/2022 à 15:55, Cornelia Huck a écrit : Add 7.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 14 ++

Re: [PULL 15/22] x86: Grant AMX permission for guest

2022-03-18 Thread Yang Zhong
On Fri, Mar 18, 2022 at 11:13:56AM +0100, Michal Prívozník wrote: > On 3/16/22 16:57, Peter Krempa wrote: > > On Tue, Mar 08, 2022 at 12:34:38 +0100, Paolo Bonzini wrote: > >> From: Yang Zhong > >> > >> Kernel allocates 4K xstate buffer by default. For XSAVE features > >> which require large state

Re: [PATCH v3 3/9] hvf: use correct data types for addresses in memory related functions

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > Follow the QEMU coding style. Use hwaddr for guest physical address. > > Signed-off-by: Yan-Jie Wang > --- > accel/hvf/hvf-mem.c | 2 +- > include/sysemu/hvf_int.h | 8 > 2 files changed, 5 insertions(+), 5 deletions(-) Reviewed

Re: [PATCH v3 2/9] hvf: simplify data structures and codes of memory related functions

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > * Remove mac_slot and use hvf_slot only. The function of the two structures > are similar. > > * Refactor function hvf_set_phys_mem(): > - Remove unnecessary checks because any modified memory sections >will be removed first (region_del c

Re: [PATCH v3 6/9] hvf: add a lock for memory related functions

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > We follow how KVM accel does in its memory listener (kvm-all.c) and add > a lock for the memory related functions. Could you outline the race condition or conflicting access that adding this mutex is fixing, please ? thanks -- PMM

Re: [PATCH v3 4/9] hvf: rename struct hvf_slot to HVFSlot

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > Follow the QEMU coding style. Structured type names are in CamelCase. > > Signed-off-by: Yan-Jie Wang > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH for-7.1] hw: Add compat machines for 7.1

2022-03-18 Thread Thomas Huth
On 16/03/2022 15.55, Cornelia Huck wrote: Add 7.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 14 +++

Re: [PATCH for-7.1] hw: Add compat machines for 7.1

2022-03-18 Thread Eric Auger
Hi Connie, On 3/16/22 3:55 PM, Cornelia Huck wrote: > Add 7.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. > > Signed-off-by: Cornelia Huck > --- > hw/arm/virt.c | 9 - > hw/core/machine.c | 3 +++ > hw/i386/pc.c | 3 +++ > hw/i386/pc_piix.c

[RFC PATCH] include/hw: start documenting the vhost API

2022-03-18 Thread Alex Bennée
While trying to get my head around the nest of interactions for vhost devices I though I could start by documenting the key API functions. This patch documents the main API hooks for creating and starting a vhost device as well as how the configuration changes are handled. Signed-off-by: Alex Benn

[PATCH 0/2] iotests/207: Filter host fingerprint

2022-03-18 Thread Hanna Reitz
Hi, Commit e3296cc796aeaf (“block: print the server key type and fingerprint on failure”) improved the verbosity of our ssh block driver's error messages for fingerprint mismatches. However, iotest 207, which tests such errors, has not been adjusted accordingly. Since the fingerprint will differ

[PATCH 2/2] iotests/207: Filter host fingerprint

2022-03-18 Thread Hanna Reitz
Commit e3296cc796aeaf319f3ed4e064ec309baf5e4da4 made the ssh block driver's error message for fingerprint mismatches more verbose, so it now prints the actual host key fingerprint and the key type. iotest 207 tests such errors, but was not amended to filter that fingerprint (which is host-specific

[PATCH 1/2] iotests.py: Filters for VM.run_job()

2022-03-18 Thread Hanna Reitz
Allow filters for VM.run_job(), and pass the filters given to VM.blockdev_create() to it. (Use this opportunity to annotate VM.run_job()'s parameter types; unfortunately, for the filter, I could not come up with anything better than Callable[[Any], Any] that would pass mypy's scrutiny.) At one po

Re: [PATCH trivial 1/1] hw/pci/pci.c: Fix typos of "Firewire", and of "controller" on same line

2022-03-18 Thread Laurent Vivier
Le 18/03/2022 à 11:45, Peter Maydell a écrit : On Fri, 18 Mar 2022 at 10:14, Rebecca Cran wrote: Signed-off-by: Rebecca Cran --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 5cb1232e271d..dae9119bfe5f 100644 --- a/hw/pci

Re: [PATCH vRESEND] virtio/virtio-balloon: Prefer Object* over void* parameter

2022-03-18 Thread Laurent Vivier
Le 04/03/2022 à 11:20, Michael S. Tsirkin a écrit : On Tue, Mar 01, 2022 at 11:23:01PM +0100, Bernhard Beschow wrote: *opaque is an alias to *obj. Using the ladder makes the code consistent with with other devices, e.g. accel/kvm/kvm-all and accel/tcg/tcg-all. It also makes the cast more typesaf

Re: [PATCH v3 7/9] hvf: use GTree to store memory slots instead of fixed-size array

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > Currently, there are only 32 memory slots in the fixed size array. > It is not scalable. Instead of using fixed size array, use GTree > (from glib library) and dynamically-allocated structures to store > memory slots. > > Signed-off-by: Yan-Jie

Re: [PATCH v2 1/3] hw/arm/virt: Fix CPU's default NUMA node ID

2022-03-18 Thread wangyanan (Y)
On 2022/3/18 17:56, Igor Mammedov wrote: On Fri, 18 Mar 2022 14:23:34 +0800 "wangyanan (Y)" wrote: Hi Gavin, On 2022/3/3 11:11, Gavin Shan wrote: The default CPU-to-NUMA association is given by mc->get_default_cpu_node_id() when it isn't provided explicitly. However, the CPU topology isn't f

Re: [PATCH v3 5/9] hvf: fix memory dirty-tracking

2022-03-18 Thread Peter Maydell
On Wed, 2 Mar 2022 at 13:04, Yan-Jie Wang wrote: > > Dirty-tracking in HVF is not properly implemented. > > On Intel Macs, Ubuntu ISO boot menu does not show properly. > > On Apple Silicon, using bochs-display may cause the guest crashes because > the guest may uses load/store instructions on fram

[PULL 00/21] target-arm queue

2022-03-18 Thread Peter Maydell
000) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220318 for you to fetch changes up to 79d54c9eac04c554e3c081589542f801ace71797: util/osdep: Remove some early cr

[PULL 01/21] target/arm: Fix sve2 ldnt1 and stnt1

2022-03-18 Thread Peter Maydell
From: Richard Henderson For both ldnt1 and stnt1, the meaning of the Rn and Rm are different from ld1 and st1: the vector and integer registers are reversed, and the integer register 31 refers to XZR instead of SP. Secondly, the 64-bit version of ldnt1 was being interpreted as 32-bit unpacked un

[PULL 02/21] target/arm: Fix pauth_check_trap vs SEL2

2022-03-18 Thread Peter Maydell
From: Richard Henderson When arm_is_el2_enabled was introduced, we missed updating pauth_check_trap. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/788 Fixes: e6ef0169264b ("target/arm: use arm_is_el2_enabled() where applicable") Signed-off-by: Richard Henderson Reviewed-by: Philippe M

[PULL 03/21] target/arm: Fix handling of LPAE block descriptors

2022-03-18 Thread Peter Maydell
LPAE descriptors come in three forms: * table descriptors, giving the address of the next level page table * page descriptors, which occur only at level 3 and describe the mapping of one page (which might be 4K, 16K or 64K) * block descriptors, which occur at higher page table levels, and

[PULL 07/21] nsis installer: Suppress "ANSI targets are deprecated" warning

2022-03-18 Thread Peter Maydell
When we build our Windows installer, it emits the warning: warning 7998: ANSI targets are deprecated Fix this by making our installer a Unicode installer instead. These won't work on Win95/98/ME, but we already do not support those. See https://nsis.sourceforge.io/Docs/Chapter4.html#aunicode

[PULL 04/21] hw/dma/xlnx_csu_dma: Set TYPE_XLNX_CSU_DMA class_size

2022-03-18 Thread Peter Maydell
In commit 00f05c02f9e7342f we gave the TYPE_XLNX_CSU_DMA object its own class struct, but forgot to update the TypeInfo::class_size accordingly. This meant that not enough memory was allocated for the class struct, and the initialization of xcdc->read in the class init function wrote off the end o

[PULL 08/21] nsis installer: Fix mouse-over descriptions for emulators

2022-03-18 Thread Peter Maydell
We use the nsis.py script to write out an installer script Section for each emulator executable, so the exact set of Sections depends on which executables were built. However the part of qemu.nsi which specifies mouse-over descriptions for each Section still has a hard-coded and very outdated list

[PULL 05/21] hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init()

2022-03-18 Thread Peter Maydell
In npcm7xx_clk_sel_init() we allocate a string with g_strdup_printf(). Use g_autofree so we free it rather than leaking it. (Detected with the clang leak sanitizer.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20220308170302.25828

[PULL 09/21] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG

2022-03-18 Thread Peter Maydell
From: Eric Auger CONFIG_ARM_GIC_TCG actually guards the compilation of TCG GICv3 specific files. So let's rename it into CONFIG_ARM_GICV3_TCG Signed-off-by: Eric Auger Reviewed-by: Andrew Jones Message-id: 20220308182452.223473-2-eric.au...@redhat.com Reviewed-by: Peter Maydell Signed-off-by:

[PULL 11/21] target/arm: Log M-profile vector table accesses

2022-03-18 Thread Peter Maydell
Currently the CPU_LOG_INT logging misses some useful information about loads from the vector table. Add logging where we load vector table entries. This is particularly helpful for cases where the user has accidentally not put a vector table in their image at all, which can result in confusing gu

[PULL 06/21] nsis installer: List emulators in alphabetical order

2022-03-18 Thread Peter Maydell
We currently list the emulators in the Windows installer's dialog in an essentially random order (it's whatever glob.glob() returns them to, which is filesystem-implementation-dependent). Add a call to sorted() so they appear in alphabetical order. Signed-off-by: Peter Maydell Reviewed-by: Philip

[PULL 13/21] hw/arm/xlnx-zynqmp: Add an unimplemented SERDES area

2022-03-18 Thread Peter Maydell
From: "Edgar E. Iglesias" Add an unimplemented SERDES (Serializer/Deserializer) area. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Signed-off-by: Edgar E. Iglesias Message-id: 20220316164645.2303510-2-edgar.igles...@gmail.com Signed-off-by: Peter Maydell --- include/h

[PULL 10/21] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset

2022-03-18 Thread Peter Maydell
From: Eric Auger In TCG mode, if gic-version=max we always select GICv3 even if CONFIG_ARM_GICV3_TCG is unset. We shall rather select GICv2. This also brings the benefit of fixing qos tests errors for tests using gic-version=max with CONFIG_ARM_GICV3_TCG unset. Signed-off-by: Eric Auger Reviewe

[PULL 16/21] hw/arm/xlnx-zynqmp: Connect the ZynqMP CRF

2022-03-18 Thread Peter Maydell
From: "Edgar E. Iglesias" Connect the ZynqMP CRF - Clock Reset FPD device. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Luc Michel Signed-off-by: Edgar E. Iglesias Message-id: 20220316164645.2303510-5-edgar.igles...@gmail.com Signed-off-by: Peter Maydell

[PULL 14/21] target/arm: Make rvbar settable after realize

2022-03-18 Thread Peter Maydell
From: "Edgar E. Iglesias" Make the rvbar property settable after realize. This is done in preparation to model the ZynqMP's runtime configurable rvbar. Signed-off-by: Edgar E. Iglesias Message-id: 20220316164645.2303510-3-edgar.igles...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter

[PULL 18/21] hw/arm/xlnx-zynqmp: Connect the ZynqMP APU Control

2022-03-18 Thread Peter Maydell
From: "Edgar E. Iglesias" Connect the ZynqMP APU Control device. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Luc Michel Signed-off-by: Edgar E. Iglesias Message-id: 20220316164645.2303510-7-edgar.igles...@gmail.com Signed-off-by: Peter Maydell --- inclu

[PULL 12/21] target/arm: Log fault address for M-profile faults

2022-03-18 Thread Peter Maydell
For M-profile, the fault address is not always exposed to the guest in a fault register (for instance the BFAR bus fault address register is only updated for bus faults on data accesses, not instruction accesses). Currently we log the address only if we're putting it into a particular guest-visibl

[PULL 15/21] hw/misc: Add a model of the Xilinx ZynqMP CRF

2022-03-18 Thread Peter Maydell
From: "Edgar E. Iglesias" Add a model of the Xilinx ZynqMP CRF. At the moment this is mostly a stub model. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Edgar E. Iglesias Message-id: 20220316164645.2303510-4-edgar.igles...@gmail.com Signed-off-by: Peter Maydell

[PULL 19/21] util/osdep: Avoid madvise proto on modern Solaris

2022-03-18 Thread Peter Maydell
From: Andrew Deason On older Solaris releases (before Solaris 11), we didn't get a prototype for madvise, and so util/osdep.c provides its own prototype. Some time between the public Solaris 11.4 release and Solaris 11.4.42 CBE, we started getting an madvise prototype that looks like this: e

[PULL 20/21] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-18 Thread Peter Maydell
From: Andrew Deason On Solaris, 'sun' is #define'd to 1, which causes errors if a variable is named 'sun'. Slightly change the name of the var for the Slot User Number so we can build on Solaris. Reviewed-by: Ani Sinha Signed-off-by: Andrew Deason Reviewed-by: Michael S. Tsirkin Message-id: 2

Re: [PATCH v2 1/3] hw/arm/virt: Fix CPU's default NUMA node ID

2022-03-18 Thread Igor Mammedov
On Fri, 18 Mar 2022 21:00:35 +0800 "wangyanan (Y)" wrote: > On 2022/3/18 17:56, Igor Mammedov wrote: > > On Fri, 18 Mar 2022 14:23:34 +0800 > > "wangyanan (Y)" wrote: > > > >> Hi Gavin, > >> > >> On 2022/3/3 11:11, Gavin Shan wrote: > >>> The default CPU-to-NUMA association is given by > >>

[PULL 17/21] hw/misc: Add a model of the Xilinx ZynqMP APU Control

2022-03-18 Thread Peter Maydell
From: "Edgar E. Iglesias" Add a model of the Xilinx ZynqMP APU Control. Reviewed-by: Luc Michel Signed-off-by: Edgar E. Iglesias Message-id: 20220316164645.2303510-6-edgar.igles...@gmail.com Signed-off-by: Peter Maydell --- include/hw/misc/xlnx-zynqmp-apu-ctrl.h | 93 + hw/misc/xlnx

Re: [PATCH v2 2/3] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-03-18 Thread Igor Mammedov
On Fri, 18 Mar 2022 14:34:12 +0800 "wangyanan (Y)" wrote: > Hi Gavin, > > On 2022/3/3 11:11, Gavin Shan wrote: > > When the PPTT table is built, the CPU topology is re-calculated, but > > it's unecessary because the CPU topology, except the cluster IDs, > > has been populated in virt_possible_cp

[PULL 21/21] util/osdep: Remove some early cruft

2022-03-18 Thread Peter Maydell
From: Andrew Deason The include for statvfs.h has not been needed since all statvfs calls were removed in commit 4a1418e07bdc ("Unbreak large mem support by removing kqemu"). The comment mentioning CONFIG_BSD hasn't made sense since an include for config-host.h was removed in commit aafd75841001

[RFC PATCH 12/17] hw/sd: Fix SET_BLOCK_COUNT command argument

2022-03-18 Thread Cédric Le Goater
The number of blocks is defined in the lower bits [15:0]. WIP. This needs to be more precise on the spec version. Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 5d7f04adf5a4..517699c5fc98 100644 --

[RFC PATCH 05/17] hw/sd: Add sd_cmd_unimplemented() handler

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210624142209.1193073-7-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 6c67

[RFC PATCH 01/17] hw/sd: When card is in wrong state, log which state it is

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé We report the card is in an inconsistent state, but don't precise in which state it is. Add this information, as it is useful when debugging problems. Since we will reuse this code, extract as sd_invalid_state_for_cmd() helper. Signed-off-by: Philippe Mathieu-Daudé

[RFC PATCH 17/17] hw/sd: Subtract bootarea size from blk

2022-03-18 Thread Cédric Le Goater
From: Joel Stanley The userdata size is derived from the file the user passes on the command line, but we must take into account the boot areas. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/sd/sd.c b/hw

[RFC PATCH 07/17] hw/sd: Add sd_cmd_SEND_OP_CMD() handler

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 30429e89

[RFC PATCH 02/17] hw/sd: Move proto_name to SDProto structure

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Introduce a new structure to hold the bus protocol specific fields: SDProto. The first field is the protocol name. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-4-f4...@amsat.org> Signed-off-by: Cédric Le Goater --

[RFC PATCH 11/17] hw/sd: Add eMMC support

2022-03-18 Thread Cédric Le Goater
The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by: Vincent Palatin Link: https://lore.kernel.org/r/1311

[RFC PATCH 16/17] hw/sd: Support boot area in emmc image

2022-03-18 Thread Cédric Le Goater
From: Joel Stanley This assumes a specially constructued image: dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img

[RFC PATCH 13/17] hw/sd: Update CMD1 definition for MMC

2022-03-18 Thread Cédric Le Goater
From: Sai Pavan Boddu Add support to Power up the card and send response r3 in case of MMC. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias [ clg: - ported on aspeed-7.0 patchset ] Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[RFC PATCH 00/17] hw/sd: Rework models for eMMC support

2022-03-18 Thread Cédric Le Goater
Hello Philippe, I am restarting the discussion we started in : http://patchwork.ozlabs.org/project/qemu-devel/list/?series=250563 This series adds an extension for a new eMMC device using the framework you put in place. It's not perfect but we are getting close. The SPI variant would need its

[RFC PATCH 04/17] hw/sd: Add sd_cmd_illegal() handler

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Log illegal commands as GUEST_ERROR. Note: we are logging back the SDIO commands (CMD5, CMD52-54). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-6-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c |

[RFC PATCH 14/17] hw/sd: Add CMD21 tuning sequence

2022-03-18 Thread Cédric Le Goater
From: Sai Pavan Boddu MMC cards support different tuning sequence for entering HS200 mode. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias [ clg: - ported on aspeed-7.0 patchset ] Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 39 +++ 1 f

[RFC PATCH 06/17] hw/sd: Add sd_cmd_GO_IDLE_STATE() handler

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-8-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/sd/s

Re: [PATCH 1/3] spapr: Ignore nested KVM hypercalls when not running TCG

2022-03-18 Thread Fabiano Rosas
David Gibson writes: > On Thu, Mar 17, 2022 at 02:20:47PM -0300, Fabiano Rosas wrote: >> It is possible that nested KVM hypercalls reach QEMU while we're >> running KVM. The spapr virtual hypervisor implementation of the nested >> KVM API only works when the L1 is running under TCG. So return >>

[RFC PATCH 15/17] hw/sd: Add mmc switch function support

2022-03-18 Thread Cédric Le Goater
From: Sai Pavan Boddu switch operation in mmc cards, updated the ext_csd register to request changes in card operations. Here we implement similar sequence but requests are mostly dummy and make no change. Implement SWITCH_ERROR if the write operation offset goes beyond length of ext_csd. Signe

[RFC PATCH 10/17] hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler

2022-03-18 Thread Cédric Le Goater
From: Joel Stanley Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 25e86c893bba..602ed6eb0701 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@

[RFC PATCH 03/17] hw/sd: Introduce sd_cmd_handler type

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Add 2 command handler arrays in SDProto, for CMD and ACMD. Have sd_normal_command() / sd_app_command() use these arrays: if an command handler is registered, call it, otherwise fall back to current code base. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Me

[PULL 0/2] Trivial branch for 7.0 patches

2022-03-18 Thread Laurent Vivier
gs/trivial-branch-for-7.0-pull-request for you to fetch changes up to a2d860bb546aa766f6c28a47fabedafbfa191cc2: virtio/virtio-balloon: Prefer Object* over void* parameter (2022-03-18 13:57:50 +0100) Trivial branch pull reques

[RFC PATCH 08/17] hw/sd: Add sd_cmd_ALL_SEND_CID() handler

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-10-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/sd/s

[PULL 1/2] hw/pci/pci.c: Fix typos of "Firewire", and of "controller" on same line

2022-03-18 Thread Laurent Vivier
From: Rebecca Cran Signed-off-by: Rebecca Cran Reviewed-by: Peter Maydell Message-Id: <20220318101124.912-1-quic_rc...@quicinc.com> Signed-off-by: Laurent Vivier --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 5cb1232e271d

[RFC PATCH 09/17] hw/sd: Add sd_cmd_SEND_RELATIVE_ADDR() handler

2022-03-18 Thread Cédric Le Goater
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-11-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/hw

[PULL 2/2] virtio/virtio-balloon: Prefer Object* over void* parameter

2022-03-18 Thread Laurent Vivier
From: Bernhard Beschow *opaque is an alias to *obj. Using the ladder makes the code consistent with with other devices, e.g. accel/kvm/kvm-all and accel/tcg/tcg-all. It also makes the cast more typesafe. Signed-off-by: Bernhard Beschow Reviewed-by: David Hildenbrand Acked-by: Michael S. Tsirki

Re: [PATCH v4 02/14] machine&vl: introduce phase_until() to handle phase transitions

2022-03-18 Thread Damien Hedde
Hi ! It would nice to have some feedback about this solution. Basically it just introduces a new function 'qemu_until' which implement the startup fsm. It's bit like what Markus proposed in december (hence the name), only it is is only internal so we can change it if we find out it should be don

[PULL 6/6] hw/display/vga: Report a proper error when adding a 2nd ISA VGA

2022-03-18 Thread Gerd Hoffmann
From: Thomas Huth QEMU currently abort()s if the user tries to add a second ISA VGA device, for example: $ ./qemu-system-x86_64 -device isa-vga -device isa-vga RAMBlock "vga.vram" already registered, abort! Aborted (core dumped) $ ./qemu-system-x86_64 -device isa-cirrus-vga -device isa-cirrus-vg

Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance

2022-03-18 Thread Claudio Fontana
On 3/17/22 4:03 PM, Dr. David Alan Gilbert wrote: > * Claudio Fontana (cfont...@suse.de) wrote: >> On 3/17/22 2:41 PM, Claudio Fontana wrote: >>> On 3/17/22 11:25 AM, Daniel P. Berrangé wrote: On Thu, Mar 17, 2022 at 11:12:11AM +0100, Claudio Fontana wrote: > On 3/16/22 1:17 PM, Claudio Fo

[PULL 0/6] Fixes 20220318 patches

2022-03-18 Thread Gerd Hoffmann
The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3: Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu into staging (2022-03-16 10:43:58 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/fixes-20220318-pu

[PULL 3/6] audio/mixeng: Do not declare unused variables

2022-03-18 Thread Gerd Hoffmann
From: Akihiko Odaki The unused variables when FLOAT_MIXENG is defined caused warnings on Apple clang version 13.1.6 (clang-1316.0.21.2). Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220316061053.60587-1-akihiko.od...@gmail.com> Signed-off-by: Gerd Hoffmann -

Re: [PATCH 3/3] spapr: Move nested KVM hypercalls under a TCG only config.

2022-03-18 Thread Fabiano Rosas
David Gibson writes: > On Thu, Mar 17, 2022 at 02:20:49PM -0300, Fabiano Rosas wrote: >> These are the spapr virtual hypervisor implementation of the nested >> KVM API. They only make sense when running with TCG. >> >> Signed-off-by: Fabiano Rosas >> --- >> hw/ppc/spapr_hcall.c | 20 ++

[PULL 1/6] ui/gtk: Ignore 2- and 3-button press events

2022-03-18 Thread Gerd Hoffmann
From: "K. Lange" GTK already produces corresponding GDK_BUTTON_PRESS events alongside 2BUTTON and 3BUTTON_PRESS events. The 2BUTTON and 3BUTTON_PRESS events were incorrectly being interpreted and passed to guests as button release events. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/5

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-18 Thread Hanna Reitz
On 18.03.22 00:49, John Snow wrote: Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an exception on non-zero return code by default. By the end of the series, every last invocation of the qemu-img binary ultimately goes thr

[PULL 5/6] hw/display: Allow vga_common_init() to return errors

2022-03-18 Thread Gerd Hoffmann
From: Thomas Huth The vga_common_init() function currently cannot report errors to its caller. But in the following patch, we'd need this possibility, so let's change it to take an "Error **" as parameter for this. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <202

Re: [RFC PATCH v3 17/36] pflash_cfi01/tdx: Introduce ram_mode of pflash for TDVF

2022-03-18 Thread Philippe Mathieu-Daudé
Hi, On 17/3/22 14:58, Xiaoyao Li wrote: TDX VM needs to boot with Trust Domain Virtual Firmware (TDVF). Unlike that OVMF is mapped as rom device, TDVF needs to be mapped as private memory. This is because TDX architecture doesn't provide read-only capability for VMM, and it doesn't support instr

Re: [PATCH] gitattributes: Cover Objective-C source files

2022-03-18 Thread Philippe Mathieu-Daudé
+qemu-trivial@ On 17/3/22 14:03, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé See comments in commit 29cf16db23 ("buildsys: Help git-diff adding .gitattributes config file") for details. Signed-off-by: Philippe Mathieu-Daudé --- .gitattributes | 1 + 1 file changed, 1 insert

  1   2   3   >