Re: [PATCH v1 1/8] qcow2: introduce compression type feature

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to Qcow2 that indicates which allow to use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image

Re: [PATCH v3] hw/i386/intel_iommu: Simplify vtd_find_as_from_bus_num() logic

2020-02-27 Thread Auger Eric
Hi Philippe, On 2/27/20 8:46 AM, Philippe Mathieu-Daudé wrote: > The vtd_find_as_from_bus_num() function was introduced (in commit > dbaabb25f) in a code format that could return an incorrect pointer, > which was later fixed by commit a2e1cd41ccf. > We could have avoid this by writing the if()

Re: [PATCH v1 2/8] qcow2: rework the cluster compression routine

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov --- block/qcow2-threads.c | 77

Re: [PATCH v1 1/2] hw/arm: versal: Add support for the LPD ADMAs

2020-02-27 Thread KONRAD Frederic
Le 2/27/20 à 4:44 PM, Edgar E. Iglesias a écrit : From: "Edgar E. Iglesias" Add support for the Versal LPD ADMAs. Signed-off-by: Edgar E. Iglesias Looks good to me. Reviewed-by: KONRAD Frederic --- hw/arm/xlnx-versal.c | 24

Re: [PATCH v1 2/2] hw/arm: versal: Generate xlnx-versal-virt zdma FDT nodes

2020-02-27 Thread KONRAD Frederic
Le 2/27/20 à 4:44 PM, Edgar E. Iglesias a écrit : From: "Edgar E. Iglesias" Generate xlnx-versal-virt zdma FDT nodes. Signed-off-by: Edgar E. Iglesias Reviewed-by: KONRAD Frederic --- hw/arm/xlnx-versal-virt.c | 28 1 file changed, 28 insertions(+)

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread David Hildenbrand
On 27.02.20 09:58, Pan Nengyuan wrote: > > > On 2/27/2020 4:41 PM, David Hildenbrand wrote: >> On 27.02.20 03:50, Pan Nengyuan wrote: >>> This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. >>> The leak stack is as follow: >>> >>> Direct leak of 48 byte(s) in 1 object(s)

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-02-27 Thread Ján Tomko
On a Thursday in 2020, Peter Krempa wrote: On Wed, Feb 26, 2020 at 20:39:26 -0600, Eric Blake wrote: There are many existing qcow2 images that specify a backing file but no format. This has been the source of CVEs in the past, but has become more prominent of a problem now that libvirt has

Re: [PATCH v5 01/18] s390x: Use constant for ESA PSW address

2020-02-27 Thread Cornelia Huck
On Thu, 27 Feb 2020 09:09:47 +0100 Janosch Frank wrote: > On 2/27/20 8:53 AM, Janosch Frank wrote: > > On 2/26/20 6:51 PM, Cornelia Huck wrote: > >> On Wed, 26 Feb 2020 15:27:52 +0100 > >> David Hildenbrand wrote: > >> > >>> On 26.02.20 13:20, Janosch Frank wrote: > Lets make it a

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Eric Blake wrote: There are many existing qcow2 images that specify a backing file but no format. This has been the source of CVEs in the past, but has become more prominent of a problem now that libvirt has switched to -blockdev. With older -drive, at least the probing

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/27/20 9:41 AM, David Hildenbrand wrote: On 27.02.20 03:50, Pan Nengyuan wrote: This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The leak stack is as follow: Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7fb43c7cd970 in __interceptor_calloc

Re: [PULL v2 00/30] virtio, pc: fixes, features

2020-02-27 Thread Michael S. Tsirkin
On Wed, Feb 26, 2020 at 04:01:02AM -0500, Michael S. Tsirkin wrote: > changes from v1: > dropped vhost changes, hope this fixes build on Mac OS. > > The following changes since commit 9a8abceb5f01d1066d3a1ac5a33aabcbaeec1860: > > Merge remote-tracking branch

[PATCH 0/3] Fix Skylake, Cascadelake and Icelake Server CPU models

2020-02-27 Thread Chenyi Qiang
Current Skylake-Server, Cascadelake-Server and Icelake-Server CPU models lack several VMX features. Icelake-Server also lacks two features in FEAT_7_0_EBX. In addition, The model numbers of Icelake-Client and Icelake-Server need to be fixed. Chenyi Qiang (3): target/i386: add missing vmx

[PATCH 3/3] target/i386: modify Icelake-Client and Icelake-Server CPU model number

