Re: [PATCH] docs/system: Document the removal of "compat" property for POWER CPUs

2021-03-09 Thread Laurent Vivier
Le 10/03/2021 à 00:06, Greg Kurz a écrit : > On Tue, 9 Mar 2021 21:52:40 +0100 > Laurent Vivier wrote: > >> Le 22/02/2021 à 12:28, Greg Kurz a écrit : >>> This is just an oversight. >>> >>> Fixes: f518be3aa35b ("target/ppc: Remove "compat" property of server class >>> POWER CPUs") >>> Cc: gr...@

Re: [PATCH] vfio: Support host translation granule size

2021-03-09 Thread Kunkun Jiang
Hi Alex, On 2021/3/10 7:17, Alex Williamson wrote: On Thu, 4 Mar 2021 21:34:46 +0800 Kunkun Jiang wrote: The cpu_physical_memory_set_dirty_lebitmap() can quickly deal with the dirty pages of memory by bitmap-traveling, regardless of whether the bitmap is aligned correctly or not. cpu_physica

Re: [PATCH v3] hw/sd: sd: Actually perform the erase operation

2021-03-09 Thread Bin Meng
Hi Philippe, On Sat, Feb 20, 2021 at 4:58 PM Bin Meng wrote: > > From: Bin Meng > > At present the sd_erase() does not erase the requested range of card > data to 0xFFs. Let's make the erase operation actually happen. > > Signed-off-by: Bin Meng > > --- > > Changes in v3: > - fix the skip erase

[PATCH] tests: Move unit tests into a separate directory

2021-03-09 Thread Thomas Huth
The main tests directory still looks very crowded, and it's not clear which files are part of a unit tests and which belong to a different test subsystem. Let's clean up the mess and move the unit tests to a separate directory. Signed-off-by: Thomas Huth --- MAINTAINERS

Re: [PATCH] fuzz: don't leave orphan llvm-symbolizers around

2021-03-09 Thread Thomas Huth
On 10/03/2021 07.12, Alexander Bulekov wrote: I noticed that with a sufficiently small timeout, the fuzzer fork-server sometimes locks up. On closer inspection, the issue appeared to be caused by entering our SIGALRM handler, while libfuzzer is in it's crash handlers. Because libfuzzer relies on

[PATCH] fuzz: don't leave orphan llvm-symbolizers around

2021-03-09 Thread Alexander Bulekov
I noticed that with a sufficiently small timeout, the fuzzer fork-server sometimes locks up. On closer inspection, the issue appeared to be caused by entering our SIGALRM handler, while libfuzzer is in it's crash handlers. Because libfuzzer relies on pipe communication with an external child proces

Re: [Bug 1918321] [NEW] [OSS-Fuzz] Issue 31875 megasas: Null-ptr dereference in megasas_finish_dcmd

2021-03-09 Thread Alexander Bulekov
I posted a reproducer for a different bug. Here are the correct reproducer and stacktrace: /* * Autogenerated Fuzzer Test Case */ #include "qemu/osdep.h" #include "libqos/libqtest.h" /* * cat << EOF | ./qemu-system-i386 -display none -machine accel=qtest \ * -m 512M -machine q35 -nodefaults

Re: [PATCH 3/3] Andes AE350 RISC-V Machine

2021-03-09 Thread Bin Meng
On Wed, Mar 10, 2021 at 11:36 AM Dylan Jhong wrote: > > This provides a RISC-V Board based on Andes's AE350 specification. > The following machine is implemented: > > - 'andes_ae350'; PLIC, PLICSW, PLMT, 16550a UART, VirtIO MMIO, device-tree Is this a virtual target because virtio is added? Or do

Re: [PATCH 1/3] Andes RISC-V PLIC

2021-03-09 Thread Bin Meng
On Wed, Mar 10, 2021 at 11:34 AM Dylan Jhong wrote: > > Andes PLIC (Platform-Level Interrupt Controller) device provides an > interrupt controller functionality based on Andes's PLIC specification. > > The Andes PLIC can handle either external interrupts (PLIC) > or interprocessor interrupts (PLIC

Re: [PATCH] docs: Fix removal text of -show-cursor

2021-03-09 Thread Markus Armbruster
Thomas Huth writes: > We should say now when it was removed, not when it was deprecated. > > Signed-off-by: Thomas Huth > --- > docs/system/removed-features.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/docs/system/removed-features.rst > b/docs/system/removed

Re: [PATCH v2] tests/acceptance: Add bFLT loader linux-user test

2021-03-09 Thread Thomas Huth
On 09/03/2021 23.27, Philippe Mathieu-Daudé wrote: ping? I guess we really need someone who could act as a maintainer for the tests/acceptance directory, who could pick up patches and send pull requests if nobody else is picking up these patches... Cleber, Wainer, Willian, any volunteers?

[PATCH] docs: Fix removal text of -show-cursor

