Re: [PATCH] yank: Avoid linking into executables that don't want it

2021-03-22 Thread Thomas Huth
On 16/03/2021 14.59, Markus Armbruster wrote: util/yank.c and stubs/yank.c are both in libqemuutil.a, even though their external symbols conflict. The linker happens to pick the former. This links a bunch of unneeded code into the executables that actually want the latter: qemu-io, qemu-img,

Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-22 Thread Thomas Huth
On 22/03/2021 18.48, Lukas Straub wrote: On Mon, 22 Mar 2021 17:00:23 +0100 Thomas Huth wrote: On 22/03/2021 08.35, Lukas Straub wrote: On Mon, 22 Mar 2021 06:20:50 +0100 Thomas Huth wrote: On 22/03/2021 00.31, Lukas Straub wrote: Use the normal yank code instead of stubs in relevant

[PATCH v1 8/8] hw/arm/virt: add ITS support in virt GIC

2021-03-22 Thread Shashi Mallela
Included creation of ITS as part of virt platform GIC initialization.This Emulated ITS model now co-exists with kvm ITS and is enabled in absence of kvm irq kernel support in a platform. Signed-off-by: Shashi Mallela --- hw/arm/virt.c| 10 -- target/arm/kvm_arm.h | 4 ++-- 2

[PATCH v1 3/8] hw/intc: GICv3 ITS command queue framework

2021-03-22 Thread Shashi Mallela
Added functionality to trigger ITS command queue processing on write to CWRITE register and process each command queue entry to identify the command type and handle commands like MAPD,MAPC,SYNC. Signed-off-by: Shashi Mallela --- hw/intc/arm_gicv3_its.c | 362 1 file

Re: [PATCH 1/2] hw/intc: GICv3 ITS implementation

2021-03-22 Thread shashi . mallela
Hi Peter, As per your suggestion, i have split the series into smaller pieces and shared newer patch-sets for review including cover letter. Also,have added virt board support and tested the same for functionality using kvm-unit-tests. Please ignore this patch and consider the latest series

[PATCH v1 7/8] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-03-22 Thread Shashi Mallela
Included creation of ITS as part of SBSA platform GIC initialization. Signed-off-by: Shashi Mallela --- hw/arm/sbsa-ref.c | 26 +--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 88dfb2284c..d05cbcae48 100644 ---

[PATCH v1 2/8] hw/intc: GICv3 ITS register definitions added

