Re: [Qemu-devel] [RFC for-2.7 1/1] block/qapi: Add query-block-node-tree

2016-03-24 Thread Wen Congyang
On 03/25/2016 03:07 AM, Max Reitz wrote: > This command returns the tree of BlockDriverStates under a given root > node. > > Every tree node is described by its node name and the connection of a > parent node to its children additionally contains the role the child > assumes. > > A node's name ca

Re: [Qemu-devel] [RFC 2/7] virtio: stop virtqueue processing if device is broken

2016-03-24 Thread Fam Zheng
On Thu, 03/24 17:56, Stefan Hajnoczi wrote: > QEMU prints an error message and exits when the device enters an invalid > state. Terminating the process is heavy-handed. The guest may still be > able to function even if there is a bug in a virtio guest driver. > > Moreover, exiting is a bug in ne

[Qemu-devel] [PATCH] pci_register_bar: cleanup

2016-03-24 Thread Cao jin
place relevant code tegother, make the code easier to read Signed-off-by: Cao jin --- hw/pci/pci.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e67664d..f0f41dc 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -974,7 +974,7

Re: [Qemu-devel] [RFC 1/7] virtio: fix stray tab character

2016-03-24 Thread Fam Zheng
On Thu, 03/24 17:56, Stefan Hajnoczi wrote: > The patches fixes a single occurrence of a tab character that resulted > in mis-aligned indentation. > > Signed-off-by: Stefan Hajnoczi > --- > hw/virtio/virtio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/virtio/vir

Re: [Qemu-devel] [PATCH v2 4/4] iotests: Test qemu-img convert -S 0 behavior

2016-03-24 Thread Fam Zheng
On Thu, 03/24 23:34, Max Reitz wrote: > Passing -S 0 to qemu-img convert should result in all source data being > copied to the output, even if that source data is known to be 0. The > output image should therefore have exactly the same size on disk as an > image which we explicitly filled with dat

Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Fix preallocation with -S 0 for convert

2016-03-24 Thread Fam Zheng
On Thu, 03/24 23:33, Max Reitz wrote: > When passing -S 0 to qemu-img convert, the target image is supposed to > be fully allocated. Right now, this is not the case if the source image > contains areas which bdrv_get_block_status() reports as being zero. > > This patch changes a zeroed area's stat

Re: [Qemu-devel] [PATCH V4] hw/pxb: add chassis_nr property

2016-03-24 Thread Cao jin
On 03/24/2016 11:34 PM, Marcel Apfelbaum wrote: Hi, You used hot-plug correctly, it doesn't work yet since I am still working on this feature. The bridge gives us the basics environment for hot-plug, what is missing is ACPI "bsel" mechanism. Thanks, Marcel I see, Thanks for your informatio

Re: [Qemu-devel] [PATCH 2/2] memory: hide mr->ram_addr from qemu_get_ram_ptr users

2016-03-24 Thread Fam Zheng
On Thu, 03/24 12:03, Paolo Bonzini wrote: > Let users of qemu_get_ram_ptr and qemu_ram_ptr_length pass in an > address that is relative to the MemoryRegion. This basically means > what address_space_translate returns. > > invalidate_and_set_dirty has to add back mr->ram_addr, but reads do > not n

Re: [Qemu-devel] [PATCH 1/2] memory: remove unnecessary masking of MemoryRegion ram_addr

2016-03-24 Thread Fam Zheng
On Thu, 03/24 12:03, Paolo Bonzini wrote: > mr->ram_block->offset is already aligned to both host and target size > (see qemu_ram_alloc_internal). Remove further masking as it is > unnecessary. > > Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v4] blizzard: Remove support for DEPTH != 32

