Re: [Qemu-devel] [PATCH] qemu/compiler: Wrap __attribute__((flatten)) in a macro

2018-09-26 Thread Peter Maydell
On 27 September 2018 at 06:28, Thomas Huth wrote: > Speaking of the minimum GCC version that we require: Did we ever > officially define that? Or is it just a result from appendix C in our > qemu-doc? I guess the minimum GCC could be defined to 4.2 since that's > the compiler that was still used i

[Qemu-devel] [QEMU-PPC] [RFC 2/2] ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV

2018-09-26 Thread Suraj Jitindar Singh
Add the spapr cap SPAPR_CAP_NESTED_KVM_HV to be used to control the availability of nested kvm-hv to the level 1 (L1) guest. Assuming a hypervisor with support enabled an L1 guest can be allowed to use the kvm-hv module (and thus run it's own kvm-hv guests) by setting: -machine pseries,cap-nested-

[Qemu-devel] [QEMU-PPC] [RFC 0/2] ppc/spapr: Add support for nested kvm-hv

2018-09-26 Thread Suraj Jitindar Singh
This patch series adds the qemu support for running nested kvm-hv on a POWER9 platform with appropriate hypervisor support and migration of these guests. That is, the ability to run kvm-hv guests as guests of an operating system which is itself a kvm-hv guest. The host (L0 hypervisor) and level 1

[Qemu-devel] [QEMU-PPC] [RFC 1/2] target/ppc: Add one reg id for ptcr

2018-09-26 Thread Suraj Jitindar Singh
The ptcr (partition table control register) is used to store the address and size of the partition table. For nested kvm-hv we have a level 1 guest register the location of it's partition table with the hypervisor. Thus to support migration we need to be able to read this out of kvm and restore it

Re: [Qemu-devel] [PATCH 2/3] memory: Refactor common shifting code from accessors

2018-09-26 Thread Cédric Le Goater
Reviewed-by: Cédric Le Goater Thanks, C. On 9/27/18 2:24 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > memory.c | 30 +- > 1 file changed, 21 insertions(+), 9 deletions(-) > > diff --git a/memory.c b/memory.c > index 385b9d35

Re: [Qemu-devel] [PATCH 1/3] memory: Use MAKE_64BIT_MASK()

2018-09-26 Thread Cédric Le Goater
Reviewed-by: Cédric Le Goater Thanks, C. On 9/27/18 2:24 AM, Philippe Mathieu-Daudé wrote: > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/memory.c b/memory.c > index 9b738927

[Qemu-devel] [PATCH v2] qemu/compiler: Wrap __attribute__((flatten)) in a macro

2018-09-26 Thread Thomas Huth
Older versions of Clang (before 3.5) and GCC (before 4.1) do not support the "__attribute__((flatten))" yet. We don't care about such old versions of GCC anymore, but since Clang 3.4 is still used in EPEL for RHEL7 / CentOS 7, we should not use this attribute directly but with a wrapper macro inste

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-26 Thread Gerd Hoffmann
Hi, > > Maybe using memdev file backend with manually created sparse file > > might actually work (with preallocate disabled) > > Thanks, this sounds like a good idea. > > I see shm_open() is used heavily in ivshmem-related tests. I haven't > looked much at shm_open() before. (I've always know

Re: [Qemu-devel] [PATCH] qemu/compiler: Wrap __attribute__((flatten)) in a macro

2018-09-26 Thread Thomas Huth
On 2018-09-26 20:57, Peter Maydell wrote: > On 26 September 2018 at 16:59, Thomas Huth wrote: > >> +/* >> + * Clang 3.4 claims to be compatible with GCC 4.2, but does not have the >> + * "flatten" attribute, so we've got to handle Clang via __has_attribute >> here >> + */ >> +#if defined(__clang

Re: [Qemu-devel] [PATCH v4 09/24] memory-device: add and use memory_device_get_region_size()

2018-09-26 Thread David Gibson
On Wed, Sep 26, 2018 at 11:42:04AM +0200, David Hildenbrand wrote: > We will factor out get_memory_region() from pc-dimm to memory device code > soon. Once that is done, get_region_size() can be implemented > generically and essentially be replaced by > memory_device_get_region_size (and work only

Re: [Qemu-devel] [PATCH v4 03/24] pc-dimm: pass PCDIMMDevice to pc_dimm_.*plug

2018-09-26 Thread David Gibson
On Wed, Sep 26, 2018 at 11:41:58AM +0200, David Hildenbrand wrote: > We're plugging/unplugging a PCDIMMDevice, so directly pass this type > instead of a more generic DeviceState. > > Signed-off-by: David Hildenbrand Seems type-safer than the previous version. Reviewed-by: David Gibson and ppc

[Qemu-devel] [PATCH] bitmap: Update count after a merge

2018-09-26 Thread Eric Blake
We need an accurate count of the number of bits set in a bitmap after a merge. In particular, since the merge operation short-circuits a merge from an empty source, if you have bitmaps A, B, and C where B started empty, then merge C into B, and B into A, an inaccurate count meant that A did not get

Re: [Qemu-devel] [PATCH 3/3] memory: Fix access_with_adjusted_size(small size) on big-endian memory regions

2018-09-26 Thread Eric Blake
On 9/26/18 7:24 PM, Philippe Mathieu-Daudé wrote: Memory regions configured as DEVICE_BIG_ENDIAN (or DEVICE_NATIVE_ENDIAN on big-endian guest) behave incorrectly when the memory access 'size' is smaller than the implementation 'access_size'. Fix this by changing the access_fn() prototype to

[Qemu-devel] [PULL 3/3] nbd/server: send more than one extent of base:allocation context

2018-09-26 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy This is necessary for efficient block-status export, for clients which support it. (qemu is not yet such a client, but could become one.) Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20180704112302.471456-3-vsement...@virtuozzo.com> [eblake: gramm

[Qemu-devel] [PULL 2/3] qapi: bitmap-merge: document name change

2018-09-26 Thread Eric Blake
From: John Snow We named these using underscores instead of the preferred dash, document this nearby so we cannot possibly forget to rectify this when we remove the 'x-' prefixes when the feature becomes stable. We do not implement the change ahead of time to avoid more work for libvirt to do in

[Qemu-devel] [PULL 1/3] nbd/server: fix bitmap export

2018-09-26 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy bitmap_to_extents function is broken: it switches dirty variable after every iteration, however it can process only part of dirty (or zero) area during one iteration in case when this area is too large for one extent. Fortunately, the bug doesn't produce wrong

[Qemu-devel] [PULL 0/3] NBD patches through 2018-09-26

2018-09-26 Thread Eric Blake
The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100) are available in the Git repository at: git://repo.or.cz/qemu/ericb.git tags/pull-nbd-2018-09-26 f

Re: [Qemu-devel] [PATCH] dirty-bitmaps: allow merging to disabled bitmaps

2018-09-26 Thread Eric Blake
On 9/19/18 4:16 PM, John Snow wrote: On 09/19/2018 05:08 PM, Eric Blake wrote: On 9/19/18 2:58 PM, John Snow wrote: We wish to prohibit merging to read-only bitmaps and frozen bitmaps, but "disabled" bitmaps only preclude their recording of live, new information. It does not prohibit them fro

Re: [Qemu-devel] [PATCH v3 0/5] dirty-bitmaps: fix QMP command permissions

2018-09-26 Thread Eric Blake
On 9/25/18 6:49 PM, John Snow wrote: based on: jsnow/bitmaps staging branch This series builds on a previous standalone patch and adjusts the permission for all (or most) of the QMP bitmap commands. John Snow (5): block/dirty-bitmaps: add user_modifiable status checker block/dirty-bitmaps

Re: [Qemu-devel] [PATCH v3 1/5] block/dirty-bitmaps: add user_modifiable status checker

2018-09-26 Thread Eric Blake
On 9/26/18 7:19 AM, Vladimir Sementsov-Ogievskiy wrote: 26.09.2018 14:53, Vladimir Sementsov-Ogievskiy wrote: 26.09.2018 02:49, John Snow wrote: Instead of both frozen and qmp_locked checks, wrap it into one check. frozen implies the bitmap is split in two (for backup), and shouldn't be modifie

Re: [Qemu-devel] [PATCH v3 1/5] block/dirty-bitmaps: add user_modifiable status checker

2018-09-26 Thread Eric Blake
On 9/26/18 6:53 AM, Vladimir Sementsov-Ogievskiy wrote: 26.09.2018 02:49, John Snow wrote: Instead of both frozen and qmp_locked checks, wrap it into one check. frozen implies the bitmap is split in two (for backup), and shouldn't be modified. qmp_locked implies it's being used by another operat

Re: [Qemu-devel] [PATCH 2/2] nbd/server: send more than one extent of base:allocation context

2018-09-26 Thread Eric Blake
On 9/17/18 11:15 AM, Vladimir Sementsov-Ogievskiy wrote: 05.07.2018 19:18, Vladimir Sementsov-Ogievskiy wrote: 05.07.2018 18:59, Eric Blake wrote: On 07/04/2018 06:23 AM, Vladimir Sementsov-Ogievskiy wrote: This is necessary for efficient block-status export, for clients which support it.

[Qemu-devel] [RFC] [PATCH 1/3] arm: API to check if the register is invariant

2018-09-26 Thread mjaggi
From: Manish Jaggi kvm_arm_is_invariant is added to return true if the register is invariant. This patch also adds an array invariant_sys_regs which is lookedup for invaraint register ids. Currently this patch checks for only MIDR invaraint register. Signed-off-by: Manish Jaggi diff --git a/t

[Qemu-devel] [RFC] [PATCH 3/3] arm: Skip invariant register restore

2018-09-26 Thread mjaggi
From: Manish Jaggi Invariant registers will be skipped from being restored from guests' context on migrated host. Signed-off-by: Manish Jaggi diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 65f867d..2d89600 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -451,6 +451,9 @@ bool wr

[Qemu-devel] [RFC] [PATCH 2/3] arm: Introduce skipinvariant command line option

2018-09-26 Thread mjaggi
From: Manish Jaggi This option along with the API kvm_arm_is_invariant will prevent any invariant registers written to KVM. This option is handy when doing migration between arm hosts which use -cpu host option, and are similar in CPU family but only differ in MIDR value or other invariant regist

[Qemu-devel] [RFC] [PATCH 0/3] qemu: arm: Migration between machines with different MIDR values

2018-09-26 Thread mjaggi
From: Manish Jaggi QEMU on arm systems use -machine virt -cpu host option for a VM. Migration thus is limited between machines with same cpu. This is a limitation if migration is desired between cpus which are of same family and have only few diferences like bug fixes which have no effect on VM

Re: [Qemu-devel] [PATCH v4 01/24] memory-device: fix alignment error message

2018-09-26 Thread David Gibson
On Wed, Sep 26, 2018 at 11:41:56AM +0200, David Hildenbrand wrote: > We're missing "x" after the leading 0. > > Signed-off-by: David Hildenbrand Reviewed-by: David Gibson > --- > hw/mem/memory-device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/mem/memory-dev

[Qemu-devel] [PATCH 2/3] memory: Refactor common shifting code from accessors

2018-09-26 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- memory.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/memory.c b/memory.c index 385b9d3590..48edf7dc23 100644 --- a/memory.c +++ b/memory.c @@ -374,6 +374,21 @@ static void adjust_endianness(MemoryReg

[Qemu-devel] [PATCH 0/3] Fix access_with_adjusted_size() on big-endian

2018-09-26 Thread Philippe Mathieu-Daudé
Hi, This series fix a bug I'v been hunting for a long time. With BE regions, if the guest used smaller access than the region implementation, the shift value is negative, but since access_fn() uses unsigned type for shift, it result in a huge positive value, then accessors shift the value which e

[Qemu-devel] [PATCH 1/3] memory: Use MAKE_64BIT_MASK()

2018-09-26 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 9b73892768..385b9d3590 100644 --- a/memory.c +++ b/memory.c @@ -582,7 +582,7 @@ static MemTxResult access_with_adjusted_siz

[Qemu-devel] [PATCH 3/3] memory: Fix access_with_adjusted_size(small size) on big-endian memory regions

2018-09-26 Thread Philippe Mathieu-Daudé
Memory regions configured as DEVICE_BIG_ENDIAN (or DEVICE_NATIVE_ENDIAN on big-endian guest) behave incorrectly when the memory access 'size' is smaller than the implementation 'access_size'. In the following code segment from access_with_adjusted_size(): if (memory_region_big_endian(mr)) {

Re: [Qemu-devel] [PATCH] Add "boot_linux" acceptance test

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/27/18 1:05 AM, Cleber Rosa wrote: > On 9/26/18 2:27 PM, Philippe Mathieu-Daudé wrote: >> Hi Cleber, >> >> On Thu, Sep 20, 2018 at 6:18 PM Cleber Rosa wrote: >>> >>> This acceptance test, validates that a full blown Linux guest can >>> successfully boot in QEMU. In this specific case, the gue

[Qemu-devel] [PATCH v9 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-26 Thread Tony Krowiak
A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The S390_FEAT_AP CPU model feature indicates whether AP instructions are available to the guest. This feature will be enabled only if the AP instructions are

Re: [Qemu-devel] [PATCH] Add "boot_linux" acceptance test

2018-09-26 Thread Cleber Rosa
On 9/26/18 2:27 PM, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On Thu, Sep 20, 2018 at 6:18 PM Cleber Rosa wrote: >> >> This acceptance test, validates that a full blown Linux guest can >> successfully boot in QEMU. In this specific case, the guest >> chosen is Fedora version 28. By pass

[Qemu-devel] [PATCH v9 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-09-26 Thread Tony Krowiak
From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is switched on for the guest, AP instructions must be interpreted by default; otherwise, they will be intercepted. This attribute set

[Qemu-devel] [PATCH v9 6/6] s390: doc: detailed specifications for AP virtualization

2018-09-26 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak --- MAINTAINERS | 1 + docs/vfio-ap.txt | 7

[Qemu-devel] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-26 Thread Tony Krowiak
From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- MAINTAINERS | 12 ++ hw/s390x/Makefile.objs | 2 + hw/s390x/ap-bridge.c | 81 hw/s390x/ap-device.c |

[Qemu-devel] [PATCH v9 1/6] linux-headers: linux header updates for AP support

2018-09-26 Thread Tony Krowiak
Updates the linux header files in preparation for introduction of the VFIO AP device: * Added a feature ID to indicate AP facilities are installed * Added device attributes to the KVM_S390_VM_CRYPTO group to indicate whether AP instructions are to be interpreted * Added VFIO device information

Re: [Qemu-devel] [RFC PATCH] ssi-sd: Make devices picking up backends unavailable with -device

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/26/18 1:46 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> Hi Markus, >> >> On 9/26/18 11:00 AM, Markus Armbruster wrote: >>> Device models aren't supposed to go on fishing expeditions for >>> backends. They should expose suitable properties for the user to set. >>> For o

[Qemu-devel] [PATCH v9 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-09-26 Thread Tony Krowiak
From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework and provides the infrastructure for granting exclusive guest access to crypto devices installed on the

[Qemu-devel] [PATCH v9 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-09-26 Thread Tony Krowiak
Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated matrix device is created by the VFIO AP device driver by writing a UUID to a sysfs attribute f

Re: [Qemu-devel] [Qemu-arm] [PATCH] virt: Suppress external aborts on virt-2.10 and earlier

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/26/18 2:29 PM, Peter Maydell wrote: > On 26 September 2018 at 11:35, Philippe Mathieu-Daudé wrote: >> Hi Peter, >> >> On 9/25/18 4:41 PM, Peter Maydell wrote: >>> In commit c79c0a314c43b78 we enabled emulation of external aborts >>> when the guest attempts to access a physical address with no

Re: [Qemu-devel] [PATCH v5 2/8] target/mips: Support R5900 specific three-operand MULT and MULTU

2018-09-26 Thread Maciej W. Rozycki
On Thu, 27 Sep 2018, Philippe Mathieu-Daudé wrote: > > +static void gen_mul_r5900(DisasContext *ctx, uint32_t opc, > > + int acc, int rd, int rs, int rt) > > Since we have acc = 0 we can directly use cpu_LO[0] and cpu_HI[0], > removing needs for an 'acc' argument. Corre

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-26 Thread Laszlo Ersek
On 09/26/18 18:26, Alex Williamson wrote: > On Wed, 26 Sep 2018 13:12:47 +0200 > Laszlo Ersek wrote: > >> On 09/25/18 22:36, Alex Williamson wrote: >>> On Tue, 25 Sep 2018 00:13:46 +0200 >>> Laszlo Ersek wrote: >>> In commit 9fa99d2519cb ("hw/pci-host: Fix x86 Host Bridges 64bit PCI

Re: [Qemu-devel] [PATCH v5 2/8] target/mips: Support R5900 specific three-operand MULT and MULTU

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/15/18 11:25 AM, Fredrik Noring wrote: Can you copy/paste some info regarding those instructions from the ISA here, to note how they differ? ... > Signed-off-by: Fredrik Noring > --- > target/mips/translate.c | 53 > + > 1 file changed, 53 in

[Qemu-devel] [Bug 1793904] Re: files are randomly overwritten by Zero Bytes

2018-09-26 Thread Hans
Hi John, As for your second question: ii glusterfs-comm 4.1.3-1 amd64GlusterFS common libraries and tr As for the other parts: I was playing with this one ealier, therefore this is not completely relieable: qemu-img check images/conesphere_internet_meeting1.qcow2 No errors w

Re: [Qemu-devel] [PATCH v5 2/8] target/mips: Support R5900 specific three-operand MULT and MULTU

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/26/18 11:59 PM, Philippe Mathieu-Daudé wrote: > On 9/25/18 2:20 PM, Philippe Mathieu-Daudé wrote: >> Hi Fredrik, >> >> On 9/15/18 11:25 AM, Fredrik Noring wrote: >>> Signed-off-by: Fredrik Noring >>> --- >>> target/mips/translate.c | 53 >>> +

Re: [Qemu-devel] [PATCH v5 2/8] target/mips: Support R5900 specific three-operand MULT and MULTU

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/25/18 2:20 PM, Philippe Mathieu-Daudé wrote: > Hi Fredrik, > > On 9/15/18 11:25 AM, Fredrik Noring wrote: >> Signed-off-by: Fredrik Noring >> --- >> target/mips/translate.c | 53 >> + >> 1 file changed, 53 insertions(+) >> >> diff --git a/tar

Re: [Qemu-devel] [PATCH] virtio: do not take address of packed members

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/26/18 11:20 PM, Paolo Bonzini wrote: > The address of a packed member is not packed, which may cause accesses > to unaligned pointers. Avoid this by reading the packed value before > passing it to another function. > > Cc: Jason Wang > Cc: Peter Maydell > Reviewed-by: Eric Blake > Cc: qem

[Qemu-devel] [PATCH] util/hbitmaps: recalculate count on merge

2018-09-26 Thread John Snow
We have been neglecting to do so, which results in wrong counts after merge. In the worst case, we may think the bitmap is empty when it has had new writes merged into it. Reported-by: Eric Blake Signed-off-by: John Snow --- util/hbitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/

[Qemu-devel] [PATCH] virtio: do not take address of packed members

2018-09-26 Thread Paolo Bonzini
The address of a packed member is not packed, which may cause accesses to unaligned pointers. Avoid this by reading the packed value before passing it to another function. Cc: Jason Wang Cc: Peter Maydell Reviewed-by: Eric Blake Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [Bug 1793904] Re: files are randomly overwritten by Zero Bytes

2018-09-26 Thread John Snow
Looks like you've narrowed it down to QEMU's usage of gluster, but some additional details might still be nice just to be sure: Can you produce the command-line for QEMU so we can see the configuration you're running? I believe on Debian that QEMU makes use of the glusterfs-common package, can yo

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-26 Thread Laszlo Ersek
(+Eric) On 09/26/18 18:26, Alex Williamson wrote: > On Wed, 26 Sep 2018 13:12:47 +0200 > Laszlo Ersek wrote: > >> On 09/25/18 22:36, Alex Williamson wrote: >>> On Tue, 25 Sep 2018 00:13:46 +0200 >>> Laszlo Ersek wrote: >>> In commit 9fa99d2519cb ("hw/pci-host: Fix x86 Host Bridges 64bit

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-26 Thread Laszlo Ersek
(+Eric) On 09/26/18 14:10, Igor Mammedov wrote: > On Wed, 26 Sep 2018 13:35:14 +0200 > Laszlo Ersek wrote: > >> On 09/26/18 13:12, Laszlo Ersek wrote: >> >>> (4) append a new patch, for "bios-tables-test", so that the ACPI gen >>> change is validated as part of the test suite, on SeaBIOS/q35. >>

Re: [Qemu-devel] [resend PATCH v2] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-09-26 Thread Michael Roth
Quoting Chen Hanxiao (2018-09-18 21:52:07) > From: Chen Hanxiao > > This patch add support for freeze specified fs. > > The valid mountpoints list member are [1]: > > The path of a mounted folder, for example, Y:\MountX\ > A drive letter, for example, D:\ > A volume GUID path of the form

Re: [Qemu-devel] [PATCH v3 0/5] dirty-bitmaps: fix QMP command permissions

2018-09-26 Thread John Snow
On 09/26/2018 08:19 AM, Vladimir Sementsov-Ogievskiy wrote: > 26.09.2018 02:49, John Snow wrote: >> based on: jsnow/bitmaps staging branch >> >> This series builds on a previous standalone patch and adjusts >> the permission for all (or most) of the QMP bitmap commands. >> >> John Snow (5): >>  

Re: [Qemu-devel] QEMU and Kconfig

2018-09-26 Thread Peter Maydell
On 26 September 2018 at 14:36, Paolo Bonzini wrote: > Here is a minimal example: > > # hw/scsi/Kconfig > config SCSI > > config ESP > select SCSI > > config ESP_PCI > default y > select ESP > depends on PCI > > # hw/pci/Kconfig > config PCI > > # hw/pci-host/Kconfig > config PCI_GE

[Qemu-devel] [PATCH v2 14/15] target/arm: Rewrite vector gather first-fault loads

2018-09-26 Thread Richard Henderson
This implements the feature for softmmu, and moves the main loop out of a macro and into a function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 84 --- target/arm/sve_helper.c| 290 +

Re: [Qemu-devel] [PATCH v3 2/5] block/dirty-bitmaps: fix merge permissions

2018-09-26 Thread John Snow
On 09/26/2018 08:08 AM, Vladimir Sementsov-Ogievskiy wrote: > 26.09.2018 14:55, Vladimir Sementsov-Ogievskiy wrote: >> 26.09.2018 02:49, John Snow wrote: >>> We wish to prohibit merging to read-only bitmaps and frozen bitmaps, >>> but "disabled" bitmaps only preclude their recording of live, new

[Qemu-devel] [PATCH v2 15/15] target/arm: Pass TCGMemOpIdx to sve memory helpers

2018-09-26 Thread Richard Henderson
There is quite a lot of code required to compute cpu_mem_index, or even put together the full TCGMemOpIdx. This can easily be done at translation time. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/internals.h | 5 ++ target/arm/

[Qemu-devel] [PATCH v2 07/15] target/arm: Rewrite helper_sve_ld1*_r using pages

2018-09-26 Thread Richard Henderson
Uses tlb_vaddr_to_host for correct operation with softmmu. Optimize for accesses within a single page or pair of pages. Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 731 +++- 1 file changed, 569 insertions(+), 162 deletions(-) diff --git a/t

[Qemu-devel] [PATCH v2 09/15] target/arm: Rewrite helper_sve_st[1234]*_r

2018-09-26 Thread Richard Henderson
This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 351 1 file change

[Qemu-devel] [PATCH v2 12/15] target/arm: Rewrite vector gather loads

2018-09-26 Thread Richard Henderson
This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 84 + target/arm/sve_helper.c| 225

[Qemu-devel] [PATCH v2 08/15] target/arm: Rewrite helper_sve_ld[234]*_r

2018-09-26 Thread Richard Henderson
Use the same *_tlb primitives as we use for ld1. For linux-user, this hoists the set of helper_retaddr. For softmmu, hoists the computation of the current mmu_idx outside the loop, fixes the endianness problem, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Pet

[Qemu-devel] [PATCH v2 13/15] target/arm: Rewrite vector gather stores

2018-09-26 Thread Richard Henderson
This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 52 ++ target/arm/sve_helper.c| 139 +++

[Qemu-devel] [PATCH v2 06/15] target/arm: Clear unused predicate bits for LD1RQ

2018-09-26 Thread Richard Henderson
The 16-byte load only uses 16 predicate bits. But while reusing the other load infrastructure, we find other bits that are set and trigger an assert. To avoid this and retain the assert, zero-extend the predicate that we pass to the LD1 helper. Tested-by: Laurent Desnogues Reported-by: Laurent

[Qemu-devel] [PATCH v2 10/15] target/arm: Split contiguous loads for endianness

2018-09-26 Thread Richard Henderson
We can choose the endianness at translation time, rather than re-computing it at execution time. Tested-by: Laurent Desnogues Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 117 +++--- target/arm/sve_helper.c| 70 +

[Qemu-devel] [PATCH v2 04/15] target/arm: Handle SVE vector length changes in system mode

2018-09-26 Thread Richard Henderson
SVE vector length can change when changing EL, or when writing to one of the ZCR_ELn registers. For correctness, our implementation requires that predicate bits that are inaccessible are never set. Which means noticing length changes and zeroing the appropriate register bits. Tested-by: Laurent

[Qemu-devel] [PATCH v2 00/15] target/arm: sve system mode patches

2018-09-26 Thread Richard Henderson
For v2, I've dropped a few patches and adjusted for some review on v1. In particular, the patches that adjust the ID system registers are dropped, so there's not actually a way to run any SVE code in system mode with just this. But there's no point keeping these out of tree while work continues o

[Qemu-devel] [PATCH v2 05/15] target/arm: Adjust aarch64_cpu_dump_state for system mode SVE

2018-09-26 Thread Richard Henderson
Use the existing helpers to determine if (1) the fpu is enabled, (2) sve state is enabled, and (3) the current sve vector length. Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/cpu.h | 4 target/arm/helper.c| 6 +++--- target/arm/translate-a6

[Qemu-devel] [PATCH v2 11/15] target/arm: Split contiguous stores for endianness

2018-09-26 Thread Richard Henderson
We can choose the endianness at translation time, rather than re-computing it at execution time. Tested-by: Laurent Desnogues Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 48 + target/arm/sve_helper.c| 11

[Qemu-devel] [PATCH v2 01/15] target/arm: Define ID_AA64ZFR0_EL1

2018-09-26 Thread Richard Henderson
Given that the only field defined for this new register may only be 0, we don't actually need to change anything except the name. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[Qemu-devel] [PATCH v2 03/15] target/arm: Pass in current_el to fp and sve_exception_el

2018-09-26 Thread Richard Henderson
We are going to want to determine whether sve is enabled for EL other than current. Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/target/arm/helper.c b/target/arm/h

[Qemu-devel] [PATCH v2 02/15] target/arm: Adjust sve_exception_el

2018-09-26 Thread Richard Henderson
Check for EL3 before testing CPTR_EL3.EZ. Return 0 when the exception should be routed via AdvSIMDFPAccessTrap. Mirror the structure of CheckSVEEnabled more closely. Fixes: 5be5e8eda78 Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/hel

Re: [Qemu-devel] [PATCH v3 2/5] block/dirty-bitmaps: fix merge permissions

2018-09-26 Thread John Snow
On 09/26/2018 08:08 AM, Vladimir Sementsov-Ogievskiy wrote: > 26.09.2018 14:55, Vladimir Sementsov-Ogievskiy wrote: >> 26.09.2018 02:49, John Snow wrote: >>> We wish to prohibit merging to read-only bitmaps and frozen bitmaps, >>> but "disabled" bitmaps only preclude their recording of live, new

Re: [Qemu-devel] [PATCH] qemu/compiler: Wrap __attribute__((flatten)) in a macro

2018-09-26 Thread Peter Maydell
On 26 September 2018 at 16:59, Thomas Huth wrote: > +/* > + * Clang 3.4 claims to be compatible with GCC 4.2, but does not have the > + * "flatten" attribute, so we've got to handle Clang via __has_attribute here > + */ > +#if defined(__clang__) && defined(__has_attribute) > +# if __has_attribute

[Qemu-devel] [PULL 09/13] qht: constify qht_lookup

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" seqlock_read_begin takes a const param since c04649eeea ("seqlock: constify seqlock_read_begin", 2018-08-23), so we can constify the entire lookup. Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/qht.h | 4 ++-- util/qht.c | 16 +

[Qemu-devel] [PULL 11/13] qht: constify arguments to some internal functions

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" These functions do not modify their @ht or @bucket arguments. Constify those arguments. Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- util/qht.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/util/qht.c b/util/

[Qemu-devel] [PULL 13/13] tcg/i386: fix vector operations on 32-bit hosts

2018-09-26 Thread Richard Henderson
From: Roman Kapl The TCG backend uses LOWREGMASK to get the low 3 bits of register numbers. This was defined as no-op for 32-bit x86, with the assumption that we have eight registers anyway. This assumption is not true once we have xmm regs. Since LOWREGMASK was a no-op, xmm register indidices w

[Qemu-devel] [PULL 07/13] qht: drop ht argument from qht iterators

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Accessing the HT from an iterator results almost always in a deadlock. Given that only one qht-internal function uses this argument, drop it from the interface. Suggested-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/qh

[Qemu-devel] [PULL 05/13] test-qht: test deletion of the last entry in a bucket

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" This improves coverage by one (!) LoC in qht.c, bringing the coverage rate up from 90.00% to 90.28%. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tests/test-qht.c | 13 - 1 file changed, 12 insertions(+), 1 del

[Qemu-devel] [PULL 10/13] qht: constify qht_statistics_init

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/qht.h | 2 +- util/qht.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/qht.h b/include/qemu/qht.h index 2e2d6bca93..758c7ac6c8 100644 --- a

[Qemu-devel] [PULL 03/13] test-qht: test qht_iter_remove

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tests/test-qht.c | 50 ++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/tests/test-qht.c b/tests/test-qht.c index d

[Qemu-devel] [PULL 08/13] qht: fix comment in qht_bucket_remove_entry

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- util/qht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qht.c b/util/qht.c index 50ed7a2102..3564a7e20f 100644 --- a/util/qht.c +++ b/util/qht.c @@ -671,7 +671,7 @@ qht_entry_m

[Qemu-devel] [PULL 06/13] test-qht: speed up + test qht_resize

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Perform first the tests that exercise code paths that are easier to hit at small table sizes, and then resize the table to speed up subsequent tests. If this resize is not too large, we can make the test faster with no code coverage loss. - With gcov enabled: Before: 20.5

[Qemu-devel] [PULL 04/13] test-qht: test removal of non-existent entries

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" This improves qht.c code coverage from 89.44% to 90.00%. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tests/test-qht.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tests/t

[Qemu-devel] [PULL 00/13] tcg-next patch queue

2018-09-26 Thread Richard Henderson
The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-tc

[Qemu-devel] [PULL 12/13] qht-bench: add -p flag to precompute hash values

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Precomputing the hash values allows us to perform more frequent accesses to the hash table, thereby reaching higher throughputs. We keep the old behaviour by default, since (1) we might confuse users if they measured a speedup without changing anything in the QHT implement

[Qemu-devel] [PULL 01/13] qht: remove unused map param from qht_remove__locked

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- util/qht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/util/qht.c b/util/qht.c index 1e3a072e25..28d9273371 100644 --- a/util/qht.c +++ b/util/qht.c

[Qemu-devel] [PULL 02/13] qht: add qht_iter_remove

2018-09-26 Thread Richard Henderson
From: "Emilio G. Cota" This currently has no users, but the use case is so common that I think we must support it. Note that without the appended we cannot safely remove a set of elements; a 2-step approach (i.e. qht_iter first, keep track of the to-be-deleted elements, and then a bunch of qht_r

Re: [Qemu-devel] [PATCH] Add "boot_linux" acceptance test

2018-09-26 Thread Philippe Mathieu-Daudé
Hi Cleber, On Thu, Sep 20, 2018 at 6:18 PM Cleber Rosa wrote: > > This acceptance test, validates that a full blown Linux guest can > successfully boot in QEMU. In this specific case, the guest > chosen is Fedora version 28. By passing parameters, the same > test can attempt to boot different d

[Qemu-devel] [PATCH v2 0/2] Maintainership changes

2018-09-26 Thread Jeff Cody
Changes from v1: - cc'ed Peter (meant to for v1, forgot) - added John's 'jobs' branch to his git url - kept myself as maintainer for vhdx - moved sheepdog to 'Odd Fixes' I'm not going to be involved with day-to-day qemu development, so this necessitates some changes. Jeff Cody (2

[Qemu-devel] [PATCH v2 2/2] MAINTAINERS: Remove myself as block maintainer

2018-09-26 Thread Jeff Cody
I'll not be involved in day-to-day qemu development. Remove myself as maintainer from the remainder of the network block drivers, and revert them to the general block layer maintainership. Move 'sheepdog' to the 'Odd Fixes' support level. For VHDX, added my personal email address as a maintainer

[Qemu-devel] [PATCH v2 1/2] MAINTAINERS: Replace myself with John Snow for block jobs

2018-09-26 Thread Jeff Cody
I'll not be involved with day-to-day qemu development, and John Snow is a block jobs wizard. Have him take over block job maintainership duties. Signed-off-by: Jeff Cody --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index ce7c3

Re: [Qemu-devel] Converting PCIDevice to VirtIODevice

2018-09-26 Thread Laszlo Ersek
On 09/26/18 17:33, Sameeh Jubran wrote: > Hi All, > > I have used the function "pci_qdev_find_device" to find a device using > it's id. This is a virtio device and I'm trying to convert it to > VirtIODevice. > > What's the best way to do this? Simply converting it to DeviceState > doesn't work an

Re: [Qemu-devel] [PATCH v5 6/8] target/mips: Define the R5900 CPU

2018-09-26 Thread Fredrik Noring
Hi Jürgen, Maciej, > The original website is down, but there is a backup: > http://ps2linux.no-ip.info/playstation2-linux.com/faq.html#Availability__When_Where_and_how_much > > There was also the question to release the documents for free. > http://ps2linux.no-ip.info/playstation2-linux.com/forum

Re: [Qemu-devel] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2018-09-26 Thread Jeff Cody
On Tue, Sep 25, 2018 at 03:49:36PM +0800, Fam Zheng wrote: > On Tue, 09/25 09:37, Markus Armbruster wrote: > > Do we want to have a dedicated VHDX driver submaintainer again? Fam, > > you're maintaining VMDK, could you cover VHDX as well? > > I don't know a lot VHDX internals. Considering my capa

Re: [Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu_update_icount

2018-09-26 Thread Emilio G. Cota
On Wed, Sep 26, 2018 at 10:23:25 +0200, Paolo Bonzini wrote: > On 24/09/2018 20:46, Emilio G. Cota wrote: > > Applying this on my local tree is deadlocking icount, since > > cpu_update_icount is called from cpu_get_icount_raw_locked: > > > > #6 cpu_update_icount (cpu=) at /data/src/qemu/cpus.c:25

[Qemu-devel] [PULL 16/16] migration/ram.c: Avoid taking address of fields in packed MultiFDInit_t struct

2018-09-26 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this: migration/ram.c:651:19: warning:

[Qemu-devel] [PULL 11/16] migration/postcopy: Clear have_listen_thread

2018-09-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Clear have_listen_thread when we exit the thread. The fallout from this was that various things thought there was an ongoing postcopy after the postcopy had finished. The case that failed was postcopy->savevm->loadvm. This corresponds to RH bug https://bugzilla.re

  1   2   3   >