2021-03-09 Thread Thomas Huth
We should say now when it was removed, not when it was deprecated. Signed-off-by: Thomas Huth --- docs/system/removed-features.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst index f8db76d0b5..13f9dd3

Re: [PATCH qemu v14] spapr: Implement Open Firmware client interface

2021-03-09 Thread Alexey Kardashevskiy
On 10/03/2021 13:40, David Gibson wrote: On Wed, Mar 10, 2021 at 12:55:07PM +1100, Alexey Kardashevskiy wrote: On 10/03/2021 01:00, BALATON Zoltan wrote: On Tue, 9 Mar 2021, Alexey Kardashevskiy wrote: On 09/03/2021 16:29, David Gibson wrote: +struct ClientArchitectureSupportClass { +   

Re: [PULL 00/20] ppc-for-6.0 queue 20210310

2021-03-09 Thread Bin Meng
Hi David, On Wed, Mar 10, 2021 at 12:10 PM David Gibson wrote: > > The following changes since commit b2ae1009d7cca2701e17eae55ae2d44fd22c942a: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-20210307' > into staging (2021-03-09 13:50:35 +) > > are available in the Git r

[PATCH v2] ui/cocoa: Clear modifiers whenever possible

2021-03-09 Thread Akihiko Odaki
ui/cocoa does not receive NSEventTypeFlagsChanged when it is not active, and the modifier state can be desynchronized in such a situation. [NSEvent -modifierFlags] tells whether a modifier is *not* pressed, so check it whenever receiving an event and clear the modifier if it is not pressed. Note

Re: [PATCH qemu v14] spapr: Implement Open Firmware client interface

2021-03-09 Thread David Gibson
On Tue, Mar 09, 2021 at 06:28:44PM +1100, Alexey Kardashevskiy wrote: > > > On 09/03/2021 16:29, David Gibson wrote: > > > > > > > +struct ClientArchitectureSupportClass { > > > > > +InterfaceClass parent; > > > > > +target_ulong (*cas)(CPUState *cs, target_ulong vec); > > > > > +vo

[PULL 20/20] spapr.c: send QAPI event when memory hotunplug fails

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza Recent changes allowed the pSeries machine to rollback the hotunplug process for the DIMM when the guest kernel signals, via a reconfiguration of the DR connector, that it's not going to release the LMBs. Let's also warn QAPI listerners about it. One place to do it

[PULL 16/20] spapr_pci.c: add 'unplug already in progress' message for PCI unplug

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza Hotunplug for all other devices are warning the user when the hotunplug is already in progress. Do the same for PCI devices in spapr_pci_unplug_request(). Signed-off-by: Daniel Henrique Barboza Message-Id: <20210226163301.419727-5-danielhb...@gmail.com> Reviewed-by

[PULL 19/20] spapr.c: remove duplicated assert in spapr_memory_unplug_request()

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza We are asserting the existence of the first DRC LMB after sending unplug requests to all LMBs of the DIMM, where every DRC is being asserted inside the loop. This means that the first DRC is being asserted twice. Remove the duplicated assert. Signed-off-by: Daniel

[PULL 17/20] qemu_timer.c: add timer_deadline_ms() helper

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza The pSeries machine is using QEMUTimer internals to return the timeout in seconds for a timer object, in hw/ppc/spapr.c, function spapr_drc_unplug_timeout_remaining_sec(). Create a helper in qemu-timer.c to retrieve the deadline for a QEMUTimer object, in ms, to avo

[PULL 18/20] target/ppc: fix icount support on Book-e vms accessing SPRs

2021-03-09 Thread David Gibson
From: Vitaly Cheptsov Failing to guard SPR access with gen_io_start/gen_stop_exception causes "Bad icount read" exceptions when running VMs with e500mc and e500v2 CPUs with an icount parameter. Cc: David Gibson Cc: Greg Kurz Cc: Paolo Bonzini Signed-off-by: Vitaly Cheptsov Message-Id: <20210

[PULL 14/20] hw/ppc: e500: Add missing in the eTSEC node

2021-03-09 Thread David Gibson
From: Bin Meng The eTSEC node should provide an empty property in the eTSEC node, otherwise of_translate_address() in the Linux kernel fails to get the eTSEC register base, reporting: OF: ** translation for device /platform@f/ethernet@0/queue-group ** OF: bus is default (na=1, ns=1)

[PULL 08/20] docs/system: Extend PPC section

2021-03-09 Thread David Gibson
From: Cédric Le Goater This moves the current documentation in files specific to each platform family. PowerNV machine is updated, the other machines need to be done. Signed-off-by: Cédric Le Goater Message-Id: <20210222133956.156001-1-...@kaod.org> Reviewed-by: Greg Kurz [dwg: Trivial capital

[PULL 15/20] spapr.c: add 'unplug already in progress' message for PHB unplug

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza Both CPU hotunplug and PC_DIMM unplug reports an user warning, mentioning that the hotunplug is in progress, if consecutive 'device_del' are issued in quick succession. Do the same for PHBs in spapr_phb_unplug_request(). Signed-off-by: Daniel Henrique Barboza Mess

[PULL 12/20] spapr_drc.c: use DRC reconfiguration to cleanup DIMM unplug state

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza Handling errors in memory hotunplug in the pSeries machine is more complex than any other device type, because there are all the complications that other devices has, and more. For instance, determining a timeout for a DIMM hotunplug must consider if it's a Hash-MMU

[PULL 11/20] spapr_drc.c: add hotunplug timeout for CPUs

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza There is a reliable way to make a CPU hotunplug fail in the pseries machine. Hotplug a CPU A, then offline all other CPUs inside the guest but A. When trying to hotunplug A the guest kernel will refuse to do it, because A is now the last online CPU of the guest. PAPR

[PULL 06/20] spapr_drc.c: use spapr_drc_release() in isolate_physical/set_unusable

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza When moving a physical DRC to "Available", drc_isolate_physical() will move the DRC state to STATE_PHYSICAL_POWERON and, if the DRC is marked for unplug, call spapr_drc_detach(). For physical DRCs, drck->empty_state is STATE_PHYSICAL_POWERON, meaning that we're sure

[PULL 03/20] hw/display/sm501: Inline template header into C file

2021-03-09 Thread David Gibson
From: Peter Maydell We no longer need to include sm501_template.h multiple times, so we can simply inline its contents into sm501.c. Signed-off-by: Peter Maydell Message-Id: <20210212180653.27588-4-peter.mayd...@linaro.org> Acked-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/display/

[PULL 02/20] hw/display/sm501: Expand out macros in template header

2021-03-09 Thread David Gibson
From: Peter Maydell Now that we only include sm501_template.h for the DEPTH==32 case, we can expand out the uses of the BPP, PIXEL_TYPE and PIXEL_NAME macros in that header. Signed-off-by: Peter Maydell Message-Id: <20210212180653.27588-3-peter.mayd...@linaro.org> Acked-by: BALATON Zoltan Sign

[PULL 13/20] hw/net: fsl_etsec: Fix build error when HEX_DUMP is on

2021-03-09 Thread David Gibson
From: Bin Meng "qemu-common.h" should be included to provide the forward declaration of qemu_hexdump() when HEX_DUMP is on. Signed-off-by: Bin Meng Message-Id: <20210228050431.24647-1-bmeng...@gmail.com> Signed-off-by: David Gibson --- hw/net/fsl_etsec/etsec.c | 1 + hw/net/fsl_etsec/rings.c

[PULL 07/20] spapr: rename spapr_drc_detach() to spapr_drc_unplug_request()

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza spapr_drc_detach() is not the best name for what the function does. The function does not detach the DRC, it makes an uncommited attempt to do it. It'll mark the DRC as pending unplug, via the 'unplug_request' flag, and only if the DRC state is drck->empty_state it

[PULL 01/20] hw/display/sm501: Remove dead code for non-32-bit RGB surfaces

2021-03-09 Thread David Gibson
From: Peter Maydell For a long time now the UI layer has guaranteed that the console surface is always 32 bits per pixel RGB. Remove the legacy dead code from the sm501 display device which was handling the possibility that the console surface was some other format. Signed-off-by: Peter Maydell

[PULL 04/20] spapr_drc.c: do not call spapr_drc_detach() in drc_isolate_logical()

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza drc_isolate_logical() is used to move the DRC from the "Configured" to the "Available" state, erroring out if the DRC is in the unexpected "Unisolate" state and doing nothing (with RTAS_OUT_SUCCESS) if the DRC is already in "Available" or in "Unusable" state. When m

[PULL 09/20] target/ppc: Fix bcdsub. emulation when result overflows

2021-03-09 Thread David Gibson
From: Fabiano Rosas The commit d03b174a83 (target/ppc: simplify bcdadd/sub functions) meant to simplify some of the code but it inadvertently altered the way the CR6 field is set after the operation has overflowed. The CR6 bits are set based on the *unbounded* result of the operation, so we need

[PULL 10/20] spapr_drc.c: introduce unplug_timeout_timer

2021-03-09 Thread David Gibson
From: Daniel Henrique Barboza The LoPAR spec provides no way for the guest kernel to report failure of hotplug/hotunplug events. This wouldn't be bad if those operations were granted to always succeed, but that's far for the reality. What ends up happening is that, in the case of a failed hotunp

[PULL 00/20] ppc-for-6.0 queue 20210310

2021-03-09 Thread David Gibson
The following changes since commit b2ae1009d7cca2701e17eae55ae2d44fd22c942a: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-20210307' into staging (2021-03-09 13:50:35 +) are available in the Git repository at: https://gitlab.com/dgibson/qemu.git tags/ppc-for-6.0-2021031

Re: [PATCH qemu v14] spapr: Implement Open Firmware client interface

2021-03-09 Thread David Gibson
On Wed, Mar 10, 2021 at 12:55:07PM +1100, Alexey Kardashevskiy wrote: > > > On 10/03/2021 01:00, BALATON Zoltan wrote: > > On Tue, 9 Mar 2021, Alexey Kardashevskiy wrote: > > > On 09/03/2021 16:29, David Gibson wrote: > > > > > > > +struct ClientArchitectureSupportClass { > > > > > > > +    Inter

[PATCH qemu v15] spapr: Implement Open Firmware client interface

2021-03-09 Thread Alexey Kardashevskiy
The PAPR platform which describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor. Since the beginning, the runtime component of the firmware (RTAS) has been implemented as a 2

[PATCH 3/3] Andes AE350 RISC-V Machine

2021-03-09 Thread Dylan Jhong
This provides a RISC-V Board based on Andes's AE350 specification. The following machine is implemented: - 'andes_ae350'; PLIC, PLICSW, PLMT, 16550a UART, VirtIO MMIO, device-tree Signed-off-by: Dylan Jhong Signed-off-by: Ruinland ChuanTzu Tsai --- default-configs/devices/riscv32-softmmu.mak |

[PATCH 2/3] Andes RISC-V PLMT

2021-03-09 Thread Dylan Jhong
Andes PLMT (Platform-Level Machine Timer) device provides an timer functionality and issues timer interrupts. The Andes PLMT is implemented based on Andes's PLMT specification. Signed-off-by: Dylan Jhong Signed-off-by: Ruinland ChuanTzu Tsai --- hw/timer/Kconfig | 3 + hw/timer/

[PATCH 1/3] Andes RISC-V PLIC

2021-03-09 Thread Dylan Jhong
Andes PLIC (Platform-Level Interrupt Controller) device provides an interrupt controller functionality based on Andes's PLIC specification. The Andes PLIC can handle either external interrupts (PLIC) or interprocessor interrupts (PLICSW). While Andes PLIC spec includes vector interrupt and interr

[PATCH 0/3] Support Andes AE350 Platform

2021-03-09 Thread Dylan Jhong
The following patches support Andes's Linux BSP booting on qemu using 'andes_ae350' machine. This patchset has implemented the basic components of AE350 platform, which are 1. PLIC(external interrupts), 2. PLICSW(interprocessor interrupts), 3. PLMT(timer interrupts), 4. UART(16550a),

Re: [PATCH 2/2] ui/cocoa: Do not rely on the first argument

2021-03-09 Thread Akihiko Odaki
2021年3月9日(火) 22:10 BALATON Zoltan : > > On Tue, 9 Mar 2021, Akihiko Odaki wrote: > > The first argument of the executable was used to get its path, but it is > > not reliable because the executer can specify any arbitrary string. Use the > > interfaces provided by QEMU and the platform to get those

[PATCH v7 8/8] hw/ppc: Add emulation of Genesi/bPlan Pegasos II

2021-03-09 Thread BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to

[PATCH v7 7/8] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller

2021-03-09 Thread BALATON Zoltan
The Marvell Discovery II aka. MV64361 is a PowerPC system controller chip that is used on the pegasos2 PPC board. This adds emulation of it that models the device enough to boot guests on this board. The mv643xx.h header with register definitions is taken from Linux 4.15.10 only fixing white space

[PATCH v7 2/8] vt82c686: QOM-ify superio related functionality

2021-03-09 Thread BALATON Zoltan
Collect superio functionality and its controlling config registers handling in an abstract VIA_SUPERIO class that is a subclass of ISA_SUPERIO and put vt82c686b specific parts in a subclass of this abstract class. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 242

[PATCH v7 1/8] vt82c686: Implement control of serial port io ranges via config regs

2021-03-09 Thread BALATON Zoltan
In VIA super south bridge the io ranges of superio components (parallel and serial ports and FDC) can be controlled by superio config registers to set their base address and enable/disable them. This is not easy to implement in QEMU because ISA emulation is only designed to set io base address once

[PATCH v7 3/8] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO

2021-03-09 Thread BALATON Zoltan
The VT8231 south bridge is very similar to VT82C686B but there are some differences in register addresses and functionality, e.g. the VT8231 only has one serial port. This commit adds VT8231_SUPERIO subclass based on the abstract VIA_SUPERIO class to emulate the superio part of VT8231. Signed-off-

[PATCH v7 6/8] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread BALATON Zoltan
From: Philippe Mathieu-Daudé TYPE_VIA_PM calls apm_init() in via_pm_realize(), so requires APM to be selected. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: BALATON Zoltan --- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/isa/Kconfig

[PATCH v7 5/8] vt82c686: Add emulation of VT8231 south bridge

2021-03-09 Thread BALATON Zoltan
Add emulation of VT8231 south bridge ISA part based on the similar VT82C686B but implemented in a separate subclass that holds the differences while reusing parts that can be shared. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 84 +++

[PATCH v7 0/8] Pegasos2 emulation

2021-03-09 Thread BALATON Zoltan
Hello, This is adding a new PPC board called pegasos2. More info on it can be found at: https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2 Currently it needs a firmware ROM image that I cannot include due to original copyright holder (bPlan) did not release it under a free licence but I hav

[PATCH v7 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it

2021-03-09 Thread BALATON Zoltan
To allow reusing ISA bridge emulation for vt8231_isa move the device state of vt82c686b_isa emulation in an abstract via_isa class. This change breaks migration back compatibility but this is not an issue for Fuloong2E machine which is not versioned or migration supported. Signed-off-by: BALATON Z

[PATCH v4 2/3] vfio: Set the priority of the VFIO VM state change handler explicitly

2021-03-09 Thread Shenming Lu
In the VFIO VM state change handler when stopping the VM, the _RUNNING bit in device_state is cleared which makes the VFIO device stop, including no longer generating interrupts. Then we can save the pending states of all interrupts in the GIC VM state change handler (on ARM). So we have to set th

[PATCH v4 0/3] vfio: Some fixes and optimizations for VFIO migration

2021-03-09 Thread Shenming Lu
This patch set includes two fixes and one optimization for VFIO migration as blew: Patch 1-2: - Fix two ordering problems in migration. Patch 3: - Optimize the enabling process of the MSI-X vectors in migration. History: v3 -> v4 - Use msix_function_masked instead of msix_masked() in Patch 3.

[PATCH v4 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-03-09 Thread Shenming Lu
In VFIO migration resume phase and some guest startups, there are already unmasked vectors in the vector table when calling vfio_msix_enable(). So in order to avoid inefficiently disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable these unmasked vector

[PATCH v4 1/3] vfio: Move the saving of the config space to the right place in VFIO migration

2021-03-09 Thread Shenming Lu
On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt setup, if the restoring of the VFIO PCI device config space is before the VGIC, an error might occur in the kernel. So we move the saving of the config space to the non-iterable process, thus it will be called after the VGIC accordi

Emulating STM32F407 (Cortex-M4) with peripherals on an X86

2021-03-09 Thread Srinath M
Hi I am new to the Qemu project and was wondering if it is possible to emulate the above processor with it's peripherals (Uart, DMA at least) on an X86. Would it be possible for the following OS to run in a Qemu emulation (as it does on the real processor) ? https://www.st.com/en/development-tools

Re: [PATCH] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread BALATON Zoltan
On Wed, 10 Mar 2021, Philippe Mathieu-Daudé wrote: On 3/10/21 12:41 AM, BALATON Zoltan wrote: On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: ping for review? This is included in my pegasos2 series as 6/8 replacing half of a similar patch from my original version. Since I've reported it I d

Re: [PATCH v6 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it

2021-03-09 Thread BALATON Zoltan
On Wed, 10 Mar 2021, Philippe Mathieu-Daudé wrote: On 3/9/21 9:28 PM, BALATON Zoltan wrote: To allow reusing ISA bridge emulation for vt8231_isa move the device state of vt82c686b_isa emulation in an abstract via_isa class. This change breaks migration back compatibility but this is not an issue

Re: [PATCH 3/3] hw/usb: Extract VT82C686 UHCI PCI function into a new unit

2021-03-09 Thread BALATON Zoltan
On Wed, 10 Mar 2021, Philippe Mathieu-Daudé wrote: On 3/9/21 9:13 PM, BALATON Zoltan wrote: On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: Extract the VT82C686 PCI UHCI function into a new unit so it is only build when the VT82C686 south bridge is selected. I'm not sure it's worth separati

Re: [RFC RESEND PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

2021-03-09 Thread Wang Xingang
Hi Eric, On 2021/3/9 22:36, Auger Eric wrote: Hi, On 2/27/21 9:33 AM, Wang Xingang wrote: From: Xingang Wang These patches add support for configure iommu on/off for pci root bus, including primary bus and pxb root bus. At present, All root bus will go through iommu when iommu is configured,

Re: [PATCH v2 2/2] accel: kvm: Add aligment assert for kvm_log_clear_one_slot

2021-03-09 Thread Keqian Zhu
On 2021/3/10 0:08, Peter Xu wrote: > On Tue, Mar 09, 2021 at 02:57:53PM +, Dr. David Alan Gilbert wrote: >> * Thomas Huth (th...@redhat.com) wrote: >>> On 09/03/2021 15.05, Keqian Zhu wrote: On 2021/3/9 21:48, Thomas Huth wrote: > On 17/12/2020 02.49, Keqian Zhu wrote: [..

Re: [PATCH qemu v14] spapr: Implement Open Firmware client interface

2021-03-09 Thread Alexey Kardashevskiy
On 10/03/2021 01:00, BALATON Zoltan wrote: On Tue, 9 Mar 2021, Alexey Kardashevskiy wrote: On 09/03/2021 16:29, David Gibson wrote: +struct ClientArchitectureSupportClass { +    InterfaceClass parent; +    target_ulong (*cas)(CPUState *cs, target_ulong vec); +    void (*quiesce)(void); Is

Re: [PATCH] vfio: Support host translation granule size

2021-03-09 Thread Keqian Zhu
Hi Alex, On 2021/3/10 7:17, Alex Williamson wrote: > On Thu, 4 Mar 2021 21:34:46 +0800 > Kunkun Jiang wrote: > >> The cpu_physical_memory_set_dirty_lebitmap() can quickly deal with >> the dirty pages of memory by bitmap-traveling, regardless of whether >> the bitmap is aligned correctly or not.

Re: [PATCH v3 2/3] migration/ram: Reduce unnecessary rate limiting

2021-03-09 Thread Kunkun Jiang
Hi, On 2021/3/10 0:15, Peter Xu wrote: On Tue, Mar 09, 2021 at 10:33:04PM +0800, Kunkun Jiang wrote: Hi, On 2021/3/9 5:12, Peter Xu wrote: On Mon, Mar 08, 2021 at 06:34:58PM +0800, Kunkun Jiang wrote: Hi, On 2021/3/5 22:22, Peter Xu wrote: Kunkun, On Fri, Mar 05, 2021 at 03:50:34PM +0800,

Re: [PATCH v2 4/4] slirp: feature detection for smbd

2021-03-09 Thread Samuel Thibault
Joelle van Dyne, le mar. 09 mars 2021 10:11:31 -0800, a ecrit: > On Tue, Mar 9, 2021 at 6:09 AM Philippe Mathieu-Daudé > wrote: > > On 3/9/21 1:27 AM, Joelle van Dyne wrote: > > > Replace Windows specific macro with a more generic feature detection > > > macro. Allows slirp smb feature to be disa

[PATCH v3 1/3] target/arm: Add support for FEAT_TLBIRANGE

2021-03-09 Thread Rebecca Cran
ARMv8.4 adds the mandatory FEAT_TLBIRANGE. It provides TLBI maintenance instructions that apply to a range of input addresses. Signed-off-by: Rebecca Cran --- accel/tcg/cputlb.c | 22 ++ include/exec/exec-all.h | 41 target/arm/cpu.h| 5 + target/arm/helper.c | 248

[PATCH v3 3/3] target/arm: set ID_AA64ISAR0.TLB to 2 for max AARCH64 CPU type

2021-03-09 Thread Rebecca Cran
Indicate support for FEAT_TLBIOS and FEAT_TLBIRANGE by setting ID_AA64ISAR0.TLB to 2 for the max AARCH64 CPU type. Signed-off-by: Rebecca Cran --- target/arm/cpu64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index f0a9e968c9c1..e34a6a6174fe 10064

[PATCH v3 2/3] target/arm: Add support for FEAT_TLBIOS

2021-03-09 Thread Rebecca Cran
ARMv8.4 adds the mandatory FEAT_TLBIOS. It provides TLBI maintenance instructions that extend to the Outer Shareable domain. Signed-off-by: Rebecca Cran --- target/arm/cpu.h| 6 ++ target/arm/helper.c | 75 2 files changed, 81 insertions(+) diff --git a/target/arm/cpu.

[PATCH v3 0/3] target/arm: Add support for FEAT_TLBIOS and FEAT_TLBIRANGE

2021-03-09 Thread Rebecca Cran
ARMv8.4 adds the mandatory FEAT_TLBIOS and FEAT_TLBIRANGE. They provides TLBI maintenance instructions that extend to the Outer Shareable domain and that apply to a range of input addresses. Changes from v2 to v3: o Change the functions in cputlb.c to do a full flush. This should only be a

[PATCH V3] file-posix: allow -EBUSY -EINVAL errors during write zeros on block

2021-03-09 Thread ChangLimin
Since Linux 5.10, write zeros to a multipath device using ioctl(fd, BLKZEROOUT, range) with cache none or directsync return -EBUSY permanently. Similar to handle_aiocb_write_zeroes_unmap, handle_aiocb_write_zeroes_block allow -EBUSY and -EINVAL errors during ioctl(fd, BLKZEROOUT, range). Referenc

Re: [PATCH 3/3] hw/usb: Extract VT82C686 UHCI PCI function into a new unit

2021-03-09 Thread Philippe Mathieu-Daudé
On 3/9/21 9:13 PM, BALATON Zoltan wrote: > On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: >> Extract the VT82C686 PCI UHCI function into a new unit so >> it is only build when the VT82C686 south bridge is selected. > > I'm not sure it's worth separating just this one device from the other > sim

Re: [PATCH v6 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it

2021-03-09 Thread Philippe Mathieu-Daudé
On 3/9/21 9:28 PM, BALATON Zoltan wrote: > To allow reusing ISA bridge emulation for vt8231_isa move the device > state of vt82c686b_isa emulation in an abstract via_isa class. This > change breaks migration back compatibility but this is not an issue > for Fuloong2E machine which is not versioned

Re: [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality

2021-03-09 Thread Philippe Mathieu-Daudé
On 3/9/21 9:28 PM, BALATON Zoltan wrote: > Collect superio functionality and its controlling config registers > handling in an abstract VIA_SUPERIO class that is a subclass of > ISA_SUPERIO and put vt82c686b specific parts in a subclass of this > abstract class. > > Signed-off-by: BALATON Zoltan

Re: [PATCH] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread Philippe Mathieu-Daudé
On 3/10/21 12:41 AM, BALATON Zoltan wrote: > On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: >> ping for review? > > This is included in my pegasos2 series as 6/8 replacing half of a > similar patch from my original version. Since I've reported it I don't > think I should be also reviewing it bu

[PATCH 7/9] hw/block/pflash_cfi02: Factor out DeviceReset method

2021-03-09 Thread Philippe Mathieu-Daudé
There is multiple places doing a device reset. Factor that out in a common method which matches the DeviceReset prototype, so we can also remove the reset code from the DeviceRealize() handler. Explicit the device is set in "read array" mode on reset. Signed-off-by: Philippe Mathieu-Daudé --- hw

[PATCH 4/9] hw/block/pflash_cfi02: Set rom_mode to true in pflash_setup_mappings()

2021-03-09 Thread Philippe Mathieu-Daudé
There is only one call to pflash_setup_mappings(). Convert 'rom_mode' to boolean and set it to true directly within pflash_setup_mappings(). Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/pflash_c

[PATCH 8/9] hw/block/pflash_cfi01: Clarify trace events

2021-03-09 Thread Philippe Mathieu-Daudé
Use the 'mode_read_array' event when we set the device in such mode, and use the 'reset' event in DeviceReset handler. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash

[PATCH 6/9] hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array

2021-03-09 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - When the timer expires and not in byp

[PATCH 9/9] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2021-03-09 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - On a read access (on invalid command)

[PATCH 3/9] hw/block/pflash_cfi02: Extract pflash_cfi02_fill_cfi_table()

2021-03-09 Thread Philippe Mathieu-Daudé
Fill the CFI table in out of DeviceRealize() in a new function: pflash_cfi02_fill_cfi_table(). Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 193 +--- 1 file changed, 99 insertions(+), 94 deletions(-) diff --git a/hw/block/pflash_cfi02.c

[PATCH 5/9] hw/block/pflash_cfi02: Open-code pflash_register_memory(rom=false)

2021-03-09 Thread Philippe Mathieu-Daudé
There is only one call to pflash_register_memory() with rom_mode == false. As we want to modify pflash_register_memory() in the next patch, open-code this trivial function in place for the 'rom_mode == false' case. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 6 -- 1 f

[PATCH 2/9] hw/block/pflash_cfi01: Extract pflash_cfi01_fill_cfi_table()

2021-03-09 Thread Philippe Mathieu-Daudé
Fill the CFI table in out of DeviceRealize() in a new function: pflash_cfi01_fill_cfi_table(). Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 140 +--- 1 file changed, 73 insertions(+), 67 deletions(-) diff --git a/hw/block/pflash_cfi01.c

[PATCH 1/9] hw/block/pflash_cfi: Fix code style for checkpatch.pl

2021-03-09 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 36 hw/block/pflash_cfi02.c | 9 ++--- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/

[PATCH 0/9] hw/block/pflash: Refactors around setting the device in read-array mode

2021-03-09 Thread Philippe Mathieu-Daudé
I remembered this almost 2 years old series while reviewing David Edmondson's patches... (which I plan to apply on top). Basically we move things around to make the code easier to maintain. Please review :) Regards, Phil. Philippe Mathieu-Daudé (9): hw/block/pflash_cfi: Fix code style for ch

Re: [PATCH] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread BALATON Zoltan
On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: ping for review? This is included in my pegasos2 series as 6/8 replacing half of a similar patch from my original version. Since I've reported it I don't think I should be also reviewing it but it's quite trivial so may not need that much rev

Re: [PATCH] vfio: Support host translation granule size

2021-03-09 Thread Alex Williamson
On Thu, 4 Mar 2021 21:34:46 +0800 Kunkun Jiang wrote: > The cpu_physical_memory_set_dirty_lebitmap() can quickly deal with > the dirty pages of memory by bitmap-traveling, regardless of whether > the bitmap is aligned correctly or not. > > cpu_physical_memory_set_dirty_lebitmap() supports pages

Re: [PATCH] docs/system: Document the removal of "compat" property for POWER CPUs

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 21:52:40 +0100 Laurent Vivier wrote: > Le 22/02/2021 à 12:28, Greg Kurz a écrit : > > This is just an oversight. > > > > Fixes: f518be3aa35b ("target/ppc: Remove "compat" property of server class > > POWER CPUs") > > Cc: gr...@kaod.org > > Signed-off-by: Greg Kurz > > --- >

Re: [PATCH 3/4] vhost-user: Monitor slave channel in vhost_user_read()

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 15:18:56 + Stefan Hajnoczi wrote: > On Mon, Mar 08, 2021 at 01:31:40PM +0100, Greg Kurz wrote: > > @@ -363,8 +367,30 @@ static int vhost_user_read(struct vhost_dev *dev, > > VhostUserMsg *msg) > > qemu_chr_be_update_read_handlers(chr->chr, ctxt); > > qemu_chr_fe_

Re: [PATCH v2] MAINTAINERS: Fix the location of tools manuals

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 20:48:40 +0100 Thomas Huth wrote: > On 09/03/2021 18.41, Wainer dos Santos Moschetta wrote: > > Hi, > > > > Any issue that prevent this of being queued? > > Maybe it's just not clear who should take the patch ... CC:-ing qemu-trivial > and qemu-block now, since I think it co

Re: [PATCH] tests/acceptance: Print expected message on wait_for_console_pattern

2021-03-09 Thread Joel Stanley
On Tue, 9 Mar 2021 at 16:00, Wainer dos Santos Moschetta wrote: > > For the sake of improve debuggability of tests which use the > wait_for_console_pattern(), this changed the _console_interaction() so that > the expected message is printed if the test fail. > > Signed-off-by: Wainer dos Santos Mo

Re: [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()

2021-03-09 Thread Philippe Mathieu-Daudé
On 2/10/21 1:12 PM, Bastian Koppelmann wrote: > Hi, > > On Wed, Jan 27, 2021 at 11:42:52PM +0100, Philippe Mathieu-Daudé wrote: >> Taking notes while reviewing commit 671a0a1265a >> ("use MMUAccessType instead of int in mmu_translate"). >> >> Philippe Mathieu-Daudé (3): >> target/tricore: Replac

Re: [PATCH v5 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it

2021-03-09 Thread David Gibson
On Tue, Mar 09, 2021 at 10:12:24AM +0100, Philippe Mathieu-Daudé wrote: > On 3/5/21 2:02 AM, David Gibson wrote: > > On Thu, Mar 04, 2021 at 11:42:10PM +0100, Philippe Mathieu-Daudé wrote: > >> On 3/4/21 9:16 PM, BALATON Zoltan wrote: > >>> On Thu, 4 Mar 2021, Philippe Mathieu-Daudé wrote: > O

Re: [PATCH] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread Philippe Mathieu-Daudé
ping for review? On 3/2/21 9:05 AM, Philippe Mathieu-Daudé wrote: > TYPE_VIA_PM calls apm_init() in via_pm_realize(), so > requires APM to be selected. > > Reported-by: BALATON Zoltan > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/isa/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > di

Re: [PATCH v2] tests/acceptance: Add bFLT loader linux-user test

2021-03-09 Thread Philippe Mathieu-Daudé
ping? On 2/14/21 8:45 PM, Philippe Mathieu-Daudé wrote: > Add a very quick test that runs a busybox binary in bFLT format: > > $ avocado --show=app run -t linux_user tests/acceptance/load_bflt.py > JOB ID : db94d5960ce564c50904d666a7e259148c27e88f > JOB LOG: ~/avocado/job-results/jo

Re: [PATCH v5 0/4] qapi: Restrict X86 features to X86 targets

2021-03-09 Thread Philippe Mathieu-Daudé
ping? On 2/24/21 11:46 PM, Philippe Mathieu-Daudé wrote: > Since v4: > - Rebase on Claudio's work to avoid stub > > This series restrict the 'feature-words' property to the x86 > architecture (other archs don't have it), and to system-mode > (user-mode doesn't use it). > > v4: https://www.mail-a

Re: [PULL 00/18] testing, docs, semihosting move and guest-loader

2021-03-09 Thread Philippe Mathieu-Daudé
On 3/9/21 7:37 PM, Alex Bennée wrote: > > Peter Maydell writes: > >> On Mon, 8 Mar 2021 at 13:51, Alex Bennée wrote: >>> >>> The following changes since commit 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1: >>> >>> Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' >>> into

Re: [PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-03-09 Thread Laurent Vivier
Le 11/01/2021 à 16:20, Philippe Mathieu-Daudé a écrit : > The 'running' argument from VMChangeStateHandler does not require > other value than 0 / 1. Make it a plain boolean. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/runstate.h | 10 -- > target/arm/kvm_arm.h

Re: [PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-03-09 Thread Laurent Vivier
Le 11/01/2021 à 16:20, Philippe Mathieu-Daudé a écrit : > runstate_check() returns a boolean. runstate_is_running() > returns what runstate_check() returns, also a boolean. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/runstate.h | 2 +- > softmmu/runstate.c| 2 +- > 2

Re: [PATCH 0/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-03-09 Thread Philippe Mathieu-Daudé
ping, qemu-trivial maybe? On 2/22/21 3:34 PM, Philippe Mathieu-Daudé wrote: > Paolo, this series is fully reviewed, can it go via your > misc tree? > > On 1/11/21 4:20 PM, Philippe Mathieu-Daudé wrote: >> Trivial prototype change to clarify the use of the 'running' >> argument of VMChangeStateHan

  1   2   3   4   5   6   7   >