[Qemu-devel] [PATCH v3 08/43] tests: remove /{qnum, qlist, dict}/destroy test

2017-06-07 Thread Marc-André Lureau
The tests aren't really useful, or already covered by other simple tests. Signed-off-by: Marc-André Lureau --- tests/check-qdict.c | 9 ++--- tests/check-qlist.c | 23 ++- tests/check-qnum.c| 18 ++

[Qemu-devel] [PATCH v3 00/43] qobject/qapi: add uint type

2017-06-07 Thread Marc-André Lureau
Hi, In previously sent series "[PATCH 00/21] WIP: dump: add kaslr support (for after 2.9)", I proposed changes to accept uint64 values from json, by adding a QUint type. During review, it was suggested to introduce a QNum type to hold various number representations. This series introduces the

[Qemu-devel] [PATCH v3 02/43] object: fix potential leak in getters

2017-06-07 Thread Marc-André Lureau
If the property is not of the requested type, the getters will leak a QObject. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- qom/object.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH v3 01/43] qdev: remove PropertyInfo.qtype field

2017-06-07 Thread Marc-André Lureau
Remove dependency on qapi qtype, replace a field by a few PropertyInfo callbacks to set the default value type (introduced in commit 4f2d3d7). Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- include/hw/qdev-core.h | 2

Re: [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2

2017-06-07 Thread Juan Quintela
Halil Pasic wrote: > Verbose error reporting for the _EQUAL family. Modify the standard _EQUAL > so the hint states the assertion probably failed due to a bug. Introduce > _EQUAL_HINT for specifying a context specific hint. > > Signed-off-by: Halil Pasic

[Qemu-devel] [PATCH v3 02/43] object: fix potential leak in getters

2017-06-07 Thread Marc-André Lureau
If the property is not of the requested type, the getters will leak a QObject. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- qom/object.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH v3 01/43] qdev: remove PropertyInfo.qtype field

2017-06-07 Thread Marc-André Lureau
Remove dependency on qapi qtype, replace a field by a few PropertyInfo callbacks to set the default value type (introduced in commit 4f2d3d7). Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- include/hw/qdev-core.h | 2

[Qemu-devel] [PATCH v3 00/43] qobject/qapi: add uint type

2017-06-07 Thread Marc-André Lureau
Hi, In previously sent series "[PATCH 00/21] WIP: dump: add kaslr support (for after 2.9)", I proposed changes to accept uint64 values from json, by adding a QUint type. During review, it was suggested to introduce a QNum type to hold various number representations. This series introduces the