2020-02-27 Thread Chenyi Qiang
According to the Intel Icelake family list, Icelake-Client uses model number 126(0x7D) and Icelake-Server uses model number 106(0x6A). Reviewed-by: Xiaoyao Li Signed-off-by: Chenyi Qiang --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread David Hildenbrand
On 27.02.20 09:55, Philippe Mathieu-Daudé wrote: > On 2/27/20 9:41 AM, David Hildenbrand wrote: >> On 27.02.20 03:50, Pan Nengyuan wrote: >>> This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. >>> The leak stack is as follow: >>> >>> Direct leak of 48 byte(s) in 1 object(s)

Re: [PATCH] softmmu/vl.c: fix too slow TCG regression

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 16:35, Igor Mammedov wrote: > > Commit a1b18df9a4 moved -m option parsing after configure_accelerators() > that broke TCG accelerator initialization which accesses global ram_size > from size_code_gen_buffer() which is equal to 0 at that moment. > > Partially revert

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread Pan Nengyuan
On 2/27/2020 5:04 PM, David Hildenbrand wrote: > On 27.02.20 09:58, Pan Nengyuan wrote: >> >> >> On 2/27/2020 4:41 PM, David Hildenbrand wrote: >>> On 27.02.20 03:50, Pan Nengyuan wrote: This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The leak stack is as

[PATCH v6] s390x: Rename and use constants for short PSW address and mask

2020-02-27 Thread Janosch Frank
Let's rename PSW_MASK_ESA_ADDR to PSW_MASK_SHORT_ADDR because we're not working with a ESA PSW which would not support the extended addressing bit. Also let's actually use it. Additionally we introduce PSW_MASK_SHORT_CTRL and use it throughout the codebase. Signed-off-by: Janosch Frank

Re: [RFC 2/2] hw/arm/virt: kvm: allow gicv3 by default if host does not support v2

2020-02-27 Thread Auger Eric
Hi Drew, On 2/26/20 7:42 PM, Andrew Jones wrote: > On Wed, Feb 26, 2020 at 06:05:00PM +0100, Eric Auger wrote: >> At the moment if the end-user does not specify the gic-version along >> with KVM acceleration, v2 is set by default. However most of the >> systems now have GICv3 and sometimes they

[Bug 1864955] Re: bundle QEMU installer with HAXM accelerator for Windows

2020-02-27 Thread Patrick Schleizer
I think licensing is a non-issue. That is probably a quote from the github license summary at https://github.com/intel/haxm/blob/master/LICENSE > A permissive license similar to the BSD 2-Clause License, but with a 3rd clause that prohibits others from using the name of the project or its

Re: [PATCH] hw/smbios: add options for type 4 max_speed and current_speed

2020-02-27 Thread Heyi Guo
On 2020/2/25 17:24, Philippe Mathieu-Daudé wrote: On 2/25/20 8:50 AM, Heyi Guo wrote: Common VM users sometimes care about CPU speed, so we add two new options to allow VM vendors to present CPU speed to their users. Normally these information can be fetched from host smbios. Strictly

Re: [RFC PATCH v3 19/27] qcow2: Add subcluster support to expand_zero_clusters_in_l1()

2020-02-27 Thread Max Reitz
On 26.02.20 18:19, Alberto Garcia wrote: > On Fri 21 Feb 2020 03:57:27 PM CET, Max Reitz wrote: >> As noted in v2, this function is only called when downgrading qcow2 >> images to v2. It kind of made sense to just call set_l2_bitmap() in >> v2, but now with the if () conditional... I suppose it

Re: [PATCH] MAINTAINERS: Add entry for Guest X86 HAXM CPUs

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/27/20 8:56 AM, Philippe Mathieu-Daudé wrote: Cc'ing qemu-trivial@ On 2/26/20 5:32 AM, Colin Xu wrote: HAXM covers below files: include/sysemu/hax.h target/i386/hax-* Cc: Wenchao Wang Cc: Hang Yuan Signed-off-by: Colin Xu Please keep the Acked-by/Reviewed-by tags:

Re: [PATCH v4 06/10] hw/arm/virt: vTPM support

2020-02-27 Thread Auger Eric
Hi Peter, On 2/26/20 9:59 PM, Eric Auger wrote: > Let the TPM TIS SYSBUS device be dynamically instantiable > in ARM virt. A device tree node is dynamically created > (TPM via MMIO). > > The TPM Physical Presence interface (PPI) is not supported. > > To run with the swtmp TPM emulator, the

Re: [PATCH v5 01/18] s390x: Use constant for ESA PSW address

2020-02-27 Thread Janosch Frank
On 2/27/20 8:53 AM, Janosch Frank wrote: > On 2/26/20 6:51 PM, Cornelia Huck wrote: >> On Wed, 26 Feb 2020 15:27:52 +0100 >> David Hildenbrand wrote: >> >>> On 26.02.20 13:20, Janosch Frank wrote: Lets make it a bit more clear that we're extracting the 31 bit address >> >> s/Lets/Let's/ :) >