2016-03-24 Thread Pooja Dhannawat
On Fri, Mar 25, 2016 at 8:39 AM, Fam Zheng wrote: > On Thu, 03/24 23:48, Pooja Dhannawat wrote: > > Removing support for DEPTH != 32 from blizzard template header > > and file that includes it, as macro DEPTH == 32 only used. > > > > Signed-off-by: Pooja Dhannawat > > Hi Pooja, a meta-comment: i

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-03-24 Thread Cao jin
On 03/24/2016 07:25 PM, Paolo Bonzini wrote: A question about legacy property: I don`t see legacy property is really used in the code, so, why still add legacy property to object? It's used here: static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,

Re: [Qemu-devel] [PATCH v4] blizzard: Remove support for DEPTH != 32

2016-03-24 Thread Fam Zheng
On Thu, 03/24 23:48, Pooja Dhannawat wrote: > Removing support for DEPTH != 32 from blizzard template header > and file that includes it, as macro DEPTH == 32 only used. > > Signed-off-by: Pooja Dhannawat Hi Pooja, a meta-comment: in the future, when post a subsequent revision, please include wh

Re: [Qemu-devel] [RFC for-2.7 1/1] block/qapi: Add query-block-node-tree

2016-03-24 Thread Wen Congyang
On 03/25/2016 03:07 AM, Max Reitz wrote: > This command returns the tree of BlockDriverStates under a given root > node. > > Every tree node is described by its node name and the connection of a > parent node to its children additionally contains the role the child > assumes. > > A node's name ca

[Qemu-devel] [RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree

2016-03-24 Thread Jason Wang
Current pre-sorted memory region array has some limitations for future device IOTLB conversion: 1) need extra work for adding and removing a single region, and it's expected to be slow because of sorting or memory re-allocation. 2) need extra work of removing a large range which may intersect

[Qemu-devel] [RFC PATCH V2 2/2] vhost: device IOTLB API

2016-03-24 Thread Jason Wang
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace(qemu) implementation of DMA remapping. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the translation, this is done through: - Fi

[Qemu-devel] [RFC PATCH V2 0/2] basic device IOTLB support

2016-03-24 Thread Jason Wang
This patch tries to implement an device IOTLB for vhost. This could be used with for co-operation with userspace(qemu) implementation of iommu for a secure DMA environment (DMAR) in guest. The idea is simple. When vhost meets an IOTLB miss, it will request the assistance of userspace to do the tra

Re: [Qemu-devel] block IO thread creation question

2016-03-24 Thread Fam Zheng
On Thu, 03/24 09:02, Chris Friesen wrote: > Hi, > > Could someone point me at the code for creating threads to handle > block IO? I'm seeing up to 30 threads per virtual disk, which seems > high. It is thread-pool.c, assuming you are using "aio=threads" for drive, which is the default. With the

Re: [Qemu-devel] [patch v5 11/12] vfio: device may stuck in D3 when doing aer recovery

2016-03-24 Thread Alex Williamson
On Fri, 25 Mar 2016 09:38:09 +0800 Chen Fan wrote: > On 03/25/2016 06:54 AM, Alex Williamson wrote: > > On Wed, 23 Mar 2016 18:12:06 +0800 > > Cao jin wrote: > > > >> From: Chen Fan > >> > >> when a physical device aer occurred, the device state probably > >> is not in D0 in a short time, if

Re: [Qemu-devel] [RFC] host and guest kernel trace merging

2016-03-24 Thread Peter Xu
On Thu, Mar 24, 2016 at 10:13:17AM +, Stefan Hajnoczi wrote: > There are probably race conditions if the tsc offset is queried > independently from the trace collection. For example, imagine the host > is suspend right when tracing begins. I think the TSC could be adjusted > when the host wak

[Qemu-devel] [RFC PATCH 6/8] intel_iommu: support device iotlb descriptor

2016-03-24 Thread Jason Wang
This patch enables device IOTLB support for intel iommu. The major work is to implement QI device IOTLB descriptor processing and notify the device through iommu notifier. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/i386

[Qemu-devel] [RFC PATCH 5/8] virtio-pci: address space translation service (ATS) support

2016-03-24 Thread Jason Wang
This patches enable the Address Translation Service support for virtio pci devices. This is needed for a guest visible Device IOTLB implementation and will be used by vhost device IOTLB API. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c| 14

[Qemu-devel] [RFC PATCH 3/8] intel_iommu: allocate new key when creating new address space

2016-03-24 Thread Jason Wang
We use the pointer to stack for key for new address space, this will break hash table searching, fixing by g_malloc() a new key instead. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 5 +++-- 1 file ch

[Qemu-devel] [RFC PATCH 8/8] vhost_net: device IOTLB support

2016-03-24 Thread Jason Wang
This patches implements Device IOTLB support for vhost kernel. This is done through: 1) switch to use dma helpers when map/unmap vrings from vhost codes 2) kernel support for Device IOTLB API: - allow vhost-net to query the IOMMU IOTLB entry through eventfd - enable the ability for qemu to update

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

2016-03-24 Thread Jason Wang
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 transport specific helper to query the dma address space. (only pci versi

[Qemu-devel] [RFC PATCH 7/8] memory: handle alias for iommu notifier

2016-03-24 Thread Jason Wang
Cc: Paolo Bonzini Signed-off-by: Jason Wang --- memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memory.c b/memory.c index 95f7209..858b390 100644 --- a/memory.c +++ b/memory.c @@ -1509,6 +1509,9 @@ bool memory_region_is_logging(MemoryRegion *mr, uint8_t client) void memory_re

[Qemu-devel] [RFC PATCH 4/8] exec: introduce address_space_get_iotlb_entry()

2016-03-24 Thread Jason Wang
This patch introduces a helper to query the iotlb entry for a possible iova. This will be used by later device IOTLB API to enable the capability for a dataplane (e.g vhost) to query the IOTLB. Cc: Paolo Bonzini Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Jason Wang --- exec.c

[Qemu-devel] [RFC PATCH 2/8] intel_iommu: name vtd address space with devfn

2016-03-24 Thread Jason Wang
To avoid duplicated name and ease debugging. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_

[Qemu-devel] [RFC PATCH 0/8] virtio/vhost DMAR support

2016-03-24 Thread Jason Wang
Hi all: As the userspace vitio driver became popular, this calls for the request of secure DMA environemt (DMAR). So this series tries to make DMAR works for virtio/vhost. The idea is let virtio/vhost co-work with userspace iommu implememtation. This is done through: - for virtio, do not assume a

Re: [Qemu-devel] [PATCH v2 3/4] block/null-{co, aio}: Implement get_block_status()

2016-03-24 Thread Fam Zheng
On Thu, 03/24 23:33, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block/null.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/block/null.c b/block/null.c > index a7df386..f4b3bba 100644 > --- a/block/null.c > +++ b/block/null.c > @@ -204,6 +204,24 @@ stat

Re: [Qemu-devel] [PATCH v2 2/4] block/null-{co, aio}: Allow reading zeroes

2016-03-24 Thread Fam Zheng
On Thu, 03/24 23:33, Max Reitz wrote: > This is optional so that it does not impede the null block driver's > performance unless this behavior is desired. > > Signed-off-by: Max Reitz > --- > block/null.c | 20 > 1 file changed, 20 insertions(+) > > diff --git a/block/null.

Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages

2016-03-24 Thread Li, Liang Z
> > > > > > > > > The order I'm trying to understand is something like: > > > > > > > > > > > > > > > > > > a) Send the get_free_page_bitmap request > > > > > > > > > b) Start sending pages > > > > > > > > > c) Reach the end of memory > > > > > > > > > [ is_ready is false - guest

Re: [Qemu-devel] [RFC] host and guest kernel trace merging

2016-03-24 Thread Peter Xu
On Thu, Mar 24, 2016 at 09:02:08AM -0400, Luiz Capitulino wrote: > On Thu, 24 Mar 2016 13:16:20 +0800 > Peter Xu wrote: > > > Hi, Steven, > > > > On Fri, Mar 04, 2016 at 08:23:11AM -0500, Steven Rostedt wrote: > > > My idea for a trace-cmd server, is to have a --client operation, for > > > runni

Re: [Qemu-devel] [patch v5 11/12] vfio: device may stuck in D3 when doing aer recovery

2016-03-24 Thread Chen Fan
On 03/25/2016 06:54 AM, Alex Williamson wrote: On Wed, 23 Mar 2016 18:12:06 +0800 Cao jin wrote: From: Chen Fan when a physical device aer occurred, the device state probably is not in D0 in a short time, if we recover the device quickly. we may stuck in D3 state when force to change device

Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages

2016-03-24 Thread Li, Liang Z
> > > On Thu, Mar 24, 2016 at 03:53:25PM +, Li, Liang Z wrote: > > > > > > > > Not very complex, we can implement like this: > > > > > > > > > > > > > > > > 1. Set all the bits in the migration_bitmap_rcu->bmap to 1 2. > > > > > > > > Clear all the bits in ram_list. > > > > > > > > dirty_memory

Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages

2016-03-24 Thread Li, Liang Z
> > > > On Thu, Mar 24, 2016 at 03:53:25PM +, Li, Liang Z wrote: > > > > > > > > > Not very complex, we can implement like this: > > > > > > > > > > > > > > > > > > 1. Set all the bits in the migration_bitmap_rcu->bmap to 1 2. > > > > > > > > > Clear all the bits in ram_list. > > > > > > > > >

Re: [Qemu-devel] [PATCH v5 00/15] data-driven device registers

2016-03-24 Thread Alistair Francis
On Tue, Mar 22, 2016 at 10:44 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> This patch series is based on Peter C's original register API. His >> original cover letter is below. >> >> Future work: Allow support for memory attributes. >> >> V5: >> - Only create a single memory region i

[Qemu-devel] [PATCHv4 2/2] slirp: Allow disabling IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and IPv6-only network environments. Signed-off-by: Samuel Thibault --- Changes since previous versions: - Introduce boolean options ipv4 and ipv6 instead of net=none and ip6-net=none. - Reject incoherent configuration (e.g. v

[Qemu-devel] [PATCHv4 1/2] Rework ipv6 options

2016-03-24 Thread Samuel Thibault
Rename the recently-added ip6-foo options into ipv6-foo options, to make them coherent with other ipv6 options. Also rework the documentation. Signed-off-by: Samuel Thibault --- net/slirp.c | 6 +++--- qapi-schema.json | 25 - qemu-options.hx | 18 ++--

[Qemu-devel] [PATCHv4 0/2] Rework ipv6 options, add ipv4/ipv6 enabling/disabling options

2016-03-24 Thread Samuel Thibault
This is a split of the previously-sent "Allow disabling IPv4 or IPv6" patch, to separate reworking the existing newly-added options and the new ipv4/ipv6 options. Samuel Thibault (2): Rework ipv6 options slirp: Allow disabling IPv4 or IPv6 net/slirp.c | 35 +++--

Re: [Qemu-devel] [PATCH v5 07/15] register: Add block initialise helper

2016-03-24 Thread Alistair Francis
On Tue, Mar 22, 2016 at 10:11 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> From: Peter Crosthwaite >> >> Add a helper that will scan a static RegisterAccessInfo Array >> and populate a container MemoryRegion with registers as defined. >> >> Signed-off-by: Peter Crosthwaite >> Signed

Re: [Qemu-devel] [PATCHv3 2/2] slirp: Allow disabling IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Samuel Thibault, on Fri 25 Mar 2016 00:25:55 +0100, wrote: > Also rename recently-added options to make the whole coherent before 2.6 > gets released. GRaaAH I'm so motivated by such bike-shedding changes that I forgot to rework the changelog. Let me do that yet again. Samuel

[Qemu-devel] [PATCHv3 2/2] slirp: Allow disabling IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and IPv6-only network environments. Also rename recently-added options to make the whole coherent before 2.6 gets released. Signed-off-by: Samuel Thibault --- Changes since previous versions: - Introduce boolean options ipv4 a

[Qemu-devel] [PATCHv3 1/2] Rework ipv6 options

2016-03-24 Thread Samuel Thibault
Rename ip6-foo options into ipv6-foo options, to make them coherent with other ipv6 options. Also rework the documentation. --- net/slirp.c | 6 +++--- qapi-schema.json | 25 - qemu-options.hx | 18 ++ 3 files changed, 29 insertions(+), 20 deletions(

[Qemu-devel] [PATCHv3 0/2] Rework ipv6 options, add ipv4/ipv6 enabling/disabling options

2016-03-24 Thread Samuel Thibault
This is a split of the previously-sent "Allow disabling IPv4 or IPv6" patch, to separate reworking the existing newly-added options and the new ipv4/ipv6 options. Samuel Thibault (2): Rework ipv6 options slirp: Allow disabling IPv4 or IPv6 net/slirp.c | 35 +++--

Re: [Qemu-devel] [PATCH v5 04/15] register: Add support for decoding information

2016-03-24 Thread Alistair Francis
On Tue, Mar 22, 2016 at 10:42 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> Allow defining of optional address decoding information in register >> definitions. This is useful for clients that want to associate >> registers with specific addresses. >> >> Signed-off-by: Peter Crosthwaite

Re: [Qemu-devel] [PATCH v5 03/15] register: Add Memory API glue

2016-03-24 Thread Alistair Francis
On Tue, Mar 22, 2016 at 9:56 AM, Alex Bennée wrote: > > Alistair Francis writes: > >> Add memory io handlers that glue the register API to the memory API. >> Just translation functions at this stage. Although it does allow for >> devices to be created without all-in-one mmio r/w handlers. >> >> T

Re: [Qemu-devel] [patch v5 06/12] vfio: add check host bus reset is support or not

2016-03-24 Thread Alex Williamson
[resending, first copy had the list address incorrect, apologies to those on the cc list] On Wed, 23 Mar 2016 18:08:16 +0800 Cao jin wrote: > From: Chen Fan > > When assigning a vfio device with AER enabled, we must check whether > the device supports a host bus reset (ie. hot reset) as this m

Re: [Qemu-devel] [PATCH v2 2/4] block/null-{co, aio}: Allow reading zeroes

2016-03-24 Thread Eric Blake
On 03/24/2016 04:33 PM, Max Reitz wrote: > This is optional so that it does not impede the null block driver's > performance unless this behavior is desired. > > Signed-off-by: Max Reitz > --- > block/null.c | 20 > 1 file changed, 20 insertions(+) Reviewed-by: Eric Blake

Re: [Qemu-devel] [patch v5 07/12] pci: add a pci_function_is_valid callback to check function if valid

2016-03-24 Thread Alex Williamson
On Wed, 23 Mar 2016 18:12:02 +0800 Cao jin wrote: > From: Chen Fan > > PCI hotplug requires that function 0 is added last to close the > slot. Since vfio supporting AER, we require that the VM bus > contains the same set of devices as the host bus to support AER, > we can perform an AER valida

Re: [Qemu-devel] [patch v5 11/12] vfio: device may stuck in D3 when doing aer recovery

2016-03-24 Thread Alex Williamson
On Wed, 23 Mar 2016 18:12:06 +0800 Cao jin wrote: > From: Chen Fan > > when a physical device aer occurred, the device state probably > is not in D0 in a short time, if we recover the device quickly. > we may stuck in D3 state when force to change device state to D0. > we may need to wait for a

[Qemu-devel] [PATCH v2 4/4] iotests: Test qemu-img convert -S 0 behavior

2016-03-24 Thread Max Reitz
Passing -S 0 to qemu-img convert should result in all source data being copied to the output, even if that source data is known to be 0. The output image should therefore have exactly the same size on disk as an image which we explicitly filled with data. Signed-off-by: Max Reitz --- tests/qemu-

[Qemu-devel] [PATCH v2 2/4] block/null-{co, aio}: Allow reading zeroes

2016-03-24 Thread Max Reitz
This is optional so that it does not impede the null block driver's performance unless this behavior is desired. Signed-off-by: Max Reitz --- block/null.c | 20 1 file changed, 20 insertions(+) diff --git a/block/null.c b/block/null.c index d90165d..a7df386 100644 --- a/blo

[Qemu-devel] [PATCH v2 3/4] block/null-{co, aio}: Implement get_block_status()

2016-03-24 Thread Max Reitz
Signed-off-by: Max Reitz --- block/null.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/block/null.c b/block/null.c index a7df386..f4b3bba 100644 --- a/block/null.c +++ b/block/null.c @@ -204,6 +204,24 @@ static int null_reopen_prepare(BDRVReopenState *reopen_state,

[Qemu-devel] [PATCH v2 0/4] qemu-img: Fix preallocation with -S 0 for convert

2016-03-24 Thread Max Reitz
Using -S 0 is supposed to allocate everything in the output image; or at least it is supposed to always explicitly write zeros even if the area in question is known to only contain zeros. That doesn't always work right now, so this series fixes it (patch 1, to be specific). I only noticed after I

[Qemu-devel] [PATCH v2 1/4] qemu-img: Fix preallocation with -S 0 for convert

2016-03-24 Thread Max Reitz
When passing -S 0 to qemu-img convert, the target image is supposed to be fully allocated. Right now, this is not the case if the source image contains areas which bdrv_get_block_status() reports as being zero. This patch changes a zeroed area's status from BLK_ZERO to BLK_DATA before invoking con

Re: [Qemu-devel] [PATCHv2] slirp: Allow disabling IPv4 or IPv6

2016-03-24 Thread Eric Blake
On 03/24/2016 04:12 PM, Samuel Thibault wrote: > Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and > IPv6-only network environments. > > Signed-off-by: Samuel Thibault Please mention in the commit message that you are renaming recently-added members, and therefore this MUST

Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages

2016-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2016 at 05:49:33PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Thu, Mar 24, 2016 at 04:05:16PM +, Li, Liang Z wrote: > > > > > > > > > On %D, %SN wrote: > > > %Q > > > > > > %C > > > > > > Liang > > > > > > > > > > -Origi

[Qemu-devel] [PATCHv2] slirp: Allow disabling IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and IPv6-only network environments. Signed-off-by: Samuel Thibault --- Changes since previous versions: - Introduce boolean options ipv4 and ipv6 instead of net=none and ip6-net=none. - Rename ipv6 options to ipv6-foo instead

Re: [Qemu-devel] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-03-24 Thread Eric Blake
On 03/23/2016 08:16 AM, Denis V. Lunev wrote: > From: Pavel Borzenkov > > With the availability of sparse storage formats, it is often needed to > query status of a particular LBA range and read only those blocks of > data that are actually present on the block device. > > To provide such inform

Re: [Qemu-devel] io_mem_notdirty and live migration

2016-03-24 Thread Paolo Bonzini
- Original Message - > From: "Hollis Blanchard" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org > Sent: Thursday, March 24, 2016 8:30:01 PM > Subject: Re: io_mem_notdirty and live migration > > On 03/23/2016 09:53 AM, Paolo Bonzini wrote: > > On 23/03/2016 17:47, Hollis Blanchard wro

Re: [Qemu-devel] [Qemu-block] [PATCH v6 08/11] block: add support for --image-opts in block I/O tests

2016-03-24 Thread Max Reitz
On 21.03.2016 15:11, Daniel P. Berrange wrote: > Currently all block tests use the traditional syntax for images > just specifying a filename. To support the LUKS driver without > resorting to JSON, the tests need to be able to use the new > --image-opts argument to qemu-img and qemu-io. > > This

[Qemu-devel] [PATCH v2 5/8] tcg: Clarify thread safety check in tb_add_jump()

2016-03-24 Thread sergey . fedorov
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 --- Notes: Changes in v2: * Typo fixed in the commit title * C

[Qemu-devel] [PATCH v2 8/8] tcg: Clean up tb_jmp_unlink()

2016-03-24 Thread sergey . fedorov
From: Sergey Fedorov Unify the code of this function with tb_jmp_remove_from_list(). Making these functions similar improves their readability. Also this could be a step towards making this function thread-safe. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Benn

[Qemu-devel] [PATCH v2 4/8] tcg: Init TB's direct jumps before making it visible

2016-03-24 Thread sergey . fedorov
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 Fedorov Signed-off-by: Sergey Fedorov --

[Qemu-devel] [PATCH v2 7/8] tcg: Extract removing of jumps to TB from tb_phys_invalidate()

2016-03-24 Thread sergey . fedorov
From: Sergey Fedorov Move the code for removing jumps to a TB out of tb_phys_invalidate() to a separate static inline function tb_jmp_unlink(). This simplifies tb_phys_invalidate() and improves code structure. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée

[Qemu-devel] [PATCH v2 3/8] tcg: Rearrange tb_link_page() to avoid forward declaration

2016-03-24 Thread sergey . fedorov
From: Sergey Fedorov Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée --- translate-all.c | 204 1 file changed, 101 insertions(+), 103 deletions(-) diff --git a/translate-all.c b/translate-all.c ind

[Qemu-devel] [PATCH v2 0/8] tcg: Direct block chaining clean-up

2016-03-24 Thread sergey . fedorov
From: Sergey Fedorov This series combines a set of patches which is meant to improve overall code structure and readability of direct block chaining mechanism. The other point is to make a step towards thread safety of TB chainig. The series' tree can be found in a public git repository [1]. [1

[Qemu-devel] [PATCH v2 6/8] tcg: Rename tb_jmp_remove() to tb_remove_from_jmp_list()

2016-03-24 Thread sergey . fedorov
From: Sergey Fedorov tb_jmp_remove() was only used to remove the TB from a list of all TBs jumping to the same TB which is n-th jump destination of the given TB. Put a comment briefly describing the function behavior and rename it to better reflect its purpose. Signed-off-by: Sergey Fedorov Sig

[Qemu-devel] [PATCH v2 2/8] tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB

2016-03-24 Thread sergey . fedorov
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 jmp_list_first. Signed-off-by: Serge

[Qemu-devel] [PATCH v2 1/8] tcg: Clean up direct block chaining data fields

2016-03-24 Thread sergey . fedorov
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 excessive 'tb_' prefix in TranslationBloc

Re: [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Hello, Eric Blake, on Thu 24 Mar 2016 15:36:19 -0600, wrote: > What happens if 'net' is provided but 'ip4' is false? Is that a user error? We could do that, yes. > The existing 'InetSocketAddress' QAPI type spells these as 'ipv4' and > ipv6'; should we use the same spelling for consistency? Th

Re: [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Eric Blake, on Thu 24 Mar 2016 15:36:19 -0600, wrote: > > Make net=none disable IPv4 and ip6-net=none disable IPv6, so the user can > > setup IPv4-only and IPv6-only network environments. > > This mentions 'net=none', but I don't see that in the patch below; > instead I see a new boolean. Eeergl,

Re: [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6

2016-03-24 Thread Eric Blake
On 03/24/2016 03:00 PM, Samuel Thibault wrote: In the subject line: "Allow to" is not idiomatic English. "Allow" requires either a subject ("Allow someone to disable"), or a gerund ("Allow disabling"). > Make net=none disable IPv4 and ip6-net=none disable IPv6, so the user can > setup IPv4-only

[Qemu-devel] [PULL v4 00/28] Misc patches for QEMU 2.6 hard freeze

2016-03-24 Thread Paolo Bonzini
The following changes since commit 4829e0378dfb91d55af9dfd741bd09e8f2c4f91a: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-18' into staging (2016-03-18 17:18:41 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you

Re: [Qemu-devel] Unable to boot ubuntu 14.04 on qemu with raspi support

2016-03-24 Thread Vincenzo Calabrò
Thanks! I don't need binaries for win, but I'll try to compile both versions and I'll keep you informed. Have a nice we V. On Mar 24, 2016 22:00, "Stefan Weil" wrote: > Am 24.03.2016 um 21:54 schrieb Vincenzo Calabrò: > > > > Ok I can test the Raspi branch and let you know... > > > > however I

Re: [Qemu-devel] [PATCH 0/4] slirp: Add dns6 support

2016-03-24 Thread Samuel Thibault
Hello, Could somebody review this? This will be needed for ipv6-only setups. Samuel Samuel Thibault, on Sun 20 Mar 2016 16:26:24 +0100, wrote: > This adds support for DNS over IPv6 in slirp, which is notably useful when the > host has only an IPv6 DNS server. > > This series depends on "slirp:

[Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6

2016-03-24 Thread Samuel Thibault
Make net=none disable IPv4 and ip6-net=none disable IPv6, so the user can setup IPv4-only and IPv6-only network environments. Signed-off-by: Samuel Thibault --- net/slirp.c | 19 +-- qapi-schema.json | 15 +-- qemu-options.hx | 19 --- slirp/i

Re: [Qemu-devel] Unable to boot ubuntu 14.04 on qemu with raspi support

2016-03-24 Thread Stefan Weil
Am 24.03.2016 um 21:54 schrieb Vincenzo Calabrò: > > Ok I can test the Raspi branch and let you know... > > however I hope you will consider to prioritize the Raspi support given > the fact that is one of the most popular low cost Linux platforms. > > Let me know where I can take the latest Raspi b

Re: [Qemu-devel] Unable to boot ubuntu 14.04 on qemu with raspi support

2016-03-24 Thread Vincenzo Calabrò
Ok I can test the Raspi branch and let you know... however I hope you will consider to prioritize the Raspi support given the fact that is one of the most popular low cost Linux platforms. Let me know where I can take the latest Raspi branch please. V. On Mar 24, 2016 21:27, "Peter Maydell" wro

Re: [Qemu-devel] [PATCH 2/2] tap: vhost busy polling support

2016-03-24 Thread Eric Blake
On 03/20/2016 11:25 PM, Jason Wang wrote: > This patch add the capability of basic vhost net busy polling which is > supported by recent kernel. User could configure the maximum number of > us that could be spent on busy polling through a new property of tap > "vhost_poll_us". > > Signed-off-by: J

Re: [Qemu-devel] Unable to boot ubuntu 14.04 on qemu with raspi support

2016-03-24 Thread Peter Maydell
On 24 March 2016 at 20:15, Vincenzo Calabrò wrote: > Hi! > I'm still trying to run an ubuntu image (14.04) with qemu. > > http://pastebin.com/TymAhZq0 > > As you can see, > > [6.790830] bcm_power: Broadcom power driver > [6.796113] bcm_power_open() -> 0 > [6.797978] bcm_power_request(0

Re: [Qemu-devel] [PULL v3 00/28] Misc patches for QEMU 2.6 hard freeze

2016-03-24 Thread Peter Maydell
On 24 March 2016 at 20:17, Paolo Bonzini wrote: > > > On 24/03/2016 19:05, Peter Maydell wrote: >> On 24 March 2016 at 13:03, Paolo Bonzini wrote: >>> The following changes since commit 4829e0378dfb91d55af9dfd741bd09e8f2c4f91a: >>> >>> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi

Re: [Qemu-devel] [PULL v3 00/28] Misc patches for QEMU 2.6 hard freeze

2016-03-24 Thread Paolo Bonzini
On 24/03/2016 19:05, Peter Maydell wrote: > On 24 March 2016 at 13:03, Paolo Bonzini wrote: >> The following changes since commit 4829e0378dfb91d55af9dfd741bd09e8f2c4f91a: >> >> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-18' >> into staging (2016-03-18 17:18:41 +)

[Qemu-devel] Unable to boot ubuntu 14.04 on qemu with raspi support

2016-03-24 Thread Vincenzo Calabrò
Hi! I'm still trying to run an ubuntu image (14.04) with qemu. http://pastebin.com/TymAhZq0 As you can see, [6.790830] bcm_power: Broadcom power driver [6.796113] bcm_power_open() -> 0 [6.797978] bcm_power_request(0, 8) there is still some sort of power management problem which stop

Re: [Qemu-devel] io_mem_notdirty and live migration

2016-03-24 Thread Hollis Blanchard
On 03/23/2016 09:53 AM, Paolo Bonzini wrote: On 23/03/2016 17:47, Hollis Blanchard wrote: Paolo, is it true that only TB-invalidating writes go through the io_mem_notdirty path? I'm looking at the live migration code now, and it seems like every memory write will go through that path when global

Re: [Qemu-devel] [PATCH v5 0/7] Deterministic replay extensions

2016-03-24 Thread Pavel Dovgalyuk
Thank you! Sent using CloudMagic Email [https://cloudmagic.com/k/d/mailapp?ct=ta&cv=7.3.5&pv=5.1.1&source=email_footer_2] On чт, Мар 24, 2016 at 2:59 PM, Kevin Wolf < kw...@redhat.com [kw...@redhat.com] > wrote: Am 14.03.2016 um 08:44 hat Pavel Dovgalyuk geschrieben: > This set of patches is

[Qemu-devel] [RFC for-2.7 0/1] block/qapi: Add query-block-node-tree

2016-03-24 Thread Max Reitz
As I responded to: - http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg04464.html - http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg05680.html I think a general solution for querying the block node tree would be nice (I don't think we actually have one). The single patch in thi

[Qemu-devel] [RFC for-2.7 1/1] block/qapi: Add query-block-node-tree

2016-03-24 Thread Max Reitz
This command returns the tree of BlockDriverStates under a given root node. Every tree node is described by its node name and the connection of a parent node to its children additionally contains the role the child assumes. A node's name can then be used e.g. in conjunction with query-named-block

Re: [Qemu-devel] [PATCH v4] blizzard: Remove support for DEPTH != 32

2016-03-24 Thread Eric Blake
On 03/24/2016 12:18 PM, Pooja Dhannawat wrote: > Removing support for DEPTH != 32 from blizzard template header > and file that includes it, as macro DEPTH == 32 only used. > > Signed-off-by: Pooja Dhannawat > --- > #define DEPTH 32 > #include "blizzard_template.h" > > +assert(surface_b

[Qemu-devel] block IO thread creation question

2016-03-24 Thread Chris Friesen
Hi, Could someone point me at the code for creating threads to handle block IO? I'm seeing up to 30 threads per virtual disk, which seems high. In case it's related, the block devices are iSCSI with the host acting as the initiator and exposing block devices to qemu. I'm particularly inter

Re: [Qemu-devel] [PATCH] Fix some typos found by codespell

2016-03-24 Thread Michael Roth
Quoting Stefan Weil (2016-03-23 09:59:57) > Signed-off-by: Stefan Weil > --- > > I hope that it is fine not to split this in lots of > small patches. > > Regards > Stefan > > audio/mixeng.c | 2 +- > audio/ossaudio.c| 2 +- > contrib/ivshmem-s

Re: [Qemu-devel] [PATCH] Change return type of functions that are named *_exit or *_exitfn in hw/ from int to void.

2016-03-24 Thread Peter Maydell
On 24 March 2016 at 17:18, Nutan Shinde wrote: Hi; thanks for this patch; I have some comments below. > Functions that are named *_exit or *_exitfn in hw/, all return 0. Changed > return type of these methods from int to void. > Also, removed check where values were returned from these methods

[Qemu-devel] [PATCH v4] blizzard: Remove support for DEPTH != 32

2016-03-24 Thread Pooja Dhannawat
Removing support for DEPTH != 32 from blizzard template header and file that includes it, as macro DEPTH == 32 only used. Signed-off-by: Pooja Dhannawat --- hw/display/blizzard.c | 41 - hw/display/blizzard_template.h | 30 +---

Re: [Qemu-devel] [PULL v3 00/28] Misc patches for QEMU 2.6 hard freeze

2016-03-24 Thread Peter Maydell
On 24 March 2016 at 13:03, Paolo Bonzini wrote: > The following changes since commit 4829e0378dfb91d55af9dfd741bd09e8f2c4f91a: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-18' > into staging (2016-03-18 17:18:41 +) > > are available in the git repository at: > >

[Qemu-devel] [RFC 7/7] virtio: handle virtqueue_get_head() errors

2016-03-24 Thread Stefan Hajnoczi
Stop processing the vring if virtqueue_get_head() fetches an out-of-bounds head index. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 525af8b..bf2

[Qemu-devel] [RFC 2/7] virtio: stop virtqueue processing if device is broken

2016-03-24 Thread Stefan Hajnoczi
QEMU prints an error message and exits when the device enters an invalid state. Terminating the process is heavy-handed. The guest may still be able to function even if there is a bug in a virtio guest driver. Moreover, exiting is a bug in nested virtualization where a nested guest could DoS oth

[Qemu-devel] [RFC 6/7] virtio: handle virtqueue_num_heads() errors

2016-03-24 Thread Stefan Hajnoczi
If the index avail ring index is bogus virtqueue_num_heads() must return -EINVAL. The only caller is virtqueue_get_avail_bytes(). Return saying no bytes are available when virtqueue_num_heads() fails. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 11 --- 1 file changed, 8 ins

[Qemu-devel] [RFC 0/7] virtio: avoid exit() when device enters invalid states

2016-03-24 Thread Stefan Hajnoczi
The virtio code calls exit() when the device enters an invalid state. This means invalid vring indices and descriptor chains kill the VM. See the patch descriptions for why this is a bad thing. When the virtio device is in the broken state calls to virtqueue_pop() and friends will pretend the vi

[Qemu-devel] [RFC 5/7] virtio: handle virtqueue_read_next_desc() errors

2016-03-24 Thread Stefan Hajnoczi
Stop processing the vring if an avail ring index is invalid. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 4758fe3..f845df2

[Qemu-devel] [RFC 1/7] virtio: fix stray tab character

2016-03-24 Thread Stefan Hajnoczi
The patches fixes a single occurrence of a tab character that resulted in mis-aligned indentation. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 08275a9..de8a3b3 100644 --- a

  1   2   3   4   >