[Qemu-devel] [PATCH] qemu-ga: do not run qga test when guest agent disabled

2016-04-19 Thread Yang Hongyang
When configure with --disable-guest-agent, make check will fail with: ERROR:tests/test-qga.c:74:fixture_setup: assertion failed (error == NULL): Failed to execute child process "/home/xx/qemu/qemu-ga" (No such file or directory) (g-exec-error-quark, 8) make: *** [check-tests/test-qga] Error 1 Thi

Re: [Qemu-devel] [PATCH for-2.6] fw_cfg: Adopt /opt/RFQDN convention

2016-04-19 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Mon, Apr 18, 2016 at 06:42:09PM +0200, Markus Armbruster wrote: >> FW CFG's primary user is QEMU, which uses it to expose configuration >> information (in the widest sense) to Firmware. Thus the name FW CFG. >> >> FW CFG can also be used by others for their own

Re: [Qemu-devel] [PATCH] qemu-ga: do not run qga test when guest agent disabled

2016-04-19 Thread Yang Hongyang
I think this patch should also be backported to stable v2.5.1 On Tue, Apr 19, 2016 at 3:39 PM, Yang Hongyang wrote: > When configure with --disable-guest-agent, make check will fail with: > ERROR:tests/test-qga.c:74:fixture_setup: assertion failed (error == NULL): > Failed to execute child proc

Re: [Qemu-devel] [PATCH for-2.6] fw_cfg: Adopt /opt/RFQDN convention

2016-04-19 Thread Markus Armbruster
Eric Blake writes: > On 04/18/2016 10:42 AM, Markus Armbruster wrote: >> FW CFG's primary user is QEMU, which uses it to expose configuration >> information (in the widest sense) to Firmware. Thus the name FW CFG. >> >> FW CFG can also be used by others for their own purposes. QEMU is >> merel

[Qemu-devel] [RFC v3] virtio-crypto specification

2016-04-19 Thread Gonglei (Arei)
Hi all, This is the specification (version 3) about a new virtio crypto device. Changes from v2: - Reserve virtio device ID 20 for crypto device. [Cornelia] - Drop all feature bits, those capabilities are offered by the device all the time. [Stefan & Cornelia] - Add a new section 1.4.2 for

[Qemu-devel] [PATCH v4 00/16] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-04-19 Thread Peter Xu
Jan, Michael, Still haven't got your response from v3 review comments, but I decided to move on to provide a workable version first (v3 is missing the first patch, so it is not working). Also, misc issues are addressed from Radim. Anyway, I am always ready for v5 and further. :) Github branch for

[Qemu-devel] [PATCH v4 02/16] intel_iommu: allow queued invalidation for IR

2016-04-19 Thread Peter Xu
Queued invalidation is required for IR. This patch add basic support for interrupt cache invalidate requests. Since we currently have no IR cache implemented yet, we can just skip all interrupt cache invalidation requests for now. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 9 ++

[Qemu-devel] [PATCH v4 05/16] intel_iommu: define interrupt remap table addr register

2016-04-19 Thread Peter Xu
Defined Interrupt Remap Table Address register to store IR table pointer. Also, do proper handling on global command register writes to store table pointer and its size. One more debug flag "DEBUG_IR" is added for interrupt remapping. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c |

[Qemu-devel] [PATCH v4 12/16] ioapic: introduce ioapic_entry_parse() helper

2016-04-19 Thread Peter Xu
Abstract IOAPIC entry parsing logic into a helper function. Signed-off-by: Peter Xu --- hw/intc/ioapic.c | 110 +++ 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 92334a6..d6e88d5 10064

[Qemu-devel] [PATCH v4 01/16] acpi: enable INTR for DMAR report structure

2016-04-19 Thread Peter Xu
Introduce iommu_intr in MachineState to show whether IOMMU IR is enabled. By default, IR is off. In ACPI DMA remapping report structure, enable INTR flag when specified. Signed-off-by: Peter Xu --- hw/core/machine.c | 2 ++ hw/i386/acpi-build.c | 12 +--- include/h

[Qemu-devel] [PATCH v4 06/16] intel_iommu: handle interrupt remap enable

2016-04-19 Thread Peter Xu
Handle writting to IRE bit in global command register. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 00b873c..4d14124 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386

[Qemu-devel] [PATCH v4 08/16] intel_iommu: provide helper function vtd_get_iommu

2016-04-19 Thread Peter Xu
Moves acpi_get_iommu() under VT-d to make it a public function. Signed-off-by: Peter Xu --- hw/i386/acpi-build.c | 7 +-- hw/i386/intel_iommu.c | 13 + include/hw/i386/intel_iommu.h | 2 ++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/i386

[Qemu-devel] [PATCH v4 14/16] q35: add "int-remap" flag to enable intr

2016-04-19 Thread Peter Xu
One flag is added to specify whether to enable INTR for emulated IOMMU. By default, interrupt remapping is not supportted. To enable it, we should specify something like: $ qemu-system-x86_64 -M q35,iommu=on,intr=on To be more clear, the following command: $ qemu-system-x86_64 -M q35,iommu=on W

[Qemu-devel] [PATCH v4 03/16] intel_iommu: set IR bit for ECAP register

