Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Michael S. Tsirkin
On Wed, Aug 06, 2014 at 08:05:46AM +0200, Markus Armbruster wrote: > "Gonglei (Arei)" writes: > > > Hi, > > > >> > > >> > $WHATEVER: don't use 'Yoda conditions' > >> > > >> > 'Yoda conditions' are not part of idiomatic QEMU coding > >> > style, so rewrite them in the more usual order. > >> > >>

[Qemu-devel] [v4][PATCH 4/5] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-05 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 39 +++ include/hw/i386/pc.h | 2 ++ 2 files

[Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index

2014-08-05 Thread Tiejun Chen
We need to use this index to reuse this macro later Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) v4: * New patch to extend I440FX_PCI_DEVICE diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 0cd82b8..4330599 100644

[Qemu-devel] [v4][PATCH 2/5] pc_init1: pass parameters just with types

2014-08-05 Thread Tiejun Chen
Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) v4: * New patch to work for patch #1 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bf26550..2bf8046 100644 --- a/hw/i386/pc_

[Qemu-devel] [v4][PATCH 5/5] xen:hw:i386:pc_piix: introduce new machine for IGD passthrough

2014-08-05 Thread Tiejun Chen
Now we can introduce a new machine, xenigd, specific to IGD passthrough. This can avoid involving other common codes. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 43 +++ 1 file changed, 43 insertions(+) v4: * Rebase v3: * Rebase v2: * Unify pr

[Qemu-devel] [v4][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-08-05 Thread Tiejun Chen
v4: * Rebase on latest tree * Drop patch #2 * Regenerate patches after Michael introduce patch #1 * We need to use this pci_type as a index to reuse I440FX_PCI_DEVICE() * Test: boot with a preinstalled winxp ./i386-softmmu/qemu-system-i386 -hda winxp-32.img -m 2560 -boot c -machine pc v3: * Dr

[Qemu-devel] [v4][PATCH 1/5] i440fx: make types configurable at run-time

2014-08-05 Thread Tiejun Chen
From: "Michael S. Tsirkin" Xen wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c| 4 +++- hw/pci-host/piix.c | 9 - include/hw/i386/pc.h | 6 +++

Re: [Qemu-devel] about -enable-kvm options

2014-08-05 Thread Gareth
Thanks Richard :) On Sat, Aug 2, 2014 at 4:47 AM, Richard W.M. Jones wrote: > On Fri, Aug 01, 2014 at 11:15:29AM +0800, Gareth wrote: > > Hi all > > > > What does '-enable-kvm' option mean? I have heard two versions of > answers: > > It's a shortcut for: > > $qemu -machine accel=kvm > > > a)

[Qemu-devel] [Bug 1353149] [NEW] qemu 2.1.0 fails to start if number of cores is greater than 1.

2014-08-05 Thread asavah
Public bug reported: qemu (kvm) 2.1.0 (built from sources) fails to start if number of cores is greater than 1. relevant part of commandline arguments: /usr/bin/qemu-system-x86_64 -name test3 -S -machine pc- i440fx-2.1,accel=kvm,usb=off -cpu Westmere -m 4096 -realtime mlock=off -smp 1,maxcpus=4,

