Re: [Qemu-devel] [PATCH 4/4] ivshmem: check the value returned by fstat()

2014-08-04 Thread Levente Kurusa
- Original Message - > Hi Michael, > Thanks for your review of this patch! > > > On Mon, Aug 04, 2014 at 04:25:44PM +0800, zhanghailiang wrote: > >> The function fstat() may fail, so check its return value. > >> > >> Signed-off-by: zhanghailiang > >> --- > >> hw/misc/ivshmem.c | 5 -

Re: [Qemu-devel] [PATCH v4 3/6] rename memory_region_init_ram to memory_region_init_ram_nofail

2014-08-04 Thread Peter Crosthwaite
On Tue, Aug 5, 2014 at 3:56 PM, Hu Tao wrote: > Signed-off-by: Hu Tao > --- > hw/alpha/typhoon.c | 2 +- > hw/arm/armv7m.c | 6 +++--- > hw/arm/cubieboard.c | 2 +- > hw/arm/digic_boards.c| 2 +- > hw/arm

Re: [Qemu-devel] [PATCH 7/7] qapi: drop support for inline subtypes

2014-08-04 Thread Fam Zheng
On Mon, 08/04 22:36, Eric Blake wrote: > diff --git a/tests/Makefile b/tests/Makefile > index a5d82e1..c54d802 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -193,7 +193,8 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ > comments.json empty.json enum-empty.json enum

[Qemu-devel] [PATCH v4 3/6] rename memory_region_init_ram to memory_region_init_ram_nofail

2014-08-04 Thread Hu Tao
Signed-off-by: Hu Tao --- hw/alpha/typhoon.c | 2 +- hw/arm/armv7m.c | 6 +++--- hw/arm/cubieboard.c | 2 +- hw/arm/digic_boards.c| 2 +- hw/arm/exynos4210.c | 9 + hw/arm/hig

[Qemu-devel] [PATCH v4 6/6] rename memory_region_init_ram_ptr_may_fail to memory_region_init_ram_ptr

2014-08-04 Thread Hu Tao
Signed-off-by: Hu Tao --- include/exec/memory.h | 18 +- memory.c | 14 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 8bebae8..9107fa5 100644 --- a/include/exec/memory.h +++ b/includ

[Qemu-devel] [PATCH v4 5/6] rename memory_region_init_ram_ptr to memory_region_init_ram_ptr_nofail

2014-08-04 Thread Hu Tao
Signed-off-by: Hu Tao --- hw/display/g364fb.c | 4 ++-- hw/i386/kvm/pci-assign.c | 3 ++- hw/misc/ivshmem.c| 9 + hw/misc/vfio.c | 3 ++- hw/ppc/spapr.c | 4 ++-- include/exec/memory.h| 16 memory.c | 10 +-

[Qemu-devel] [PATCH v4 0/6] bug fixs for memory backend

2014-08-04 Thread Hu Tao
This series includes: 1. two patches to fix bugs of memory backend. See patch 1-2. 2. Add errp to memory_region_init_ram and memory_region_init_ram_ptr, and add corresponding nofail versions. See patch 3-4. changes to v3: - fix build on 32bit host - add memory API renaming - rebase on latest

[Qemu-devel] [PATCH v4 2/6] exec: improve error handling and reporting in file_ram_alloc() and gethugepagesize()

2014-08-04 Thread Hu Tao
This patch fixes two problems of memory-backend-file: 1. If user adds a memory-backend-file object using object_add command, specifying a non-existing directory for property mem-path, qemu will core dump with message: /nonexistingdir: No such file or directory Bad ram offset f

[Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_fail() and memory_region_init_ram_ptr_may_fail()

2014-08-04 Thread Hu Tao
These two are almost the same as memory_region_init_ram() and memory_region_init_ram_ptr() except that they have an extra errp parameter to let callers handle error. The purpose is to fix the bug described below. We should have added errp directly to memory_region_ram(), but that mixes updates to

[Qemu-devel] [PATCH v4 4/6] rename memory_region_init_ram_may_fail to memory_region_init_ram

2014-08-04 Thread Hu Tao
Signed-off-by: Hu Tao --- backends/hostmem-ram.c | 4 ++-- include/exec/memory.h | 15 +++ memory.c | 12 ++-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/backends/hostmem-ram.c b/backends/hostmem-ram.c index d0e92ad..a67a134 100644 --- a/b

[Qemu-devel] Fix a bug in debug printing of memory translation tables

2014-08-04 Thread Mikhail Ilin
ping http://patchwork.ozlabs.org/patch/372865/ On 23.07.2014 14:44, Mikhail Ilin wrote: > Hi, > > I've enabled DEBUG_MMAP in linux-user/mmap.c and got debug info of memory > layout. > > This is the debug output of guest memory layout from qemu (including > the last mmap call marked with *). > >

Re: [Qemu-devel] [PATCH 1/7] qapi: add some enum tests

2014-08-04 Thread Fam Zheng
On Mon, 08/04 22:36, Eric Blake wrote: > diff --git a/tests/Makefile b/tests/Makefile > index 4b2e1bb..a5d82e1 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -190,7 +190,8 @@ $(foreach target,$(SYSEMU_TARGET_LIST), \ > $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF))) > >