2016-04-19 Thread Peter Xu
Enable IR in IOMMU Extended Capability register. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 7 +++ hw/i386/intel_iommu_internal.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 4b0558e..17668d6 100644 --- a/hw/i386

[Qemu-devel] [PATCH v4 09/16] intel_iommu: add IR translation faults defines

2016-04-19 Thread Peter Xu
Adding translation fault definitions for interrupt remapping. Please refer to VT-d spec section 7.1. Signed-off-by: Peter Xu --- hw/i386/intel_iommu_internal.h | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index

[Qemu-devel] [PATCH v4 10/16] intel_iommu: Add support for PCI MSI remap

2016-04-19 Thread Peter Xu
This patch enables interrupt remapping for PCI devices. To play the trick, one memory region "iommu_ir" is added as child region of the original iommu memory region, covering range 0xfeeX (which is the address range for APIC). All the writes to this range will be taken as MSI, and translation

[Qemu-devel] [PATCH v4 04/16] acpi: add DMAR scope definition for root IOAPIC

2016-04-19 Thread Peter Xu
To enable interrupt remapping for intel IOMMU device, each IOAPIC device in the system reported via ACPI MADT must be explicitly enumerated under one specific remapping hardware unit. This patch adds the root-complex IOAPIC into the default DMAR device. Please refer to VT-d spec 8.3.1.1 for more i

[Qemu-devel] [PATCH v4 11/16] q35: ioapic: add support for emulated IOAPIC IR

2016-04-19 Thread Peter Xu
This patch translates all IOAPIC interrupts into MSI ones. One pseudo ioapic address space is added to transfer the MSI message. By default, it will be system memory address space. When IR is enabled, it will be IOMMU address space. Currently, only emulated IOAPIC is supported. Idea suggested by

[Qemu-devel] [PATCH v4 07/16] intel_iommu: define several structs for IOMMU IR

2016-04-19 Thread Peter Xu
Several data structs are defined to better support the rest of the patches: IRTE to parse remapping table entries, and IOAPIC/MSI related structure bits to parse interrupt entries to be filled in by guest kernel. Signed-off-by: Peter Xu --- include/hw/i386/intel_iommu.h | 60

[Qemu-devel] [PATCH v4 16/16] ioapic: register VT-d IEC invalidate notifier

2016-04-19 Thread Peter Xu
Let IOAPIC the first consumer of VT-d IEC invalidation notifiers. This is only used for split irqchip case, when VT-d receives IR invalidation requests, IOAPIC will be notified to update kernel irq routes. For simplicity, we just update all IOAPIC routes, even if the invalidated entries are not IOA

[Qemu-devel] [PATCH v4 13/16] intel_iommu: add support for split irqchip

2016-04-19 Thread Peter Xu
In split irqchip mode, IOAPIC is working in user space, only update kernel irq routes when entry changed. When IR is enabled, we directly update the kernel with translated messages. It works just like a kernel cache for the remapping entries. Since KVM irqfd is using kernel gsi routes to deliver i

[Qemu-devel] [PATCH v4 15/16] intel_iommu: introduce IEC notifiers

2016-04-19 Thread Peter Xu
This patch introduces Intel VT-d IEC (Interrupt Entry Cache) invalidation notifier list. When vIOMMU receives IEC invalidate request, all the registered units will be notified with specific invalidation requests. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 52 +++

Re: [Qemu-devel] [PATCH 1/2] block: Invalidate all children

2016-04-19 Thread Changlong Xie
On 04/19/2016 09:42 AM, Fam Zheng wrote: Currently we only recurse to bs->file, which will miss the children in quorum and VMDK. Recurse into the whole subtree to avoid that. Signed-off-by: Fam Zheng --- block.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) di

Re: [Qemu-devel] [PATCH v5 9/9] target-mips: Clean up position of abs2008/nan2008 cases in genfarith()