[Bug 1864955] Re: bundle QEMU installer with HAXM accelerator for Windows

2020-02-27 Thread Philippe Mathieu-Daudé
Apparently HAXM uses the BSD 3-Clause License with the 3rd clause that "prohibits others from using the name of the project or its contributors to promote derived products without written consent." -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [PATCH v3] pcie_root_port: Add hotplug disabling option

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Julia Suvorova wrote: Make hot-plug/hot-unplug on PCIe Root Ports optional to allow libvirt manage it and restrict unplug for the whole machine. This is going to prevent user-initiated unplug in guests (Windows mostly). Hotplug is enabled by default. Usage: -device

Re: [PATCH v5 00/18] s390x: Protected Virtualization support

2020-02-27 Thread Janosch Frank
On 2/26/20 9:09 PM, Cornelia Huck wrote: > On Wed, 26 Feb 2020 07:20:20 -0500 > Janosch Frank wrote: > >> Most of the QEMU changes for PV are related to the new IPL type with >> subcodes 8 - 10 and the execution of the necessary Ultravisor calls to >> IPL secure guests. Note that we can only

Re: [PATCH v2 2/2] hw/arm/smmu-common: Simplify smmu_find_smmu_pcibus() logic

2020-02-27 Thread Auger Eric
Hi Philippe, On 2/27/20 8:51 AM, Philippe Mathieu-Daudé wrote: > The smmu_find_smmu_pcibus() function was introduced (in commit > cac994ef43b) in a code format that could return an incorrect > pointer, which was then fixed by the previous commit. > We could have avoid this by writing the if()

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread David Hildenbrand
On 27.02.20 03:50, Pan Nengyuan wrote: > This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The > leak stack is as follow: > > Direct leak of 48 byte(s) in 1 object(s) allocated from: > #0 0x7fb43c7cd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) > #1

Re: [PATCH v2] virtio: gracefully handle invalid region caches

2020-02-27 Thread Michael S. Tsirkin
On Fri, Feb 07, 2020 at 10:46:19AM +, Stefan Hajnoczi wrote: > The virtqueue code sets up MemoryRegionCaches to access the virtqueue > guest RAM data structures. The code currently assumes that > VRingMemoryRegionCaches is initialized before device emulation code > accesses the virtqueue. An

Re: [PATCH v12 Kernel 1/7] vfio: KABI for migration interface for device state

2020-02-27 Thread Yan Zhao
On Sat, Feb 08, 2020 at 03:42:28AM +0800, Kirti Wankhede wrote: > - Defined MIGRATION region type and sub-type. > > - Defined vfio_device_migration_info structure which will be placed at 0th > offset of migration region to get/set VFIO device related information. > Defined members of

[PATCH 2/3] target/i386: add two missing features for Icelake-Server CPU model

2020-02-27 Thread Chenyi Qiang
Add the SHA_NI and AVX512IFMA feature bits in FEAT_7_0_EBX. Reviewed-by: Xiaoyao Li Signed-off-by: Chenyi Qiang --- target/i386/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 4e105029ca..c0be0f83b4 100644 ---

Re: [PATCH v4 00/10] vTPM for aarch64

2020-02-27 Thread Auger Eric
Hi Stefan, On 2/26/20 11:44 PM, Stefan Berger wrote: > On 2/26/20 3:59 PM, Eric Auger wrote: >> This series adds the capability to instantiate an MMIO TPM TIS >> in ARM virt. It is candidate to qemu 5.0. > > I queued it now here: > https://github.com/stefanberger/qemu-tpm/commits/tpm-next > > I

Re: [PATCH rc4 06/29] target/avr: Add defintions of AVR core types

2020-02-27 Thread Michael Rolnik
Hi all. I don't see how the fact that some MCUs have an instruction and some don't within same AVR family. Think about gnu binutils (not GCC) these utils have no idea about MCUs all they are aware of AVR CPU only. However, I don't mind removing -cpu flag. Regards, Michael Ronik On Fri, Feb 21,

Re: [RFC 2/2] hw/arm/virt: kvm: allow gicv3 by default if host does not support v2

2020-02-27 Thread Andrew Jones
On Wed, Feb 26, 2020 at 06:05:00PM +0100, Eric Auger wrote: > At the moment if the end-user does not specify the gic-version along > with KVM acceleration, v2 is set by default. However most of the > systems now have GICv3 and sometimes they do not support GICv2 > compatibility. In that case we

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread Pan Nengyuan
On 2/27/2020 4:41 PM, David Hildenbrand wrote: > On 27.02.20 03:50, Pan Nengyuan wrote: >> This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The >> leak stack is as follow: >> >> Direct leak of 48 byte(s) in 1 object(s) allocated from: >> #0 0x7fb43c7cd970 in