Re: [Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Felipe Franciosi
> On 7 Jun 2017, at 17:21, Paolo Bonzini wrote: > > > > On 07/06/2017 17:39, Felipe Franciosi wrote: >> >>> On 7 Jun 2017, at 16:37, Peter Maydell wrote: >>> >>> On 7 June 2017 at 16:28, Paolo Bonzini wrote: From:

Re: [Qemu-devel] [PATCH] cpus: reset throttle_thread_scheduled after sleep

2017-06-07 Thread Juan Quintela
Felipe Franciosi wrote: > Currently, the throttle_thread_scheduled flag is reset back to 0 before > sleeping (as part of the throttling logic). Given that throttle_timer > (well, any timer) may tick with a slight delay, it so happens that under > heavy throttling (ie. close or

[Qemu-devel] [PULL v6 00/31] Misc patches for 2017-06-01

2017-06-07 Thread Paolo Bonzini
The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into staging (2017-06-06 17:00:12 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to

Re: [Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Paolo Bonzini
On 07/06/2017 17:39, Felipe Franciosi wrote: > >> On 7 Jun 2017, at 16:37, Peter Maydell wrote: >> >> On 7 June 2017 at 16:28, Paolo Bonzini wrote: >>> From: Felipe Franciosi >>> >>> This commit introduces a vhost-user device

Re: [Qemu-devel] [PATCH v2 6/7] qcow2: Pass a QEMUIOVector to do_perform_cow_{read, write}()

2017-06-07 Thread Manos Pitsidianakis
On Wed, Jun 07, 2017 at 05:08:27PM +0300, Alberto Garcia wrote: Instead of passing a single buffer pointer to do_perform_cow_write(), pass a QEMUIOVector. This will allow us to merge the write requests for the COW regions and the actual data into a single one. Although do_perform_cow_read()

Re: [Qemu-devel] GSoC 2017 Proposal: TCG performance enhancements

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 16:45, Lluís Vilanova wrote: > This speed comes at the cost of exposing TCG operations to the instrumentation > library (i.e., the library can inject TCG code; AFAIR, calling out into a > function in the instrumentation library is slower than PIN). Mmm,

[Qemu-devel] [RFC v2 8/8] hw/arm/virt: Add virtio-iommu the virt board

2017-06-07 Thread Eric Auger
The specific virtio-mmio node is inconditionally added on machine init while the binding between this latter and the PCIe host bridge is done on machine init done notifier, only if -device virtio-iommu-device was added to the qemu command line. Signed-off-by: Eric Auger

Re: [Qemu-devel] [PATCH] arm_gicv3: Fix ICC_BPR1 reset value when EL3 not implemented

2017-06-07 Thread Alex Bennée
Peter Maydell writes: > If EL3 is not implemented (ie only one security state) then the > one and only ICC_BPR1 register behaves like the Non-secure > ICC_BPR1 in an EL3-present configuration. In particular, its > reset value is GIC_MIN_BPR_NS, not GIC_MIN_BPR. > >

[Qemu-devel] [RFC v2 7/8] hw/arm/virt: Add 2.10 machine type

2017-06-07 Thread Eric Auger
The new machine type allows virtio-iommu instantiation. Signed-off-by: Eric Auger --- a Veuillez saisir le message de validation pour vos modifications. Les lignes --- hw/arm/virt.c | 24 ++-- include/hw/arm/virt.h | 1 + 2 files changed, 23

[Qemu-devel] [RFC v2 4/8] virtio-iommu: Decode the command payload

2017-06-07 Thread Eric Auger
This patch adds the command payload decoding and introduces the functions that will do the actual command handling. Those functions are not yet implemented. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 7 hw/virtio/virtio-iommu.c | 97

Re: [Qemu-devel] GSoC 2017 Proposal: TCG performance enhancements

2017-06-07 Thread Alex Bennée
Lluís Vilanova writes: > Paolo Bonzini writes: > >> On 07/06/2017 14:07, Peter Maydell wrote: My understanding was that adding a public instrumentation interface would add too much code maintenance overhead for a feature that is not in QEMU's core

[Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-07 Thread Eric Auger
This series implements the virtio-iommu device. This is a proof of concept based on the virtio-iommu specification written by Jean-Philippe Brucker [1]. This was tested with a guest using the virtio-iommu driver [2] and exposed with a virtio-net-pci using dma ops. The device gets instantiated

[Qemu-devel] [RFC v2 5/8] virtio_iommu: Add the iommu regions

2017-06-07 Thread Eric Auger
This patch initializes the iommu memory regions so that PCIe end point transactions get translated. The translation function is not yet implemented at that stage. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 1 + hw/virtio/virtio-iommu.c | 97

[Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-06-07 Thread Eric Auger
This patch adds the actual implementation for the translation routine and the virtio-iommu commands. Signed-off-by: Eric Auger --- v1 -> v2: - fix compilation issue reported by autobuild system --- hw/virtio/trace-events | 6 ++ hw/virtio/virtio-iommu.c | 202

Re: [Qemu-devel] [PATCH RFC] block: add throttle block filter driver

2017-06-07 Thread Manos Pitsidianakis
On Wed, Jun 07, 2017 at 10:40:08AM -0500, Eric Blake wrote: On 06/07/2017 08:06 AM, Manos Pitsidianakis wrote: This is part of my work for my GSOC project this summer. I am not sure if the count parameter in bdrv_co_pwrite_zeros and bdrv_co_pdiscard refers to sectors or bytes. Both refer to

[Qemu-devel] [RFC v2 1/8] update-linux-headers: import virtio_iommu.h

2017-06-07 Thread Eric Auger
Update the script to update the virtio_iommu.h header. Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 2f906c4..03f6712 100755 ---

[Qemu-devel] [RFC v2 2/8] linux-headers: Update for virtio-iommu

2017-06-07 Thread Eric Auger
This is a partial linux header update against Jean-Philippe's branch: git://linux-arm.org/linux-jpb.git virtio-iommu/base (unstable) Signed-off-by: Eric Auger --- include/standard-headers/linux/virtio_ids.h | 1 + include/standard-headers/linux/virtio_iommu.h | 142

Re: [Qemu-devel] [PATCH v2 2/7] qcow2: Use unsigned int for both members of Qcow2COWRegion

2017-06-07 Thread Eric Blake
On 06/07/2017 09:08 AM, Alberto Garcia wrote: > Qcow2COWRegion has two attributes: > > - The offset of the COW region from the start of the first cluster > touched by the I/O request. Since it's always going to be positive > and the maximum request size is at most INT_MAX, we can use a >

[Qemu-devel] [RFC v2 3/8] virtio_iommu: add skeleton

2017-06-07 Thread Eric Auger
This patchs adds the skeleton for the virtio-iommu device. Signed-off-by: Eric Auger --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-iommu.c | 247 +++ include/hw/virtio/virtio-iommu.h | 60 ++ 3 files

[Qemu-devel] [PATCH v4 6/7] target/arm: Try pc-relative addresses for movi

2017-06-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index fce382f..18708b1 100644 ---

[Qemu-devel] [PATCH v4 5/7] target/arm: Remove limit on code buffer size

2017-06-07 Thread Richard Henderson
Since we're no longer using a direct branch, we have no limit on the branch distance. Signed-off-by: Richard Henderson --- translate-all.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/translate-all.c b/translate-all.c index bb094ad..966747a 100644 --- a/translate-all.c

[Qemu-devel] [PATCH v4 3/7] tcg/aarch64: Use ADR in tcg_out_movi

2017-06-07 Thread Richard Henderson
The new placement of the TB means that we can use one insn to load the return value for exit_tb returning the TB pointer. --- tcg/aarch64/tcg-target.inc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index

[Qemu-devel] [PATCH v4 7/7] target/arm: Use ldr (literal) for goto_tb

2017-06-07 Thread Richard Henderson
The new placement of the TB means that we can use one insn to load the goto_tb destination directly from the TB. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v4 4/7] target/arm: Use indirect branch for goto_tb

2017-06-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 5 + tcg/arm/tcg-target.inc.c | 17 ++--- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 87ae10b..724ec73 100644 ---

[Qemu-devel] [PATCH v4 2/7] tcg: allocate TB structs before the corresponding translated code

2017-06-07 Thread Richard Henderson
From: "Emilio G. Cota" Allocating an arbitrarily-sized array of tbs results in either (a) a lot of memory wasted or (b) unnecessary flushes of the code cache when we run out of TB structs in the array. An obvious solution would be to just malloc a TB struct when needed, and keep

[Qemu-devel] [PATCH v4 1/7] util: add cacheinfo

2017-06-07 Thread Richard Henderson
From: "Emilio G. Cota" Add helpers to gather cache info from the host at init-time. For now, only export the host's I/D cache line sizes, which we will use to improve cache locality to avoid false sharing. Suggested-by: Richard Henderson Suggested-by: Geert

[Qemu-devel] [PATCH v4 0/7] tcg: allocate TB structs preceding translate

2017-06-07 Thread Richard Henderson
This is a follow-up to Emilio's patch set. My primary changes to Emilio's patches are to the first patch, in merging the existing implementations from tcg/ppc/tcg-target.inc.c into util/cacheinfo.c. Then I've a few follow-up patches to take advantage of the new TB placement for arm platforms.

Re: [Qemu-devel] GSoC 2017 Proposal: TCG performance enhancements

2017-06-07 Thread Lluís Vilanova
Paolo Bonzini writes: > On 07/06/2017 14:07, Peter Maydell wrote: >>> My understanding was that adding a public instrumentation interface would >>> add >>> too much code maintenance overhead for a feature that is not in QEMU's core >>> target. >> Well, it depends what you define as our core

Re: [Qemu-devel] [PULL 22/26] target/aarch64: optimize indirect branches

2017-06-07 Thread Alex Bennée
Alex Bennée writes: > Alex Bennée writes: > >> Alex Bennée writes: >> >>> Richard Henderson writes: >>> From: "Emilio G. Cota" Measurements: [Baseline

Re: [Qemu-devel] [RFC 0/8] VIRTIO-IOMMU device

2017-06-07 Thread Auger Eric
Hi, On 07/06/2017 17:00, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Message-id:

Re: [Qemu-devel] [PATCH 0/2] Add reduce image for qcow2

2017-06-07 Thread Kevin Wolf
Am 07.06.2017 um 15:37 hat Max Reitz geschrieben: > On 2017-06-01 13:11, Denis V. Lunev wrote: > > On 06/01/2017 12:12 PM, Kevin Wolf wrote: > >> Am 31.05.2017 um 17:03 hat Eric Blake geschrieben: > >>> On 05/31/2017 09:43 AM, Pavel Butsykin wrote: > This patch adds the reduction of the image

Re: [Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 16:39, Felipe Franciosi wrote: > >> On 7 Jun 2017, at 16:37, Peter Maydell wrote: >> >> On 7 June 2017 at 16:28, Paolo Bonzini wrote: >>> From: Felipe Franciosi >>> >>> This commit

Re: [Qemu-devel] GSoC 2017 Proposal: TCG performance enhancements

2017-06-07 Thread Lluís Vilanova
Peter Maydell writes: > On 7 June 2017 at 12:12, Lluís Vilanova wrote: >> My understanding was that adding a public instrumentation interface would add >> too much code maintenance overhead for a feature that is not in QEMU's core >> target. > Well, it depends what you

Re: [Qemu-devel] [PATCH v2 1/7] qcow2: Remove unused Error variable in do_perform_cow()

2017-06-07 Thread Eric Blake
On 06/07/2017 09:08 AM, Alberto Garcia wrote: > We are using the return value of qcow2_encrypt_sectors() to detect > problems but we are throwing away the returned Error since we have no > way to report it to the user. Therefore we can simply get rid of the > local Error variable and pass NULL

Re: [Qemu-devel] [PATCH RFC] block: add throttle block filter driver

2017-06-07 Thread Eric Blake
On 06/07/2017 08:06 AM, Manos Pitsidianakis wrote: > This is part of my work for my GSOC project this summer. > > I am not sure if the count parameter in bdrv_co_pwrite_zeros and > bdrv_co_pdiscard refers to sectors or bytes. Both refer to byte counts. (We're trying to get rid of as many

Re: [Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Felipe Franciosi
> On 7 Jun 2017, at 16:37, Peter Maydell wrote: > > On 7 June 2017 at 16:28, Paolo Bonzini wrote: >> From: Felipe Franciosi >> >> This commit introduces a vhost-user device for SCSI. This is based >> on the existing

Re: [Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 16:28, Paolo Bonzini wrote: > From: Felipe Franciosi > > This commit introduces a vhost-user device for SCSI. This is based > on the existing vhost-scsi implementation, but done over vhost-user > instead. It also uses a chardev to

Re: [Qemu-devel] [PATCH] block: fix external snapshot abort permission error

2017-06-07 Thread Eric Blake
On 06/07/2017 08:55 AM, Jeff Cody wrote: > In external_snapshot_abort(), we try to undo what was done in > external_snapshot_prepare() calling bdrv_replace_node() to swap the > nodes back. However, we receive a permissions error as writers are > blocked on the old node, which is now the new node

Re: [Qemu-devel] [PATCH v2 4/4] util/mmap-alloc: account for DAX device in qemu_fd_getpagesize

2017-06-07 Thread Stefan Hajnoczi
On Tue, Jun 06, 2017 at 03:22:29PM +0800, Haozhong Zhang wrote: > A DAX device may require a page size different than getpagesize(). > > Signed-off-by: Haozhong Zhang > --- > include/qemu/osdep.h | 10 ++ > util/mmap-alloc.c| 6 ++ > util/osdep.c

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-07 Thread Stefan Hajnoczi
On Wed, Jun 07, 2017 at 04:06:39PM +0800, Haozhong Zhang wrote: > Per ACPI 6.2, section 5.2.25.6 and JEDEC Annex L Release 3, the > current region format interface code 0x201 indicates the block > addressed function interface 1, rather than a byte addressable > interface. Fix it by using 0x301

[Qemu-devel] [PATCH] arm_gicv3: Fix ICC_BPR1 reset value when EL3 not implemented

2017-06-07 Thread Peter Maydell
If EL3 is not implemented (ie only one security state) then the one and only ICC_BPR1 register behaves like the Non-secure ICC_BPR1 in an EL3-present configuration. In particular, its reset value is GIC_MIN_BPR_NS, not GIC_MIN_BPR. Correct the erroneous reset value; this fixes a problem where we

Re: [Qemu-devel] [PATCH v2 1/4] nvdimm: add a macro for property "label-size"

2017-06-07 Thread Stefan Hajnoczi
On Tue, Jun 06, 2017 at 03:22:26PM +0800, Haozhong Zhang wrote: > Signed-off-by: Haozhong Zhang > --- > hw/mem/nvdimm.c | 2 +- > include/hw/mem/nvdimm.h | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL v5 00/33] Misc patches for 2017-06-01

2017-06-07 Thread Paolo Bonzini
The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into staging (2017-06-06 17:00:12 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to

[Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user device for SCSI. This is based on the existing vhost-scsi implementation, but done over vhost-user instead. It also uses a chardev to connect to the backend. Unlike vhost-scsi (today), VMs using vhost-user-scsi can be

Re: [Qemu-devel] [PATCH v2 3/4] nvdimm: add a boolean option "restrict"

2017-06-07 Thread Stefan Hajnoczi
On Tue, Jun 06, 2017 at 03:22:28PM +0800, Haozhong Zhang wrote: > If a vNVDIMM device is not backed by a DAX device and its "restrict" > option is enabled, bit 3 of state flags in its region mapping > structure will be set, in order to notify the guest of the lack of > write persistence guarantee.

Re: [Qemu-devel] [PULL 22/26] target/aarch64: optimize indirect branches

2017-06-07 Thread Alex Bennée
Alex Bennée writes: > Alex Bennée writes: > >> Richard Henderson writes: >> >>> From: "Emilio G. Cota" >>> >>> Measurements: >>> >>> [Baseline performance is that before applying this and the previous >>>

Re: [Qemu-devel] [PULL v4 00/33] Misc patches for 2017-06-01

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 14:55, Paolo Bonzini wrote: > The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: > > Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into > staging (2017-06-06 17:00:12 +0100) > > are available in the git

Re: [Qemu-devel] [PATCH v2 2/4] nvdimm: warn if the backend is not a DAX device

2017-06-07 Thread Stefan Hajnoczi
On Tue, Jun 06, 2017 at 03:22:27PM +0800, Haozhong Zhang wrote: > diff --git a/util/osdep.c b/util/osdep.c > index a2863c8e53..02881f96bc 100644 > --- a/util/osdep.c > +++ b/util/osdep.c > @@ -471,3 +471,64 @@ writev(int fd, const struct iovec *iov, int iov_cnt) > return readv_writev(fd, iov,

Re: [Qemu-devel] [PULL 0/7] Migration PULL requset

2017-06-07 Thread Peter Maydell
nks, Juan. > > The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: > > Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into > staging (2017-06-06 17:00:12 +0100) > > are available in the git repository at: > > git://githu

Re: [Qemu-devel] [RFC 0/8] VIRTIO-IOMMU device

2017-06-07 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1496824556-1883-1-git-send-email-eric.au...@redhat.com Subject: [Qemu-devel] [RFC 0/8] VIRTIO-IOMMU device Type:

Re: [Qemu-devel] [Bug 893956] Re: qemu-img bug with dynamic vhd

2017-06-07 Thread Bobby Dimmette
No, sorry. The environment was retired in 2014 and we took a different direction. -Bobby -Original Message- From: boun...@canonical.com [mailto:boun...@canonical.com] On Behalf Of Thomas Huth Sent: Wednesday, June 07, 2017 4:44 AM To: bjdimme...@gmail.com Subject: [Bug 893956] Re:

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 03:56 PM, Juan Quintela wrote: Alexey Perevalov wrote: +static unsigned long get_copiedmap_size(RAMBlock *rb) +{ +unsigned long pages; +pages = rb->max_length >> find_first_bit((unsigned long *)>page_size, +

Re: [Qemu-devel] [PATCH v2 0/2] aspeed: add a TMP421 device to the palmetto machine

2017-06-07 Thread Peter Maydell
On 6 June 2017 at 09:53, Cédric Le Goater wrote: > Hello, > > This series fixes issues in the TMP421 model previously sent and adds > such a device to the palmetto machine. > > Thanks, > > C. > > Cédric Le Goater (2): > hw/misc: add a TMP42{1,2,3} device model > aspeed: add a

Re: [Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread Paolo Bonzini
On 07/06/2017 09:33, Thomas Huth wrote: > On 07.06.2017 09:07, David Gibson wrote: >> The pseries machine type doesn't usually use the 'pvpanic' device as such, >> because it has a firmware/hypervisor facility with roughly the same >> purpose. The 'ibm,os-term' RTAS call notifies the hypervisor

Re: [Qemu-devel] [PATCH v2] configure: split c and cxx extra flags

2017-06-07 Thread Stefan Hajnoczi
On Tue, Jun 06, 2017 at 02:07:47PM +0100, Bruno Dominguez wrote: > There was no possibility to add specific cxx flags using the configure > file. So A new entrance has been created to support it. > > Duplication of information in configure and rules.mak. Taking > QEMU_CFLAGS and add them to

Re: [Qemu-devel] [PATCH] timer.h: Provide better monotonic time

2017-06-07 Thread Peter Maydell
On 5 June 2017 at 10:27, Paolo Bonzini wrote: > > > On 02/06/2017 14:24, Peter Maydell wrote: >> On 18 April 2017 at 20:18, Pranith Kumar wrote: >>> Tested and confirmed that the stretch i386 debian qcow2 image on a >>> raspberry pi 2 works. >>> >>>

Re: [Qemu-devel] [PULL 22/26] target/aarch64: optimize indirect branches

2017-06-07 Thread Alex Bennée
Alex Bennée writes: > Richard Henderson writes: > >> From: "Emilio G. Cota" >> >> Measurements: >> >> [Baseline performance is that before applying this and the previous >> commit] > > Sadly this has regressed my qemu-system-aarch64

[Qemu-devel] [Bug 1696353] Re: golang binaries fail to start under linux-user

2017-06-07 Thread Will Newton
True, but it used to work albeit with slightly wrong semantics. It now fails hard even though the golang runtime doesn't make any use of Sys V semaphores so the presence of the flag is not noticeable by any normal user. -- You received this bug notification because you are a member of qemu-

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 12:46 PM, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in

Re: [Qemu-devel] [PULL 22/26] target/aarch64: optimize indirect branches

2017-06-07 Thread Alex Bennée
Richard Henderson writes: > From: "Emilio G. Cota" > > Measurements: > > [Baseline performance is that before applying this and the previous > commit] Sadly this has regressed my qemu-system-aarch64 EL2 run. It was slightly masked by an unrelated assertion

[Qemu-devel] [PATCH v2 5/7] qcow2: Allow reading both COW regions with only one request

2017-06-07 Thread Alberto Garcia
Reading both COW regions requires two separate requests, but it's perfectly possible to merge them and perform only one. This generally improves performance, particularly on rotating disk drives. The downside is that the data in the middle region is read but discarded. This patch takes a

[Qemu-devel] [PATCH v2 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write()

2017-06-07 Thread Alberto Garcia
This patch splits do_perform_cow() into three separate functions to read, encrypt and write the COW regions. perform_cow() can now read both regions first, then encrypt them and finally write them to disk. The memory allocation is also done in this function now, using one single buffer large

[Qemu-devel] [PATCH v2 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-06-07 Thread Alberto Garcia
Hi all, here's a patch series that rewrites the copy-on-write code in the qcow2 driver to reduce the number of I/O operations. This is version v2, please refer to the original e-mail for a complete description: https://lists.gnu.org/archive/html/qemu-block/2017-05/msg00882.html Regards, Berto

[Qemu-devel] [PATCH v2 7/7] qcow2: Merge the writing of the COW regions with the guest data

2017-06-07 Thread Alberto Garcia
If the guest tries to write data that results on the allocation of a new cluster, instead of writing the guest data first and then the data from the COW regions, write everything together using one single I/O operation. This can improve the write performance by 25% or more, depending on several

[Qemu-devel] [PATCH v2 3/7] qcow2: Make perform_cow() call do_perform_cow() twice

2017-06-07 Thread Alberto Garcia
Instead of calling perform_cow() twice with a different COW region each time, call it just once and make perform_cow() handle both regions. This patch simply moves code around. The next one will do the actual reordering of the COW operations. Signed-off-by: Alberto Garcia ---

[Qemu-devel] [PATCH v2 6/7] qcow2: Pass a QEMUIOVector to do_perform_cow_{read, write}()

2017-06-07 Thread Alberto Garcia
Instead of passing a single buffer pointer to do_perform_cow_write(), pass a QEMUIOVector. This will allow us to merge the write requests for the COW regions and the actual data into a single one. Although do_perform_cow_read() does not strictly need to change its API, we're doing it here as well

[Qemu-devel] [PATCH v2 2/7] qcow2: Use unsigned int for both members of Qcow2COWRegion

2017-06-07 Thread Alberto Garcia
Qcow2COWRegion has two attributes: - The offset of the COW region from the start of the first cluster touched by the I/O request. Since it's always going to be positive and the maximum request size is at most INT_MAX, we can use a regular unsigned int to store this offset. - The size of

[Qemu-devel] [PATCH v2 1/7] qcow2: Remove unused Error variable in do_perform_cow()

2017-06-07 Thread Alberto Garcia
We are using the return value of qcow2_encrypt_sectors() to detect problems but we are throwing away the returned Error since we have no way to report it to the user. Therefore we can simply get rid of the local Error variable and pass NULL instead. Alternatively we could try to figure out a way

Re: [Qemu-devel] [PATCH v3 1/2 -- fixed] util: add cacheinfo

2017-06-07 Thread Pranith Kumar
On Tue, Jun 6, 2017 at 8:17 PM, Emilio G. Cota wrote: > Add helpers to gather cache info from the host at init-time. > > For now, only export the host's I/D cache line sizes, which we > will use to improve cache locality to avoid false sharing. > > Suggested-by: Richard Henderson

Re: [Qemu-devel] [PULL 0/1] M68k for 2.10 patches

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 10:30, Laurent Vivier wrote: > The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: > > Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into > staging (2017-06-06 17:00:12 +0100) > > are available in the git

[Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user device for SCSI. This is based on the existing vhost-scsi implementation, but done over vhost-user instead. It also uses a chardev to connect to the backend. Unlike vhost-scsi (today), VMs using vhost-user-scsi can be

[Qemu-devel] [PATCH] block: fix external snapshot abort permission error

2017-06-07 Thread Jeff Cody
In external_snapshot_abort(), we try to undo what was done in external_snapshot_prepare() calling bdrv_replace_node() to swap the nodes back. However, we receive a permissions error as writers are blocked on the old node, which is now the new node backing file. An easy fix (initially suggested

[Qemu-devel] [PULL 33/33] docs: create config/, devel/ and spin/ subdirectories

2017-06-07 Thread Paolo Bonzini
Developer documentation should be its own manual. As a start, move all developer-oriented files to a separate directory. Also move non-text files to their own directories: docs/config/ for QEMU -readconfig input, and docs/spin/ for formal models to be used with the SPIN model checker.

[Qemu-devel] [PULL v4 00/33] Misc patches for 2017-06-01

2017-06-07 Thread Paolo Bonzini
The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into staging (2017-06-06 17:00:12 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to

Re: [Qemu-devel] [PATCH v3 1/1] coroutine-lock: do not touch coroutine after another one has been entered

2017-06-07 Thread Stefan Hajnoczi
On Thu, Jun 01, 2017 at 06:08:47PM +0200, Roman Pen wrote: > Submission of requests on linux aio is a bit tricky and can lead to > requests completions on submission path: > > 44713c9e8547 ("linux-aio: Handle io_submit() failure gracefully") > 0ed93d84edab ("linux-aio: process completions from

Re: [Qemu-devel] [PATCH v2 05/45] qdev: remove PropertyInfo.qtype field

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 14:09, Markus Armbruster wrote: > Peter Maydell writes: >> So how should I obtain those semantics with this cleanup in place ? > > Two ways come to mind: > > * Define a PropertyInfo like qdev_prop_uint32 with a null >

Re: [Qemu-devel] [PATCH 0/2] Add reduce image for qcow2

2017-06-07 Thread Max Reitz
On 2017-06-01 13:11, Denis V. Lunev wrote: > On 06/01/2017 12:12 PM, Kevin Wolf wrote: >> Am 31.05.2017 um 17:03 hat Eric Blake geschrieben: >>> On 05/31/2017 09:43 AM, Pavel Butsykin wrote: This patch adds the reduction of the image file for qcow2. As a result, this allows us to

Re: [Qemu-devel] GSoC 2017 Proposal: TCG performance enhancements

2017-06-07 Thread Paolo Bonzini
On 07/06/2017 14:07, Peter Maydell wrote: >> My understanding was that adding a public instrumentation interface would add >> too much code maintenance overhead for a feature that is not in QEMU's core >> target. > Well, it depends what you define as our core target :-) > I think we get quite a

Re: [Qemu-devel] [PATCH v3 0/4] tcg: split the tcg code and separate tcg files

2017-06-07 Thread Paolo Bonzini
On 02/06/2017 08:06, Yang Zhong wrote: > In order to disable tcg, the first phase is to split some > tcg code and separate those tcg related files into one > directory. The next phase will disable tcg more easily and > cleanly. > > In the first phase, there are four patches to deal with split

[Qemu-devel] [Bug 1525676] Re: qemu runas and sandbox option incompatible, process will hang in futex after setgid

2017-06-07 Thread Simon Déziel
There is some overlap with LP: #1675114 so you might be interested to know that @otubo is working on refactoring seccomp for upstream. No firm ETA yet but he thinks that 18.04 would be doable. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

[Qemu-devel] [Bug 1696353] Re: golang binaries fail to start under linux-user

2017-06-07 Thread Peter Maydell
The problem with doing that is that it doesn't actually change the behaviour. We use pthread_create to create the new thread, which glibc does with a clone with CLONE_SYSVSEM set. We can't tell the difference between "guest program needs the new threads to not share SysV semaphore behaviour" and

Re: [Qemu-devel] [PATCH v8 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Juan Quintela
Alexey Perevalov wrote: > This patch provides blocktime calculation per vCPU, > as a summary and as a overlapped value for all vCPUs. > > This approach was suggested by Peter Xu, as an improvements of > previous approch where QEMU kept tree with faulted page address and

Re: [Qemu-devel] [PATCH v2 05/45] qdev: remove PropertyInfo.qtype field

2017-06-07 Thread Markus Armbruster
Peter Maydell writes: > On 1 June 2017 at 12:19, Markus Armbruster wrote: >> Lovely cleanup. >> >> The interesting part is the move of the bits controlling use of ->defval >> from Property member .qtype (set only by DEFINE_PROP_foo() macros) to >>

Re: [Qemu-devel] [PATCH v8 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 03:52 PM, Juan Quintela wrote: Alexey Perevalov wrote: Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff

[Qemu-devel] [PATCH RFC] block: add throttle block filter driver

2017-06-07 Thread Manos Pitsidianakis
This is part of my work for my GSOC project this summer. I am not sure if the count parameter in bdrv_co_pwrite_zeros and bdrv_co_pdiscard refers to sectors or bytes. Should this be handled differently? The driver can only be instantiated in the command line for now like in the following

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2017 at 11:44:43AM +0800, Peter Xu wrote: > On Wed, Jun 07, 2017 at 09:47:05AM +1000, David Gibson wrote: > > On Tue, Jun 06, 2017 at 04:34:30PM +0200, Paolo Bonzini wrote: > > > > > > > > > On 05/06/2017 05:07, Peter Xu wrote: > > > > I don't sure whether it'll be a good

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-07 Thread Paolo Bonzini
On 07/06/2017 01:47, David Gibson wrote: >> I would ask David. There are PowerPC MMUs that allow fast lookup of >> arbitrarily-sized windows (not necessarily power of two), > > Uh.. I'm not sure what you mean here. You might be thinking of the > BATs which really old (32-bit) PowerPC MMUs had

Re: [Qemu-devel] [PATCH v8 08/11] migration: postcopy_place_page factoring out

2017-06-07 Thread Juan Quintela
Alexey Perevalov wrote: > Need to mark paged copied as closer as possible place where it > tracks down. That will be necessary in futher patch. > > Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Juan Quintela
Alexey Perevalov wrote: > +static unsigned long get_copiedmap_size(RAMBlock *rb) > +{ > +unsigned long pages; > +pages = rb->max_length >> find_first_bit((unsigned long *)>page_size, > + sizeof(rb->page_size)); > +

[Qemu-devel] [Bug 1696353] [NEW] golang binaries fail to start under linux-user

2017-06-07 Thread Will Newton
Public bug reported: With current master golang binaries fail when run under linux-user, for example: [will@localhost qemu]$ ./arm-linux-user/qemu-arm glide runtime: failed to create new OS thread (have 2 already; errno=22) fatal error: newosproc runtime stack: runtime.throw(0x45f879, 0x9)

Re: [Qemu-devel] [PATCH v8 06/11] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 03:43 PM, Juan Quintela wrote: Alexey Perevalov wrote: This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. I think this function is wrong migration_exit_cb will be called at QEMU exit,

Re: [Qemu-devel] [PATCH v8 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Juan Quintela
Alexey Perevalov wrote: > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Alexey Perevalov > --- > docs/migration.txt | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/migration.txt

<    1   2   3   4   5   >