2016-04-19 Thread Aleksandar Markovic
Diff looks messy, but, in fact, this change is just changing location of six cases in gen_farith(). This is illustrated in the diagram below: (I added indentation of 2 spaces for abs2008-related cases, and 4 spaces for nan2008-related cases, to stress the effect of grouping cases with similar hand

Re: [Qemu-devel] [Qemu-block] [PATCH v4 8/8] linux-aio: share one LinuxAioState within an AioContext

2016-04-19 Thread Stefan Hajnoczi
On Thu, Apr 07, 2016 at 06:33:36PM +0200, Paolo Bonzini wrote: > This has better performance because it executes fewer system calls > and does not use a bottom half per disk. Each aio_context_t is initialized for 128 in-flight requests in laio_init(). Will it be possible to hit the limit now that

Re: [Qemu-devel] last call for bugs that need to be fixed for 2.6 release!

2016-04-19 Thread Kevin Wolf
Am 18.04.2016 um 13:22 hat Peter Maydell geschrieben: > Hi; looking at http://wiki.qemu.org/Planning/2.6#Known_issues and > the mailing list we seem to be in reasonable shape for the 2.6 release. > I would ideally like the 2.6rc3 tarball which we will make later this > week to be the final one befo

Re: [Qemu-devel] [Qemu-block] [PATCH v4 0/8] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-19 Thread Stefan Hajnoczi
On Thu, Apr 07, 2016 at 06:33:28PM +0200, Paolo Bonzini wrote: > Patch 1 comes from Kevin's series to do BlockBackend throttling. > > Patches 2-6 are from my bdrv_drain patches. They apply on top of Fam's > patch (which will be in 2.6) that introduces bdrv_co_drain. Patch 4 > is new in this vers

Re: [Qemu-devel] [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Mon, Apr 18, 2016 at 02:29:33PM -0400, David Woodhouse wrote: > On Mon, 2016-04-18 at 19:27 +0300, Michael S. Tsirkin wrote: > > I balk at adding more hacks to a broken system. My goals are > > merely to > > - make things work correctly with an IOMMU and new guests, > >   so people can use users

Re: [Qemu-devel] [PATCH] hid: Extend the event queue size to 1024

2016-04-19 Thread Juan Quintela
Alexander Graf wrote: > We can currently buffer up to 16 events in our event queue for input > devices. While it sounds like 16 events backlog for everyone should > be enough, our automated testing tools (OpenQA) manage to easily > type faster than our guests can handle. > > So we run into queue o

Re: [Qemu-devel] [PULL 0/1] X86 fix for 2.6.0-rc3

2016-04-19 Thread Peter Maydell
On 18 April 2016 at 20:04, Eduardo Habkost wrote: > Last-minute fix. Still in time for -rc3, I hope. > > The following changes since commit 92b674b62a1aec734280c9019cfb3b3745044b66: > > Merge remote-tracking branch 'remotes/afaerber/tags/qom-cpu-for-peter' into > staging (2016-04-18 17:42:59 +0

Re: [Qemu-devel] [PATCH v2 REPOST 1/2] Add dynamic module loading for block drivers

2016-04-19 Thread Stefan Hajnoczi
On Tue, Apr 12, 2016 at 02:41:13PM +0100, Richard W.M. Jones wrote: > From: Marc Marí > > Extend the current module interface to allow for block drivers to be loaded > dynamically on request. I like this approach to run-time loading QEMU modules because it's not a plugin system that would inevit

[Qemu-devel] [PATCH for-2.6] Update language files for QEMU 2.6.0

2016-04-19 Thread Peter Maydell
Update translation files (change created via 'make -C po update'). Signed-off-by: Peter Maydell --- po/de_DE.po| 36 ++-- po/fr_FR.po| 36 ++-- po/hu.po | 36 ++-- po/it.po | 36 ++

Re: [Qemu-devel] [PATCH RFC 3/3] vfio: add virtio pci quirk

2016-04-19 Thread Michael S. Tsirkin
On Mon, Apr 18, 2016 at 02:00:06PM -0600, Alex Williamson wrote: > On Mon, 18 Apr 2016 12:58:28 +0300 > "Michael S. Tsirkin" wrote: > > > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > > to signal they are safe to use with an IOMMU. > > > > Without this bit, exposing the device to u

Re: [Qemu-devel] [PATCH v3 01/10] tcg: Clean up direct block chaining data fields

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > Briefly describe in a comment how direct block chaining is done. It > should help in understanding of the following data fields. > > Rename some fields in TranslationBlock and TCGContext structures to > better reflect their purpose (dropping exc

[Qemu-devel] [PATCH 0/3] block: Fix drive-mirror with image size unaligned with granularity

2016-04-19 Thread Fam Zheng
This fixes the bug introduced in e5b43573e28 and lately noticed by Kevin. Fam Zheng (3): mirror: Don't extend the last sub-chunk iotests: Add iotests.image_size iotests: Test case for drive-mirror with unaligned image size block/mirror.c| 10 + tests/qemu-iotests/10

[Qemu-devel] [PATCH 2/3] iotests: Add iotests.image_size

2016-04-19 Thread Fam Zheng
This retrieves the virtual size of the image out of qemu-img info. Signed-off-by: Fam Zheng --- tests/qemu-iotests/iotests.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index d9ef60e..56f988a 100644 --- a/tests/qemu-iot

[Qemu-devel] [PATCH 1/3] mirror: Don't extend the last sub-chunk

2016-04-19 Thread Fam Zheng
The last sub-chunk is rounded up to the copy granularity in the target image, resulting in a larger size than the source. Add a function to clip the copied sectors to the end. This undoes the "wrong" changes to tests/qemu-iotests/109.out in e5b43573e28. The remaining two offset changes are okay.

Re: [Qemu-devel] [v2, 1/3] powerpc: scan_features() updates incorrect bits for REAL_LE

2016-04-19 Thread Michael Ellerman
On Mon, 2016-18-04 at 10:36:07 UTC, Michael Ellerman wrote: > From: Anton Blanchard > > The REAL_LE feature entry in the ibm_pa_feature struct is missing an MMU > feature value, meaning all the remaining elements initialise the wrong > values. ... > > Fix the code by adding the missing initialis

[Qemu-devel] [PATCH 3/3] iotests: Test case for drive-mirror with unaligned image size

2016-04-19 Thread Fam Zheng
This is the regression test for the virtual size mismatch issue between target and source images. Signed-off-by: Fam Zheng --- tests/qemu-iotests/152 | 51 ++ tests/qemu-iotests/152.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed

Re: [Qemu-devel] [3/3] powerpc: Update TM user feature bits in scan_features()

2016-04-19 Thread Michael Ellerman
On Fri, 2016-15-04 at 02:08:19 UTC, Unknown sender due to SPF wrote: > We need to update the user TM feature bits (PPC_FEATURE2_HTM and > PPC_FEATURE2_HTM) to mirror what we do with the kernel TM feature > bit. > > At the moment, if firmware reports TM is not available we turn off > the kernel TM

Re: [Qemu-devel] [2/3] powerpc: Update cpu_user_features2 in scan_features()

2016-04-19 Thread Michael Ellerman
On Fri, 2016-15-04 at 02:07:24 UTC, Unknown sender due to SPF wrote: > scan_features() updates cpu_user_features but not cpu_user_features2. > > Amongst other things, cpu_user_features2 contains the user TM feature > bits which we must keep in sync with the kernel TM feature bit. > > Signed-off-b

[Qemu-devel] how to enable nvme device in Qemu?

2016-04-19 Thread Qingtao Sun
Hi all, I want to boot OS from NVMe device in qemu-2.5.1. But I didn't find the bootable NVMe device in guest BIOS. How to enable this feature? Thanks! Qingtao Architect Mobile: +86 18301029918 Email: qingtao@memblaze.com Website: http://www.memblaz

Re: [Qemu-devel] [PATCH] cadence_uart: bounds check write offset

2016-04-19 Thread Peter Maydell
On 18 April 2016 at 21:50, Alistair Francis wrote: > On Mon, Apr 18, 2016 at 3:10 AM, Peter Maydell > wrote: >> CCing the maintainers for this device... >> >> On 18 April 2016 at 11:07, Michael S. Tsirkin wrote: >>> cadence_uart_init() initializes an I/O memory region of size 0x1000 >>> bytes.

Re: [Qemu-devel] [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Mon, Apr 18, 2016 at 12:24:15PM -0700, Andy Lutomirski wrote: > On Mon, Apr 18, 2016 at 11:29 AM, David Woodhouse wrote: > > For x86, you *can* enable virtio-behind-IOMMU if your DMAR tables tell > > the truth, and even legacy kernels ought to cope with that. > > FSVO 'ought to' where I suspect

Re: [Qemu-devel] [PATCH v3 02/10] tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > These fields do not contain pure pointers to a TranslationBlock > structure. So uintptr_t is the most appropriate type for them. > Also put an assert to assure that the two least significant bits of the > pointer are zero before assigning it to

Re: [Qemu-devel] last call for bugs that need to be fixed for 2.6 release!

2016-04-19 Thread Jeff Cody
On Tue, Apr 19, 2016 at 11:10:12AM +0200, Kevin Wolf wrote: > Am 18.04.2016 um 13:22 hat Peter Maydell geschrieben: > > Hi; looking at http://wiki.qemu.org/Planning/2.6#Known_issues and > > the mailing list we seem to be in reasonable shape for the 2.6 release. > > I would ideally like the 2.6rc3 t

Re: [Qemu-devel] [PATCH v3 04/10] tcg: Init TB's direct jumps before making it visible

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > Initialize TB's direct jump list data fields and reset the jumps before > tb_link_page() puts it into the physical hash table and the physical > page list. So TB is completely initialized before it becomes visible. > > Signed-off-by: Sergey Fedo

Re: [Qemu-devel] [PATCH v3 05/10] tcg: Clarify thread safety check in tb_add_jump()

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > The check is to make sure that another thread hasn't already done the > same while we were outside of tb_lock. Mention this in a comment. > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov > --- > > Changes in v2: > * Typo fixe

Re: [Qemu-devel] [PULL 0/1] ppc-for-2.6 queue 20160419

2016-04-19 Thread Peter Maydell
ble in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.6-20160419 > > for you to fetch changes up to ed3d807b0a577c4f825b25f3281fe54ce89202db: > > cuda: fix off-by-one error in SET_TIME command (2016-04-19 11:39:23 +1000) > >

Re: [Qemu-devel] [PATCH v3 09/10] tcg: Clean up direct block chaining safety checks

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > We don't take care of direct jumps when address mapping changes. Thus we > must be sure to generate direct jumps so that they always keep valid > even if address mapping changes. However we only allow to execute a TB > if it was generated from t

[Qemu-devel] [RFC PATCH v0 for 2.7] spapr: Work around the memory hotplug failure with DDW

2016-04-19 Thread Bharata B Rao
Memory hotplug can fail for some combinations of RAM and maxmem when DDW is enabled in the presence of devices like nec-xhci-usb. DDW depends on maximum addressable memory by guest and this value is currently being calculated wrongly by the guest kernel routine memory_hotplug_max(). While there is

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
Dear Markus, Markus Armbruster writes: >> Running an iotests-based Python test directly might appear to work, >> but may fail in subtle ways and is insecure: >> >> - It creates files with predictable file names in a world-writable >> location (/var/tmp). >> >> - Tests expect the environment to

[Qemu-devel] [PATCH for-2.6 v2 0/3] Bug fixes for gluster

2016-04-19 Thread Jeff Cody
Bug fixes for gluster; third patch is to prevent a potential data loss when trying to recover from a recoverable error (such as ENOSPC). The final patch closes the gluster fd and sets the protocol drv to NULL on fsync failure in gluster; we have no way of knowing what gluster versions support reta

[Qemu-devel] [PATCH for-2.6 v2 1/3] block/gluster: return correct error value

2016-04-19 Thread Jeff Cody
Upon error, gluster will call the aio callback function with a ret value of -1, with errno set to the proper error value. If we set the acb->ret value to the return value in the callback, that results in every error being EPERM (i.e. 1). Instead, set it to the proper error result. Reviewed-by: N

[Qemu-devel] [PATCH for-2.6 v2 3/3] block/gluster: prevent data loss after i/o error

2016-04-19 Thread Jeff Cody
Upon receiving an I/O error after an fsync, by default gluster will dump its cache. However, QEMU will retry the fsync, which is especially useful when encountering errors such as ENOSPC when using the werror=stop option. When using caching with gluster, however, the last written data will be los

[Qemu-devel] iolimits for virtio-9p

2016-04-19 Thread Pradeep Kiruvale
Hi All, We are planning to implement the io-limits for the virtio-9p driver i.e for fsdev devices. So, I am looking into the code base and how it has done for the block io devices. I would like to know how difficult is this and is there some one out there who has any plan to do this? Any suggest

[Qemu-devel] [PATCH for-2.6 v2 2/3] block/gluster: code movement of qemu_gluster_close()

2016-04-19 Thread Jeff Cody
Move qemu_gluster_close() further up in the file, in preparation for the next patch, to avoid a forward declaration. Signed-off-by: Jeff Cody --- block/gluster.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index b

Re: [Qemu-devel] [PATCH for-2.6 v2 0/3] Bug fixes for gluster

2016-04-19 Thread Ric Wheeler
On 04/19/2016 08:07 AM, Jeff Cody wrote: Bug fixes for gluster; third patch is to prevent a potential data loss when trying to recover from a recoverable error (such as ENOSPC). Hi Jeff, Just a note, I have been talking to some of the disk drive people here at LSF (the kernel summit for file

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 14.04.2016 13:32, Sascha Silbe wrote: [tests/qemu-iotests/iotests.py] [...] >> def main(supported_fmts=[], supported_oses=['linux']): >> '''Run tests''' >> >> +if test_dir is None or qemu_default_machine is None: > > I think checking test_dir would ha

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Markus Armbruster
Sascha Silbe writes: > Dear Markus, > > Markus Armbruster writes: > >>> Running an iotests-based Python test directly might appear to work, >>> but may fail in subtle ways and is insecure: >>> >>> - It creates files with predictable file names in a world-writable >>> location (/var/tmp). >>> >

Re: [Qemu-devel] [PATCH for-2.6 v2 3/3] block/gluster: prevent data loss after i/o error

2016-04-19 Thread Kevin Wolf
Am 19.04.2016 um 14:07 hat Jeff Cody geschrieben: > Upon receiving an I/O error after an fsync, by default gluster will > dump its cache. However, QEMU will retry the fsync, which is especially > useful when encountering errors such as ENOSPC when using the werror=stop > option. When using cachin

Re: [Qemu-devel] [PATCH for-2.6 v2 3/3] block/gluster: prevent data loss after i/o error

2016-04-19 Thread Jeff Cody
On Tue, Apr 19, 2016 at 02:27:56PM +0200, Kevin Wolf wrote: > Am 19.04.2016 um 14:07 hat Jeff Cody geschrieben: > > Upon receiving an I/O error after an fsync, by default gluster will > > dump its cache. However, QEMU will retry the fsync, which is especially > > useful when encountering errors su

Re: [Qemu-devel] [PATCH 1/2] block: Invalidate all children

2016-04-19 Thread Fam Zheng
On Tue, 04/19 16:44, Changlong Xie wrote: > On 04/19/2016 09:42 AM, Fam Zheng wrote: > >Currently we only recurse to bs->file, which will miss the children in quorum > >and VMDK. > > > >Recurse into the whole subtree to avoid that. > > > >Signed-off-by: Fam Zheng > >--- > > block.c | 20 +

Re: [Qemu-devel] [PATCH v3 04/10] tcg: Init TB's direct jumps before making it visible

2016-04-19 Thread Sergey Fedorov
On 19/04/16 13:55, Alex Bennée wrote: > Sergey Fedorov writes: > >> From: Sergey Fedorov >> >> Initialize TB's direct jump list data fields and reset the jumps before >> tb_link_page() puts it into the physical hash table and the physical >> page list. So TB is completely initialized before it be

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-19 Thread Fam Zheng
On Mon, 04/18 09:04, Richard W.M. Jones wrote: > On Mon, Apr 18, 2016 at 09:10:36AM +0800, Fam Zheng wrote: > > On Sun, 04/17 20:27, Richard W.M. Jones wrote: > > > On Fri, Apr 15, 2016 at 11:27:55AM +0800, Fam Zheng wrote: > > > > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid

Re: [Qemu-devel] [PATCH for-2.7 v2 00/17] block: Lock images when opening

2016-04-19 Thread Fam Zheng
On Mon, 04/18 10:53, Daniel P. Berrange wrote: > If you want todo locks inside of QEMU, you really can't rely > on delegating handling to each individual block driver instance. > You need to have a process global registry of which files you have > already locked, and check against that registry bef

Re: [Qemu-devel] [PULL for-2.6 0/2] ehci: fix (s)iTD looping issue (CVE-2015-8558) in a different way.

2016-04-19 Thread Peter Maydell
c4015142f2f86a: > > Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20160415' into > staging (2016-04-18 09:55:16 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-usb-20160419-1 > > for you to fetch changes

Re: [Qemu-devel] [PATCH v3 05/10] tcg: Clarify thread safety check in tb_add_jump()

2016-04-19 Thread Sergey Fedorov
On 19/04/16 14:01, Alex Bennée wrote: > Sergey Fedorov writes: > >> From: Sergey Fedorov >> >> The check is to make sure that another thread hasn't already done the >> same while we were outside of tb_lock. Mention this in a comment. >> >> Signed-off-by: Sergey Fedorov >> Signed-off-by: Sergey F

Re: [Qemu-devel] [PATCH v3 09/10] tcg: Clean up direct block chaining safety checks

2016-04-19 Thread Sergey Fedorov
On 19/04/16 14:37, Alex Bennée wrote: > Sergey Fedorov writes: (snip) >> diff --git a/cpu-exec.c b/cpu-exec.c >> index bbfcbfb54385..065cc9159477 100644 >> --- a/cpu-exec.c >> +++ b/cpu-exec.c >> @@ -508,11 +508,8 @@ int cpu_exec(CPUState *cpu) >> next_tb = 0; >>

Re: [Qemu-devel] [RFC] libqtest: dump child invocation when QTEST_LOG set

2016-04-19 Thread Stefan Hajnoczi
On Wed, Apr 13, 2016 at 02:34:17PM +0100, Alex Bennée wrote: > The QTEST_LOG environment is used for debugging qtest interactions with > a child process. When it is defined we now also dump the invocation line > to stderr to make it easier for people to see how QEMU was invoked. > > Signed-off-by:

Re: [Qemu-devel] [PATCH for-2.6] fw_cfg: Adopt /opt/RFQDN convention

2016-04-19 Thread Gabriel L. Somlo
On Tue, Apr 19, 2016 at 09:48:40AM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Mon, Apr 18, 2016 at 06:42:09PM +0200, Markus Armbruster wrote: > >> FW CFG's primary user is QEMU, which uses it to expose configuration > >> information (in the widest sense) to Firmware.

Re: [Qemu-devel] [PATCH for-2.7 v2 11/17] qemu-nbd: Add "--no-lock/-L" option

2016-04-19 Thread Fam Zheng
On Sat, 04/16 17:32, Denis V. Lunev wrote: > On 04/15/2016 06:28 AM, Fam Zheng wrote: > >Signed-off-by: Fam Zheng > >--- > > qemu-nbd.c| 6 +- > > qemu-nbd.texi | 2 ++ > > 2 files changed, 7 insertions(+), 1 deletion(-) > > > >diff --git a/qemu-nbd.c b/qemu-nbd.c > >index b5751f8..37da7a

Re: [Qemu-devel] [PATCH for-2.7 v2 09/17] qemu-img: Add "-L" option to sub commands

2016-04-19 Thread Fam Zheng
On Sat, 04/16 17:29, Denis V. Lunev wrote: > On 04/15/2016 06:27 AM, Fam Zheng wrote: > >If specified, BDRV_O_NO_LOCK flag will be set when opening the image. > > > >Signed-off-by: Fam Zheng > >--- > > qemu-img.c | 89 > > ++ > > 1 file

Re: [Qemu-devel] [PATCH for-2.7 v2 08/17] qemu-io: Add "-L" option for BDRV_O_NO_LOCK

2016-04-19 Thread Fam Zheng
On Sat, 04/16 16:46, Denis V. Lunev wrote: > On 04/15/2016 06:27 AM, Fam Zheng wrote: > >Signed-off-by: Fam Zheng > >--- > > qemu-io.c | 22 -- > > 1 file changed, 20 insertions(+), 2 deletions(-) > > > >diff --git a/qemu-io.c b/qemu-io.c > >index 288bba8..6bb6232 100644 > >--

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-19 Thread Richard W.M. Jones
On Tue, Apr 19, 2016 at 08:37:14PM +0800, Fam Zheng wrote: > On Mon, 04/18 09:04, Richard W.M. Jones wrote: > > On Mon, Apr 18, 2016 at 09:10:36AM +0800, Fam Zheng wrote: > > > On Sun, 04/17 20:27, Richard W.M. Jones wrote: > > > > On Fri, Apr 15, 2016 at 11:27:55AM +0800, Fam Zheng wrote: > > > >

Re: [Qemu-devel] [PATCH for-2.7 v2 03/17] blockdev: Add and parse "lock-image" option for block devices

2016-04-19 Thread Fam Zheng
On Sat, 04/16 16:15, Denis V. Lunev wrote: > On 04/15/2016 06:27 AM, Fam Zheng wrote: > >Honor the locking switch specified in CLI or QMP, and set the open flags for > >the image accordingly. > > > >Signed-off-by: Fam Zheng > >--- > > blockdev.c | 8 > > 1 file changed, 8 insertions(+) >

Re: [Qemu-devel] [PATCH v3 04/10] tcg: Init TB's direct jumps before making it visible

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > On 19/04/16 13:55, Alex Bennée wrote: >> Sergey Fedorov writes: >> >>> From: Sergey Fedorov >>> >>> Initialize TB's direct jump list data fields and reset the jumps before >>> tb_link_page() puts it into the physical hash table and the physical >>> page list. So TB is

Re: [Qemu-devel] [PATCH for-2.6] fw_cfg: Adopt /opt/RFQDN convention

2016-04-19 Thread Laszlo Ersek
On 04/18/16 18:42, Markus Armbruster wrote: > +To avoid clashes among different users, it is strongly recommended > +that you use names beginning with opt/RFQDN/, where RFQDN is a > +reverse fully qualified domain name you control. For instance, if > +SeaBIOS wanted to define additional names, pr

Re: [Qemu-devel] vmdk: improve streamOptimized vmdk support

2016-04-19 Thread Fam Zheng
On Sat, 04/09 14:19, devsk wrote: > Fam, > > Was this work ever completed? Sorry Sunil, I haven't been able to finish this patch yet. I'll try to allocate some time for it. Fam > > Thanks, > Sunil > > > > On Monday, April 20, 2015 11:10 PM, Fam Zheng wrote: > On Fri, 04/17 18:25, devsk wro

Re: [Qemu-devel] [PATCH v3 10/10] tcg: Moderate direct block chaining safety checks in user mode

2016-04-19 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > In user mode, there's only a static address translation, TBs are always > invalidated properly and direct jumps are reset when mapping change. > Thus the destination address is always valid for direct jumps and > there's no need to restrict it t

Re: [Qemu-devel] [PATCH] virtio: reserve device id for virtio crypto

2016-04-19 Thread Stefan Hajnoczi
On Fri, Apr 15, 2016 at 09:51:00AM +0800, Gonglei wrote: > Reserve a device ID for virtio crypto device to > avoid collisions with other new virtio devices. > > Because 19 had been reserved for virtio socket > device, I'd like to reserve 20 for crypto device. > > Suggested-by: Cornelia Huck > Si

Re: [Qemu-devel] [PATCH v3 10/10] tcg: Moderate direct block chaining safety checks in user mode

2016-04-19 Thread Sergey Fedorov
On 19/04/16 16:10, Alex Bennée wrote: > Sergey Fedorov writes: (snip) >> diff --git a/target-alpha/translate.c b/target-alpha/translate.c >> index 5fa66309ce2e..684559e694bd 100644 >> --- a/target-alpha/translate.c >> +++ b/target-alpha/translate.c >> @@ -464,11 +464,19 @@ static bool use_goto_tb(

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-19 Thread Fam Zheng
On Tue, 04/19 14:07, Richard W.M. Jones wrote: > On Tue, Apr 19, 2016 at 08:37:14PM +0800, Fam Zheng wrote: > > On Mon, 04/18 09:04, Richard W.M. Jones wrote: > > > On Mon, Apr 18, 2016 at 09:10:36AM +0800, Fam Zheng wrote: > > > > On Sun, 04/17 20:27, Richard W.M. Jones wrote: > > > > > On Fri, Ap

Re: [Qemu-devel] Move autoconverge out of experimental?

2016-04-19 Thread Jason J. Herne
On 04/19/2016 02:39 AM, Amit Shah wrote: Hi Jason, We've had the new autoconverge features enabled for a full release now, what are your thoughts on dropping the x- ? Some factors I consider are direct user feedback, changes to the functionality / API, and higher-level user feedback (like libvi

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-19 Thread Daniel P. Berrange
On Mon, Apr 18, 2016 at 09:04:19AM +0100, Richard W.M. Jones wrote: > On Mon, Apr 18, 2016 at 09:10:36AM +0800, Fam Zheng wrote: > > On Sun, 04/17 20:27, Richard W.M. Jones wrote: > > > On Fri, Apr 15, 2016 at 11:27:55AM +0800, Fam Zheng wrote: > > > > virtlockd in libvirt locks the first byte, we

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-19 Thread Richard W.M. Jones
On Tue, Apr 19, 2016 at 09:19:02PM +0800, Fam Zheng wrote: > On Tue, 04/19 14:07, Richard W.M. Jones wrote: > > We've done this successfully for years, for people monitoring their > > VMs using virt-df, pulling out files using guestfish and so on. We > > allow you to do it while the guest is live

Re: [Qemu-devel] [RFC PATCH 1/8] virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Fri, Mar 25, 2016 at 10:13:22AM +0800, Jason Wang wrote: > Currently, all virtio devices bypass IOMMU completely. This is because > address_space_memory is assumed and used during DMA emulation. This > patch converts the virtio core API to use DMA API. This idea is > > - introducing a new trans

[Qemu-devel] [RFC v8 05/14] softmmu: Add new TLB_EXCL flag

2016-04-19 Thread Alvise Rigo
Add a new TLB flag to force all the accesses made to a page to follow the slow-path. The TLB entries referring guest pages with the DIRTY_MEMORY_EXCLUSIVE bit clean will have this flag set. Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana Signed-off-by: Alvise Rigo --- include/exec/c

[Qemu-devel] [RFC v8 00/14] Slow-path for atomic instruction translation

2016-04-19 Thread Alvise Rigo
This is the eighth iteration of the patch series which applies to the upstream branch of QEMU (v2.5.0+). Changes versus previous versions are at the bottom of this cover letter. The code is also available at following repository: https://git.virtualopensystems.com/dev/qemu-mt.git branch: slowpath

[Qemu-devel] [RFC v8 03/14] softmmu: Simplify helper_*_st_name, wrap MMIO code

2016-04-19 Thread Alvise Rigo
Attempting to simplify the helper_*_st_name, wrap the MMIO code into an inline function. The function covers both BE and LE cases and it is expanded twice in each helper (TODO: check this last statement). Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana CC: Alex Bennée Signed-off-by: A

[Qemu-devel] [RFC v8 04/14] softmmu: Simplify helper_*_st_name, wrap RAM code

2016-04-19 Thread Alvise Rigo
Attempting to simplify the helper_*_st_name, wrap the code relative to a RAM access into an inline function. The function covers both BE and LE cases and it is expanded twice in each helper (TODO: check this last statement). Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana CC: Alex Benn

[Qemu-devel] [RFC v8 02/14] softmmu: Simplify helper_*_st_name, wrap unaligned code

2016-04-19 Thread Alvise Rigo
Attempting to simplify the helper_*_st_name, wrap the do_unaligned_access code into an shared inline function. As this also removes the goto statement the inline code is expanded twice in each helper. >From Message-id 1452268394-31252-2-git-send-email-alex.ben...@linaro.org: There is a minor wrink

[Qemu-devel] [RFC v8 01/14] exec.c: Add new exclusive bitmap to ram_list

2016-04-19 Thread Alvise Rigo
The purpose of this new bitmap is to flag the memory pages that are in the middle of LL/SC operations (after a LL, before a SC). For all these pages, the corresponding TLB entries will be generated in such a way to force the slow-path for all the VCPUs (see the following patches). When the system

[Qemu-devel] [RFC v8 08/14] softmmu: Add history of excl accesses

2016-04-19 Thread Alvise Rigo
Add a circular buffer to store the hw addresses used in the last EXCLUSIVE_HISTORY_LEN exclusive accesses. When an address is pop'ed from the buffer, its page will be set as not exclusive. In this way we avoid frequent set/unset of a page (causing frequent flushes as well). Suggested-by: Jani Kok

[Qemu-devel] [RFC v8 07/14] softmmu: Add helpers for a new slowpath

2016-04-19 Thread Alvise Rigo
The new helpers rely on the legacy ones to perform the actual read/write. The LoadLink helper (helper_ldlink_name) prepares the way for the following StoreCond operation. It sets the linked address and the size of the access. The LoadLink helper also updates the TLB entry of the page involved in t

[Qemu-devel] [RFC v8 09/14] softmmu: Honor the new exclusive bitmap

2016-04-19 Thread Alvise Rigo
The pages set as exclusive (clean) in the DIRTY_MEMORY_EXCLUSIVE bitmap have to have their TLB entries flagged with TLB_EXCL. The accesses to pages with TLB_EXCL flag set have to be properly handled in that they can potentially invalidate an open LL/SC transaction. Modify the TLB entries generatio

[Qemu-devel] [RFC v8 06/14] qom: cpu: Add CPUClass hooks for exclusive range

2016-04-19 Thread Alvise Rigo
The excl_protected_range is a hwaddr range set by the VCPU at the execution of a LoadLink instruction. If a normal access writes to this range, the corresponding StoreCond will fail. Each architecture can set the exclusive range when issuing the LoadLink operation through a CPUClass hook. This com

[Qemu-devel] [RFC v8 10/14] softmmu: Support MMIO exclusive accesses

2016-04-19 Thread Alvise Rigo
Enable exclusive accesses when the MMIO flag is set in the TLB entry. In case a LL access is done to MMIO memory, we treat it differently from a RAM access in that we do not rely on the EXCL bitmap to flag the page as exclusive. In fact, we don't even need the TLB_EXCL flag to force the slow path,

[Qemu-devel] [RFC v8 13/14] target-arm: cpu64: use custom set_excl hook

2016-04-19 Thread Alvise Rigo
In aarch64 the LDXP/STXP instructions allow to perform up to 128 bits exclusive accesses. However, due to a softmmu limitation, such wide accesses are not allowed. To workaround this limitation, we need to support LoadLink instructions that cover at least 128 consecutive bits (see the next patch f

[Qemu-devel] [RFC v8 11/14] tcg: Create new runtime helpers for excl accesses

2016-04-19 Thread Alvise Rigo
Introduce a set of new runtime helpers to handle exclusive instructions. These helpers are used as hooks to call the respective LL/SC helpers in softmmu_llsc_template.h from TCG code. The helpers ending with an "a" make an alignment check. Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontan

  1   2   3   >