[Qemu-devel] [Bug 1823790] Re: QEMU mishandling of SO_PEERSEC forces systemd into tight loop

2019-08-16 Thread Fritz Katze
I filed the duplicate #1840252 of this bug. I think that the options SO_PEERCRED and SO_PEERSEC belong into the context of SELINUX. So maybe the format of the paylod can be found in the sources of libselinux? I'd like to compile qemu with a local hack to work around my current problem. Something

[Qemu-devel] [PATCH v7 01/42] configure: Define TARGET_ALIGNED_ONLY

2019-08-16 Thread tony.nguyen
Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move defines out of target/foo/cpu.h into configure, as we do with TARGET_WORDS_BIGENDIAN, so that it is always defined early. Poisoned TARGET_ALIGNED_ONLY to prevent use in common code. Signed-off-by: Tony Nguyen Reviewed-by: Philippe M

Re: [Qemu-devel] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-16 Thread Paolo Bonzini
On 16/08/19 04:46, Yao, Jiewen wrote: > Comment below: > > >> -Original Message- >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> Sent: Friday, August 16, 2019 12:21 AM >> To: Laszlo Ersek ; de...@edk2.groups.io; Yao, Jiewen >> >> Cc: edk2-rfc-groups-io ; qemu devel list >> ; Igor

[Qemu-devel] [PATCH v7 03/42] memory: Introduce size_memop

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Signed-off-by: Tony Ng

[Qemu-devel] [PATCH v7 04/42] target/mips: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v7 02/42] tcg: TCGMemOp is now accelerator independent MemOp

2019-08-16 Thread tony.nguyen
Preparation for collapsing the two byte swaps, adjust_endianness and handle_bswap, along the I/O path. Target dependant attributes are conditionalized upon NEED_CPU_H. Signed-off-by: Tony Nguyen Acked-by: David Gibson Reviewed-by: Richard Henderson Acked-by: Cornelia Huck --- MAINTAINERS

[Qemu-devel] [PATCH v7 05/42] hw/s390x: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v7 09/42] exec: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v7 06/42] hw/intc/armv7m_nic: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v7 07/42] hw/virtio: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v5 2/3] aspeed: add a GPIO controller to the SoC

2019-08-16 Thread Rashmica Gupta
Signed-off-by: Rashmica Gupta --- include/hw/arm/aspeed_soc.h | 3 +++ hw/arm/aspeed_soc.c | 17 + 2 files changed, 20 insertions(+) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index cef605ad6b..fa04abddd8 100644 --- a/include/hw/arm/aspeed_soc

[Qemu-devel] [PATCH v7 10/42] cputlb: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v7 20/42] hw/gpio: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 14/42] exec: Hard code size with MO_{8|16|32|64}

2019-08-16 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoids size_memop calls. Signed-off-by: Tony

[Qemu-devel] [PATCH v7 08/42] hw/vfio: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v7 11/42] memory: Access MemoryRegion with MemOp

2019-08-16 Thread tony.nguyen
Convert memory_region_dispatch_{read|write} operand "unsigned size" into a "MemOp op". Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/memop.h | 20 ++-- include/exec/memory.h | 9 + memory.c | 7 +-- 3 files changed, 24 ins

[Qemu-devel] [PATCH v7 18/42] hw/display: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 12/42] hw/s390x: Hard code size with MO_{8|16|32|64}

2019-08-16 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoids size_memop calls. Signed-off-by: Tony

[Qemu-devel] [PATCH v7 27/42] hw/pci-host: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 13/42] target/mips: Hard code size with MO_{8|16|32|64}

2019-08-16 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoids size_memop calls. Signed-off-by: Tony

[Qemu-devel] [PATCH v7 15/42] hw/audio: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 31/42] build: Correct non-common common-obj-* to obj-*

2019-08-16 Thread tony.nguyen
Preparation for replacing device_endian with MemOp. Device realizing code with MemorRegionOps endianness as DEVICE_NATIVE_ENDIAN is not common code. Corrected devices were identified by making the declaration of DEVICE_NATIVE_ENDIAN conditional upon NEED_CPU_H and then listing what failed to comp

[Qemu-devel] [PATCH v7 16/42] hw/block: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 21/42] hw/i2c: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v4 0/3] Add Aspeed GPIO controller model

