Re: [Qemu-devel] [PATCH v3 0/9] virtio-blk: Converge VirtIOBlockRequest into VirtIOBlockReq

2014-06-05 Thread Paolo Bonzini
Il 06/06/2014 03:53, Fam Zheng ha scritto: This unifies the request structure used by dataplane and non-dataplane code, while dropping unnessary fields for bounce buffer and read flag. Applies on top of Stefan's block tree. v3: Address Paolo's comments: [06/09] virtio-blk: Use VirtIOBlockReq.i

Re: [Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-06-05 Thread Paolo Bonzini
Il 06/06/2014 05:06, Zhang, Yang Z ha scritto: Paolo Bonzini wrote on 2014-06-03: Il 30/05/2014 10:59, Tiejun Chen ha scritto: +static int create_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev) +{ +struct PCIDevice *dev; + +char rid; + +dev = pci_create(bus, PCI_DEVFN(0x1f, 0),

Re: [Qemu-devel] checkpatch.pl question

2014-06-05 Thread Alexey Kardashevskiy
On 06/06/2014 04:27 PM, Markus Armbruster wrote: > Alexey Kardashevskiy writes: > >> Hi! >> >> checkpatch.pl often complains on things like this: >> >> === >> ERROR: need consistent spacing around '*' (ctx:WxV) >> #57: FILE: hw/misc/vfio.c:4323: >> +int vfio_container_ioctl(AddressSpace *as, int3

Re: [Qemu-devel] checkpatch.pl question

2014-06-05 Thread Markus Armbruster
Alexey Kardashevskiy writes: > Hi! > > checkpatch.pl often complains on things like this: > > === > ERROR: need consistent spacing around '*' (ctx:WxV) > #57: FILE: hw/misc/vfio.c:4323: > +int vfio_container_ioctl(AddressSpace *as, int32_t groupid, >^ > > t

[Qemu-devel] [PATCH memory v4 10/10] memory: MemoryRegion: Add size property

2014-06-05 Thread Peter Crosthwaite
To allow devices to dynamically resize the device. The motivation is to allow devices with variable size to init their memory_region without size early and then correctly populate size at realize() time. Signed-off-by: Peter Crosthwaite --- memory.c | 38 ++

[Qemu-devel] [PATCH memory v4 09/10] memory: MemoryRegion: Add may-overlap and priority props

2014-06-05 Thread Peter Crosthwaite
QOM propertyify the .may-overlap and .priority fields. The setters will re-add the memory as a subregion if needed (i.e. the values change when the memory region is already contained). Signed-off-by: Peter Crosthwaite --- changed since v2: Fixed priority getter Support signed values in priority s

[Qemu-devel] [PATCH memory v4 08/10] memory: MemoryRegion: Add container and addr props

2014-06-05 Thread Peter Crosthwaite
Expose the already existing .parent and .addr fields as QOM properties. .parent (i.e. the field describing the memory region that contains this one in Memory hierachy) is renamed "container". This is to avoid confusion with the owner field, which is much more akin to an actual QOM parent. Setting

[Qemu-devel] [PATCH memory v4 07/10] memory: MemoryRegion: QOMify

2014-06-05 Thread Peter Crosthwaite
QOMify memory regions as an Object. The former init() and destroy() routines become instance_init() and instance_finalize() resp. memory_region_init() is re-implemented to be: object_initialize() + set fields memory_region_destroy() is re-implemented to call finalize(). Signed-off-by: Peter Cros

[Qemu-devel] [PATCH memory v4 06/10] memory: MemoryRegion: factor out memory region re-adder

2014-06-05 Thread Peter Crosthwaite
memory_region_set_address is mostly just a function that deletes and re-adds a memory region. Factor this generic functionality out into a re-usable function. This prepares support for further QOMification of MemoryRegion. Signed-off-by: Peter Crosthwaite --- memory.c | 30 +++--

[Qemu-devel] [PATCH memory v4 05/10] memory: Coreify subregion add functionality

2014-06-05 Thread Peter Crosthwaite
Split off the core looping code that actually adds subregions into it's own fn. This prepares support for Memory Region qomification where setting the MR address or parent via QOM will back onto this more minimal function. Signed-off-by: Peter Crosthwaite --- memory.c | 18 -- 1

[Qemu-devel] [PATCH memory v4 04/10] qom: Publish object_resolve_link

2014-06-05 Thread Peter Crosthwaite
The lower level API object_resolve_path is already published to the world as part of the QOM API. Add object_resolve link as well. This allows QOM clients to roll their own link property setters without having to fallback to the less safe object_resolve_path. Signed-off-by: Peter Crosthwaite ---

[Qemu-devel] [PATCH memory v4 03/10] qom: object: Ignore refs/unrefs of NULL

2014-06-05 Thread Peter Crosthwaite
Just do nothing if passed NULL for a ref or unref. This avoids call sites that manage a combination of NULL or non-NULL pointers having to add iffery around every ref and unref. Signed-off-by: Peter Crosthwaite --- qom/object.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-

[Qemu-devel] [PATCH memory v4 02/10] qom: add a generic mechanism to resolve paths

2014-06-05 Thread Peter Crosthwaite
From: Paolo Bonzini It may be desirable to have custom link<> properties that do more than just store an object. Even the addition of a "check" function is not enough if setting the link has side effects or if a non-standard reference counting is preferrable. Avoid the assumption that the opaqu

[Qemu-devel] [PATCH memory v4 01/10] memory: Simplify mr_add_subregion() if-else

2014-06-05 Thread Peter Crosthwaite
This if else is not needed. The previous call to memory_region_add (whether _overlap or not) will always set priority and may_overlap to desired values. And its not possible to get here without having called memory_region_add_subregion due to the null guard on parent. So we can just directly call m

[Qemu-devel] [PATCH memory v4 00/10] Memory Region QOMification

2014-06-05 Thread Peter Crosthwaite
Hi Paolo, Andreas, This patch series QOMifies Memory regions. This is the Memory API specific subset of patches forming part of the Memory/GPIO/Sysbus QOMification. I think Paolo already has P1 enqeued. Including for ease of review. some QOM patches in P2-4 that cut down on later boilerplate. TBH

Re: [Qemu-devel] [PATCH] vl.c: Check -smp option ranges before setting int globals

2014-06-05 Thread Markus Armbruster
Eduardo Habkost writes: > When parsing the -smp option, check if the values (that can be anywhere > in the [0, UINT64_MAX] range) are in the int range before setting the > int globals smp_cpus, max_cpus, smp_cores, smp_threads. > > Without this, it was posbible to make smp_cpus and max_cpus negat

Re: [Qemu-devel] [sheepdog] [PATCH v3 0/2] bugfixes of sheepdog driver for a case of live snapshot

2014-06-05 Thread Liu Yuan
On Fri, Jun 06, 2014 at 01:35:10PM +0900, Hitoshi Mitake wrote: > Current sheepdog driver has two problems in a mechanism of inode > object reloading for live snapshot. It causes inconsistent state of > snapshot volumes. A new GC algorithm implemented in sheepdog exposes > the problems. This patchs

Re: [Qemu-devel] [PATCH 2/3] virtio-blk: Bypass error action and I/O accounting on invalid r/w

2014-06-05 Thread Markus Armbruster
Fam Zheng writes: > On Thu, 06/05 14:15, Markus Armbruster wrote: >> When a device model's I/O operation fails, we execute the error >> action. This lets layers above QEMU implement thin provisioning, or >> attempt to correct errors before they reach the guest. But when the >> I/O operation fai

Re: [Qemu-devel] [PATCH 1/2] qom: add a generic mechanism to resolve paths

2014-06-05 Thread Peter Crosthwaite
On Thu, Jun 5, 2014 at 9:23 PM, Paolo Bonzini wrote: > It may be desirable to have custom link<> properties that do more > than just store an object. Even the addition of a "check" > function is not enough if setting the link has side effects > or if a non-standard reference counting is preferrab

Re: [Qemu-devel] active block commit bug?

2014-06-05 Thread Amos Kong
On Thu, Jun 05, 2014 at 09:06:42AM +0200, Markus Armbruster wrote: > Eric Blake writes: > > > On 06/04/2014 08:09 PM, Fam Zheng wrote: > > > >>> Sounds like we have an off-by-one condition if empty files behave > >>> differently from other files. We ought to fix that bug (not that your > >>> nor

Re: [Qemu-devel] [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-05 Thread Amos Kong
On Fri, Jun 06, 2014 at 01:28:59AM +, Gonglei (Arei) wrote: > Hi, Amos > > > -Original Message- > > From: Amos Kong [mailto:ak...@redhat.com] > > Sent: Friday, June 06, 2014 9:12 AM > > To: qemu-devel@nongnu.org > > Cc: stefa...@gmail.com; afaer...@suse.de; Gonglei (Arei) > > Subject:

[Qemu-devel] [PATCH v9 1/3] sPAPR: Implement EEH RTAS calls

2014-06-05 Thread Gavin Shan
The emulation for EEH RTAS requests from guest isn't covered by QEMU yet and the patch implements them. The patch defines constants used by EEH RTAS calls and adds callback sPAPRPHBClass::eeh_handler, which is going to be used this way: 1. RTAS calls are received in spapr_pci.c, sanity check is d

[Qemu-devel] [PATCH v9 2/3] headers: Update kernel header

2014-06-05 Thread Gavin Shan
This updates kernel header (vfio.h) for EEH support on VFIO PCI devices. Signed-off-by: Gavin Shan --- linux-headers/linux/vfio.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index f0aa97d..6dfaf16

[Qemu-devel] [PATCH v9 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-06-05 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 56 + 1 file changed, 56 insertions(+) diff --git a/hw/ppc/spapr_pci_

[Qemu-devel] [PATCH v9 0/3] EEH Support for VFIO PCI Device

2014-06-05 Thread Gavin Shan
The series of patches adds support EEH for VFIO PCI devices on sPAPR platform. It requires corresponding host kernel support. Also, it is based on top of Alexey's VFIO-for-sPAPR git repository. QEMU: git://github.com/aik/qemu.git (branch: vfio) Kernel: git://github.com/aik/linux.git (branch: vfi

[Qemu-devel] [PATCH v3 1/2] sheepdog: fix vdi object update after live snapshot

2014-06-05 Thread Hitoshi Mitake
sheepdog driver should decide a write request is COW or not based on inode object which is active when the write request is issued. Example of wrong inode update path in the previous driver: 1. drier issues an ordinal write request to an existing object 2. user creates a snapshot of the VDI before

[Qemu-devel] [PATCH v3 2/2] sheepdog: reload only header in a case of live snapshot

2014-06-05 Thread Hitoshi Mitake
sheepdog driver doesn't need to read data_vdi_id[] when a live snapshot is created. Cc: Kevin Wolf Cc: Stefan Hajnoczi Cc: Liu Yuan Cc: MORITA Kazutaka Signed-off-by: Hitoshi Mitake --- v2: - correct wrong spelling in the commit log block/sheepdog.c |9 ++--- 1 files changed, 6 ins

[Qemu-devel] [PATCH v3 0/2] bugfixes of sheepdog driver for a case of live snapshot

2014-06-05 Thread Hitoshi Mitake
Current sheepdog driver has two problems in a mechanism of inode object reloading for live snapshot. It causes inconsistent state of snapshot volumes. A new GC algorithm implemented in sheepdog exposes the problems. This patchset contains bugfixes for them. v3: - update commit log v2: - corrrec

Re: [Qemu-devel] [Qemu-ppc] qemu does not support PAPR

2014-06-05 Thread sonia verma
Hi Stuart Thanks for the information.I'm able to run libvirt on my system.I need to run libguestfs on the same powerpc ubuntu. Can you help me regarding that? On Thu, Jun 5, 2014 at 11:10 PM, Stuart Yoder wrote: > > From: sonia verma [mailto:soniaverma9...@gmail.com] > > Sent: Thursday, June 0

Re: [Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-06-05 Thread Hu Tao
On Mon, May 19, 2014 at 08:34:54PM -0300, Eduardo Habkost wrote: > On Tue, May 06, 2014 at 05:27:46PM +0800, Hu Tao wrote: > [...] > > @@ -203,6 +296,20 @@ host_memory_backend_memory_init(UserCreatable *uc, > > Error **errp) > > if (backend->prealloc) { > > os_mem_prealloc(memory_reg

Re: [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-05 Thread Benjamin Herrenschmidt
On Fri, 2014-06-06 at 01:36 +0200, Alexander Graf wrote: > > It would be nicer if the guest had full control over the virtual > address range of a PCI device. It does ... within a HW window which can be different between P7 and P8. On P7 all PEs on a PHB share a single DMA address space that ge

[Qemu-devel] checkpatch.pl question

2014-06-05 Thread Alexey Kardashevskiy
Hi! checkpatch.pl often complains on things like this: === ERROR: need consistent spacing around '*' (ctx:WxV) #57: FILE: hw/misc/vfio.c:4323: +int vfio_container_ioctl(AddressSpace *as, int32_t groupid, ^ total: 1 errors, 0 warnings, 46 lines checked ===

[Qemu-devel] [PATCH v8 4/4] vfio: Enable for SPAPR

2014-06-05 Thread Alexey Kardashevskiy
This turns the sPAPR support on and enables VFIO container use in the kernel. This extends vfio_connect_container to support VFIO_SPAPR_TCE_IOMMU type in the host kernel. This registers a memory listener which sPAPR IOMMU will notify when executing H_PUT_TCE/etc DMA calls. The listener then will

[Qemu-devel] [PATCH v8 3/4] spapr_pci_vfio: Add spapr-pci-vfio-host-bridge to support vfio

2014-06-05 Thread Alexey Kardashevskiy
The patch adds a spapr-pci-vfio-host-bridge device type which is a PCI Host Bridge with VFIO support. The new device inherits from the spapr-pci-host-bridge device and adds an "iommu" property which is an IOMMU id. This ID represents a minimal entity for which IOMMU isolation can be guaranteed. In

[Qemu-devel] [PATCH v8 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-05 Thread Alexey Kardashevskiy
POWER KVM supports an KVM_CAP_SPAPR_TCE capability which allows allocating TCE tables in the host kernel memory and handle H_PUT_TCE requests targeted to specific LIOBN (logical bus number) right in the host without switching to QEMU. At the moment this is used for emulated devices only and the han

[Qemu-devel] [PATCH v8 2/4] vfio: Add vfio_container_ioctl()

2014-06-05 Thread Alexey Kardashevskiy
While most operations with VFIO IOMMU driver are generic and used inside vfio.c, there are still some operations which only specific VFIO IOMMU drivers implement. The first example of it will be reading a DMA window start from the host. This adds a helper which passes an ioctl request to the conta

[Qemu-devel] [PATCH v8 0/4] vfio on spapr-ppc64

2014-06-05 Thread Alexey Kardashevskiy
Yet another try with VFIO on SPAPR (server PPC64). This adds VFIO support on SPAPR for the existing VFIO-SPAPR-TCE driver in the upstream kernel. Individual patches have more detailed commit logs. Please comment. Thanks! Changes: v8: * added placeholder for KVM_CAP_SPAPR_TCE_VFIO capability *

[Qemu-devel] [network performance question] only ~2Gbps throughput between two linux guests which are running on the same host via netperf -t TCP_STREAM -m 1400, but xen can achieve ~7Gbps

2014-06-05 Thread Zhang Haoyu
Hi, all I ran two linux guest on the same kvm host, then start the netserver on one vm, start netperf on the other one, netperf command and test result shown as below, netperf -H 196.5.5.71 -t TCP_STREAM -l 60 -- -m 1400 -M 1400 MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 1

Re: [Qemu-devel] [PATCH 2/3] virtio-blk: Bypass error action and I/O accounting on invalid r/w

2014-06-05 Thread Eric Blake
On 06/05/2014 09:18 PM, Fam Zheng wrote: > On Thu, 06/05 14:15, Markus Armbruster wrote: >> When a device model's I/O operation fails, we execute the error >> action. This lets layers above QEMU implement thin provisioning, or >> attempt to correct errors before they reach the guest. But when the

Re: [Qemu-devel] [PATCH 3/3] virtio-blk: Treat read/write beyond end as invalid

2014-06-05 Thread Fam Zheng
On Thu, 06/05 14:15, Markus Armbruster wrote: > The block layer fails such reads and writes just fine. However, they > then get treated like valid operations that fail: the error action > gets executed. Unwanted; reporting the error to the guest is the only > sensible action. > > Reject them bef

Re: [Qemu-devel] [PATCH 2/3] virtio-blk: Bypass error action and I/O accounting on invalid r/w

2014-06-05 Thread Fam Zheng
On Thu, 06/05 14:15, Markus Armbruster wrote: > When a device model's I/O operation fails, we execute the error > action. This lets layers above QEMU implement thin provisioning, or > attempt to correct errors before they reach the guest. But when the > I/O operation fails because its invalid, re

Re: [Qemu-devel] [PATCH 1/3] virtio-blk: Factor common checks out of virtio_blk_handle_read/write()

2014-06-05 Thread Fam Zheng
On Thu, 06/05 14:15, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/block/virtio-blk.c | 24 ++-- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 8a568e5..f2b4dca 100644 > --- a

Re: [Qemu-devel] [Bug 1326986] [NEW] e1000 - no link detected by

2014-06-05 Thread Gabriel L. Somlo
On Thu, Jun 05, 2014 at 10:55:39PM -0400, Matthew Gamble wrote: > Gabriel, > > I tried your suggestion and while the OS doesn't detect a link, it does > send the following right after toggling the link: > > e1000: set_ics 4, ICR 4, IMR 0 > > e1000: set_ics 4, ICR 4, IMR 0 > > Without diving int

Re: [Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-06-05 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-06-03: > Il 30/05/2014 10:59, Tiejun Chen ha scritto: >> +static int create_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev) >> +{ >> +struct PCIDevice *dev; >> + >> +char rid; >> + >> +dev = pci_create(bus, PCI_DEVFN(0x1f, 0), "intel-pch-isa-bridge"); >

Re: [Qemu-devel] [Bug 1326986] [NEW] e1000 - no link detected by

2014-06-05 Thread Matthew Gamble
Gabriel, I tried your suggestion and while the OS doesn't detect a link, it does send the following right after toggling the link: e1000: set_ics 4, ICR 4, IMR 0 e1000: set_ics 4, ICR 4, IMR 0 Without diving into the intel programming guide myself does that help in any way? Perhaps it's expect

Re: [Qemu-devel] [Bug 1326986] [NEW] e1000 - no link detected by

2014-06-05 Thread Gabriel L. Somlo
Matthew Gamble wrote: > I'm trying to get a VXWorks image running inside a qemu guest. I have > the machine running, however, the vxworks image only has support for the > 82544EI device so I had to change the device ID in e1000.c to get the > device even recognized so I'm not sure if this is a bu

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulation" option

2014-06-05 Thread Eduardo Habkost
On Fri, Jun 06, 2014 at 03:21:04AM +0200, Borislav Petkov wrote: > On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote: > > But can we drop the EMULATED name somehow? Can we rename [1] the ioctl > > to say GET_UNSUPPORTED_CPUID or something along those lines? The name > > is just a reall

Re: [Qemu-devel] [PATCH] scripts/qemu-binfmt-conf.sh: rewrite to make user friendly & easier to maintain

2014-06-05 Thread Eric Blake
On 06/05/2014 07:47 PM, Mike Frysinger wrote: > The current script isn't terribly friendly -- you basically get one chance > to run it per boot w/out manually recovering the system state. > > It also doesn't lend itself to being made into an init script w/out a lot > of manual editing. > > Rewrit

Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2

2014-06-05 Thread Fam Zheng
On Thu, 06/05 17:11, Peter Maydell wrote: > On 5 June 2014 14:38, Rainer Müller wrote: > > On 2014-03-14 13:29, Paolo Bonzini wrote: > >> Il 13/03/2014 19:48, Peter Maydell ha scritto: > >>> Yep, here we are: > >>> LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names > >>> -arch x

[Qemu-devel] [PATCH v3 9/9] virtio-blk: Fix and clean up the in_sg and out_sg check

2014-06-05 Thread Fam Zheng
out_sg is checked by iov_to_buf below, so it can be dropped. Add assert and iov_discard_back around in_sg, as the in_sg is handled in dataplane code. Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/block/v

[Qemu-devel] [PATCH v3 8/9] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code

2014-06-05 Thread Fam Zheng
VirtIOBlockReq is allocated in process_request, and freed in command functions. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 102 +--- 1 file changed, 44 insertions(+), 58 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/

[Qemu-devel] [PATCH v3 5/9] virtio-blk: Replace VirtIOBlockRequest with VirtIOBlockReq

2014-06-05 Thread Fam Zheng
Field "inhdr" is added temporarily for a more mechanical change, and will be dropped in the next commit. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 34 +++--- include/hw/virtio/virtio-blk.h | 4 2 files changed, 19 insertions(+), 19 deletion

[Qemu-devel] [PATCH v3 7/9] virtio-blk: Convert VirtIOBlockReq.out to structrue

2014-06-05 Thread Fam Zheng
The virtio code currently assumes that the outhdr is in its own iovec. This is not guaranteed by the spec, so we should relax this assumption. Convert the VirtIOBlockReq.out field to structrue so that we can use iov_to_buf and then discard the header from the beginning of iovec. Suggested-by: Pao

[Qemu-devel] [PATCH v3 4/9] virtio-blk: Drop VirtIOBlockRequest.read

2014-06-05 Thread Fam Zheng
Since it's set but not used. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 3d1e9e1..4e5e458 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/data

[Qemu-devel] [PATCH v3 6/9] virtio-blk: Use VirtIOBlockReq.in to drop VirtIOBlockReq.inhdr

2014-06-05 Thread Fam Zheng
In current virtio spec, inhdr is a single byte, and is unlikely to change for both functionality and compatibility considerations. Non-dataplane uses .in, and we are on the way to converge them. So let's unify it to get cleaner code. Remove .inhdr and use .in. Signed-off-by: Fam Zheng --- hw/bl

[Qemu-devel] [PATCH v3 2/9] virtio-blk: Convert VirtIOBlockReq.elem to pointer

2014-06-05 Thread Fam Zheng
This will make converging with dataplane code easier. Add virtio_blk_free_request to handle the freeing of request internal fields. Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 85 +++--- include/hw/virtio/virtio-blk.h | 2 +- 2 files change

[Qemu-devel] [PATCH v3 1/9] virtio-blk: Move VirtIOBlockReq to header

2014-06-05 Thread Fam Zheng
For later reusing by dataplane code. Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 11 --- include/hw/virtio/virtio-blk.h | 11 +++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 0b1446e..49507a

[Qemu-devel] [PATCH v3 3/9] virtio-blk: Drop bounce buffer from dataplane code

2014-06-05 Thread Fam Zheng
The block layer will handle the unaligned request. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 25 - 1 file changed, 25 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index c10b7b7..3d1e9e1 100644 --- a/hw/b

[Qemu-devel] [PATCH v3 0/9] virtio-blk: Converge VirtIOBlockRequest into VirtIOBlockReq

2014-06-05 Thread Fam Zheng
This unifies the request structure used by dataplane and non-dataplane code, while dropping unnessary fields for bounce buffer and read flag. Applies on top of Stefan's block tree. v3: Address Paolo's comments: [06/09] virtio-blk: Use VirtIOBlockReq.in to drop VirtIOBlockReq.inhdr Add as

[Qemu-devel] [PATCH] scripts/qemu-binfmt-conf.sh: rewrite to make user friendly & easier to maintain

2014-06-05 Thread Mike Frysinger
The current script isn't terribly friendly -- you basically get one chance to run it per boot w/out manually recovering the system state. It also doesn't lend itself to being made into an init script w/out a lot of manual editing. Rewrite the sucker with proper functions so that people can easily

Re: [Qemu-devel] [PATCH v7 2/4] vfio: Add vfio_container_spapr_get_info()

2014-06-05 Thread Gavin Shan
On Fri, Jun 06, 2014 at 09:40:56AM +1000, Alexey Kardashevskiy wrote: >On 06/06/2014 05:27 AM, Alex Williamson wrote: >> On Thu, 2014-06-05 at 15:49 +1000, Alexey Kardashevskiy wrote: >>> To perform DMA mapping via TCE table correctly, the guest must >>> know where DMA window is located on the PCI

Re: [Qemu-devel] [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-05 Thread Gonglei (Arei)
Hi, Amos > -Original Message- > From: Amos Kong [mailto:ak...@redhat.com] > Sent: Friday, June 06, 2014 9:12 AM > To: qemu-devel@nongnu.org > Cc: stefa...@gmail.com; afaer...@suse.de; Gonglei (Arei) > Subject: [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest > > This patch adds a new

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulation" option

2014-06-05 Thread Borislav Petkov
On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote: > But can we drop the EMULATED name somehow? Can we rename [1] the ioctl > to say GET_UNSUPPORTED_CPUID or something along those lines? The name > is just a really really bad pick. What do you mean, a "bad pick" :-P? I added extra car

[Qemu-devel] [PATCH v3 2/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-05 Thread Amos Kong
This patch wraps a helper function to execute human command by one QMP command (human-monitor-command). It also checks the return string. Signed-off-by: Amos Kong --- tests/libqtest.c | 26 ++ tests/libqtest.h | 9 + 2 files changed, 35 insertions(+) diff --git

[Qemu-devel] [PATCH v3 4/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-05 Thread Amos Kong
Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..c9127c0 100644 --- a/tests/blockdev-test.c +++ b/tests/blockde

[Qemu-devel] [PATCH v3 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-05 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/virtio-blk-test.c | 31 +

[Qemu-devel] [PATCH v3 1/4] virtio-blk-test.c: change pci_nop() to virtblk_init()

2014-06-05 Thread Amos Kong
I want to add a new subtest in virtio-blk-test.c, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong --- tests/virtio-blk-test.c | 13 ++--- 1 file changed, 6 insertions(+), 7 d

[Qemu-devel] [PATCH v3 0/4] test virtio-blk hotplug

2014-06-05 Thread Amos Kong
It's worth to add a hotplug test to qtest, but without cooperation of guest OS, new devices can't be initialized by guest, and hot-unplug doesn't work. However, the new test can cover some part of code of hotplug/unplug. I will write another subtest to test hotplug with pci support. V2: move qmp

Re: [Qemu-devel] [PATCH v8 3/4] VFIO: Introduce helper vfio_pci_container_ioctl()

2014-06-05 Thread Gavin Shan
On Thu, Jun 05, 2014 at 12:27:23PM -0600, Alex Williamson wrote: >On Thu, 2014-06-05 at 16:53 +1000, Gavin Shan wrote: >> The patch introduces helper function vfio_pci_container_ioctl() to >> pass ioctl commands to the specified VFIO container that is identified >> by IOMMU group id. On sPAPR platf

Re: [Qemu-devel] [PATCH v8 3/4] VFIO: Introduce helper vfio_pci_container_ioctl()

2014-06-05 Thread Gavin Shan
On Thu, Jun 05, 2014 at 02:11:21PM +0200, Alexander Graf wrote: > >On 05.06.14 08:53, Gavin Shan wrote: >>The patch introduces helper function vfio_pci_container_ioctl() to >>pass ioctl commands to the specified VFIO container that is identified >>by IOMMU group id. On sPAPR platform, each containe

Re: [Qemu-devel] [PATCH v8 1/4] sPAPR: Implement EEH RTAS calls

2014-06-05 Thread Gavin Shan
On Thu, Jun 05, 2014 at 02:09:14PM +0200, Alexander Graf wrote: > >On 05.06.14 08:53, Gavin Shan wrote: >>The emulation for EEH RTAS requests from guest isn't covered >>by QEMU yet and the patch implements them. >> >>The patch defines constants used by EEH RTAS calls and adds >>callback sPAPRPHBCla

[Qemu-devel] [Bug 1326986] [NEW] e1000 - no link detected by VXWorks based guest

2014-06-05 Thread Matthew Gamble
Public bug reported: I'm trying to get a VXWorks image running inside a qemu guest. I have the machine running, however, the vxworks image only has support for the 82544EI device so I had to change the device ID in e1000.c to get the device even recognized so I'm not sure if this is a bug or an i

Re: [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-05 Thread Alexey Kardashevskiy
On 06/06/2014 09:36 AM, Alexander Graf wrote: > > On 06.06.14 01:17, Alexey Kardashevskiy wrote: >> On 06/06/2014 02:51 AM, Alexander Graf wrote: >>> On 05.06.14 16:33, Alexey Kardashevskiy wrote: On 06/05/2014 11:36 PM, Alexander Graf wrote: > On 05.06.14 15:33, Alexey Kardashevskiy wrot

Re: [Qemu-devel] [PATCH v7 2/4] vfio: Add vfio_container_spapr_get_info()

2014-06-05 Thread Alexey Kardashevskiy
On 06/06/2014 05:27 AM, Alex Williamson wrote: > On Thu, 2014-06-05 at 15:49 +1000, Alexey Kardashevskiy wrote: >> To perform DMA mapping via TCE table correctly, the guest must >> know where DMA window is located on the PCI bus. A hypervisor is >> expected to provide such information. Since QEMU h

Re: [Qemu-devel] [PATCH v7 4/4] vfio: Enable for spapr

2014-06-05 Thread Alexey Kardashevskiy
On 06/06/2014 05:31 AM, Alex Williamson wrote: > On Thu, 2014-06-05 at 15:50 +1000, Alexey Kardashevskiy wrote: >> This turns the sPAPR support on and enables VFIO container use >> in the kernel. >> >> This extends vfio_connect_container to support VFIO_SPAPR_TCE_IOMMU type >> in the host kernel. >

Re: [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-05 Thread Alexander Graf
On 06.06.14 01:17, Alexey Kardashevskiy wrote: On 06/06/2014 02:51 AM, Alexander Graf wrote: On 05.06.14 16:33, Alexey Kardashevskiy wrote: On 06/05/2014 11:36 PM, Alexander Graf wrote: On 05.06.14 15:33, Alexey Kardashevskiy wrote: On 06/05/2014 11:15 PM, Alexander Graf wrote: On 05.06.14

Re: [Qemu-devel] [RFC PATCH 0/2] qom: custom link properties

2014-06-05 Thread Marcelo Tosatti
On Thu, Jun 05, 2014 at 01:23:53PM +0200, Paolo Bonzini wrote: > Both Marcelo's rtc patches and Peter's MemoryRegion patches showed > the interest in having link properties with a custom representation > and/or a different way to store the property. > > Such properties would still be link<>s for t

[Qemu-devel] [PATCH] add command to position mouse pointer in absolute mode

2014-06-05 Thread Marcelo Tosatti
Add monitor command to change mouse cursor position when input device is in absolute mode. Signed-off-by: Marcelo Tosatti --- hmp-commands.hx | 22 +++--- monitor.c | 35 ++- 2 files changed, 53 insertions(+), 4 deletions(-) Index: qe

Re: [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-05 Thread Alexey Kardashevskiy
On 06/06/2014 02:51 AM, Alexander Graf wrote: > > On 05.06.14 16:33, Alexey Kardashevskiy wrote: >> On 06/05/2014 11:36 PM, Alexander Graf wrote: >>> On 05.06.14 15:33, Alexey Kardashevskiy wrote: On 06/05/2014 11:15 PM, Alexander Graf wrote: > On 05.06.14 15:10, Alexey Kardashevskiy wrot

Re: [Qemu-devel] [PATCH 5/9 v2] Add print_sysarch() to out table of syscalls that are supported and support them on all architectures for freebsd. netbsd and openbsd are not implemented but stubbed ou

2014-06-05 Thread Eric Blake
On 06/05/2014 04:28 PM, Sean Bruno wrote: In the subject, s/out/our/ ? Please trim your subject lines to 60 characters or so; and also include a topic. If you have more information (and that is often the case), then include a blank line after the summary before providing it. Thus, your commit s

[Qemu-devel] [PATCH 8/9 v2] Add thr_* to the table of syscalls that are supported on FreeBSD

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/freebsd/strace.list | 9 + 1 file changed, 9 insertions(+) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index ab52ca8..b2a159e 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/strace.list @@ -202,6 +202,15

[Qemu-devel] [PATCH 1/9 v2] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code

2014-06-05 Thread Sean Bruno
From: Stacey Son This change adds HOST_VARIANT_DIR so the various BSD OS dependent code can be seperated into its own directories rather than using #ifdef's. This may also allow an BSD variant OS to host another BSD variant's executible as a target. Signed-off-by: Stacey Son Signed-off-by: Se

[Qemu-devel] [PATCH 9/9 v2] Fix socket, fstat, fstatfs, chown syscalls. Add support for missing syscalls to the table on FreeBSD

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/freebsd/strace.list | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index b2a159e..61d11ca 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/st

[Qemu-devel] [PATCH 4/9 v2] Add print_ioctl() to out table of syscalls that are supported.

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/freebsd/strace.list | 2 +- bsd-user/strace.c| 19 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index 3235f16..718357b 100644 --- a/bsd-user/freebs

[Qemu-devel] [PATCH 7/9 v2] Add extattr_* to the table of syscalls that are supported on FreeBSD

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/freebsd/strace.list | 13 + 1 file changed, 13 insertions(+) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index b09b130..ab52ca8 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/strace.list @@ -51,6 +5

[Qemu-devel] [PATCH 5/9 v2] Add print_sysarch() to out table of syscalls that are supported and support them on all architectures for freebsd. netbsd and openbsd are not implemented but stubbed out.

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/arm/syscall.h | 36 bsd-user/arm/syscall.h.orig| 0 bsd-user/arm/target_arch_sysarch.h | 78 ++ bsd-user/freebsd/os-strace.h | 29 + bsd-user/freebsd/stra

[Qemu-devel] [PATCH 3/9 v2] Add print_sysctl() to out table of syscalls that are supported.

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/freebsd/strace.list | 21 +++-- bsd-user/strace.c| 22 ++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index 1edf412..3235f16 10064

[Qemu-devel] [PATCH 2/9 v2] No functional changes. GPL v2 attribution update. Cleanup some while space and style fixes. Move struct syscallname into qemu.h

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/qemu.h | 26 +++ bsd-user/strace.c | 126 +- 2 files changed, 94 insertions(+), 58 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index ddc74ed..b8a34c7 100644 --- a/bsd-user/qemu.h

[Qemu-devel] [PATCH 6/9 v2] Add __acl_* to the table of syscalls that are supported on FreeBSD

2014-06-05 Thread Sean Bruno
Signed-off-by: Sean Bruno --- bsd-user/freebsd/strace.list | 12 1 file changed, 12 insertions(+) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index 32b3c55..b09b130 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/strace.list @@ -16,6 +16

[Qemu-devel] [PATCH 0/9 v2] FreeBSD-user, breakout the BSDs

2014-06-05 Thread Sean Bruno
At the advice of Peter Maydell, break out these patches to inplement new syscalls into substantially smaller, bite sized chunks for review. These patches are based off a tree that Peter has kindly setup at: git://git.linaro.org/people/peter.maydell/qemu-arm.git bsd-user.next I've made clear brea

Re: [Qemu-devel] [PATCH v27 20/33] qcow2.c: replace QEMUOptionParameter with QemuOpts

2014-06-05 Thread Eric Blake
On 05/07/2014 03:58 AM, Chunyan Liu wrote: > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu > --- > Changes: > * remove exporting qemu_opt_find from qcow2 patch and commit separately. > * remove unnecessary indention changes in bdrv_qcow2 as Eric points out. > > block/qcow2.c | 26

Re: [Qemu-devel] [RFC 2/2 v2] target-i386: Add "x-allow-emulation" X86CPU property

2014-06-05 Thread Alexander Graf
On 05.06.14 21:57, Eduardo Habkost wrote: The new option will allow slow emulated features (the ones returned by GET_EMULATED_CPUID) to be enabled. We don't want to allow them to be enabled by accident, so they will be enabled only if emulation is explicitly allowed by the user. Use "x-" prefix

Re: [Qemu-devel] [PULL] qemu-sparc: SPARC32 and SPARC64 updates

2014-06-05 Thread Peter Maydell
On 5 June 2014 21:30, Mark Cave-Ayland wrote: > Hi Peter, > > This branch contains updates for SPARC, particularly QOM fixes for CG3/TCX as > requested by Andreas, an additional CG3 register boundary check requested by > Paolo and my APB IOMMU implementation for SPARC64. Please pull. > > > ATB, >

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulation" option

2014-06-05 Thread Alexander Graf
On 05.06.14 19:48, Eduardo Habkost wrote: On Thu, Jun 05, 2014 at 06:58:17PM +0200, Alexander Graf wrote: On 05.06.14 18:52, Paolo Bonzini wrote: Il 05/06/2014 18:45, Alexander Graf ha scritto: Only if you were using "-cpu somethingThatHasAVX", though, no? Yes. The same argument goes the oth

[Qemu-devel] [PATCH] vl.c: Check -smp option ranges before setting int globals

2014-06-05 Thread Eduardo Habkost
When parsing the -smp option, check if the values (that can be anywhere in the [0, UINT64_MAX] range) are in the int range before setting the int globals smp_cpus, max_cpus, smp_cores, smp_threads. Without this, it was posbible to make smp_cpus and max_cpus negative. Signed-off-by: Eduardo Habkos

Re: [Qemu-devel] [PATCH v2 0/2] Restore kvm-type option support on -machine pseries

2014-06-05 Thread Alexander Graf
On 30.05.14 23:24, Eduardo Habkost wrote: Second try, now changing only the pseries machine code at hw/ppc/spapr.c. Thanks, applied to ppc-next. Alex

Re: [Qemu-devel] [PATCH v27 19/33] QemuOpts: export qemu_opt_find

2014-06-05 Thread Eric Blake
On 05/07/2014 03:58 AM, Chunyan Liu wrote: > Export qemu_opt_find for qcow2 driver using it. > After replacing QEMUOptionParameter with QemuOpts, qcow2 driver will > use qemu_opt_find to judge if an option is explicitly set, to replace > the usage of .assigned in QEMUOptionParameter. > > Signed-of

Re: [Qemu-devel] [PULL 0/1] qemu-ga fixes for win32

2014-06-05 Thread Peter Maydell
On 5 June 2014 20:41, Michael Roth wrote: > The following changes since commit e00fcfeab3d452cba3d0a08991a39ab15df66424: > > Merge remote-tracking branch > 'remotes/awilliam/tags/vfio-pci-for-qemu-20140602.0' into staging (2014-06-03 > 14:37:43 +0100) > > are available in the git repository at

Re: [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path

2014-06-05 Thread Josh Durgin
On 06/05/2014 07:19 AM, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- block/rbd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/rbd.c b/block/rbd.c index 09af484..898fcfe 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -684,13 +684,16 @@ static BlockDriverAIOCB

Re: [Qemu-devel] [PULL 00/10] pc,pci,virtio,qdev fixes, tests

2014-06-05 Thread Peter Maydell
On 5 June 2014 18:17, Michael S. Tsirkin wrote: > The following changes since commit c5fa6c86d0765f837515d1c10654c621724a77e0: > > Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging > (2014-05-19 14:10:01 +0100) > > are available in the git repository at: > > git://git

  1   2   3   4   5   >