Re: [Qemu-devel] [PATCH] /proc/self/maps content is not correct for a guest

2014-08-04 Thread Mikhail Ilin
ping http://patchwork.ozlabs.org/patch/374162/ On 28.07.2014 16:02, Mikhail Ilin wrote: Hi, As it was posted earlier the output of reading /proc/self/maps is not correct for a guest. There are some issues: https://bugs.launchpad.net/qemu/+bug/1346784 http://lists.nongnu.org/archive/html/qemu-

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

2014-08-04 Thread Fam Zheng
On Mon, 08/04 13:10, Milos Vyletel wrote: > VMDK's streamOptimized format is different from regular sparse format. > L1(GD) and L2(GT) tables are not predefined but rather generated and > written during image creation mainly because there is no way to tell > how much space data will occupy once the

[Qemu-devel] [PATCH 7/7] qapi: drop support for inline subtypes

2014-08-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument; but existing use of inline substructs conflicts with that goal. Now that all commands have been fixed to avoid inline substructs, nuke support for them. * scripts/qapi.p

Re: [Qemu-devel] [PATCH v2 1/1] virtio-rng: add some trace events

2014-08-04 Thread Amos Kong
On Mon, Aug 04, 2014 at 04:22:44PM +0530, Amit Shah wrote: > Add some trace events to virtio-rng for easier debugging > > Signed-off-by: Amit Shah > > --- > v2: > - requested_size trace event now shows proper values Reviewed-by: Amos Kong > --- > hw/virtio/virtio-rng.c | 6 ++ > trace-

[Qemu-devel] [PATCH 1/7] qapi: add some enum tests

2014-08-04 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with enums that aren't up to par. Later patches can improve the expected results as the generator is made stricter. * tests/qapi-schema/enum-empty.*: New files. * tests/qapi-schema/enum-missing-data.*: Likewise. * tests/qapi-schema/enum-wrong-d

Re: [Qemu-devel] Cc'ing emails [

2014-08-04 Thread Chen Gang
Every members have their own tastes, and one working flow may be not suitable for all members. I can understand, and hope other members understand too. At least for me, next, I shall send patch to the members which I can get from 'get_maintainers.pl' and only Cc to qemu-devel. And shall skip qemu

[Qemu-devel] [PATCH 4/7] qapi: drop tests for inline subtypes

2014-08-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument; but existing use of inline substructs conflicts with that goal. This patch fixes the testsuite to avoid nested subtypes, by breaking the nesting into explicit types. * t

[Qemu-devel] [PATCH 5/7] qapi: drop inline subtype in query-version

2014-08-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument; but existing use of inline substructs conflicts with that goal. This patch fixes one of only two commands relying on nested subtypes, by breaking the nesting into an expl

[Qemu-devel] [PATCH 6/7] qapi: drop inline subtype in query-pci

2014-08-04 Thread Eric Blake
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument; but existing use of inline substructs conflicts with that goal. This patch fixes one of only two commands relying on nested subtypes, by breaking the nesting into an expl

[Qemu-devel] [PATCH 2/7] qapi: better error message for bad enum

2014-08-04 Thread Eric Blake
The previous test demonstrated that the generator choked if an enum forgot 'data', and silently ignored an enum where 'data' was the wrong type. Fix both cases to give a sane error message. * scripts/qapi.py (parse_schema): Avoid bad deref. (check_exprs): Check for array on enums. * tests/qapi-sc

[Qemu-devel] [PATCH 3/7] qapi: merge UserDefTwo and UserDefNested in tests

2014-08-04 Thread Eric Blake
In the testsuite, UserDefTwo and UserDefNested were identical types other than the member names. Reduce code duplication by having just one type, and choose names that also favor reuse. This will also make it easier for a later patch to get rid of nested inline subtypes in QAPI. Ensure that 'make

[Qemu-devel] [PATCH 0/7] drop qapi nested structs

2014-08-04 Thread Eric Blake
According to this email: https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg00708.html we want to repurpose 'data': { 'name': {dict...} } in qapi files for future use of designating default values of optional parameters. But to do that, we must first nuke existing use of that syntax for decla

[Qemu-devel] [PATCH v1 15/17] virtio-blk: support multi queue for non-dataplane

2014-08-04 Thread Ming Lei
This patch introduces support of multi virtqueue for non-dataplane, and the conversion is a bit straightforward. Signed-off-by: Ming Lei --- hw/block/virtio-blk.c | 25 +++-- include/hw/virtio/virtio-blk.h |4 +++- 2 files changed, 22 insertions(+), 7 deletions