[PATCH 1/3] target/i386: add missing vmx features for several CPU models

2020-02-27 Thread Chenyi Qiang
Add some missing VMX features in Skylake-Server, Cascadelake-Server and Icelake-Server CPU models based on the output of Paolo's script. Reviewed-by: Xiaoyao Li Signed-off-by: Chenyi Qiang --- target/i386/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 2/3] block: Add support to warn on backing file change without format

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Eric Blake wrote: For now, this is a mechanical addition; all callers pass false. But the next patch will use it to improve 'qemu-img rebase -u' when selecting a backing file with no format. Signed-off-by: Eric Blake --- include/block/block.h | 4 ++-- block.c

Re: [PATCH v6] s390x: Rename and use constants for short PSW address and mask

2020-02-27 Thread David Hildenbrand
On 27.02.20 10:23, Janosch Frank wrote: > Let's rename PSW_MASK_ESA_ADDR to PSW_MASK_SHORT_ADDR because we're > not working with a ESA PSW which would not support the extended > addressing bit. Also let's actually use it. > > Additionally we introduce PSW_MASK_SHORT_CTRL and use it throughout >

Wiki user request

2020-02-27 Thread Joaquin de Andres
Hi! I wonder if I can get write access to the wiki page. I'm working with Philippe Mathieu-Daudé in the GSoC Arduino Visualization project ([1]) and I need to modify and add pages. Thanks! --joa [1] https://wiki.qemu.org/Internships/ProjectIdeas/ArduinoVisualisation signature.asc

Re: [PATCH 3/3] target/i386: modify Icelake-Client and Icelake-Server CPU model number

2020-02-27 Thread Jack Wang
Chenyi Qiang 于2020年2月27日周四 上午10:07写道: > > According to the Intel Icelake family list, Icelake-Client uses model > number 126(0x7D) 0x7D is 125 in hex, so the commit message needs to be fixed. Cheers Jack Wang

Re: [PATCH v1 2/2] hw/arm: versal: Generate xlnx-versal-virt zdma FDT nodes

2020-02-27 Thread Francisco Iglesias
On [2020 Feb 27] Thu 16:44:24, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Generate xlnx-versal-virt zdma FDT nodes. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/arm/xlnx-versal-virt.c | 28 > 1 file changed, 28

Re: [PATCH v1 5/8] iotests: fix header size, feature table size and backing file offset

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: Affected tests: 031, 036, 061 Because of adding the compression type feature, some size values in the qcow2 v3 header are changed: header_size +=8: 1 byte compression type 7 bytes padding feature_table += 48: incompatible feture

Re: [PATCH v1 2/4] accel/tcg: remove link between guest ram and TCG cache size

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/26/20 7:10 PM, Alex Bennée wrote: Basing the TB cache size on the ram_size was always a little heuristic and was broken by a1b18df9a4 which caused ram_size not to be fully realised at the time we initialise the TCG translation cache. The current DEFAULT_CODE_GEN_BUFFER_SIZE may still be a

Re: [PATCH v16 00/10] VIRTIO-IOMMU device

2020-02-27 Thread Daniel P . Berrangé
On Fri, Feb 14, 2020 at 02:27:35PM +0100, Eric Auger wrote: > This series implements the QEMU virtio-iommu device. > > This matches the v0.12 spec (voted) and the corresponding > virtio-iommu driver upstreamed in 5.3. All kernel dependencies > are resolved for DT integration. The virtio-iommu can

[PATCH 2/2] hw/arm/armv7m: Downgrade CPU reset handler priority