2021-03-22 Thread Shashi Mallela
Defined descriptors for ITS device table,collection table and ITS command queue entities.Implemented register read/write functions, extract ITS table parameters and command queue parameters,extended gicv3 common to capture qemu address space(which host the ITS table platform memories required for

[PATCH v1 1/8] hw/intc: GICv3 ITS initial framework

2021-03-22 Thread Shashi Mallela
Added register definitions relevant to ITS,implemented overall ITS device framework with stubs for ITS control and translater regions read/write,extended ITS common to handle mmio init between existing kvm device and newer qemu device. Signed-off-by: Shashi Mallela --- hw/intc/arm_gicv3_its.c

[PATCH v1 6/8] hw/intc: GICv3 redistributor ITS processing

2021-03-22 Thread Shashi Mallela
Implemented lpi processing at redistributor to get lpi config info from lpi configuration table,determine priority,set pending state in lpi pending table and forward the lpi to cpuif.Added logic to invoke redistributor lpi processing with translated LPI which set/clear LPI from ITS device as part

[PATCH v1 5/8] hw/intc: GICv3 ITS Feature enablement

2021-03-22 Thread Shashi Mallela
Added properties to enable ITS feature and define qemu system address space memory in gicv3 common,setup distributor and redistributor registers to indicate LPI support. Signed-off-by: Shashi Mallela --- hw/intc/arm_gicv3_common.c | 16 +++ hw/intc/arm_gicv3_dist.c |

[PATCH v1 0/8] GICv3 LPI and ITS feature implementation

2021-03-22 Thread Shashi Mallela
This patchset implements qemu device model for enabling physical LPI support and ITS functionality in GIC as per GICv3 specification. Both flat table and 2 level tables are implemented.The ITS commands for adding/deleting ITS table entries,trigerring LPI interrupts are implemented.Translated LPI

[PATCH v1 4/8] hw/intc: GICv3 ITS Command processing

2021-03-22 Thread Shashi Mallela
Added ITS command queue handling for MAPTI,MAPI commands,handled ITS translation which triggers an LPI via INT command as well as write to GITS_TRANSLATER register,defined enum to differentiate between ITS command interrupt trigger and GITS_TRANSLATER based interrupt trigger. Each of these

Re: [PATCH] MAINTAINERS: replace Huawei's email to personal one

2021-03-22 Thread Dongjiu Geng
ping...sorry for the noise. On 3/11/2021 19:29,Dongjiu Geng wrote: In order to conveniently receive email, replace the Huaweiemail address with my personal one.Signed-off-by: Dongjiu Geng --- MAINTAINERS | 2 +- 1 file changed, 1

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 01:06:53PM +0100, Paolo Bonzini wrote: > On 22/03/21 07:39, David Gibson wrote: > > > QEMU doesn't really keep track of "in flight" unplug requests, and as > > > long as that's the case, its timeout even will have the same issue. > > Not generically, maybe. In the PAPR

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

2021-03-22 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

Re: [PATCH 1/9] tpm: Changed a qemu_mutex_lock to QEMU_LOCK_GUARD

2021-03-22 Thread Stefan Berger
On 3/10/21 10:15 PM, Mahmoud Mandour wrote: Removed a qemu_mutex_lock() and its respective qemu_mutex_unlock() and used QEMU_LOCK_GUARD instead. This simplifies the code by eliminiating gotos and removing the qemu_mutex_unlock() calls. Signed-off-by: Mahmoud Mandour ---

Re: [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log

2021-03-22 Thread Kunkun Jiang
On 2021/3/18 20:36, Tian, Kevin wrote: From: Kunkun Jiang Sent: Thursday, March 18, 2021 8:29 PM Hi Kevin, On 2021/3/18 17:04, Tian, Kevin wrote: From: Kunkun Jiang Sent: Thursday, March 18, 2021 3:59 PM Hi Kevin, On 2021/3/18 14:28, Tian, Kevin wrote: From: Kunkun Jiang Sent: Wednesday,

Re: [PATCH 07/11] hw/gpio/avr_gpio: Add tracing for reads and writes

2021-03-22 Thread Niteesh G. S.
Hii Phil, A gentle reminder to push these patches. Thanks, Niteesh. On Sat, Mar 13, 2021 at 10:51 PM Niteesh G. S. wrote: > Reviewed-by: Niteesh G S > > On Sat, Mar 13, 2021 at 10:25 PM Philippe Mathieu-Daudé > wrote: > >> From: G S Niteesh Babu >> >> Added tracing for gpio read, write,

[PULL 15/16] docs/system: riscv: Add documentation for 'microchip-icicle-kit' machine

2021-03-22 Thread Alistair Francis
From: Bin Meng This adds the documentation to describe what is supported for the 'microchip-icicle-kit' machine, and how to boot the machine in QEMU. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 20210322075248.136255-2-bmeng...@gmail.com Signed-off-by: Alistair Francis

[PULL 14/16] hw/riscv: microchip_pfsoc: Map EMMC/SD mux register

2021-03-22 Thread Alistair Francis
From: Bin Meng Since HSS commit c20a89f8dcac, the Icicle Kit reference design has been updated to use a register mapped at 0x4f00 instead of a GPIO to control whether eMMC or SD card is to be used. With this support the same HSS image can be used for both eMMC and SD card boot flow, while

[PULL 13/16] hw/block: m25p80: Support fast read for SST flashes

2021-03-22 Thread Alistair Francis
From: Bin Meng Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes. [1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf Signed-off-by: Bin Meng Acked-by: Alistair Francis Message-id:

[PULL 09/16] hw/riscv: Add fw_cfg support to virt

2021-03-22 Thread Alistair Francis
From: Asherah Connor Provides fw_cfg for the virt machine on riscv. This enables using e.g. ramfb later. Signed-off-by: Asherah Connor Reviewed-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 20210318235041.17175-2-a...@kivikakk.ee Signed-off-by: Alistair Francis ---

[PULL 07/16] target/riscv: Make VSTIP and VSEIP read-only in hip

2021-03-22 Thread Alistair Francis
From: Georg Kotheimer Signed-off-by: Georg Kotheimer Reviewed-by: Alistair Francis Message-id: 20210311094902.1377593-1-georg.kothei...@kernkonzept.com Signed-off-by: Alistair Francis --- target/riscv/csr.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PULL 11/16] target/riscv: Fix read and write accesses to vsip and vsie

2021-03-22 Thread Alistair Francis
From: Georg Kotheimer The previous implementation was broken in many ways: - Used mideleg instead of hideleg to mask accesses - Used MIP_VSSIP instead of VS_MODE_INTERRUPTS to mask writes to vsie - Did not shift between S bits and VS bits (VSEIP <-> SEIP, ...) Signed-off-by: Georg Kotheimer

[PULL 03/16] target/riscv: propagate PMP permission to TLB page

2021-03-22 Thread Alistair Francis
From: Jim Shu Currently, PMP permission checking of TLB page is bypassed if TLB hits Fix it by propagating PMP permission to TLB page permission. PMP permission checking also use MMU-style API to change TLB permission and size. Signed-off-by: Jim Shu Reviewed-by: Alistair Francis Message-id:

[PULL 10/16] hw/riscv: allow ramfb on virt

2021-03-22 Thread Alistair Francis
From: Asherah Connor Allow ramfb on virt. This lets `-device ramfb' work. Signed-off-by: Asherah Connor Reviewed-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 20210318235041.17175-3-a...@kivikakk.ee Signed-off-by: Alistair Francis --- hw/riscv/virt.c | 3 +++ 1 file changed, 3

[PULL 16/16] target/riscv: Prevent lost illegal instruction exceptions

2021-03-22 Thread Alistair Francis
From: Georg Kotheimer When decode_insn16() fails, we fall back to decode_RV32_64C() for further compressed instruction decoding. However, prior to this change, we did not raise an illegal instruction exception, if decode_RV32_64C() fails to decode the instruction. This means that we skipped

[PULL 02/16] hw/char: disable ibex uart receive if the buffer is full

2021-03-22 Thread Alistair Francis
From: Alexander Wagner Not disabling the UART leads to QEMU overwriting the UART receive buffer with the newest received byte. The rx_level variable is added to allow the use of the existing OpenTitan driver libraries. Signed-off-by: Alexander Wagner Reviewed-by: Alistair Francis Message-id:

[PULL 08/16] target/riscv: Use background registers also for MSTATUS_MPV

2021-03-22 Thread Alistair Francis
From: Georg Kotheimer The current condition for the use of background registers only considers the hypervisor load and store instructions, but not accesses from M mode via MSTATUS_MPRV+MPV. Signed-off-by: Georg Kotheimer Reviewed-by: Alistair Francis Message-id:

[PULL 12/16] target/riscv: Add proper two-stage lookup exception detection

2021-03-22 Thread Alistair Francis
From: Georg Kotheimer The current two-stage lookup detection in riscv_cpu_do_interrupt falls short of its purpose, as all it checks is whether two-stage address translation either via the hypervisor-load store instructions or the MPRV feature would be allowed. What we really need instead is

[PATCH v4 4/4] virtio-pci: add support for configure interrupt

2021-03-22 Thread Cindy Lu
Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 171

[PULL 06/16] target/riscv: Adjust privilege level for HLV(X)/HSV instructions

2021-03-22 Thread Alistair Francis
From: Georg Kotheimer According to the specification the "field SPVP of hstatus controls the privilege level of the access" for the hypervisor virtual-machine load and store instructions HLV, HLVX and HSV. Signed-off-by: Georg Kotheimer Reviewed-by: Alistair Francis Message-id:

[PULL 04/16] target/riscv: add log of PMP permission checking

2021-03-22 Thread Alistair Francis
From: Jim Shu Like MMU translation, add qemu log of PMP permission checking for debugging. Signed-off-by: Jim Shu Reviewed-by: Alistair Francis Message-id: 1613916082-19528-3-git-send-email-cw...@andestech.com Signed-off-by: Alistair Francis --- target/riscv/cpu_helper.c | 12

[PATCH v4 3/4] virtio-mmio: add support for configure interrupt

2021-03-22 Thread Cindy Lu
add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-mmio.c

[PULL 05/16] target/riscv: flush TLB pages if PMP permission has been changed

2021-03-22 Thread Alistair Francis
From: Jim Shu If PMP permission of any address has been changed by updating PMP entry, flush all TLB pages to prevent from getting old permission. Signed-off-by: Jim Shu Reviewed-by: Alistair Francis Message-id: 1613916082-19528-4-git-send-email-cw...@andestech.com Signed-off-by: Alistair

[PULL 00/16] riscv-to-apply queue

2021-03-22 Thread Alistair Francis
The following changes since commit c95bd5ff1660883d15ad6e0005e4c8571604f51a: Merge remote-tracking branch 'remotes/philmd/tags/mips-fixes-20210322' into staging (2021-03-22 14:26:13 +) are available in the Git repository at: g...@github.com:alistair23/qemu.git tags/pull-riscv-to-apply

[PULL 01/16] target/riscv: fix vs() to return proper error code

2021-03-22 Thread Alistair Francis
From: Frank Chang vs() should return -RISCV_EXCP_ILLEGAL_INST instead of -1 if rvv feature is not enabled. If -1 is returned, exception will be raised and cs->exception_index will be set to the negative return value. The exception will then be treated as an instruction access fault instead of

[PATCH v4 2/4] vhost-vdpa: add callback function for configure interrupt

2021-03-22 Thread Cindy Lu
Add call back function for configure interrupt. Set the notifier's fd to the kernel driver when vdpa start. also set -1 while vdpa stop. then the kernel will release the related resource Signed-off-by: Cindy Lu --- hw/virtio/trace-events| 2 ++ hw/virtio/vhost-vdpa.c|

[PATCH v4 0/4] vhost-vdpa: add support for configure interrupt

2021-03-22 Thread Cindy Lu
These code are all tested in vp-vdpa (support configure interrupt) vdpa_sim (not support configure interrupt) test in virtio-pci bus and virtio-mmio bus Change in v2: Add support fot virtio-mmio bus active the notifier wihle the backend support configure intterrput misc fixes form v1 Change in

[PATCH v4 1/4] virtio:add support in configure interrupt

2021-03-22 Thread Cindy Lu
Add configure notifier support in virtio and related driver When peer is vhost vdpa, setup the configure interrupt function vhost_net_start and release the resource when vhost_net_stop Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 14 +++ hw/net/vhost_net.c |

Re: [PATCH v5 10/10] KVM: Dirty ring support

2021-03-22 Thread Keqian Zhu
On 2021/3/23 2:52, Peter Xu wrote: > On Mon, Mar 22, 2021 at 09:37:19PM +0800, Keqian Zhu wrote: >>> +/* Should be with all slots_lock held for the address spaces. */ >>> +static void kvm_dirty_ring_mark_page(KVMState *s, uint32_t as_id, >>> + uint32_t

Re: [PATCH 0/4] DEVICE_NOT_DELETED/DEVICE_UNPLUG_ERROR QAPI events

2021-03-22 Thread David Gibson
On Fri, Mar 12, 2021 at 05:07:36PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This series adds 2 new QAPI events, DEVICE_NOT_DELETED and > DEVICE_UNPLUG_ERROR. They were (and are still being) discussed in [1]. > > Patches 1 and 3 are independent of the ppc patches and can be applied >

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-03-22 Thread David Gibson
On Fri, Mar 19, 2021 at 03:34:52PM -0300, Daniel Henrique Barboza wrote: > Kernel commit 4bce545903fa ("powerpc/topology: Update > topology_core_cpumask") cause a regression in the pseries machine when > defining certain SMP topologies [1]. The reasoning behind the change is > explained in kernel

Re: [PATCH v10 6/7] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller

2021-03-22 Thread David Gibson
On Wed, Mar 17, 2021 at 02:17:51AM +0100, BALATON Zoltan wrote: > 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

Re: [PATCH v10 7/7] hw/ppc: Add emulation of Genesi/bPlan Pegasos II

2021-03-22 Thread David Gibson
On Wed, Mar 17, 2021 at 02:17:51AM +0100, BALATON Zoltan wrote: > 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

Re: [PATCH v10 0/7] Pegasos2 emulation

2021-03-22 Thread David Gibson
On Wed, Mar 17, 2021 at 02:17:51AM +0100, BALATON Zoltan wrote: > 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 >

Re: [PATCH] configure: Improve alias attribute check

2021-03-22 Thread Gavin Shan
Hi Richard, On 3/23/21 7:59 AM, Richard Henderson wrote: On 3/22/21 4:54 AM, Gavin Shan wrote: It looks this issue can be avoided after "volatile" is applied to @target_page. However, I'm not sure if it's the correct fix to have. Certainly not. That is the exact opposite of what we want. 

Re: [PATCH] hw/net: fsl_etsec: Tx padding length should exclude CRC

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 01:48:07PM +0800, Bin Meng wrote: > Hi David, > > On Mon, Mar 22, 2021 at 1:24 PM David Gibson > wrote: > > > > On Mon, Mar 22, 2021 at 12:33:06PM +0800, Bin Meng wrote: > > > Hi David, > > > > > > On Mon, Mar 22, 2021 at 12:11 PM David Gibson > > > wrote: > > > > > > >

Re: [PATCH] hw/net: fsl_etsec: Tx padding length should exclude CRC

2021-03-22 Thread David Gibson
On Tue, Mar 16, 2021 at 04:15:05PM +0800, Bin Meng wrote: > As the comment of tx_padding_and_crc() says: "Never add CRC in QEMU", > min_frame_len should excluce CRC, so it should be 60 instead of 64. > > Signed-off-by: Bin Meng Applied to ppc-for-6.0, thanks. > --- > >

Re: [PATCH v4 10/17] target/ppc: Create helper_scv

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 11:05:00AM -0600, Richard Henderson wrote: > On 3/21/21 10:00 PM, David Gibson wrote: > > On Mon, Mar 15, 2021 at 12:46:08PM -0600, Richard Henderson wrote: > > > Perform the test against FSCR_SCV at runtime, in the helper. > > > > > > This means we can remove the

Re: [PATCH v4 13/17] target/ppc: Remove env->immu_idx and env->dmmu_idx

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 11:27:49AM -0600, Richard Henderson wrote: > On 3/21/21 10:26 PM, David Gibson wrote: > > On Mon, Mar 15, 2021 at 12:46:11PM -0600, Richard Henderson wrote: > > > We weren't recording MSR_GS in hflags, which means that BookE > > > memory accesses were essentially random vs

Re: [PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 10:55:46AM -0600, Richard Henderson wrote: > On 3/21/21 9:52 PM, David Gibson wrote: > > > +/* > > > + * Bits for env->hflags. > > > + * > > > + * Most of these bits overlap with corresponding bits in MSR, > > > + * but some come from other sources. Be cautious when

Re: [PATCH] [NFC] Mark locally used symbols as static.

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 10:55:42PM +0300, Yuri Gribov wrote: > Hi all, > > This patch makes locally used symbols static to enable more compiler > optimizations on them. Some of the symbols turned out to not be used > at all so I marked them with ATTRIBUTE_UNUSED (as I wasn't sure if > they were

Re: [PATCH v4 03/17] target/ppc: Properly sync cpu state with new msr in cpu_load_old

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 10:53:01AM -0600, Richard Henderson wrote: > On 3/16/21 2:15 AM, Cédric Le Goater wrote: > > On 3/15/21 7:46 PM, Richard Henderson wrote: > > > Match cpu_post_load in using ppc_store_msr to set all of > > > the cpu state implied by the value of msr. Do not restore > > >

Re: [PATCH 1/2] block/raw: added support of persistent dirty bitmaps

2021-03-22 Thread Lubos Matejka
Kdy si muzem cinknout k dalsimu vyvoji? Odesláno z iPhonu > 22. 3. 2021 v 12:37, Patrik Janoušek : > >  >> On 3/22/21 12:18 PM, Vladimir Sementsov-Ogievskiy wrote: >> 22.03.2021 13:46, Vladimir Sementsov-Ogievskiy wrote: >>> 22.03.2021 13:18, Patrik Janoušek wrote: On 3/22/21 9:41 AM,

[PULL v2 19/19] acpi: Move setters/getters of oem fields to X86MachineState

2021-03-22 Thread Michael S. Tsirkin
From: Marian Postevca The code that sets/gets oem fields is duplicated in both PC and MICROVM variants. This commit moves it to X86MachineState so that all x86 variants can use it and duplication is removed. Signed-off-by: Marian Postevca Message-Id: <20210221001737.24499-2-poste...@mutex.one>

[PULL v2 18/19] acpi: Set proper maximum size for "etc/acpi/rsdp" blob

2021-03-22 Thread Michael S. Tsirkin
From: David Hildenbrand Let's also set a maximum size for "etc/acpi/rsdp", so the maximum size doesn't get implicitly set based on the initial table size. In my experiments, the table size was in the range of 22 bytes, so a single page (== what we used until now) seems to be good enough. Now

[PULL v2 15/19] acpi: Set proper maximum size for "etc/table-loader" blob

2021-03-22 Thread Michael S. Tsirkin
From: David Hildenbrand The resizeable memory region / RAMBlock that is created for the cmd blob has a maximum size of whole host pages (e.g., 4k), because RAMBlocks work on full host pages. In addition, in i386 ACPI code: acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); makes

[PULL v2 13/19] pci: acpi: add _DSM method to PCI devices

2021-03-22 Thread Michael S. Tsirkin
From: Igor Mammedov Implement _DSM according to: PCI Firmware Specification 3.1 4.6.7. DSM for Naming a PCI or PCI Express Device Under Operating Systems and wire it up to cold and hot-plugged PCI devices. Feature depends on ACPI hotplug being enabled (as that provides PCI

[PULL v2 17/19] acpi: Move maximum size logic into acpi_add_rom_blob()

2021-03-22 Thread Michael S. Tsirkin
From: David Hildenbrand We want to have safety margins for all tables based on the table type. Let's move the maximum size logic into acpi_add_rom_blob() and make it dependent on the table name, so we don't have to replicate for each and every instance that creates such tables. Suggested-by:

[PULL v2 06/19] vhost-user: Introduce nested event loop in vhost_user_read()

2021-03-22 Thread Michael S. Tsirkin
From: Greg Kurz A deadlock condition potentially exists if a vhost-user process needs to request something to QEMU on the slave channel while processing a vhost-user message. This doesn't seem to affect any vhost-user implementation so far, but this is currently biting the upcoming enablement

[PULL v2 11/19] pci: acpi: ensure that acpi-index is unique

2021-03-22 Thread Michael S. Tsirkin
From: Igor Mammedov it helps to avoid device naming conflicts when guest OS is configured to use acpi-index for naming. Spec ialso says so: PCI Firmware Specification Revision 3.2 4.6.7. _DSM for Naming a PCI or PCI Express Device Under Operating Systems " Instance number must be unique under

[PULL v2 04/19] vhost-user: Factor out duplicated slave_fd teardown code

2021-03-22 Thread Michael S. Tsirkin
From: Greg Kurz Signed-off-by: Greg Kurz Message-Id: <20210312092212.782255-4-gr...@kaod.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- hw/virtio/vhost-user.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-)

[PULL v2 08/19] virtio-pmem: fix virtio_pmem_resp assign problem

2021-03-22 Thread Michael S. Tsirkin
From: Wang Liang ret in virtio_pmem_resp is a uint32_t variable, which should be assigned using virtio_stl_p. The kernel side driver does not guarantee virtio_pmem_resp to be initialized to zero in advance, So sometimes the flush operation will fail. Signed-off-by: Wang Liang Message-Id:

[PULL v2 14/19] tests: acpi: update expected blobs

2021-03-22 Thread Michael S. Tsirkin
From: Igor Mammedov expected changes are: * larger BNMR operation region * new PIDX field and method to fetch acpi-index * PDSM method that implements PCI device _DSM + per device _DSM that calls PDSM @@ -221,10 +221,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC", 0x0001)

[PULL v2 02/19] vhost-user: Drop misleading EAGAIN checks in slave_read()

2021-03-22 Thread Michael S. Tsirkin
From: Greg Kurz slave_read() checks EAGAIN when reading or writing to the socket fails. This gives the impression that the slave channel is in non-blocking mode, which is certainly not the case with the current code base. And the rest of the code isn't actually ready to cope with non-blocking

[PULL v2 07/19] vhost-user: Monitor slave channel in vhost_user_read()

2021-03-22 Thread Michael S. Tsirkin
From: Greg Kurz Now that everything is in place, have the nested event loop to monitor the slave channel. The source in the main event loop is destroyed and recreated to ensure any pending even for the slave channel that was previously detected is purged. This guarantees that the main loop wont

[PULL v2 12/19] acpi: add aml_to_decimalstring() and aml_call6() helpers

2021-03-22 Thread Michael S. Tsirkin
From: Igor Mammedov it will be used by follow up patches Signed-off-by: Igor Mammedov Message-Id: <20210315180102.3008391-5-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/aml-build.h | 3 +++ hw/acpi/aml-build.c | 28

[PULL v2 09/19] tests: acpi: temporary whitelist DSDT changes

2021-03-22 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210315180102.3008391-2-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PULL v2 01/19] virtio: Fix virtio_mmio_read()/virtio_mmio_write()

2021-03-22 Thread Michael S. Tsirkin
From: Laurent Vivier Both functions don't check the personality of the interface (legacy or modern) before accessing the configuration memory and always use virtio_config_readX()/virtio_config_writeX(). With this patch, they now check the personality and in legacy mode call

[PULL v2 05/19] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-22 Thread Michael S. Tsirkin
From: Greg Kurz The slave channel is implemented with socketpair() : QEMU creates the pair, passes one of the socket to virtiofsd and monitors the other one with the main event loop using qemu_set_fd_handler(). In order to fix a potential deadlock between QEMU and a vhost-user external process

[PULL v2 10/19] pci: introduce acpi-index property for PCI device

2021-03-22 Thread Michael S. Tsirkin
From: Igor Mammedov In x86/ACPI world, linux distros are using predictable network interface naming since systemd v197. Which on QEMU based VMs results into path based naming scheme, that names network interfaces based on PCI topology. With itm on has to plug NIC in exactly the same bus/slot,

[PULL v2 03/19] vhost-user: Fix double-close on slave_read() error path

2021-03-22 Thread Michael S. Tsirkin
From: Greg Kurz Some message types, e.g. VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG, can convey file descriptors. These must be closed before returning from slave_read() to avoid being leaked. This can currently be done in two different places: [1] just after the request has been processed [2]

[PULL v2 00/19] pc,virtio,pci: fixes, features

2021-03-22 Thread Michael S. Tsirkin
Changes from v1: dropped an acpi patch causing regressions reported by clang The following changes since commit f0f20022a0c744930935fdb7020a8c18347d391a: Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-03-21' into staging (2021-03-22 10:05:45 +) are

Re: [PATCH] acpi:piix4, vt82c686: reinitialize acpi PM device on reset

2021-03-22 Thread Michael S. Tsirkin
On Wed, Mar 17, 2021 at 02:49:31PM -0700, isaku.yamah...@gmail.com wrote: > From: Isaku Yamahata > > Commit 6be8cf56bc8b made sure that SCI is enabled in PM1.CNT > on reset in acpi_only mode by modifying acpi_pm1_cnt_reset() and > that worked for q35 as expected. > > The function was introduced

Re: [PULL 00/20] pc,virtio,pci: fixes, features

2021-03-22 Thread Michael S. Tsirkin
On Mon, Mar 22, 2021 at 06:46:06PM +, Peter Maydell wrote: > On Mon, 22 Mar 2021 at 16:41, Peter Maydell wrote: > > > > On Mon, 22 Mar 2021 at 15:44, Michael S. Tsirkin wrote: > > > > > > The following changes since commit > > > f0f20022a0c744930935fdb7020a8c18347d391a: > > > > > > Merge

Re: [PULL 00/20] pc,virtio,pci: fixes, features

2021-03-22 Thread Michael S. Tsirkin
On Mon, Mar 22, 2021 at 04:41:01PM +, Peter Maydell wrote: > On Mon, 22 Mar 2021 at 15:44, Michael S. Tsirkin wrote: > > > > The following changes since commit f0f20022a0c744930935fdb7020a8c18347d391a: > > > > Merge remote-tracking branch > >

Re: [PATCH v1] vhost-user-blk: use different event handlers on init and operation

2021-03-22 Thread Raphael Norwitz
I'm mostly happy with this. My biggest overall comment is that I think this should be split into two, as your refactor using different event handlers for init is a standalone improvement over and above the bugfix. I would have the first commit split out vhost_user_blk_event_init() and

Re: [PATCH v3 1/1] acpi: Consolidate the handling of OEM ID and OEM Table ID fields

2021-03-22 Thread Michael S. Tsirkin
On Mon, Mar 22, 2021 at 11:55:54PM +0200, Marian Postevca wrote: > Introduces structure AcpiBuildOem to hold the value of OEM fields and > uses dedicated macros to initialize/set the values. > Unnecessary dynamically allocated OEM fields are re-factored to static > allocation. > > Signed-off-by:

Re: [PATCH] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-22 Thread Michael S. Tsirkin
On Mon, Mar 22, 2021 at 08:13:36PM +, Peter Maydell wrote: > Currently the gpex PCI controller implements no special behaviour for > guest accesses to areas of the PIO and MMIO where it has not mapped > any PCI devices, which means that for Arm you end up with a CPU > exception due to a data

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2021-03-22 Thread John Snow
On 3/17/21 3:00 AM, Olaf Hering wrote: Commit ee358e919e385fdc79d59d0d47b4a81e349cd5c9 causes a regression in Xen HVM domUs which run xenlinux based kernels. If the domU has an USB device assigned, for example with "usbdevice=['tablet']" in domU.cfg, the late unplug of devices will kill the

Re: [PATCH v2] target/riscv: Prevent lost illegal instruction exceptions

2021-03-22 Thread Richard Henderson
On 3/22/21 6:16 AM, Georg Kotheimer wrote: When decode_insn16() fails, we fall back to decode_RV32_64C() for further compressed instruction decoding. However, prior to this change, we did not raise an illegal instruction exception, if decode_RV32_64C() fails to decode the instruction. This means

[PATCH v3 0/1] Rework ACPI OEM fields handling to simplify code (was: acpi: Remove duplicated code handling OEM ID and OEM table ID fields)

2021-03-22 Thread Marian Postevca
This patch consolidates ACPI OEM fields handling by: - Moving common code in PC and MICROVM to X86. - Changes unnecessary dynamic memory allocation to static allocation - Uses dedicated structure to keep values of fields instead of two separate strings - Adds helper macros to initialize the

[PATCH v3 1/1] acpi: Consolidate the handling of OEM ID and OEM Table ID fields

2021-03-22 Thread Marian Postevca
Introduces structure AcpiBuildOem to hold the value of OEM fields and uses dedicated macros to initialize/set the values. Unnecessary dynamically allocated OEM fields are re-factored to static allocation. Signed-off-by: Marian Postevca --- hw/acpi/hmat.h | 2 +-

Re: [PATCH v2 0/3] exec: Build page-vary-common.c with -fno-lto

2021-03-22 Thread Richard Henderson
On 3/22/21 7:00 AM, Paolo Bonzini wrote: On 22/03/21 12:24, Philippe Mathieu-Daudé wrote: Hi, While reviewing Richard's original patch, I split it in 3 to make it more digestible to my review taste. I then simply filled the patch descriptions. Feel free to keep Richard's v1 if this isn't worth

Re: Fwd: [PATCH 0/2] block/raw: implemented persistent dirty bitmap and ability to dump bitmap content via qapi

2021-03-22 Thread Patrik Janoušek
On 3/22/21 1:06 PM, Max Reitz wrote: > On 22.03.21 12:27, Patrik Janoušek wrote: >> On 3/22/21 11:48 AM, Max Reitz wrote: >>> Hi, >>> >>> On 20.03.21 11:01, Patrik Janoušek wrote: I'm sorry, but I forgot to add you to the cc, so I'm forwarding the patch to you additionally. I don't want

Re: [PATCH] exec: Build page-varry-common.c with -fno-lto

2021-03-22 Thread Richard Henderson
On 3/22/21 5:14 AM, Philippe Mathieu-Daudé wrote: configure| 19 --- meson.build | 18 ++- include/exec/cpu-all.h | 15 ++ include/exec/page-vary.h | 34 exec-vary.c | 108 ---

Re: [PATCH] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-22 Thread Arnd Bergmann
6On Mon, Mar 22, 2021 at 9:13 PM Peter Maydell wrote: > > Currently the gpex PCI controller implements no special behaviour for > guest accesses to areas of the PIO and MMIO where it has not mapped > any PCI devices, which means that for Arm you end up with a CPU > exception due to a data abort.

Re: [PATCH] [NFC] Mark locally used symbols as static.

2021-03-22 Thread Max Filippov
On Mon, Mar 22, 2021 at 12:55 PM Yuri Gribov wrote: > > Hi all, > > This patch makes locally used symbols static to enable more compiler > optimizations on them. Some of the symbols turned out to not be used > at all so I marked them with ATTRIBUTE_UNUSED (as I wasn't sure if > they were ok to

Re: [PATCH] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-22 Thread Richard Henderson
On 3/22/21 4:59 AM, Robert Hoo wrote: Since commit fa4518741e (target-i386: Rename struct XMMReg to ZMMReg), CPUX86State.xmm_regs[] has already been extended to 512bit to support AVX512. Also, other qemu level supports for AVX512 registers are there for years. But in x86_cpu_dump_state(), still

Re: [PATCH] configure: Improve alias attribute check

2021-03-22 Thread Richard Henderson
On 3/22/21 4:54 AM, Gavin Shan wrote: It looks this issue can be avoided after "volatile" is applied to @target_page. However, I'm not sure if it's the correct fix to have. Certainly not. That is the exact opposite of what we want. We want to minimize the number of reads from the variable,

Re: [PATCH 2/2] docs/system: riscv: Add documentation for 'microchip-icicle-kit' machine

2021-03-22 Thread Alistair Francis
On Mon, Mar 22, 2021 at 3:53 AM Bin Meng wrote: > > From: Bin Meng > > This adds the documentation to describe what is supported for the > 'microchip-icicle-kit' machine, and how to boot the machine in QEMU. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > --- > >

Re: [PATCH v1 1/3] migration: Fix missing qemu_fflush() on buffer file in bg_migration_thread

2021-03-22 Thread Peter Xu
On Fri, Mar 19, 2021 at 05:52:47PM +0300, Andrey Gruzdev wrote: > Added missing qemu_fflush() on buffer file holding precopy device state. > Increased initial QIOChannelBuffer allocation to 512KB to avoid reallocs. > Typical configurations often require >200KB for device state and VMDESC. > >

Re: [Virtio-fs] [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-22 Thread Vivek Goyal
On Mon, Mar 22, 2021 at 11:00:52AM +, Stefan Hajnoczi wrote: > On Wed, Mar 17, 2021 at 08:32:31PM +0800, Jiachen Zhang wrote: > > On Wed, Mar 17, 2021 at 6:05 PM Stefan Hajnoczi wrote: > > > On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > > I agreed with you that a virtiofsd

[PATCH] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-22 Thread Peter Maydell
Currently the gpex PCI controller implements no special behaviour for guest accesses to areas of the PIO and MMIO where it has not mapped any PCI devices, which means that for Arm you end up with a CPU exception due to a data abort. Most host OSes expect "like an x86 PC" behaviour, where bad

[PATCH] [NFC] Mark locally used symbols as static.

2021-03-22 Thread Yuri Gribov
Hi all, This patch makes locally used symbols static to enable more compiler optimizations on them. Some of the symbols turned out to not be used at all so I marked them with ATTRIBUTE_UNUSED (as I wasn't sure if they were ok to delete). The symbols have been identified with a pet project of

Re: [PATCH] docs: simplify each section title

2021-03-22 Thread Marc-André Lureau
Hi On Mon, Mar 22, 2021 at 10:23 PM John Snow wrote: > On 3/22/21 12:36 PM, Peter Maydell wrote: > > On Mon, 22 Mar 2021 at 16:03, wrote: > >> > >> From: Marc-André Lureau > >> > >> Now that we merged into one doc, it makes the nav looks nicer. > >> > >> Signed-off-by: Marc-André Lureau > >>

Re: [PATCH v5 00/10] KVM: Dirty ring support (QEMU part)

2021-03-22 Thread Peter Xu
On Mon, Mar 22, 2021 at 10:02:38PM +0800, Keqian Zhu wrote: > Hi Peter, Hi, Keqian, [...] > You emphasize that dirty ring is a "Thread-local buffers", but dirty bitmap > is global, > but I don't see it has optimization about "locking" compared to dirty bitmap. > > The thread-local means that

[Bug 1407808] Re: virtual console gives strange response to ANSI DSR

2021-03-22 Thread Peter Maydell
This should be fixed in head-of-git by commit 8eb13bbbac08a, which will be in QEMU 6.0. (The underlying bug is that when the GTK front-end tries to send sequences of more than one byte to a UART, it didn't account for UARTs which don't have a FIFO capable of holding the whole sequence at once.)

Re: [RFC PATCH v2] gitlab: default to not building the documentation

2021-03-22 Thread Alex Bennée
Alex Bennée writes: > In d0f26e68a0 ("gitlab: force enable docs build in Fedora, Ubuntu, > Debian") we made sure we can build the documents on more than one > system. However we don't want to build documents all the time as it's > a waste of cycles (and energy). So lets reduce the total amount

  1   2   3   4   5   >