[Qemu-devel] [PATCH v1 17/17] hw/virtio-pci: introduce num_queues property

2014-08-04 Thread Ming Lei
This patch introduces parameter of 'num_queues', so that virtio-blk can support multi virt queues. The virtio-blk multi virtqueue feature will be added to virtio spec 1.1[1], and the 3.17 linux kernel[2] will support the feature in virtio-blk driver. For those who wants to play the stuff now, the

[Qemu-devel] [PATCH v1 16/17] virtio-blk: dataplane: support multi virtqueue

2014-08-04 Thread Ming Lei
This patch supports to handle host notify from multi virt queues, but still process/submit io in the one iothread. One BH is introduced to process I/O from all virtqueues, so that they can be sumitted to kernel in batch as far as possible. Signed-off-by: Ming Lei --- hw/block/dataplane/virtio-b

[Qemu-devel] [PATCH v1 13/17] linux-aio: remove 'node' from 'struct qemu_laiocb'

2014-08-04 Thread Ming Lei
No one uses the 'node' field any more, so remove it from 'struct qemu_laiocb', and this can save 16byte for the struct on 64bit arch. Signed-off-by: Ming Lei --- block/linux-aio.c |1 - 1 file changed, 1 deletion(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index bf94ae9..da50ea5 1

[Qemu-devel] [PATCH v1 06/17] block: introduce bdrv_co_can_bypass_co

2014-08-04 Thread Ming Lei
This function is introduced to check if the current block I/O can be allowed to run without coroutine for sake of performance. Signed-off-by: Ming Lei --- block.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/block.c b/block.c index ac184ef..2326da

[Qemu-devel] [PATCH v1 14/17] hw/virtio/virtio-blk.h: introduce VIRTIO_BLK_F_MQ

2014-08-04 Thread Ming Lei
Prepare for supporting mutli vqs per virtio-blk device. Signed-off-by: Ming Lei --- include/hw/virtio/virtio-blk.h |8 1 file changed, 8 insertions(+) diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h index 49ac234..5b0fb91 100644 --- a/include/hw/virtio/

[Qemu-devel] [PATCH v1 05/17] garbage collector: introduced for support of bypass coroutine

2014-08-04 Thread Ming Lei
In case of bypass coroutine, some buffers in stack have to convert to survive in the whole I/O submit & completion cycle. Garbase collector is one of the best data structure for this purpose, as I thought of. Signed-off-by: Ming Lei --- include/qemu/gc.h | 56 +

[Qemu-devel] [PATCH v1 12/17] linux-aio: increase max event to 256

2014-08-04 Thread Ming Lei
This patch increases max event to 256 for the comming virtio-blk multi virtqueue support. Signed-off-by: Ming Lei --- block/linux-aio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index 0e21f76..bf94ae9 100644 --- a/block/linux-aio

[Qemu-devel] [PATCH v1 11/17] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-08-04 Thread Ming Lei
Previously -EAGAIN is simply ignored for !s->io_q.plugged case, and sometimes it is easy to cause -EIO to VM, such as NVME device. This patch handles -EAGAIN by io queue for !s->io_q.plugged case, and it will be retried in following aio completion cb. Suggested-by: Paolo Bonzini Signed-off-by: M

[Qemu-devel] [PATCH v1 08/17] Revert "raw-posix: drop raw_get_aio_fd() since it is no longer used"

2014-08-04 Thread Ming Lei
This reverts commit 76ef2cf5493a215efc351f48ae7094d6c183fcac. Reintroduce the helper of raw_get_aio_fd() for enabling coroutinue bypass mode in case of raw image. Signed-off-by: Ming Lei --- block/raw-posix.c | 34 ++ include/block/block.h |9 +

[Qemu-devel] [PATCH v1 10/17] linux-aio: fix submit aio as a batch

2014-08-04 Thread Ming Lei
In the enqueue path, we can't complete request, otherwise "Co-routine re-entered recursively" may be caused, so this patch fixes the issue with below ideas: - for -EAGAIN or partial completion, retry the submision by schedule an BH in following completion cb - for part of c

[Qemu-devel] [PATCH v1 04/17] block: prepare for supporting selective bypass coroutine

2014-08-04 Thread Ming Lei
If device thinks that it isn't necessary to apply coroutine in its performance sensitive path, it can call block_set_bypass_co(false) to bypass the coroutine and just call the function directly in the aio read/write path. One example is virtio-blk dataplane. Signed-off-by: Ming Lei --- block.c

[Qemu-devel] [PATCH v1 01/17] qemu/obj_pool.h: introduce object allocation pool

2014-08-04 Thread Ming Lei
This patch introduces object allocation pool for speeding up object allocation in fast path. Signed-off-by: Ming Lei --- include/qemu/obj_pool.h | 64 +++ 1 file changed, 64 insertions(+) create mode 100644 include/qemu/obj_pool.h diff --git a/incl

[Qemu-devel] [PATCH v1 03/17] qemu coroutine: support bypass mode

2014-08-04 Thread Ming Lei
This patch introduces several APIs for supporting bypass qemu coroutine in case of being not necessary and for performance's sake. Signed-off-by: Ming Lei --- include/block/coroutine.h |8 include/block/coroutine_int.h |5 + qemu-coroutine-lock.c |4 ++-- qem

[Qemu-devel] [PATCH v1 07/17] block: support to bypass qemu coroutinue

2014-08-04 Thread Ming Lei
This patch adds support of bypassing coroutinue in bdrv_co_aio_rw_vector(), which is in the fast path block device, especially for virtio-blk dataplane. Signed-off-by: Ming Lei --- block.c | 185 +-- 1 file changed, 157 insertions(+),

[Qemu-devel] [PATCH v1 09/17] dataplane: enable selective bypassing coroutine

2014-08-04 Thread Ming Lei
This patch enables selective bypassing for the coroutine in bdrv_co_aio_rw_vector() if the image format is raw. With this patch, ~10% throughput improvement for raw image is observed in the VM based on server. Signed-off-by: Ming Lei --- hw/block/dataplane/virtio-blk.c | 10 ++ 1 file

[Qemu-devel] [PATCH v1 02/17] dataplane: use object pool to speed up allocation for virtio blk request

2014-08-04 Thread Ming Lei
g_slice_new(VirtIOBlockReq), its free pair and access the instance is a bit slow since sizeof(VirtIOBlockReq) takes more than 40KB, so use object pool to speed up its allocation and release. With this patch, ~5%-10% throughput improvement is observed in the VM based on server. Signed-off-by: Ming

[Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-04 Thread Ming Lei
Hi, These patches bring up below 4 changes: - introduce object allocation pool and apply it to virtio-blk dataplane for improving its performance - introduce selective coroutine bypass mechanism for improving performance of virtio-blk dataplane with raw for

[Qemu-devel] host hangs with pci-passthrough of SAS adapter

2014-08-04 Thread Nishank Trivedi
Hi, I'm using QEMU (2.1.50) with Fedora 20 based host (3.15.6-200). While doing PCI-passthrough of PMC-Sierra 8001 SAS adapter, the *host* does a hard lockup even before guest kernel starts running. BIOS in use is SeaBIOS 1.7.5. Despite enabling various debugging options, I do not see any mes

[Qemu-devel] host hangs with pci-passthrough of SAS adapter

2014-08-04 Thread Nishank Trivedi
Hi, I'm using QEMU (2.1.50) with Fedora 20 based host (3.15.6-200). While doing PCI-passthrough of PMC-Sierra 8001 SAS adapter, the *host* does a hard lockup even before guest kernel starts running. BIOS in use is SeaBIOS 1.7.5. Despite enabling various debugging options, I do not see any mes

Re: [Qemu-devel] [PATCH 2/4] monitor: fix access freed memory

2014-08-04 Thread zhanghailiang
Hi Alex, Thanks for your quick reply. On 2014/8/4 17:01, Alex Bennée wrote: zhanghailiang writes: The function monitor_fdset_dup_fd_find_remove() references member of 'mon_fdset' which may be freed in function monitor_fdset_cleanup() Signed-off-by: zhanghailiang --- monitor.c | 4 +++- 1 f

Re: [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command

2014-08-04 Thread Gonglei (Arei)
Hi, > >> >> >> >> Subject: Re: [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex > >> >> command > >> >> >> >> > >> >> >> >> On Fri, Jul 25, 2014 at 02:52:50PM +0800, > arei.gong...@huawei.com > >> >> wrote: > >> >> >> >> > From: Gonglei > >> >> >> >> > > >> >> >> >> > Adds "set-bootindex id=xx,

Re: [Qemu-devel] [PATCH] vhost_net: cleanup start/stop condition

2014-08-04 Thread Amos Kong
On Mon, Aug 04, 2014 at 02:12:39PM +0200, Michael S. Tsirkin wrote: > Checking vhost device internal state in vhost_net looks like > a layering violation since vhost_net does not > set this flag: it is set and tested by vhost.c. > There seems to be no reason to check this: > caller in virtio net us

Re: [Qemu-devel] [PATCH 4/4] ivshmem: check the value returned by fstat()

2014-08-04 Thread zhanghailiang
Hi Michael, Thanks for your review of this patch! On Mon, Aug 04, 2014 at 04:25:44PM +0800, zhanghailiang wrote: The function fstat() may fail, so check its return value. Signed-off-by: zhanghailiang --- hw/misc/ivshmem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH v5] implementing victim TLB for QEMU system emulated TLB

2014-08-04 Thread Xin Tong
Sorry for the absence. Forgot the patch in submission till then. I rebased the patch to the newest QEMU git repository and retook the performance improvement data. Please review when have time. Xin On Mon, Aug 4, 2014 at 8:35 PM, Xin Tong wrote: > QEMU system mode page table walks are expensi

[Qemu-devel] [PATCH v5] implementing victim TLB for QEMU system emulated TLB

2014-08-04 Thread Xin Tong
QEMU system mode page table walks are expensive. Taken by running QEMU qemu-system-x86_64 system mode on Intel PIN , a TLB miss and walking a 4-level page tables in guest Linux OS takes ~450 X86 instructions on average. QEMU system mode TLB is implemented using a directly-mapped hashtable. This st

Re: [Qemu-devel] [RFC PATCH 00/10] spapr: vfio: Enable Dynamic DMA windows (DDW)

2014-08-04 Thread Alexey Kardashevskiy
On 07/31/2014 07:34 PM, Alexey Kardashevskiy wrote: > At the moment sPAPR PHB supports only a single 32bit window > which is normally 1..2GB which is not enough for high performance devices. > > PAPR spec enables creating an additional window(s) to support 64bit > DMA and bigger page sizes. > > T

Re: [Qemu-devel] [PATCH 2/3] pc-dimm: check if the value of node property

2014-08-04 Thread Hu Tao
On Mon, Aug 04, 2014 at 02:22:48PM +0200, Michael S. Tsirkin wrote: > On Mon, Aug 04, 2014 at 04:16:08PM +0800, Hu Tao wrote: > > If user specifies a node number that exceeds the available numa nodes in > > emulated system for pc-dimm device, the device will reports an invalid _PXM > > to OSPM. Fix

[Qemu-devel] [Bug 1285708] Re: FreeBSD Guest crash on boot due to xsave instruction issue

2014-08-04 Thread Chris J Arges
$ git tag --contains 56c103ec040b1944c8866f79aa768265c0dd2986 v3.15-rc1 The patch in question is already in 3.16 / Utopic. I can reproduce this easily in Trusty. ** Also affects: linux (Ubuntu Trusty) Importance: Undecided Status: New ** Changed in: linux (Ubuntu) Status: Incom

[Qemu-devel] [Bug 1334307] Re: isapc and pc-0.10 to pc-0.13 memory layout changed in 2.0.0

2014-08-04 Thread Don Slutz
Fixed in QEMU 2.1.0 ** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1334307 Title: isapc and pc-0.10 to pc-0.13 memory layout changed

[Qemu-devel] [Bug 1308341] Re: Multiple CPUs causes blue screen on Windows guest (14.04 regression)

2014-08-04 Thread Chris J Arges
*** This bug is a duplicate of bug 1307473 *** https://bugs.launchpad.net/bugs/1307473 ** This bug has been marked a duplicate of bug 1307473 guest hang due to missing clock interrupt -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[Qemu-devel] [PATCH v2 23/30] libqos: allow qpci_iomap to return BAR mapping size

2014-08-04 Thread John Snow
This patch allows qpci_iomap to return the size of the BAR mapping that it created, to allow driver applications (e.g, ahci-test) to make determinations about the suitability or the mapping size, or in the specific case of AHCI, how many ports are supported by the HBA. Signed-off-by: John Snow --

[Qemu-devel] [PATCH v2 28/30] ahci: Add test_hba_spec to ahci-test.

2014-08-04 Thread John Snow
Add a test routine that checks the boot-up values of the HBA configuration memory space against the AHCI 1.3 specification and Intel ICH9 data sheet (for Q35 machines) for adherence and sane values. The HBA is not yet engaged or put into the idle state. Signed-off-by: John Snow --- tests/ahci-t

[Qemu-devel] [PATCH v2 25/30] ahci: Adding basic functionality qtest.

2014-08-04 Thread John Snow
Currently, there is no qtest to test the functionality of the AHCI functionality present within the Q35 machine type. This patch adds a skeleton for an AHCI test suite, and adds a simple sanity-check test case where we identify that the AHCI device is present, then disengage the virtual machine.

[Qemu-devel] [PATCH v2 26/30] ahci: Add test_pci_spec to ahci-test.

2014-08-04 Thread John Snow
Adds a specification adherence test for AHCI where the boot-up values for the PCI configuration space are compared against the AHCI 1.3 specification. This test does not itself attempt to engage the device. Signed-off-by: John Snow --- tests/ahci-test.c | 305 +++

[Qemu-devel] [PATCH v2 29/30] ahci: Add test_hba_enable to ahci-test.

2014-08-04 Thread John Snow
This test engages the HBA functionality and initializes values to sane defaults to allow for minimal HBA functionality. Buffers are allocated and pointers are updated to allow minimal I/O commands to complete as expected. Error registers and responses are sanity checked for specification adherence

[Qemu-devel] [PATCH v2 21/30] libqtest: Correct small memory leak.

2014-08-04 Thread John Snow
Fixes a small memory leak inside of libqtest. After we produce a test path and glib copies the string for itself, we should clean up our temporary copy. Signed-off-by: John Snow --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index e52

[Qemu-devel] [PATCH v2 22/30] libqos: Fixes a small memory leak.

2014-08-04 Thread John Snow
Allow users the chance to clean up the QPCIBusPC structure by adding a small cleanup routine. Helps clear up small memory leaks during setup/teardown, to allow for cleaner debug output messages. Signed-off-by: John Snow --- tests/libqos/pci-pc.c | 7 +++ tests/libqos/pci-pc.h | 1 + 2 files

[Qemu-devel] [PATCH v2 30/30] ahci: Add test_identify case to ahci-test.

2014-08-04 Thread John Snow
Utilizing all of the bring-up code in pci_enable and hba_enable, this test issues a simple IDENTIFY command via the HBA and retrieves the response via the PIO receive mechanisms of the HBA. Signed-off-by: John Snow --- tests/ahci-test.c | 296 +

[Qemu-devel] [PATCH v2 27/30] ahci: add test_pci_enable to ahci-test.

2014-08-04 Thread John Snow
This adds a test wherein we engage the PCI AHCI device and ensure that the memory region for the HBA functionality is now accessible. Under Q35 environments, additional PCI configuration is performed to ensure that the HBA functionality will become usable. Signed-off-by: John Snow --- tests/ahc

[Qemu-devel] [PATCH v2 14/30] ahci: remove duplicate PORT_IRQ_* constants

2014-08-04 Thread John Snow
From: Paolo Bonzini These are defined twice, just use one set consistently. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 6 +++--- hw/ide/ahci.h | 21 - 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahc

[Qemu-devel] [PATCH v2 20/30] libqos: Correct memory leak

2014-08-04 Thread John Snow
Fix a small memory leak inside of libqos, in the pc_alloc_init routine. Signed-off-by: John Snow --- tests/libqos/malloc-pc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index db1496c..63af60a 100644 --- a/tests/libqos/malloc-pc.c ++

[Qemu-devel] [PATCH v2 12/30] ide: move BM_STATUS bits to pci.[ch]

2014-08-04 Thread John Snow
From: Paolo Bonzini They are not used by AHCI, and should not be even available there. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/internal.h | 11 --- hw/ide/pci.c | 4 hw/ide/pci.h | 7 +++ 3 files changed, 11 insertions(+), 11 deletions(-)

[Qemu-devel] [PATCH v2 24/30] qtest/ide: Fix small memory leak

2014-08-04 Thread John Snow
For libqos debugging purposes, it's nice to be able to assert that tests and associated libraries have no memory leaks. To that end, free up the trivial cmdline leak. The remaining leaks caused by pc_alloc_init are fixed instead by my first-fit pc_alloc implementation already on the qemu-devel mai

[Qemu-devel] [PATCH v2 17/30] ahci: construct PIO Setup FIS for PIO commands

2014-08-04 Thread John Snow
From: Paolo Bonzini PIO commands should put a PIO Setup FIS in the receive area when data transfer ends. Currently QEMU does not do this and only places the D2H FIS at the end of the operation. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 70 +

[Qemu-devel] [PATCH v2 16/30] ide: make all commands go through cmd_done

2014-08-04 Thread John Snow
From: Paolo Bonzini AHCI has code to fill in the D2H FIS trigger the IRQ all over the place. Centralize this in a single cmd_done callback by generalizing the existing async_cmd_done callback. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 16 +++- h

[Qemu-devel] [PATCH v2 19/30] qtest: Adding qtest_memset and qmemset.

2014-08-04 Thread John Snow
Currently, libqtest allows for memread and memwrite, but does not offer a simple way to zero out regions of memory. This patch adds a simple function to do so. Signed-off-by: John Snow --- tests/libqtest.c | 12 tests/libqtest.h | 24 2 files changed, 36 ins

[Qemu-devel] [PATCH v2 13/30] ide: move retry constants out of BM_STATUS_* namespace

2014-08-04 Thread John Snow
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 20 ++-- hw/ide/internal.h | 12 ++-- hw/ide/pci.c | 14 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c

[Qemu-devel] [PATCH v2 15/30] ide: stop PIO transfer on errors

2014-08-04 Thread John Snow
From: Paolo Bonzini This will provide a hook for sending the result of the command via the FIS receive area. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 00f

[Qemu-devel] [PATCH v2 09/30] ide: wrap start_dma callback

2014-08-04 Thread John Snow
From: Paolo Bonzini Make it optional and prepare for the next patches. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/atapi.c| 6 ++ hw/ide/core.c | 15 --- hw/ide/internal.h | 1 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v2 18/30] q35: Enable the ioapic device to be seen by qtest.

2014-08-04 Thread John Snow
Currently, the ioapic device can not be found in a qtest environment when requesting "irq_interrupt_in ioapic" via the qtest socket. By mirroring how the ioapic is added in i44ofx (hw/i440/pc_piix.c), as a child of "q35," the device is able to be seen by qtest. Signed-off-by: John Snow --- hw/i

[Qemu-devel] [PATCH v2 08/30] ide: simplify start_transfer callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 4 +--- hw/ide/core.c | 10 +++--- hw/ide/internal.h | 3 +-- hw/ide/macio.c| 6 -- hw/ide/pci.c | 6 --

[Qemu-devel] [PATCH v2 10/30] ide: remove wrong setting of BM_STATUS_INT

2014-08-04 Thread John Snow
From: Paolo Bonzini Similar to the case removed in commit 69c38b8 (ide/core: Remove explicit setting of BM_STATUS_INT, 2011-05-19), the only remaining use of add_status(..., BM_STATUS_INT) is for short PRDs. The flag should not be raised in this case. Signed-off-by: Paolo Bonzini Signed-off-by

[Qemu-devel] [PATCH v2 03/30] ide-test: add test for werror=stop

2014-08-04 Thread John Snow
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- tests/ide-test.c | 81 1 file changed, 81 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index 4a0d97f..151ef30 100644 --- a/tests/ide-test.c

[Qemu-devel] [PATCH v2 04/30] ide: stash aiocb for flushes

2014-08-04 Thread John Snow
From: Paolo Bonzini This ensures that operations are completed after a reset Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index db191a6..79985f9 100644 --- a/hw/ide/

[Qemu-devel] [PATCH v2 07/30] ide: simplify async_cmd_done callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini Drop the unused return value. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 4 +--- hw/ide/internal.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 679357f..e494503 100644 --- a/hw

[Qemu-devel] [PATCH v2 05/30] ide: simplify reset callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 6 -- hw/ide/core.c | 5 +++-- hw/ide/internal.h | 3 ++- hw/ide/macio.c| 1 - hw/ide/pci.c | 4 +--- 5 files changed

[Qemu-devel] [PATCH v2 06/30] ide: simplify set_inactive callbacks

2014-08-04 Thread John Snow
From: Paolo Bonzini Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 6 -- hw/ide/core.c | 5 +++-- hw/ide/internal.h | 2 +- hw/ide/macio.c| 1 - hw/ide/pci.c | 4 +--- 5 files changed,

[Qemu-devel] [PATCH v2 01/30] blkdebug: report errors on flush too

2014-08-04 Thread John Snow
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- block/blkdebug.c | 20 1 file changed, 20 insertions(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index f51407d..1586ed9 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -522,6 +52

[Qemu-devel] [PATCH v2 02/30] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-04 Thread John Snow
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- tests/libqtest.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 98e8f4b..4a75cd3 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -167,11 +1

[Qemu-devel] [PATCH v2 00/30] AHCI test suite framework

2014-08-04 Thread John Snow
This patch series introduces a number of small fixes and tweaks to help support an AHCI test suite that in the future I hope to expand to a fuller regression suite to help guide the development of the AHCI device support under, in particular, the Q35 machine type in QEMU. Paolo Bonzini has contrib

[Qemu-devel] [PATCH v2 11/30] ide: fold add_status callback into set_inactive

2014-08-04 Thread John Snow
From: Paolo Bonzini It is now called only after the set_inactive callback. Put the two together. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 9 - hw/ide/atapi.c| 2 +- hw/ide/core.c | 12 hw/ide/internal.h | 6 +++--- hw/ide/m

[Qemu-devel] [Bug 1352555] [NEW] iproute2 incompatibility

2014-08-04 Thread swestlake
Public bug reported: installed iproute2 which replaced ifupdown, kvm no longer connects to tap devices and is unable to create spice sockets ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which i

Re: [Qemu-devel] [PATCH v3 15/15] target-tricore: Add instructions of SR opcode format

2014-08-04 Thread Richard Henderson
> +case OPC2_16_SR_RSUB: > +/* overflow only if r1 = -0x8000 */ > +temp = tcg_const_i32(-0x8000); > +t0 = tcg_const_i32(0); > +t1 = tcg_const_i32(1); > +tcg_gen_movcond_tl(TCG_COND_EQ, cpu_PSW_V, cpu_gpr_d[r1], temp, t1, > t0); This is setcond.

Re: [Qemu-devel] [PATCH v3 07/15] target-tricore: Add instructions of SRR opcode format

2014-08-04 Thread Richard Henderson
On 08/04/2014 07:38 AM, Bastian Koppelmann wrote: > +target_ulong helper_add_ssov(CPUTRICOREState *env, target_ulong r1, > + target_ulong r2) > +{ > +target_ulong ret; > +int64_t result = (int64_t)r1 + (int64_t)r2; > +SSOV(env, ret, result, 32); > +return

Re: [Qemu-devel] [PATCH v3 06/15] target-tricore: Add instructions of SRC opcode format

2014-08-04 Thread Richard Henderson
On 08/04/2014 07:38 AM, Bastian Koppelmann wrote: > +static inline void gen_calc_psw_sv_i32(TCGv ret, TCGv arg) > +{ > +tcg_gen_xor_tl(ret, ret, arg); > +} Not exclusive or, inclusive or. And there's really no need for a helper for this. > +static inline void gen_calc_psw_av_i32(TCGv ret, T

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-08-04 Thread Paolo Bonzini
Il 04/08/2014 18:30, Marcin Gibuła ha scritto: > > > is this analysis deep enough for you? I don't know if that can be fixed > with existing api as cpu_synchronize_all_states() is all or nothing kind > of stuff. > > Kvmclock needs it only to read current cpu registers, so syncing > everything is

Re: [Qemu-devel] [PATCH 02/12] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-04 Thread Tom Musta
On 8/4/2014 12:04 PM, Peter Maydell wrote: > On 4 August 2014 17:45, Tom Musta wrote: >> When the ipc system call is used to wrap a semctl system call, >> the ptr argument to ipc needs to be dereferenced prior to passing >> it to the semctl handler. This is because the fourth argument to >> semct

Re: [Qemu-devel] [PATCH 10/12] linux-user: clock_nanosleep errno Handling on PPC

2014-08-04 Thread Tom Musta
On 8/4/2014 12:43 PM, Peter Maydell wrote: > On 4 August 2014 17:45, Tom Musta wrote: >> The clock_nanosleep syscall is unusual in that it returns positive >> numbers in error handling situations, versus returning -1 and setting >> errno, or returning a negative errno value. On POWER, the kernel

[Qemu-devel] [Bug 1352465] [NEW] Can't install virtio block drivers during Windows setup

2014-08-04 Thread Lorenzo
Public bug reported: Hi! Apparently there's no way to install the virtio block drivers during Windows setup, as they're simply not recognized by the installer when it looks for them on the CD drive. The only way to setup virtio block drivers is to first install Windows on a IDE drive, then add

Re: [Qemu-devel] [PATCH 10/12] linux-user: clock_nanosleep errno Handling on PPC

2014-08-04 Thread Peter Maydell
On 4 August 2014 17:45, Tom Musta wrote: > The clock_nanosleep syscall is unusual in that it returns positive > numbers in error handling situations, versus returning -1 and setting > errno, or returning a negative errno value. On POWER, the kernel will > set the SO bit of CR0 to indicate failure

Re: [Qemu-devel] [PATCH 10/12] linux-user: clock_nanosleep errno Handling on PPC

2014-08-04 Thread Peter Maydell
On 4 August 2014 17:45, Tom Musta wrote: > The clock_nanosleep syscall is unusual in that it returns positive > numbers in error handling situations, versus returning -1 and setting > errno, or returning a negative errno value. On POWER, the kernel will > set the SO bit of CR0 to indicate failure

Re: [Qemu-devel] [PATCH 09/12] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-04 Thread Peter Maydell
On 4 August 2014 17:45, Tom Musta wrote: > The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was > 2048 previously. Alpha and SPARC also have a 4096 byte MINSIGSTKSZ... > Signed-off-by: Tom Musta > > diff --git a/linux-user/signal.c b/linux-user/signal.c > index cdfcc52..b2a

Re: [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command

2014-08-04 Thread Eduardo Habkost
On Mon, Aug 04, 2014 at 12:00:59PM +0200, Markus Armbruster wrote: > "Gonglei (Arei)" writes: > > > Hi, > > > >> >> Subject: Re: [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command > >> >> > >> >> On Fri, Jul 25, 2014 at 02:52:50PM +0800, arei.gong...@huawei.com wrote: > >> >> > From: Gong

Re: [Qemu-devel] [PATCH 08/12] linux-user: Detect fault in sched_rr_get_interval

2014-08-04 Thread Peter Maydell
On 4 August 2014 17:45, Tom Musta wrote: > Properly detect a fault when attempting to store into an invalid > struct timespec pointer. > > Signed-off-by: Tom Musta > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 5f193cd..95cee0b 100644 > --- a/linux-user/syscall.c > +++ b/lin

Re: [Qemu-devel] [PATCH 07/12] linux-user: Handle NULL argument to sched_{get, set}param

2014-08-04 Thread Peter Maydell
On 4 August 2014 17:45, Tom Musta wrote: > The sched_getparam and sched_setparam system calls take a pointer > argument to a sched_param structure. When this pointer is null, > errno should be set to EINVAL. Don't we also need this for the other syscall which takes a sched_param pointer, sched_s

  1   2   3   4   >