2020-02-27 Thread Stephanos Ioannidis
The ARMv7-M CPU reset handler, which loads the initial SP and PC register values from the vector table, is currently executed before the ROM reset handler (rom_reset), and this causes the devices that alias low memory region (e.g. STM32F405 that aliases the flash memory located at 0x800 to

[PATCH 1/2] hw/core: Support device reset handler priority

2020-02-27 Thread Stephanos Ioannidis
The device reset handler invocation order is currently dependent on the order of handler registration, and this is less than ideal because there may exist dependencies among the handlers that require them to be invoked in a specific order. This commit adds the `priority` field to the reset entry

Re: [PATCH 08/18] qemu-doc: split target sections to separate files

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini > --- > docs/system/target-arm.texi | 264 ++ > docs/system/target-i386.texi| 92 > docs/system/target-m68k.texi| 46 ++ > docs/system/target-mips.texi| 152 ++ >

Re: [PATCH 13/18] docs/system: put qemu-block-drivers body in an included file

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > This removes the "only" directives, and lets us use the conventional > "DESCRIPTION" section in the manpage. > > Signed-off-by: Paolo Bonzini > --- > docs/system/index.rst | 2 - > docs/system/qemu-block-drivers.rst |

[PULL 7/7] s390x: Rename and use constants for short PSW address and mask

2020-02-27 Thread Cornelia Huck
From: Janosch Frank Let's rename PSW_MASK_ESA_ADDR to PSW_MASK_SHORT_ADDR because we're not working with a ESA PSW which would not support the extended addressing bit. Also let's actually use it. Additionally we introduce PSW_MASK_SHORT_CTRL and use it throughout the codebase. Signed-off-by:

Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit

2020-02-27 Thread Alex Bennée
Richard Henderson writes: > On 2/26/20 10:10 AM, Alex Bennée wrote: >> While 32mb is certainly usable a full system boot ends up flushing the >> codegen buffer nearly 100 times. Increase the default on 64 bit hosts >> to take advantage of all that spare memory. After this change I can >> boot

Re: [PATCH] ppc: Officially deprecate the CPU "compat" property

2020-02-27 Thread Greg Kurz
On Thu, 27 Feb 2020 09:46:41 +1100 David Gibson wrote: > On Wed, Feb 26, 2020 at 07:59:38PM +0100, Greg Kurz wrote: > > Server class POWER CPUs have a "compat" property, which was obsoleted > > by commit 7843c0d60d and replaced by a "max-cpu-compat" property on the > > pseries machine type. A

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Coiby Xu
Thank you for reminding me of this socket short read issue! It seems we still need customized vu_message_read because libvhost-user assumes we will always get a full-size VhostUserMsg and hasn't taken care of this short read case. I will improve libvhost-user's vu_message_read by making it keep

Re: [PATCH v1 6/8] iotests: add "compression type" for test output matching

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 13:04, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 10:29, Denis Plotnikov wrote: Affected tests: 049, 060, 061, 065, 144, 182, 242, 255 After adding the compression type feature for qcow2, the compression type is reported on image quering. Add the corresponding values of the

[RFC PATCH] linux-user/syscall: Use g_file_open_tmp()

2020-02-27 Thread Philippe Mathieu-Daudé
Use GLib g_file_open_tmp() instead of getenv + snprintf + mkstemp. Signed-off-by: Philippe Mathieu-Daudé --- RFC because I'm not sure g_autoptr(GError) works this way. linux-user/syscall.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/linux-user/syscall.c

[PATCH v3 08/15] util/mmap-alloc: Factor out reserving of a memory region to mmap_reserve()

2020-02-27 Thread David Hildenbrand
We want to reserve a memory region without actually populating memory. Let's factor that out. Reviewed-by: Igor Kotrasinski Acked-by: Murilo Opsfelder Araujo Reviewed-by: Richard Henderson Reviewed-by: Peter Xu Cc: "Michael S. Tsirkin" Cc: Greg Kurz Cc: Murilo Opsfelder Araujo Cc: Eduardo

[PATCH v3 11/15] util/mmap-alloc: Implement resizeable mmaps

2020-02-27 Thread David Hildenbrand
Implement resizeable mmaps. For now, the actual resizing is not wired up. Introduce qemu_ram_mmap_resizeable() and qemu_ram_mmap_resize(). Make qemu_ram_mmap() a wrapper of qemu_ram_mmap_resizeable(). Cc: Richard Henderson Cc: Igor Kotrasinski Cc: Murilo Opsfelder Araujo Cc: "Michael S.

[PATCH v3 15/15] exec: Ram blocks with resizeable anonymous allocations under POSIX

2020-02-27 Thread David Hildenbrand
We can now make use of resizeable anonymous allocations to implement actually resizeable ram blocks. Resizeable anonymous allocations are not implemented under WIN32 yet and are not available when using alternative allocators. Fall back to the existing handling. We also have to fallback to the

Re: [PATCH 1/2] chardev: Improve error report by calling error_setg_win32()

2020-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2020 at 11:02:49AM +0100, Philippe Mathieu-Daudé wrote: > Use error_setg_win32() which adds a hint similar to strerror(errno)). > > Signed-off-by: Philippe Mathieu-Daudé > --- > chardev/char-pipe.c | 2 +- > chardev/char-win.c | 2 +- > 2 files changed, 2 insertions(+), 2

[PATCH] qapi/machine: Place the 'Notes' tag after the 'Since' tag

2020-02-27 Thread Philippe Mathieu-Daudé
This fixes when adding a 'Since' tag: In file included from qapi/qapi-schema.json:105: qapi/machine.json:25:1: '@arch:' can't follow 'Notes' section Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Kevin Wolf
Am 27.02.2020 um 12:07 hat Marc-André Lureau geschrieben: > On Thu, Feb 27, 2020 at 11:55 AM Kevin Wolf wrote: > > Am 27.02.2020 um 11:28 hat Coiby Xu geschrieben: > > > > > we still need customized vu_message_read because libvhost-user assumes > > > > > we will always get a full-size