Re: [Qemu-devel] [v3][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:51, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:30PM +0800, Tiejun Chen wrote: v3: * Drop patch #4 * Add one patch #1 from Michael * Rebase You added my patch but don't use it, so most of my comment weren't addressed. I guess I should cover those comments and post

Re: [Qemu-devel] [v3][PATCH 3/4] xen:hw:pci-host:piix: create host bridge to passthrough

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:50, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:33PM +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen -

Re: [Qemu-devel] [v3][PATCH 1/4] i440fx: make types configurable at run-time

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:48, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:31PM +0800, Tiejun Chen wrote: Xen wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen You should have a

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread Markus Armbruster
"Zhang Haoyu" writes: >> The output is on qemu's stderr. You are in control of what that > stderr is. > > I don't get why we can configure > -D /path/to/unique/file/name.log > > but we also have to redirect stderr (I didn't checked if the daemonize > option was cl

[Qemu-devel] [PATCH v2 0/4] fix several bugs about use-after-free and an api abuse

2014-08-05 Thread zhanghailiang
v1 -> v2: -ivshmem: modified the log message according to reviewing suggestion of Michael zhanghailiang (4): l2cap: fix access freed memory monitor: fix access freed memory virtio-blk: fix reference a pointer which might be freed ivshmem: check the value returned by fstat() hw/block/virt

Re: [Qemu-devel] [v3][PATCH 2/4] hw:i386:pc_piix: split pc_init1()

2014-08-05 Thread Chen, Tiejun
On 2014/8/4 21:48, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 08:09:32PM +0800, Tiejun Chen wrote: We'd like to split pc_init1 and then we can share something with other stuff. Signed-off-by: Tiejun Chen With patch 1 in place, this should not be necessary - just propage the correct ty

[Qemu-devel] [PATCH v2 3/4] virtio-blk: fix reference a pointer which might be freed

2014-08-05 Thread zhanghailiang
In function virtio_blk_handle_request, it may freed memory pointed by req, So do not access member of req after calling this function. Reviewed-by: Stefan Hajnoczi Signed-off-by: zhanghailiang --- hw/block/virtio-blk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/

Re: [Qemu-devel] qemu live migration error from 2.0 to 2.1

2014-08-05 Thread Markus Armbruster
William Dauchy writes: > On Tue, Aug 5, 2014 at 8:57 PM, Dr. David Alan Gilbert > wrote: >> Can you confirm this is on the final 2.1 release (there was a fix that >> went in just around rc5). > > for the receiver, I'm using 2.1 > # qemu-system-x86_64 --version > QEMU emulator version 2.1.0, Copy

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

2014-08-05 Thread zhanghailiang
The function fstat() may fail, so check its return value. Signed-off-by: zhanghailiang --- hw/misc/ivshmem.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 768e528..5d939d2 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.

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

2014-08-05 Thread zhanghailiang
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 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 5bc70a6..41e46a6 1

[Qemu-devel] [PATCH v2 1/4] l2cap: fix access freed memory

2014-08-05 Thread zhanghailiang
Pointer 'ch' will be used in function 'l2cap_channel_open_req_msg' after it was previously freed in 'l2cap_channel_open'. Assigned it to NULL after it is freed. Reviewed-by: Alex Bennée Signed-off-by: zhanghailiang --- hw/bt/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Markus Armbruster
"Gonglei (Arei)" writes: > Hi, > >> > >> > $WHATEVER: don't use 'Yoda conditions' >> > >> > 'Yoda conditions' are not part of idiomatic QEMU coding >> > style, so rewrite them in the more usual order. >> >> >> OK but why stop at these files? How about this >> instead? >> > I just search c file

[Qemu-devel] [PATCH v5 5/6] hostmem-ram: don't exit qemu if size of memory-backend-ram is way too big

2014-08-05 Thread Hu Tao
When using monitor command object_add to add a memory backend whose size is way too big to allocate memory for it, qemu just exits. In the case we'd better give an error message and keep guest running. The problem can be reproduced as follows: 1. run qemu 2. (monitor)object_add memory-backend-ram

[Qemu-devel] [PATCH v5 3/6] memory: add parameter errp to memory_region_init_ram_ptr

2014-08-05 Thread Hu Tao
Add parameter errp to memory_region_init_ram_ptr and update all call sites to pass in &error_abort. Signed-off-by: Hu Tao --- hw/display/g364fb.c | 2 +- hw/i386/kvm/pci-assign.c | 3 ++- hw/misc/ivshmem.c| 5 +++-- hw/misc/vfio.c | 3 ++- hw/ppc/spapr.c | 2 +-

[Qemu-devel] [PATCH v5 2/6] memory: add parameter errp to memory_region_init_ram

2014-08-05 Thread Hu Tao
Add parameter errp to memory_region_init_ram and update all call sites to pass in &error_abort. Signed-off-by: Hu Tao --- backends/hostmem-ram.c | 2 +- hw/alpha/typhoon.c | 3 ++- hw/arm/armv7m.c | 7 --- hw/arm/cubieboard.

[Qemu-devel] [PATCH v5 1/6] exec: add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr

2014-08-05 Thread Hu Tao
Add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr so that we can handler errors. Signed-off-by: Hu Tao --- exec.c | 32 +++- include/exec/ram_addr.h | 4 ++-- memory.c| 6 +++--- 3 files changed, 28 insertions(+), 14 d

[Qemu-devel] [PATCH v5 4/6] memory: add parameter errp to memory_region_init_rom_device

2014-08-05 Thread Hu Tao
Add parameter errp to memory_region_init_rom_device and update all call sites to pass in &error_abort. Signed-off-by: Hu Tao --- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +- include/exec/memory.h | 4 +++- memory.c| 5 +++-- 4 files changed, 8 insertions(+),

[Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-08-05 Thread Fam Zheng
This implements the core part of dataplane feature of virtio-scsi. A few fields are added in VirtIOSCSICommon to maintain the dataplane status. These fields are managed by a new source file: virtio-scsi-dataplane.c. Most code in this file will run on an iothread, unless otherwise commented as in

[Qemu-devel] [PATCH v5 0/6] memory API improvements and bug fixes for memory

2014-08-05 Thread Hu Tao
This series includes two parts: 1. part 1 includes patches 1-4, which improves error handling of memory_region_init_ram, memory_region_init_ram_ptr and memory_region_init_rom_device 2. part 2 includes patches 5-6, each fixes a bug of memory backend. changes to v4: - don't introd

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

2014-08-05 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] [RFC PATCH v2 04/10] virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq

2014-08-05 Thread Fam Zheng
Move VirtIOSCSIReq to header and add one field "vring" as a wrapper structure of Vring, VirtIOSCSIVring. This is necessary for coming dataplane code that runs uses vring on iothread. Signed-off-by: Fam Zheng --- include/hw/virtio/virtio-scsi.h | 14 ++ 1 file changed, 14 insertions(

[Qemu-devel] [RFC PATCH v2 10/10] virtio-scsi: Hook up with dataplane

2014-08-05 Thread Fam Zheng
This enables the virtio-scsi-dataplane code by setting the iothread in virtio-scsi device, and makes any function that is called by back from dataplane to cooperate with the caller: they need to be vring/iothread aware when handling the requests and using scsi devices on the bus. Signed-off-by: Fa

[Qemu-devel] [RFC PATCH v2 08/10] virtio-scsi: Add 'iothread' property to virtio-scsi-pci

2014-08-05 Thread Fam Zheng
Similar to this property in virtio-blk for dataplane, add it as a QOM link in virtio-scsi and an alias in virtio-scsi-pci, in order to assign an iothread to the device. Other bus types can be added later. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 11 +++ hw/virtio/v

[Qemu-devel] [RFC PATCH v2 05/10] virtio-scsi: Make virtio_scsi_init_req public

2014-08-05 Thread Fam Zheng
To share with datplane code later. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 2 +- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index cb2745d..4a65653 100644 --- a/hw/scsi/v

[Qemu-devel] [RFC PATCH v2 07/10] virtio-scsi: Make virtio_scsi_push_event public

2014-08-05 Thread Fam Zheng
Later this will be called by dataplane code. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 4 ++-- include/hw/virtio/virtio-scsi.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index c5a6b63..8fa9bec 100644 -

[Qemu-devel] [RFC PATCH v2 06/10] virtio-scsi: Make virtio_scsi_free_req public

2014-08-05 Thread Fam Zheng
To share with dataplane code later. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 2 +- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 4a65653..c5a6b63 100644 --- a/hw/scsi/

[Qemu-devel] [RFC PATCH v2 00/10] virtio-scsi: Dataplane on single iothread

2014-08-05 Thread Fam Zheng
Hi all, This series adds "iothread" property to virtio-scsi in a way just similar to virtio-blk, and turns all scsi devices to run on top of it. Example: -object iothread,id=iothread-1 \ -device virtio-scsi-pci,id=virtio-scsi-bus-0,iothread=iothread-1 \ -drive file=guest.img,id=scs

[Qemu-devel] [RFC PATCH v2 01/10] virtio: Compile vring code unconditionally

2014-08-05 Thread Fam Zheng
Because virtio-scsi dataplane will also use it. Signed-off-by: Fam Zheng --- hw/virtio/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs index ec9e855..a92582f 100644 --- a/hw/virtio/Makefile.objs +++ b/hw/virtio/M

[Qemu-devel] [RFC PATCH v2 02/10] virtio-scsi: Split virtio_scsi_handle_cmd_req from virtio_scsi_handle_cmd

2014-08-05 Thread Fam Zheng
This is the "common part" to handle one cmd request. Refactor out for later usage of dataplane iothread code. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 107 include/hw/virtio/virtio-scsi.h | 26 ++ 2 files changed, 69 inserti

[Qemu-devel] [RFC PATCH v2 03/10] virtio-scsi: Split virtio_scsi_handle_ctrl_req from virtio_scsi_handle_ctrl

2014-08-05 Thread Fam Zheng
To share with dataplane code. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 60 ++--- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index

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

2014-08-05 Thread Ming Lei
Hi Kevin, On Tue, Aug 5, 2014 at 10:47 PM, Kevin Wolf wrote: > Am 05.08.2014 um 15:48 hat Stefan Hajnoczi geschrieben: >> On Tue, Aug 05, 2014 at 06:00:22PM +0800, Ming Lei wrote: >> > On Tue, Aug 5, 2014 at 5:48 PM, Kevin Wolf wrote: >> > > Am 05.08.2014 um 05:33 hat Ming Lei geschrieben: >> >

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread Zhang Haoyu
> The output is on qemu's stderr. You are in control of what that stderr > is. I don't get why we can configure -D /path/to/unique/file/name.log but we also have to redirect stderr (I didn't checked if the daemonize option was closing it). What's the purpose

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread Peter Crosthwaite
On Wed, Aug 6, 2014 at 11:23 AM, Zhang Haoyu wrote: The output is on qemu's stderr. You are in control of what that stderr is. >>> >>> I don't get why we can configure >>> -D /path/to/unique/file/name.log >>> >>> but we also have to redirect stderr (I didn't checked if the daemonize >>> opti

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

2014-08-05 Thread Ming Lei
On Tue, Aug 5, 2014 at 8:30 PM, Eric Blake wrote: > On 08/04/2014 09:33 PM, Ming Lei wrote: >> g_slice_new(VirtIOBlockReq), its free pair and access the instance > > Took me a while to read this. Maybe: > > Calling g_slice_new(VirtIOBlockReq) and its free pair, and accessing the > instance, are a

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

2014-08-05 Thread Ming Lei
On Tue, Aug 5, 2014 at 7:55 PM, Eric Blake wrote: > On 08/04/2014 09:33 PM, Ming Lei wrote: >> 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 >> ++

Re: [Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-05 Thread Gonglei (Arei)
Hi, > > > > > >> > Yoda conditions lack readability, and QEMU has a > > >> > strict compiler configuration for checking a common > > >> > mistake like "if (dev = NULL)". Make it a written rule. > > > > >> > > >> I know this is my suggested text, but now that I'm re-reading it, I'd > > >> recommen

[Qemu-devel] [PATCH v2 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-05 Thread Fam Zheng
Replace "init/destroy" with "realize/unrealize" in SCSIDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Also in lsi53c895a, report the error when initializing the if=scsi devices, before dropping it, because in t

[Qemu-devel] [PATCH v2 1/2] block: Pass errp in blkconf_geometry

2014-08-05 Thread Fam Zheng
This allows us to pass error information to caller. Signed-off-by: Fam Zheng --- hw/block/block.c | 18 +- hw/block/virtio-blk.c| 7 +++ hw/ide/qdev.c| 11 --- hw/scsi/scsi-disk.c | 11 --- include/hw/block/block.h | 6 -- 5

[Qemu-devel] [PATCH v2 0/2] scsi: Change device init to realize

2014-08-05 Thread Fam Zheng
v2: Fix two typos in commit message in patch 2. DeviceClass->init is the old interface, let's convert scsi devices to the new ->realize API. A user visible change is the error message shown in qemu-iotests reference output, but I don't know what's the best way to retain it. So please review if an

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Eric Blake
On 08/05/2014 08:02 AM, Michael S. Tsirkin wrote: > On Fri, Aug 01, 2014 at 03:46:08PM +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> $WHATEVER: don't use 'Yoda conditions' >> >> 'Yoda conditions' are not part of idiomatic QEMU coding >> style, so rewrite them in the more usual order

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Gonglei (Arei)
Hi, > > > > $WHATEVER: don't use 'Yoda conditions' > > > > 'Yoda conditions' are not part of idiomatic QEMU coding > > style, so rewrite them in the more usual order. > > > OK but why stop at these files? How about this > instead? > I just search c files by using key words like "NULL ==" etc.

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

2014-08-05 Thread Fam Zheng
On Tue, 08/05 12:44, Milos Vyletel wrote: > On Tue, Aug 5, 2014 at 1:27 AM, Fam Zheng wrote: > > Does putting a monolithicSparse into the OVA work in this case? > > It does not. I did not try to import it to OVM but ESXi server > complained about the format of vmdk in OVA archive (don't have exac

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

2014-08-05 Thread Hu Tao
On Tue, Aug 05, 2014 at 05:47:03AM -0600, Eric Blake wrote: > On 08/04/2014 11:56 PM, Hu Tao wrote: > > 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

Re: [Qemu-devel] [PATCH v4 0/8] don't use Yoda conditions

2014-08-05 Thread Gonglei (Arei)
Hi, > > > > $WHATEVER: don't use 'Yoda conditions' > > > > 'Yoda conditions' are not part of idiomatic QEMU coding > > style, so rewrite them in the more usual order. > > > > v4: > > - trivial typo for patch 1/8 suggested by Eric, thanks. > > Series: Reviewed-by: Eric Blake > > Adding qemu-tri

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread Zhang Haoyu
>>> The output is on qemu's stderr. You are in control of what that stderr is. >> >> I don't get why we can configure >> -D /path/to/unique/file/name.log >> >> but we also have to redirect stderr (I didn't checked if the daemonize >> option was closing it). What's the purpose of this logfile optio

Re: [Qemu-devel] [PATCH v2 03/14] qapi: add some enum tests

2014-08-05 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

[Qemu-devel] [PATCH v3 11/14] qapi: drop tests for inline subtypes

2014-08-05 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 v3 12/14] qapi: drop inline subtype in query-version

2014-08-05 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 v3 13/14] qapi: drop inline subtype in query-pci

2014-08-05 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 v3 10/14] qapi: merge UserDefTwo and UserDefNested in tests

2014-08-05 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 v3 02/14] qapi: ignore files created during make check

2014-08-05 Thread Eric Blake
After an in-tree build and run of 'make check-{qapi-schema,unit}', I noticed some leftover files. * tests/.gitignore: Ignore more testsuite droppings. Signed-off-by: Eric Blake --- tests/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/.gitignore b/tests/.gitignore index

[Qemu-devel] [PATCH v3 05/14] qapi: add some expr tests

2014-08-05 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with expressions that aren't up to par. Later patches will improve the expected results as the generator is made stricter. * tests/qapi-schema/missing-type.*: New files. * tests/qapi-schema/double-type.*: Likewise. * tests/Makefile (check-qapi-

[Qemu-devel] [PATCH v3 09/14] qapi: add check_type helper function

2014-08-05 Thread Eric Blake
Add a helper function for use in a later patch that will validate that a 'data':... or 'returns':... member of an expression evaluates to a valid type. * scripts/qapi.py (check_type): New function. (check_exprs): Use it. Signed-off-by: Eric Blake --- scripts/qapi.py |

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

2014-08-05 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, and turn it into

[Qemu-devel] [PATCH v3 07/14] qapi: add some type check tests

2014-08-05 Thread Eric Blake
Demonstrate that the qapi generator silently parses confusing types, which may cause other errors later on. Later patches will update the expected results as the generator is made stricter. * tests/qapi-schema/data-array-empty.*: New files. * tests/qapi-schema/data-array-unknown.*: Likewise. * tes

[Qemu-devel] [PATCH v3 08/14] qapi: add expr_name() helper

2014-08-05 Thread Eric Blake
Now that we know every expression has a known meta-type, we can add a helper function that retrieves the name of an arbitrary expression, for use in future error messages. * scripts/qapi.py (expr_name): New function. Signed-off-by: Eric Blake --- scripts/qapi.py | 13 + 1 file chang

[Qemu-devel] [PATCH v3 06/14] qapi: require valid expressions

2014-08-05 Thread Eric Blake
The previous patch demonstrated that the generator could get confused if an expression had conflicting meta-types, and silently ignored expressions that lacked a known meta-type. Fix both cases to give a sane error message. * scripts/qapi.py (check_exprs): Require a valid meta-type for every expre

[Qemu-devel] [PATCH v3 01/14] qapi: consistent whitespace in tests/Makefile

2014-08-05 Thread Eric Blake
This file had a mix of TAB vs. 8-space indentation; given that it is a Makefile, TAB is more idiomatic even though in these particular cases the choice of whitespace didn't matter. * tests/Makefile (check-qapi-schema-y, GENERATED_HEADERS) (test-qapi-obj-y): Consistent tab indentation. Signed-off-

[Qemu-devel] [PATCH v3 00/14] drop qapi nested structs

2014-08-05 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 v3 03/14] qapi: add some enum tests

2014-08-05 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with enums that aren't up to par. Later patches will update 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

[Qemu-devel] [PATCH v3 04/14] qapi: better error message for bad enum

2014-08-05 Thread Eric Blake
The previous commit 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-

Re: [Qemu-devel] [PATCH v2 00/14] drop qapi nested structs

2014-08-05 Thread Eric Blake
On 08/05/2014 04:38 PM, Eric Blake wrote: > 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 m

Re: [Qemu-devel] [PATCH v2 02/14] qapi: ignore files created during make check

2014-08-05 Thread Wenchao Xia
Reviewed-by: Wenchao Xia 在 2014-8-6 6:38, Eric Blake 写道: After an in-tree build and run of 'make check-{qapi-schema,unit}', I noticed some leftover files. * tests/.gitignore: Ignore more testsuite droppings. Signed-off-by: Eric Blake --- tests/.gitignore | 3 +++ 1 file changed, 3 inserti

Re: [Qemu-devel] [PATCH v2 11/14] target-arm: Add FAR_EL2 and 3

2014-08-05 Thread Eric Blake
On 08/05/2014 05:08 PM, Peter Maydell wrote: > On 5 August 2014 23:41, Eric Blake wrote: >> From: "Edgar E. Iglesias" >> >> Reviewed-by: Greg Bellows >> Signed-off-by: Edgar E. Iglesias >> Reviewed-by: Alex Bennée >> Message-id: 1402994746-8328-7-git-send-email-edgar.igles...@gmail.com >> Sign

Re: [Qemu-devel] About the VT-d features that q35 chipset supports

2014-08-05 Thread Le Tan
Hi Jan, 2014-08-06 1:08 GMT+08:00 Jan Kiszka : > On 2014-08-05 14:55, Le Tan wrote: >> Hi, >> I am now adding features to the VT-d emulation for q35 chipset. I >> think it is good to know what features q35 chipset supports exactly. >> However I can't find materials about this. Does anyone know thi

Re: [Qemu-devel] [PATCH v2 11/14] target-arm: Add FAR_EL2 and 3

2014-08-05 Thread Peter Maydell
On 5 August 2014 23:41, Eric Blake wrote: > From: "Edgar E. Iglesias" > > Reviewed-by: Greg Bellows > Signed-off-by: Edgar E. Iglesias > Reviewed-by: Alex Bennée > Message-id: 1402994746-8328-7-git-send-email-edgar.igles...@gmail.com > Signed-off-by: Peter Maydell Hi Eric; why are you retran

Re: [Qemu-devel] [PATCH v2 1/2] hw/misc/arm_sp810: Create SP810 device

2014-08-05 Thread Peter Crosthwaite
On Tue, Aug 5, 2014 at 7:32 PM, Fabian Aggeler wrote: > This adds a device model for the PrimeXsys System Controller (SP810) > which is present in the Versatile Express motherboards. It is > so far read-only but allows to set the SCCTRL register. > > Signed-off-by: Fabian Aggeler > --- > default

[Qemu-devel] [PATCH v2 14/14] target-arm: A64: fix TLB flush instructions

2014-08-05 Thread Eric Blake
From: Alex Bennée According to the ARM ARM we weren't correctly flushing the TLB entries where bits 63:56 didn't match bit 55 of the virtual address. This exposed a problem when we switched QEMU's internal TARGET_PAGE_BITS to 12 for aarch64. Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH v2 12/14] target-arm: Fix bit test in sp_el0_access

2014-08-05 Thread Eric Blake
From: Stefan Weil Static code analyzers complain about a dubious & operation used for a boolean value. The code does not test the PSTATE_SP bit as it should. Cc: Peter Maydell Signed-off-by: Stefan Weil Message-id: 1406359601-25583-1-git-send-email...@weilnetz.de Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH v2 11/14] target-arm: Add FAR_EL2 and 3

2014-08-05 Thread Eric Blake
From: "Edgar E. Iglesias" Reviewed-by: Greg Bellows Signed-off-by: Edgar E. Iglesias Reviewed-by: Alex Bennée Message-id: 1402994746-8328-7-git-send-email-edgar.igles...@gmail.com Signed-off-by: Peter Maydell --- target-arm/cpu.h| 2 +- target-arm/helper.c | 6 ++ 2 files changed, 7

[Qemu-devel] [PATCH v2 10/14] qapi: merge UserDefTwo and UserDefNested in tests

2014-08-05 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 v2 07/14] qapi: add some type check tests

2014-08-05 Thread Eric Blake
Demonstrate that the qapi generator silently parses confusing types, which may cause other errors later on. Later patches will update the expected results as the generator is made stricter. * tests/qapi-schema/data-array-empty.*: New files. * tests/qapi-schema/data-array-unknown.*: Likewise. * tes

[Qemu-devel] [PATCH v2 13/14] target-arm: don't hardcode mask values in arm_cpu_handle_mmu_fault

2014-08-05 Thread Eric Blake
From: Alex Bennée Otherwise we break quickly when we change TARGET_PAGE_SIZE. Signed-off-by: Alex Bennée Message-id: 1406733627-24255-2-git-send-email-alex.ben...@linaro.org Signed-off-by: Peter Maydell --- target-arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread Peter Crosthwaite
On Wed, Aug 6, 2014 at 6:48 AM, William Dauchy wrote: > On Tue, Jul 29, 2014 at 9:51 PM, Eric Blake wrote: >> The output is on qemu's stderr. You are in control of what that stderr is. > > I don't get why we can configure > -D /path/to/unique/file/name.log > > but we also have to redirect stderr

[Qemu-devel] [PATCH v2 02/14] qapi: ignore files created during make check

2014-08-05 Thread Eric Blake
After an in-tree build and run of 'make check-{qapi-schema,unit}', I noticed some leftover files. * tests/.gitignore: Ignore more testsuite droppings. Signed-off-by: Eric Blake --- tests/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/.gitignore b/tests/.gitignore index

[Qemu-devel] [PATCH v2 09/14] qapi: add check_type helper function

2014-08-05 Thread Eric Blake
Add a helper function for use in a later patch that will validate that a 'data':... or 'returns':... member of an expression evaluates to a valid type. * scripts/qapi.py (check_type): New function. (check_exprs): Use it. Signed-off-by: Eric Blake --- scripts/qapi.py |

[Qemu-devel] [PATCH v2 05/14] qapi: add some expr tests

2014-08-05 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with expressions that aren't up to par. Later patches will improve the expected results as the generator is made stricter. * tests/qapi-schema/missing-type.*: New files. * tests/qapi-schema/double-type.*: Likewise. * tests/Makefile (check-qapi-

[Qemu-devel] [PATCH v2 04/14] qapi: better error message for bad enum

2014-08-05 Thread Eric Blake
The previous commit 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-

[Qemu-devel] [PATCH v2 06/14] qapi: require valid expressions

2014-08-05 Thread Eric Blake
The previous patch demonstrated that the generator could get confused if an expression had conflicting meta-types, and silently ignored expressions that lacked a known meta-type. Fix both cases to give a sane error message. * scripts/qapi.py (check_exprs): Require a valid meta-type for every expre

[Qemu-devel] [PATCH v2 01/14] qapi: consistent whitespace in tests/Makefile

2014-08-05 Thread Eric Blake
This file had a mix of TAB vs. 8-space indentation; given that it is a Makefile, TAB is more idiomatic even though in these particular cases the choice of whitespace didn't matter. * tests/Makefile (check-qapi-schema-y, GENERATED_HEADERS) (test-qapi-obj-y): Consistent tab indentation. Signed-off-

[Qemu-devel] [PATCH v2 03/14] qapi: add some enum tests

2014-08-05 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with enums that aren't up to par. Later patches will update 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

[Qemu-devel] [PATCH v2 08/14] qapi: add expr_name() helper

2014-08-05 Thread Eric Blake
Now that we know every expression has a known meta-type, we can add a helper function that retrieves the name of an arbitrary expression, for use in future error messages. * scripts/qapi.py (expr_name): New function. Signed-off-by: Eric Blake --- scripts/qapi.py | 13 + 1 file chang

[Qemu-devel] [PATCH v2 00/14] drop qapi nested structs

2014-08-05 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

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

2014-08-05 Thread Peter Crosthwaite
On Tue, Aug 5, 2014 at 5:05 PM, Hu Tao wrote: > On Tue, Aug 05, 2014 at 04:42:37PM +1000, Peter Crosthwaite wrote: >> 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

Re: [Qemu-devel] Are -cdrom/-hda (or -drive if=ide) supposed to work in q35?

2014-08-05 Thread John Snow
On 08/05/2014 04:30 AM, Kevin Wolf wrote: Am 01.08.2014 um 22:10 hat John Snow geschrieben: On 06/12/2014 05:03 AM, Markus Armbruster wrote: -drive mixes up configuration of backend and frontend (a.k.a. device model), as follows: 1. It always defines a backend. "info block" shows them.

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

2014-08-05 Thread Chris J Arges
As a workaround use the 'host' cpu type so the proper bits are enabled: -cpu host,+xsave -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1285708 Title: FreeBSD Guest crash on boot due to xsave instr

Re: [Qemu-devel] [questions] about qemu log

2014-08-05 Thread William Dauchy
On Tue, Jul 29, 2014 at 9:51 PM, Eric Blake wrote: > The output is on qemu's stderr. You are in control of what that stderr is. I don't get why we can configure -D /path/to/unique/file/name.log but we also have to redirect stderr (I didn't checked if the daemonize option was closing it). What's

[Qemu-devel] [Bug 1348719] Re: arm64: -smp 2 hangs qemu

2014-08-05 Thread Joel Schopp
The combination of a newer kernel and newer qemu make qemu work with -smp 2 . Rather than go figure out what got fixed let's just be happy it did. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is su

[Qemu-devel] [bug?] getting EAGAIN on connect() to virtio-serial unix socket on host

2014-08-05 Thread Chris Friesen
Hi, I'm running qemu 1.4.2 (soon planning on moving to 1.7). I'm running two instances of qemu with a virtio-serial channel each, exposed on the host via unix stream sockets. I've got an app that tries to connect() to both of them in turn. The connect() to the first socket fails with EAGAIN

[Qemu-devel] [PULL 2/2] vfio: Don't cache MSIMessage

2014-08-05 Thread Alex Williamson
Commit 40509f7f added a test to avoid updating KVM MSI routes when the MSIMessage is unchanged and f4d45d47 switched to relying on this rather than doing our own comparison. Our cached msg is effectively unused now. Remove it. Signed-off-by: Alex Williamson --- hw/misc/vfio.c |8 ++--

[Qemu-devel] [PATCH] vfio: Enable NVIDIA 88000 region quirk regardless of VGA

2014-08-05 Thread Alex Williamson
If we make use of OVMF for the BIOS then we can use GPUs without VGA space access, but we still need this quirk. Disassociate it from the x-vga option and enable it on all NVIDIA VGA display class devices. Signed-off-by: Alex Williamson --- hw/misc/vfio.c |8 ++-- 1 file changed, 6 ins

  1   2   3   >