2019-08-16 Thread Rashmica Gupta
v5: - integrated AspeedGPIOController fields into AspeedGPIOClass - separated ast2600_3_6v and ast2600_1_8v into two classes v4: - proper interupt handling thanks to Andrew - switch statements for reading and writing suggested by Peter - some small cleanups suggested by Alexey v3: - didn't have e

[Qemu-devel] [PATCH v5 1/3] hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500

2019-08-16 Thread Rashmica Gupta
GPIO pins are arranged in groups of 8 pins labeled A,B,..,Y,Z,AA,AB,AC. (Note that the ast2400 controller only goes up to group AB). A set has four groups (except set AC which only has one) and is referred to by the groups it is composed of (eg ABCD,EFGH,...,YZAAAB). Each set is accessed and contro

[Qemu-devel] [PATCH v7 22/42] hw/input: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 41/42] target/sparc: Add TLB entry with attributes

2019-08-16 Thread tony.nguyen
Append MemTxAttrs to interfaces so we can pass along up coming Invert Endian TTE bit on SPARC64. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- target/sparc/mmu_helper.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/

[Qemu-devel] [PATCH v7 17/42] hw/char: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 25/42] hw/misc: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 24/42] hw/isa: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 23/42] hw/intc: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v5 3/3] hw/gpio: Add in AST2600 specific implementation

2019-08-16 Thread Rashmica Gupta
The AST2600 has the same sets of 3.6v gpios as the AST2400 plus an addtional two sets of 1.8V gpios. Signed-off-by: Rashmica Gupta --- hw/gpio/aspeed_gpio.c | 142 -- 1 file changed, 137 insertions(+), 5 deletions(-) diff --git a/hw/gpio/aspeed_gpio.c b/h

[Qemu-devel] [PATCH v7 29/42] hw/ssi: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 26/42] hw/net: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 19/42] hw/dma: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 35/42] exec: Delete DEVICE_HOST_ENDIAN

2019-08-16 Thread tony.nguyen
DEVICE_HOST_ENDIAN is conditional upon HOST_WORDS_BIGENDIAN. Code is cleaner if the single use of DEVICE_HOST_ENDIAN is instead directly conditional upon HOST_WORDS_BIGENDIAN. Signed-off-by: Tony Nguyen --- include/exec/cpu-common.h | 8 memory.c | 2 +- 2 files change

[Qemu-devel] [PATCH v7 28/42] hw/sd: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

[Qemu-devel] [PATCH v7 36/42] memory: Access MemoryRegion with endianness

2019-08-16 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Call memory_region_dispatch_{read|write} with endianness encoded into the "MemOp op" operand. This patch does not change any behaviour as memory_region_dispatch_{read|write} is yet to handle the endi

[Qemu-devel] [PATCH v7 38/42] memory: Single byte swap along the I/O path

2019-08-16 Thread tony.nguyen
Now that MemOp has been pushed down into the memory API, and callers are encoding endianness, we can collapse byte swaps along the I/O path into the accelerator and target independent adjust_endianness. Collapsing byte swaps along the I/O path enables additional endian inversion logic, e.g. SPARC6

[Qemu-devel] [PATCH v7 32/42] exec: Map device_endian onto MemOp

2019-08-16 Thread tony.nguyen
Preparation to replace device_endian with MemOp. Mapping device_endian onto MemOp limits behaviour changes to this relatively smaller patch. The next patch will replace all device_endian usages with the equivalent MemOp. That patch will be large but have no behaviour changes. A subsequent patch

Re: [Qemu-devel] [PATCH v5 2/3] aspeed: add a GPIO controller to the SoC

2019-08-16 Thread Rashmica Gupta
Cédric, this is how I thought changes to the SOC for your aspeed-4.1 branch would look >From 13a07834476fa266c352d9a075b341c483b2edf9 Mon Sep 17 00:00:00 2001 From: Rashmica Gupta Date: Fri, 16 Aug 2019 15:18:22 +1000 Subject: [PATCH] Aspeed SOC changes --- include/hw/arm/aspeed_soc.h | 4 +++

[Qemu-devel] [PATCH v7 30/42] hw/timer: Declare device little or big endian

2019-08-16 Thread tony.nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result i

Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary

2019-08-16 Thread Erik Skultety
On Fri, Aug 16, 2019 at 08:10:20AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > We have this issue reported when using libvirt to hotplug CPUs: > > https://bugzilla.redhat.com/show_bug.cgi?id=1741451 > > > > Basically, libvirt is not copying die-id from > > query-hotpluggable-cp