Re: [PATCH 07/18] qemu-doc: move system requirements chapter inside PC section

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > The system requirements documented in this chapter are limited to x86 KVM > targets. > Clean them up and move them to the target section. > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 06/18] qemu-doc: extract common system emulator documentation from the PC section

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > Move the section on PC peripherals together with other targets. > While some x86-specific information remains in the main system > emulation chapter, it can be tackled more easily a section at a > time. > > Signed-off-by: Paolo Bonzini

Re: [PATCH 12/18] qemu-doc: remove indices other than findex

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > These indices are not well-maintained, and pandoc also chokes on the > directives. Just nuke them. > > Signed-off-by: Paolo Bonzini Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 11/18] qemu-doc: move included files to docs/system

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > Since qemu-doc.texi is mostly including files from docs/system, > move the existing include files there for consistency. > > Signed-off-by: Paolo Bonzini > --- > MAINTAINERS | 3 ++- > Makefile

[PULL 1/3] hw/xen/xen_pt_load_rom: Remove unused includes

2020-02-27 Thread Anthony PERARD
From: Philippe Mathieu-Daudé xen_pt_load_rom.c does not use any of these includes, remove them. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Paul Durrant Message-Id: <20191014142246.4538-9-phi...@redhat.com> Signed-off-by: Anthony PERARD --- hw/xen/xen_pt_load_rom.c | 4 1 file

Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit

2020-02-27 Thread Alex Bennée
Niek Linnenbank writes: > Hi Alex, > > On Wed, Feb 26, 2020 at 7:13 PM Alex Bennée wrote: > >> While 32mb is certainly usable a full system boot ends up flushing the >> codegen buffer nearly 100 times. Increase the default on 64 bit hosts >> to take advantage of all that spare memory. After

[PULL 2/3] xen-bus/block: explicitly assign event channels to an AioContext

2020-02-27 Thread Anthony PERARD
From: Paul Durrant It is not safe to close an event channel from the QEMU main thread when that channel's poller is running in IOThread context. This patch adds a new xen_device_set_event_channel_context() function to explicitly assign the channel AioContext, and modifies

Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit

2020-02-27 Thread Richard Henderson
On 2/27/20 4:31 AM, Alex Bennée wrote: >> It does not make sense for a linux-user chroot, running make -jN, on just >> about >> any host. For linux-user, I could be happy with a modest increase, but not >> all >> the way out to 2GiB. >> >> Discuss. > > Does it matter that much? Surely for

Re: [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-02-27 Thread Halil Pasic
On Wed, 26 Feb 2020 11:52:26 -0500 "Michael S. Tsirkin" wrote: > On Wed, Feb 26, 2020 at 04:36:18PM +0100, Halil Pasic wrote: > > On Wed, 26 Feb 2020 08:37:13 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Feb 26, 2020 at 02:28:39PM +0100, Halil Pasic wrote: > > > > On Wed, 26 Feb

Re: [PATCH v2 3/3] qemu-img: Deprecate use of -b without -F

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Eric Blake wrote: Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot). If our probing algorithm ever changes, or if other

Re: [PATCH v1 1/2] hw/arm: versal: Add support for the LPD ADMAs

2020-02-27 Thread Francisco Iglesias
On [2020 Feb 27] Thu 16:44:23, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for the Versal LPD ADMAs. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 24 >

Re: [PATCH v1 4/8] iotests: filter out compression_type

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: After adding compression type feature to qcow2 format, qemu framework commands reporting the image settingd, e.g. "qemu-img create", started reporting the compression type for the image which breaks the iotests output matching. To fix it, add

Re: [PATCH v1 6/8] iotests: add "compression type" for test output matching

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: Affected tests: 049, 060, 061, 065, 144, 182, 242, 255 After adding the compression type feature for qcow2, the compression type is reported on image quering. Add the corresponding values of the "compression type" for the tests' output matching. And

[PATCH 1/2] chardev: Improve error report by calling error_setg_win32()

2020-02-27 Thread Philippe Mathieu-Daudé
Use error_setg_win32() which adds a hint similar to strerror(errno)). Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-pipe.c | 2 +- chardev/char-win.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index

[PATCH v3 10/15] util/mmap-alloc: Prepare for resizeable mmaps

2020-02-27 Thread David Hildenbrand
When shrinking a mmap we want to re-reserve the already populated area. When growing a memory region, we want to populate starting with a given fd_offset. Prepare by allowing to pass these parameters. Also, let's make sure we always process full pages, to avoid unmapping/remapping pages that are

Re: [PATCH 2/2] util/oslib-win32: Improve error report by calling error_setg_win32()

2020-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2020 at 11:02:50AM +0100, Philippe Mathieu-Daudé wrote: > Use error_setg_win32() which adds a hint similar to strerror(errno)). > > Signed-off-by: Philippe Mathieu-Daudé > --- > util/oslib-win32.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Daniel P.

[Bug 1864984] [NEW] "nr_entries is too big" when using virgl

2020-02-27 Thread Valentin David
Public bug reported: I have a bootable image where GNOME Shell fails because it hits a limit in virtio-gpu. In `hw/display/virtio-gpu.c`, there is a limit for `nr_entries` at 16384. There is no explanation for that limit. But there does not seem to be any limit on the kernel side. Raising this

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Coiby Xu
> > we still need customized vu_message_read because libvhost-user assumes > > we will always get a full-size VhostUserMsg and hasn't taken care of > > this short read case. I will improve libvhost-user's vu_message_read > > by making it keep reading from socket util getting enough bytes. I > >

Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open()

2020-02-27 Thread Kevin Wolf
Am 27.02.2020 um 02:49 hat Chenqun (kuhn) geschrieben: > >-Original Message- > >From: Kevin Wolf [mailto:kw...@redhat.com] > >Sent: Wednesday, February 26, 2020 5:55 PM > >To: Chenqun (kuhn) > >Cc: qemu-devel@nongnu.org; qemu-triv...@nongnu.org; > >peter.mayd...@linaro.org; Zhanghailiang

Re: [PATCH v1 1/4] accel/tcg: use units.h for defining code gen buffer sizes

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/26/20 7:10 PM, Alex Bennée wrote: It's easier to read. Signed-off-by: Alex Bennée --- accel/tcg/translate-all.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index a08ab11f657..238b0e575bf

Re: [PATCH 3/6] iotests: move bitmap helpers into their own file

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 3:56, John Snow wrote: Signed-off-by: John Snow --- tests/qemu-iotests/257| 110 +--- tests/qemu-iotests/bitmaps.py | 131 ++ 2 files changed, 132 insertions(+), 109 deletions(-) create mode 100644

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Marc-André Lureau
Hi On Thu, Feb 27, 2020 at 11:55 AM Kevin Wolf wrote: > > Am 27.02.2020 um 11:28 hat Coiby Xu geschrieben: > > > > we still need customized vu_message_read because libvhost-user assumes > > > > we will always get a full-size VhostUserMsg and hasn't taken care of > > > > this short read case. I

Re: [PATCH 01/18] qemu-doc: convert user-mode emulation to a separate Sphinx manual

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > The final addition to the set of QEMU manuals is the user-mode emulation > manual, which right now is included in qemu-doc.texi. Extract it and > convert it to rST, so that qemu-doc.texi covers only full system emulation. > > Signed-off-by:

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread Pan Nengyuan
On 2/27/2020 7:06 PM, Cornelia Huck wrote: > On Thu, 27 Feb 2020 10:50:50 +0800 > Pan Nengyuan wrote: > >> This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The >> leak stack is as follow: >> >> Direct leak of 48 byte(s) in 1 object(s) allocated from: >> #0

Re: [PATCH 5/6] qmp.py: change event_wait to use a dict

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 3:56, John Snow wrote: It's easier to work with than a list of tuples, because we can check the keys for membership. Signed-off-by: John Snow --- python/qemu/machine.py| 10 +- tests/qemu-iotests/040| 12 ++-- tests/qemu-iotests/260| 5

Re: [PATCH 10/18] qemu-doc: move qemu-tech.texi into main section

2020-02-27 Thread Peter Maydell
On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini wrote: > > The only remaining content in qemu-tech.texi is a few paragraphs > about managed start up options. Move them in the main section > about full system emulation. > > Signed-off-by: Paolo Bonzini Reviewed-by: Peter Maydell thanks -- PMM

[PULL 4/7] s390/sclp: improve special wait psw logic

2020-02-27 Thread Cornelia Huck
From: Christian Borntraeger There is a special quiesce PSW that we check for "shutdown". Otherwise disabled wait is detected as "crashed". Architecturally we must only check PSW bits 116-127. Fix this. Cc: qemu-sta...@nongnu.org Signed-off-by: Christian Borntraeger Message-Id:

[PULL 1/7] target/s390x/translate: Fix RNSBG instruction

2020-02-27 Thread Cornelia Huck
From: Thomas Huth RNSBG is handled via the op_rosbg() helper function. But RNSBG has the opcode 0xEC54, i.e. 0x54 as second byte, while op_rosbg() currently checks for 0x55. This seems to be a typo, fix it to use 0x54 instead, so that op_rosbg() does not abort() anymore if a program uses RNSBG.