[Qemu-devel] [PATCH v7 42/42] target/sparc: sun4u Invert Endian TTE bit

2019-08-16 Thread tony.nguyen
This bit configures endianness of PCI MMIO devices. It is used by Solaris and OpenBSD sunhme drivers. Tested working on OpenBSD. Unfortunately Solaris 10 had a unrelated keyboard issue blocking testing... another inch towards Solaris 10 on SPARC64 =) Signed-off-by: Tony Nguyen Reviewed-by: Rich

Re: [Qemu-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-16 Thread Igor Mammedov
On Thu, 15 Aug 2019 18:24:53 +0200 Paolo Bonzini wrote: > On 15/08/19 18:07, Igor Mammedov wrote: > > Looking at Q35 code and Seabios SMM relocation as example, if I see it > > right QEMU has: > > - SMRAM is aliased from DRAM at 0xa > > - and TSEG steals from the top of low RAM when c

[Qemu-devel] [PATCH v7 34/42] exec: Delete device_endian

2019-08-16 Thread tony.nguyen
device_endian has been made redundant by MemOp. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/cpu-common.h | 8 1 file changed, 8 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 01a29ba..7eeb78c 100644 --- a/include/ex

Re: [Qemu-devel] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-16 Thread Yao, Jiewen
below > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, August 16, 2019 3:20 PM > To: Yao, Jiewen ; Laszlo Ersek > ; de...@edk2.groups.io > Cc: edk2-rfc-groups-io ; qemu devel list > ; Igor Mammedov ; > Chen, Yingwen ; Nakajima, Jun > ; Boris Ostrovsky

[Qemu-devel] [PATCH v7 39/42] cpu: TLB_FLAGS_MASK bit to force memory slow path

2019-08-16 Thread tony.nguyen
The fast path is taken when TLB_FLAGS_MASK is all zero. TLB_FORCE_SLOW is simply a TLB_FLAGS_MASK bit to force the slow path, there are no other side effects. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/cpu-all.h | 10 -- 1 file changed, 8 insertions(+),

[Qemu-devel] [PATCH v7 40/42] cputlb: Byte swap memory transaction attribute

2019-08-16 Thread tony.nguyen
Notice new attribute, byte swap, and force the transaction through the memory slow path. Required by architectures that can invert endianness of memory transaction, e.g. SPARC64 has the Invert Endian TTE bit. Suggested-by: Richard Henderson Signed-off-by: Tony Nguyen Reviewed-by: Richard Hender

[Qemu-devel] [PATCH v7 37/42] cputlb: Replace size and endian operands for MemOp

2019-08-16 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 172 +-- include/exec/memop.h | 6 ++ memory.c | 11 +--- 3 files changed, 90 ins

Re: [Qemu-devel] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-16 Thread Kevin Wolf
Am 15.08.2019 um 21:24 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 15.08.2019 um 18:07 hat John Snow geschrieben: > >> > >> > >> On 8/15/19 6:49 AM, Kevin Wolf wrote: > >> > Am 14.08.2019 um 21:27 hat John Snow geschrieben: > >> >> > >> >> > >> >> On 8/14/19 6:07 AM, Vladim

[Qemu-devel] [PATCH v3 0/6] s390x/mmu: Storage key reference and change bit handling

2019-08-16 Thread David Hildenbrand
The first two patches are modified patches from: [PATCH-for-4.2 v1 0/9] s390x: MMU changes and extensions This series primarily fixes minor things in the storage key handling code in the MMU and implements fairly reliable reference and change bit handling for TCG. To track the reference and ch

[Qemu-devel] [PATCH v3 3/6] s390x/tcg: Rework MMU selection for instruction fetches

2019-08-16 Thread David Hildenbrand
Instructions are always fetched from primary address space, except when in home address mode. Perform the selection directly in cpu_mmu_index(). get_mem_index() is only used to perform data access, instructions are fetched via cpu_lduw_code(), which translates to cpu_mmu_index(env, true). We don'

[Qemu-devel] [PATCH v3 4/6] s390x/tcg: Flush the TLB of all CPUs on SSKE and RRBE

2019-08-16 Thread David Hildenbrand
Whenever we modify a storage key, we should flush the TLBs of all CPUs, so the MMU fault handling code can properly consider the changed storage key (to e.g., properly set the reference and change bit on the next accesses). These functions are barely used in modern Linux guests, so the performance

[Qemu-devel] [PATCH v3 2/6] s390x/mmu: ASC selection in s390_cpu_get_phys_page_debug()

2019-08-16 Thread David Hildenbrand
Let's select the ASC before calling the function. This is a prepararion to remove the ASC magic depending on the access mode from mmu_translate. There is currently no way to distinguish if we have code or data access. For now, we were using code access, because especially when debugging with the g

[Qemu-devel] [PATCH v3 5/6] s390x/mmu: Better storage key reference and change bit handling

2019-08-16 Thread David Hildenbrand
Any access sets the reference bit. In case we have a read-fault, we should not allow writes to the TLB entry if the change bit was not already set. This is a preparation for proper storage-key reference/change bit handling in TCG and a fix for KVM whereby read accesses would set the change bit (ol

[Qemu-devel] [PATCH v3 6/6] s390x/mmu: Factor out storage key handling

2019-08-16 Thread David Hildenbrand
Factor it out, add a comment how it all works, and also use it in the REAL MMU. Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 115 +++--- 1 file changed, 71 insertions(+), 44 deletions(-) di

[Qemu-devel] [PATCH v3 1/6] s390x/mmu: Trace the right value if setting/getting the storage key fails

2019-08-16 Thread David Hildenbrand
We want to trace the actual return value, not "0". Fixes: 0f5f669147b5 (s390x: Enable new s390-storage-keys device) Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) di

Re: [Qemu-devel] [PULL 04/32] target/riscv: Implement riscv_cpu_unassigned_access

2019-08-16 Thread Peter Maydell
On Thu, 15 Aug 2019 at 23:17, Palmer Dabbelt wrote: > You're more than welcome to take them over. I've got something that boots > Linux on my unassigned_access branch (github.com/palmer-dabbelt/qemu), but I > haven't sanitized the whole port for physical accesses and I haven't convinced > myself

[Qemu-devel] [Bug 1823790] Re: QEMU mishandling of SO_PEERSEC forces systemd into tight loop

2019-08-16 Thread Fritz Katze
I patched linux-user/syscall.c (see below, branch stable-2.11) which works around my problem. So far so good, but the qemu-arm that i compiled is terribly slow compared to the one that came with Ubuntu 18.04. Any hints? I configured as this: ./configure --static --enable-kvm --target-list=arm-lin

[Qemu-devel] [Bug 1839428] Re: qemu core dumped when repeat "system_reset" multiple times during guest boot

2019-08-16 Thread Philippe Mathieu-Daudé
This issue is very hard to reproduce. It sometimes crashes, so I could mark few commits 'bad' while bisecting, but since it is not reliable, I'm not sure a commit is 'good' when there is no crash. For now after hours of testing I could reduce Xujun Ma's range to qemu-v3.1.0..1d31f1872b: commit 1

[Qemu-devel] [PULL 00/16] Block layer patches

2019-08-16 Thread Kevin Wolf
The following changes since commit 9e06029aea3b2eca1d5261352e695edc1e7d7b8b: Update version for v4.1.0 release (2019-08-15 13:03:37 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to a6b257a08e3d72219f03e461a521526

[Qemu-devel] [PULL 04/16] iotests: Move migration helpers to iotests.py

2019-08-16 Thread Kevin Wolf
234 implements functions that are useful for doing migration between two VMs. Move them to iotests.py so that other test cases can use them, too. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/234| 30 +++--- tests/qemu-iotests/iotests.py

[Qemu-devel] [PULL 02/16] iotests/118: Create test classes dynamically

2019-08-16 Thread Kevin Wolf
We're getting a ridiculous number of child classes of TestInitiallyFilled and TestInitiallyEmpty that differ only in a few attributes that we want to test in all combinations. Instead of explicitly writing down every combination, let's use a loop and create those classes dynamically. Signed-off-b

[Qemu-devel] [PULL 03/16] iotests/118: Add -blockdev based tests

2019-08-16 Thread Kevin Wolf
The code path for -device drive= or without a drive=... option for empty drives, which is supposed to be used with -blockdev differs enough from the -drive based path with a user-owned BlockBackend, so we want to test both paths at least for the basic tests implemented by TestInitiallyFilled and Te

[Qemu-devel] [PULL 06/16] block: Simplify bdrv_filter_default_perms()

2019-08-16 Thread Kevin Wolf
The same change as commit 2b23f28639 ('block/copy-on-read: Fix permissions for inactive node') made for the copy-on-read driver can be made for bdrv_filter_default_perms(): Retaining the old permissions from the BdrvChild if it is given complicates things unnecessarily when in the end this only mea

[Qemu-devel] [PULL 01/16] iotests/118: Test media change for scsi-cd

2019-08-16 Thread Kevin Wolf
The test covered only floppy and ide-cd. Add scsi-cd as well. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/118 | 20 tests/qemu-iotests/118.out | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/118 b

[Qemu-devel] [PULL 10/16] tests: Test mid-drain bdrv_replace_child_noperm()

2019-08-16 Thread Kevin Wolf
From: Max Reitz Add a test for what happens when you call bdrv_replace_child_noperm() for various drain situations ({old,new} child {drained,not drained}). Most importantly, if both the old and the new child are drained, the parent must not be undrained at any point. Signed-off-by: Max Reitz S

[Qemu-devel] [PULL 08/16] block: Reduce (un)drains when replacing a child

2019-08-16 Thread Kevin Wolf
From: Max Reitz Currently, bdrv_replace_child_noperm() undrains the parent until it is completely undrained, then re-drains it after attaching the new child node. This is a problem with bdrv_drop_intermediate(): We want to keep the whole subtree drained, including parents, while the operation is

[Qemu-devel] [PULL 11/16] iotests: Add test for concurrent stream/commit

2019-08-16 Thread Kevin Wolf
From: Max Reitz We already have 030 for that in general, but this tests very specific cases of both jobs finishing concurrently. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/258 | 163 + tests/qemu-iotests/258.out | 33

[Qemu-devel] [PULL 07/16] block: Keep subtree drained in drop_intermediate

2019-08-16 Thread Kevin Wolf
From: Max Reitz bdrv_drop_intermediate() calls BdrvChildRole.update_filename(). That may poll, thus changing the graph, which potentially breaks the QLIST_FOREACH_SAFE() loop. Just keep the whole subtree drained. This is probably the right thing to do anyway (dropping nodes while the subtree i

[Qemu-devel] [PULL 13/16] mirror: Keep mirror_top_bs drained after dropping permissions

2019-08-16 Thread Kevin Wolf
mirror_top_bs is currently implicitly drained through its connection to the source or the target node. However, the drain section for target_bs ends early after moving mirror_top_bs from src to target_bs, so that requests can already be restarted while mirror_top_bs is still present in the chain, b

[Qemu-devel] [PULL 05/16] iotests: Test migration with all kinds of filter nodes

2019-08-16 Thread Kevin Wolf
This test case is motivated by commit 2b23f28639 ('block/copy-on-read: Fix permissions for inactive node'). Instead of just testing copy-on-read on migration, let's stack all sorts of filter nodes on top of each other and try if the resulting VM can still migrate successfully. For good measure, put

[Qemu-devel] [PULL 16/16] file-posix: Handle undetectable alignment

2019-08-16 Thread Kevin Wolf
From: Nir Soffer In some cases buf_align or request_alignment cannot be detected: 1. With Gluster, buf_align cannot be detected since the actual I/O is done on Gluster server, and qemu buffer alignment does not matter. Since we don't have alignment requirement, buf_align=1 is the best v

[Qemu-devel] [PULL 09/16] tests: Test polling in bdrv_drop_intermediate()

2019-08-16 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 167 1 file changed, 167 insertions(+) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 03fa1142a1..1600d41e9a 100644 --- a/tests/test-

[Qemu-devel] [PULL 12/16] block: Remove blk_pread_unthrottled()

2019-08-16 Thread Kevin Wolf
The functionality offered by blk_pread_unthrottled() goes back to commit 498e386c584. Then, we couldn't perform I/O throttling with synchronous requests because timers wouldn't be executed in polling loops. So the commit automatically disabled I/O throttling as soon as a synchronous request was iss

[Qemu-devel] [PULL 15/16] qemu-img convert: Deprecate using -n and -o together

2019-08-16 Thread Kevin Wolf
bdrv_create options specified with -o have no effect when skipping image creation with -n, so this doesn't make sense. Warn against the misuse and deprecate the combination so we can make it a hard error later. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: John Snow Reviewed-by:

[Qemu-devel] [PULL 14/16] block-backend: Queue requests while drained

2019-08-16 Thread Kevin Wolf
This fixes devices like IDE that can still start new requests from I/O handlers in the CPU thread while the block backend is drained. The basic assumption is that in a drain section, no new requests should be allowed through a BlockBackend (blk_drained_begin/end don't exist, we get drain sections

[Qemu-devel] [PATCH] file-posix: Fix has_write_zeroes after NO_FALLBACK

2019-08-16 Thread Kevin Wolf
If QEMU_AIO_NO_FALLBACK is given, we always return failure and don't even try to use the BLKZEROOUT ioctl. In this failure case, we shouldn't disable has_write_zeroes because we didn't learn anything about the ioctl. The next request might not set QEMU_AIO_NO_FALLBACK and we can still use the ioctl

Re: [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-16 Thread Philippe Mathieu-Daudé
Hi Tony, On 8/16/19 8:28 AM, tony.ngu...@bt.com wrote: > This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. > > v7: [...] > - Re-declared many native endian devices as little or big endian. This is why > v7 has +16 patches. Why are you doing that? What is the rational? An

Re: [Qemu-devel] [PATCH v7 24/42] hw/isa: Declare device little or big endian

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 9:34 AM, tony.ngu...@bt.com wrote: > For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > targets from the set of target/hw/*/device.o. > > If the set of targets are all little or all big endian, re-declare > the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_E

Re: [Qemu-devel] [PATCH v7 25/42] hw/misc: Declare device little or big endian

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 9:34 AM, tony.ngu...@bt.com wrote: > For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > targets from the set of target/hw/*/device.o. > > If the set of targets are all little or all big endian, re-declare > the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_E

Re: [Qemu-devel] [PATCH v7 27/42] hw/pci-host: Declare device little or big endian

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 9:35 AM, tony.ngu...@bt.com wrote: > For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > targets from the set of target/hw/*/device.o. > > If the set of targets are all little or all big endian, re-declare > the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_E

Re: [Qemu-devel] [PULL 00/15] Audio 20190813 patches

2019-08-16 Thread Peter Maydell
On Tue, 13 Aug 2019 at 12:20, Gerd Hoffmann wrote: > > The following changes since commit 5e7bcdcfe69ce0fad66012b2cfb2035003c37eef: > > display/bochs: fix pcie support (2019-08-12 16:36:41 +0100) > > are available in the Git repository at: > > git://git.kraxel.org/qemu tags/audio-20190813-pull

Re: [Qemu-devel] [qemu-s390x] [PATCH v7 33/42] exec: Replace device_endian with MemOp

2019-08-16 Thread Thomas Huth
On 8/16/19 9:37 AM, tony.ngu...@bt.com wrote: > Simplify endianness comparisons with consistent use of the more > expressive MemOp. > > Suggested-by: Richard Henderson > Signed-off-by: Tony Nguyen > Reviewed-by: Richard Henderson > Acked-by: David Gibson This patch is *huge*, more than 800kB.

Re: [Qemu-devel] [PULL 00/16] Block layer patches

2019-08-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190816093439.14262-1-kw...@redhat.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has

Re: [Qemu-devel] [PATCH] nbd: Advertise multi-conn for shared read-only connections

2019-08-16 Thread Vladimir Sementsov-Ogievskiy
15.08.2019 21:50, Eric Blake wrote: > The NBD specification defines NBD_FLAG_CAN_MULTI_CONN, which can be > advertised when the server promises cache consistency between > simultaneous clients (basically, rules that determine what FUA and > flush from one client are able to guarantee for reads from

Re: [Qemu-devel] [PATCH] nbd: Advertise multi-conn for shared read-only connections

2019-08-16 Thread Vladimir Sementsov-Ogievskiy
16.08.2019 13:23, Vladimir Sementsov-Ogievskiy wrote: > 15.08.2019 21:50, Eric Blake wrote: >> The NBD specification defines NBD_FLAG_CAN_MULTI_CONN, which can be >> advertised when the server promises cache consistency between >> simultaneous clients (basically, rules that determine what FUA and >

Re: [Qemu-devel] Publishing binary images for testing

2019-08-16 Thread Philippe Mathieu-Daudé
ping? :) On 6/17/19 7:17 AM, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On 5/11/18 4:27 PM, Cleber Rosa wrote: >> On 05/11/2018 09:55 AM, Eduardo Habkost wrote: >>> (CCing Cleber and avocado-devel in case they have suggestions) >>> >>> On Tue, May 08, 2018 at 12:47:52PM -0300, Philippe Mathie

Re: [Qemu-devel] [PULL 00/29] Header cleanup patches for 2019-08-13

2019-08-16 Thread Peter Maydell
On Tue, 13 Aug 2019 at 16:54, Markus Armbruster wrote: > > The following changes since commit 864ab314f1d924129d06ac7b571f105a2b76a4b2: > > Update version for v4.1.0-rc4 release (2019-08-06 17:05:21 +0100) > > are available in the Git repository at: > > git://repo.or.cz/qemu/armbru.git tags/pu

Re: [Qemu-devel] [PATCH v6 35/42] block: Fix check_to_replace_node()

2019-08-16 Thread Vladimir Sementsov-Ogievskiy
15.08.2019 20:01, Max Reitz wrote: > On 15.08.19 17:21, Vladimir Sementsov-Ogievskiy wrote: >> 09.08.2019 19:14, Max Reitz wrote: >>> Currently, check_to_replace_node() only allows mirror to replace a node >>> in the chain of the source node, and only if it is the first non-filter >>> node below th

Re: [Qemu-devel] [PATCH v4] blockjob: drain all job nodes in block_job_drain

2019-08-16 Thread Vladimir Sementsov-Ogievskiy
15.08.2019 16:15, Max Reitz wrote: > On 02.08.19 11:52, Vladimir Sementsov-Ogievskiy wrote: >> Instead of draining additional nodes in each job code, let's do it in >> common block_job_drain, draining just all job's children. >> BlockJobDriver.drain becomes unused, so, drop it at all. >> >> It's al

Re: [Qemu-devel] [PULL 00/29] Header cleanup patches for 2019-08-13

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 12:59 PM, Peter Maydell wrote: > On Tue, 13 Aug 2019 at 16:54, Markus Armbruster wrote: >> >> The following changes since commit 864ab314f1d924129d06ac7b571f105a2b76a4b2: >> >> Update version for v4.1.0-rc4 release (2019-08-06 17:05:21 +0100) >> >> are available in the Git repository

[Qemu-devel] [POC QEMU PATCH 0/2] CPU hotplug: use dedicated SMRAM at 0x30000 in SMM address space

2019-08-16 Thread Igor Mammedov
It's just a quick hack together with Seabios to show that normal RAM at 0x3 is not affected by SMM relocation and dedicated SMRAM could be used for relocation without need to care about untrusted RAM content at 0x3. CC: "Chen, Yingwen" CC: edk2-devel-groups-io CC: Phillip Goerl CC:

[Qemu-devel] [PATCH QEMU 1/1] q35: use dedicated SMRAM at default SMM_BASE

2019-08-16 Thread Igor Mammedov
it will allow us to hide sensetive SMM_BASE area from non SMM running env, that will allow us to ensure that hotplugged CPU will run trusted SMM BASE relocation code and we won't need to force all present CPUs into SMM mode since we don not care about about 0x3 content in normal RAM address spa

[Qemu-devel] [POC Seabios PATCH] seabios: use isolated SMM address space for relocation

2019-08-16 Thread Igor Mammedov
for purpose of demo SMRAM (at 0x3) is aliased at a in system address space for easy initialization of SMI entry point. Here is resulting debug output showing that RAM at 0x3 is not affected by SMM and only RAM in SMM adderss space is modified: init smm smm_relocate: before relocaten s

Re: [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-16 Thread tony.nguyen
Hi Phillippe, On 8/16/19 7:58 PM, Philippe Mathieu-Daudé wrote: >On 8/16/19 8:28 AM, tony.ngu...@bt.com wrote: >> This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. >> >> v7: >[...] >> - Re-declared many native endian devices as little or big endian. This is why >> v7 has +1

Re: [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-16 Thread Peter Maydell
On Fri, 16 Aug 2019 at 12:37, wrote: > > Hi Phillippe, > > On 8/16/19 7:58 PM, Philippe Mathieu-Daudé wrote: > >On 8/16/19 8:28 AM, tony.ngu...@bt.com wrote: > >> For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > >> targets from the set of target/hw/*/device.o. > >> > >> If the

Re: [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-16 Thread David Gibson
On Fri, Aug 16, 2019 at 11:58:05AM +0200, Philippe Mathieu-Daudé wrote: > Hi Tony, > > On 8/16/19 8:28 AM, tony.ngu...@bt.com wrote: > > This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. > > > > v7: > [...] > > - Re-declared many native endian devices as little or big endian

  1   2   3   >