[PULL 6/7] docs: rstfy vfio-ap documentation

2020-02-27 Thread Cornelia Huck
Move to system/, as this is mostly about configuring vfio-ap. Message-Id: <20200213162942.14177-3-coh...@redhat.com> Reviewed-by: Pierre Morel Signed-off-by: Cornelia Huck --- MAINTAINERS | 2 +- docs/system/index.rst| 1 + docs/{vfio-ap.txt

Re: [RFC PATCH v2] target/ppc: Enable hardfloat for PPC

2020-02-27 Thread BALATON Zoltan
On Thu, 27 Feb 2020, Aleksandar Markovic wrote: I totally disagree with your using the term "hardfloat feature enabled" in this context, speaking about this particulat patch. This may be just wishful thinking. The right wording would be "hardfloat feature hacked", or "hardfloat feature fooled".

Re: [PATCH 08/20] hw/xen/xen_pt_load_rom: Remove unused includes

2020-02-27 Thread Anthony PERARD
On Mon, Oct 14, 2019 at 03:29:42PM +0100, Paul Durrant wrote: > On Mon, 14 Oct 2019 at 15:27, Philippe Mathieu-Daudé > wrote: > > > > xen_pt_load_rom.c does not use any of these includes, remove them. > > > > Signed-off-by: Philippe Mathieu-Daudé > > Reviewed-by: Paul Durrant Hi, I've added

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Kevin Wolf
Am 27.02.2020 um 10:53 hat Coiby Xu geschrieben: > Thank you for reminding me of this socket short read issue! It seems > we still need customized vu_message_read because libvhost-user assumes > we will always get a full-size VhostUserMsg and hasn't taken care of > this short read case. I will

Re: Issue with vl.c: move -m parsing after memory backends has been processed. Commit a1b18df9a4848fc8a906e40c275063bfe9ca2047

2020-02-27 Thread Howard Spoelstra
On Wed, Feb 26, 2020 at 12:38 PM BALATON Zoltan wrote: > Hello, > > On Wed, 26 Feb 2020, Howard Spoelstra wrote: > > Hi all, > > > > Commit a1b18df9a4848fc8a906e40c275063bfe9ca2047 on the ppc-for-50 branch > > makes qemu-system-ppc running Mac OS 9 extremely slow. I bisected to the > > result

[PATCH v3 03/15] util: vfio-helpers: Factor out removal from qemu_vfio_undo_mapping()

2020-02-27 Thread David Hildenbrand
Factor it out and properly use it where applicable. Make qemu_vfio_undo_mapping() look like qemu_vfio_do_mapping(), passing the size and iova, not the mapping. Reviewed-by: Peter Xu Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Alex Williamson Cc:

[PATCH v3 02/15] util: vfio-helpers: Remove Error parameter from qemu_vfio_undo_mapping()

2020-02-27 Thread David Hildenbrand
Everybody discards the error. Let's error_report() instead so this error doesn't get lost. This is now the same error handling as in qemu_vfio_do_mapping(). However, we don't report any errors via the return value to the caller. This seems to be one of these "will never happen, but let's better

[PATCH v3 05/15] exec: Reuse qemu_ram_apply_settings() in qemu_ram_remap()

2020-02-27 Thread David Hildenbrand
I don't see why we shouldn't apply all settings to make it look like the surrounding RAM (and enable proper VMA merging). Note: memory backend settings might have overridden these settings. We would need a callback to let the memory backend fix that up. Reviewed-by: Richard Henderson

[PATCH v3 14/15] numa: Introduce ram_block_notifiers_support_resize()

2020-02-27 Thread David Hildenbrand
We want to actually use resizeable allocations in resizeable ram blocks (IOW, make everything between used_length and max_length inaccessible) - however, not all ram block notifiers can support that. Introduce a way to detect if any registered notifier does not support resizes -

[PATCH v3 13/15] util: oslib: Resizeable anonymous allocations under POSIX

2020-02-27 Thread David Hildenbrand
Introduce qemu_anon_ram_alloc_resizeable() and qemu_anon_ram_resize(). Implement them under POSIX and make them return NULL under WIN32. Under POSIX, we make use of resizeable mmaps. An implementation under WIN32 is theoretically possible AFAIK and can be added later. In qemu_anon_ram_free(),

Re: [PATCH v3 1/6] s390x: fix memleaks in cpu_finalize

2020-02-27 Thread Cornelia Huck
On Thu, 27 Feb 2020 10:50:50 +0800 Pan Nengyuan wrote: > This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The > leak stack is as follow: > > Direct leak of 48 byte(s) in 1 object(s) allocated from: > #0 0x7fb43c7cd970 in __interceptor_calloc

  1   2   3   4   >