Re: [Qemu-devel] [RFC PATCH] spapr: Provide an error message when migration fails due to htab_shift mismatch

2015-07-31 Thread David Gibson
On Thu, Jul 30, 2015 at 08:25:15PM +0530, Bharata B Rao wrote: > Include an error message when migration fails due to mismatch in > htab_shift values at source and target. This should provide a bit more > verbose message in addition to the current migration failure message > that reads like: > > q

Re: [Qemu-devel] [PATCH for-2.5 06/10] tcg: don't abuse TCG type in tcg_gen_trunc_shr_i64_i32

2015-07-31 Thread Alex Bennée
Aurelien Jarno writes: > The tcg_gen_trunc_shr_i64_i32 function takes a 64-bit argument and > returns a 32-bit value. Directly call tcg_gen_op3 with the correct > types instead of calling tcg_gen_op3i_i32 and abusing the TCG types. > > Reviewed-by: Richard Henderson > Signed-off-by: Aurelien Ja

Re: [Qemu-devel] [PATCH RFC v2 29/47] qapi: Replace dirty is_c_ptr() by method c_null()

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > On 07/30/2015 09:57 AM, Markus Armbruster wrote: >>> For qmp_FOO(), this is a reasonable contract. But our very own >>> generated code does not follow these rules: visit_type_FOO() can assign >>> into *obj even when setting an error, if it encounters a parse error >>> halfwa

[Qemu-devel] Recent patches for 2.4

2015-07-31 Thread Peter Lieven
Hi Paolo, hi Stefan, you submitted some fixes for 2.4 recently. None of the folloing had qemu-stable in CC. Is this not stable material? ca96ac4 AioContext: force event loop iteration using BH a076972 AioContext: avoid leaking BHs on cleanup fed105e virtio-blk-dataplane: delete bottom half befor

Re: [Qemu-devel] [PATCH v2 0/9] For QEMU 2.5: Add a netfilter object and netbuffer filter

2015-07-31 Thread Yang Hongyang
On 07/31/2015 01:58 PM, Jason Wang wrote: [...] Hi: I would like to have some unit-tests with this series. It could be started with very simple cases, e.g something like this: 1) adding or removing net filter 2) adding a net filter then destroy the netdev 3) adding and remove more than one n

Re: [Qemu-devel] Recent patches for 2.4

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 10:12, Peter Lieven wrote: > Hi Paolo, hi Stefan, > > you submitted some fixes for 2.4 recently. None of the folloing had > qemu-stable in CC. Is this not stable material? In general I send less and less patches to qemu-stable as we get closer to the new release, because I'm not

Re: [Qemu-devel] [PATCH v2 5/9] netfilter: hook packets before net queue send

2015-07-31 Thread Yang Hongyang
On 07/31/2015 02:06 PM, Jason Wang wrote: On 07/31/2015 12:13 PM, Yang Hongyang wrote: Capture packets that will be sent. Signed-off-by: Yang Hongyang --- include/net/filter.h | 8 +++ net/filter.c | 1 + net/net.c| 67 +

Re: [Qemu-devel] [PATCH] sdhci: Pass drive parameter to sdhci-pci via qdev property

2015-07-31 Thread Stefan Hajnoczi
On Thu, Jul 30, 2015 at 7:04 PM, Kevin O'Connor wrote: > On Wed, Jul 29, 2015 at 10:01:03AM +0100, Stefan Hajnoczi wrote: >> On Tue, Jul 28, 2015 at 12:22:43PM -0400, Kevin O'Connor wrote: >> > Commit 19109131 disabled the sdhci-pci support because it used >> > drive_get_next(). This patch reenab

[Qemu-devel] The issue about parameters(uint64) of a device are treated as signed long int.

2015-07-31 Thread Lin Ma
Hi all, Because qemu uses strtoll to parse string in parse_str function of qapi/string-input-visitor.c, I'd like to know why the parameters of scsi-hd device which are specified as uint64(says wwn) are getting interpreted as signed long int's instead e.g: # qemu-system-x86_64 -device scsi-h

Re: [Qemu-devel] [PATCH v2 8/9] netfilter: add a netbuffer filter

2015-07-31 Thread Yang Hongyang
On 07/31/2015 02:08 PM, Jason Wang wrote: On 07/31/2015 12:13 PM, Yang Hongyang wrote: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you can also use it to simulate the network delay. It has an interval op

Re: [Qemu-devel] Recent patches for 2.4

2015-07-31 Thread Peter Lieven
Am 31.07.2015 um 10:22 schrieb Paolo Bonzini: > > On 31/07/2015 10:12, Peter Lieven wrote: >> Hi Paolo, hi Stefan, >> >> you submitted some fixes for 2.4 recently. None of the folloing had >> qemu-stable in CC. Is this not stable material? > In general I send less and less patches to qemu-stable a

Re: [Qemu-devel] [PATCH v2 0/9] For QEMU 2.5: Add a netfilter object and netbuffer filter

2015-07-31 Thread Jason Wang
On 07/31/2015 04:20 PM, Yang Hongyang wrote: > On 07/31/2015 01:58 PM, Jason Wang wrote: > [...] >>> >> >> Hi: >> >> I would like to have some unit-tests with this series. It could be >> started with very simple cases, e.g something like this: >> >> 1) adding or removing net filter >> 2) adding a

Re: [Qemu-devel] [PATCH v2 5/9] netfilter: hook packets before net queue send

2015-07-31 Thread Jason Wang
On 07/31/2015 04:24 PM, Yang Hongyang wrote: > > > On 07/31/2015 02:06 PM, Jason Wang wrote: >> >> >> On 07/31/2015 12:13 PM, Yang Hongyang wrote: >>> Capture packets that will be sent. >>> >>> Signed-off-by: Yang Hongyang >>> --- >>> include/net/filter.h | 8 +++ >>> net/filter.c

Re: [Qemu-devel] [PATCH for-2.4 v2 0/2] vhost: check if vhost has capacity for hotplugged memory

2015-07-31 Thread Igor Mammedov
On Thu, 30 Jul 2015 18:54:40 +0300 "Michael S. Tsirkin" wrote: > On Thu, Jul 30, 2015 at 11:17:41AM +0200, Igor Mammedov wrote: > > On Thu, 30 Jul 2015 10:58:23 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Jul 30, 2015 at 09:31:34AM +0200, Igor Mammedov wrote: > > > > On Thu, 30 Jul

Re: [Qemu-devel] [PATCH v2 8/9] netfilter: add a netbuffer filter

2015-07-31 Thread Jason Wang
On 07/31/2015 04:30 PM, Yang Hongyang wrote: > On 07/31/2015 02:08 PM, Jason Wang wrote: >> >> >> On 07/31/2015 12:13 PM, Yang Hongyang wrote: >>> This filter is to buffer/release packets, this feature can be used >>> when using MicroCheckpointing, or other Remus like VM FT solutions, you >>> can

[Qemu-devel] [PATCH for-2.5 3/6] Add new block driver interface to add/delete a BDS's child

2015-07-31 Thread Wen Congyang
In some cases, we want to take a quorum child offline, and take another child online. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 52 +++ include/block/block.h | 4 include

[Qemu-devel] [PATCH for-2.5 4/6] quorum: implement block driver interfaces add/delete a BDS's child

2015-07-31 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Alberto Garcia --- block/quorum.c | 74 -- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 4e66221..1

[Qemu-devel] [PATCH for-2.5 1/6] QAPI: move InetSocketAddress to qapi/common.json

2015-07-31 Thread Wen Congyang
It will be used by BlockdevOptionsNBD. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- qapi-schema.json | 27 --- qapi/common.json | 27 +++ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/qapi

[Qemu-devel] [PATCH for-2.5 0/6] qapi: child add/delete support

2015-07-31 Thread Wen Congyang
If quorum's child is broken, we can use mirror job to replace it. But sometimes, the user only need to remove the broken child, and add it later when the problem is fixed. Wen Congyang (6): QAPI: move InetSocketAddress to qapi/common.json support nbd driver in blockdev-add Add new block driv

[Qemu-devel] [PATCH for-2.5 2/6] support nbd driver in blockdev-add

2015-07-31 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- qapi/block-core.json | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 7b2efb8..3ed8114 100644 --- a/qapi/block-core.json ++

[Qemu-devel] [PATCH for-2.5 5/6] qmp: add monitor command to add/remove a child

2015-07-31 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- blockdev.c | 79 qapi/block-core.json | 32 + qmp-commands.hx | 67 3 files ch

[Qemu-devel] [PATCH for-2.5 6/6] hmp: add monitor command to add/remove a child

2015-07-31 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino --- blockdev.c| 33 + hmp-commands.hx | 28 include/sysemu/blockdev.h | 2 ++ 3 files changed, 63 insertio

Re: [Qemu-devel] Recent patches for 2.4

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 10:35, Peter Lieven wrote: > Am 31.07.2015 um 10:22 schrieb Paolo Bonzini: >>> 52c91da memory: do not add a reference to the owner of aliased regions >> This could be backported, yes. Feel free to send it to qemu-stable. >> However, the bug was only visible with virtio 1. > > Appl

Re: [Qemu-devel] Call Trace for QEMU functions

2015-07-31 Thread Naman patel
​Thanks Alex and Peter for this useful information. Looks like the stack information is not available for this functions in QEMU 2.0. Can someone explain me what happens when a guest OS calls "invlpg" on say page swap out or a context switch? What exactly is the call flow and how QEMU handles this

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Pavel Fedin
Hello! > On 24 July 2015 at 10:55, Pavel Fedin wrote: > > Get/put routines are missing, live migration is not possible. > > This commit message could do with being made a bit less terse. Ok. Subject was self-explanatory, so i didn't have much to add. > > +static void kvm_arm_gicv3_reset(Devi

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-31 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 07/01/2015 02:21 PM, Markus Armbruster wrote: >>> The struct generated for a flat union is weird: the members of its >>> base are at the end, except for the union tag, which is renamed to >>> 'kind' and put at the beginning. >> >> The renami

Re: [Qemu-devel] [RFC PATCH 12.5/47] qapi: Document that input visitor semantics are prone to leaks

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > Most functions that can return a pointer or set an Error ** value > are decent enough to guarantee a NULL return when reporting an error. > Not so with our generated qapi visitor functions. If the caller > is not careful to clean up partially-allocated objects on error, > th

Re: [Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy

2015-07-31 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:48], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Once we're in postcopy the source processors are stopped and memory > > shouldn't change any more, so there's no need to look at the dirty >

Re: [Qemu-devel] [RFC PATCH 12.6/47] qapi: Document shortcoming with union 'data' branch

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > Add a FIXME to remind us to fully audit whether removing the > 'void *data' branch of each qapi union type can be done safely. > > Signed-off-by: Eric Blake Picked into my series. Thanks!

[Qemu-devel] QMP greeting sometimes does not show up

2015-07-31 Thread Peter Lieven
Hi, I recently had some cases of the QMP greeting not showing up on a vServer configured for incoming migration. Not showing up in a reasonable amount of time (5 second timeout in my case) at least. I retry and retry and suddenly in some cases after 30-60 seconds after vServer setup the greetin

Re: [Qemu-devel] [PATCH v2 0/9] For QEMU 2.5: Add a netfilter object and netbuffer filter

2015-07-31 Thread Yang Hongyang
On 07/31/2015 05:08 PM, Jason Wang wrote: On 07/31/2015 04:20 PM, Yang Hongyang wrote: On 07/31/2015 01:58 PM, Jason Wang wrote: [...] Hi: I would like to have some unit-tests with this series. It could be started with very simple cases, e.g something like this: 1) adding or removing n

Re: [Qemu-devel] [PATCH v2 5/9] netfilter: hook packets before net queue send

2015-07-31 Thread Yang Hongyang
On 07/31/2015 05:09 PM, Jason Wang wrote: On 07/31/2015 04:24 PM, Yang Hongyang wrote: On 07/31/2015 02:06 PM, Jason Wang wrote: On 07/31/2015 12:13 PM, Yang Hongyang wrote: Capture packets that will be sent. Signed-off-by: Yang Hongyang --- include/net/filter.h | 8 +++ net/

Re: [Qemu-devel] [PATCH for-2.4 0/3] Migration regressions with Xen.

2015-07-31 Thread Stefano Stabellini
On Thu, 30 Jul 2015, Stefano Stabellini wrote: > On Thu, 30 Jul 2015, Juan Quintela wrote: > > Anthony PERARD wrote: > > > This is a critical issue for Xen as migration either with the same version > > > of QEMU, or from a previous version of QEMU is broken. > > > > > > Any suggestion on how to mo

Re: [Qemu-devel] Call Trace for QEMU functions

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 10:29, Naman patel wrote: > Can someone explain me what happens when a guest OS calls "invlpg" on say > page swap out or a context switch? What exactly is the call flow and how > QEMU handles this instruction? When we see the instruction during translation, we emit code which w

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 10:32, Pavel Fedin wrote: > Hello! > >> On 24 July 2015 at 10:55, Pavel Fedin wrote: >> > +static void kvm_arm_gicv3_reset(DeviceState *dev) >> > +{ >> > +GICv3State *s = ARM_GICV3_COMMON(dev); >> > +KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s); >> > + >> > +

[Qemu-devel] [PATCH for-2.4] acpi: avoid potential uninitialized access to cpu_hp_io_base

2015-07-31 Thread Daniel P. Berrange
When building QEMU with Mingw64 toolchain I see a warning CCx86_64-softmmu/hw/i386/acpi-build.o hw/i386/acpi-build.c: In function 'acpi_build': hw/i386/acpi-build.c:1138:9: warning: 'pm.cpu_hp_io_base' may be used uninitialized in this function [-Wmaybe-uninitialized] aml_appe

[Qemu-devel] [PATCH for-2.4] gtk: avoid redefining _WIN32_WINNT macro

2015-07-31 Thread Daniel P. Berrange
When building for Mingw64 target on Fedora 22 a warning is issued about _WIN32_WINNT being redefined. In file included from ui/gtk.c:40:0: include/ui/gtk.h:5:0: warning: "_WIN32_WINNT" redefined # define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC */ ^ In file included fr

[Qemu-devel] [PATCH for-2.4] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-07-31 Thread Daniel P. Berrange
The oslib-win32 file currently provides a localtime_r and gmtime_r replacement unconditionally. Some versions of Mingw64 would provide crude macros for localtime_r/gmtime_r which QEMU takes care to disable. Latest versions of Mingw64 now provide actual functions for localtime_r/gmtime_r, but with a

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 11:08, Peter Maydell wrote: > On 31 July 2015 at 10:32, Pavel Fedin wrote: >> I intentionally put some tracing to these conditions. On my >> system KVM_DEV_ARM_VGIC_GRP_NR_IRQS is supported and >> KVM_DEV_ARM_VGIC_CTRL_INIT is not. So will it always be this way? > > That is we

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > On 07/29/2015 01:33 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 07/01/2015 02:21 PM, Markus Armbruster wrote: The struct generated for a flat union is weird: the members of its base are at the end, except for the union tag, which is renamed to >>>

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Pavel Fedin
Hello! > >> I intentionally put some tracing to these conditions. On my > >> system KVM_DEV_ARM_VGIC_GRP_NR_IRQS is supported and > >> KVM_DEV_ARM_VGIC_CTRL_INIT is not. So will it always be this way? > > > > That is weird. I thought that the kernel devs had agreed that all > > new VGIC code sho

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 12:12, Pavel Fedin wrote: > Hello! > >> >> I intentionally put some tracing to these conditions. On my >> >> system KVM_DEV_ARM_VGIC_GRP_NR_IRQS is supported and >> >> KVM_DEV_ARM_VGIC_CTRL_INIT is not. So will it always be this way? >> > >> > That is weird. I thought that the

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Pavel Fedin
Hello! > >> I just checked with Marc, and he agreed that all kernels > >> with GICv3 support should support VGIC_CTRL_INIT. What kernel > >> are you running? > > > > v3.18 with backported GICv3 support. It is a choice of our > > HW vendor and their current official kernel. > > Sounds like their

Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 12:15, Pavel Fedin wrote: > Hello! > >> >> I just checked with Marc, and he agreed that all kernels >> >> with GICv3 support should support VGIC_CTRL_INIT. What kernel >> >> are you running? >> > >> > v3.18 with backported GICv3 support. It is a choice of our >> > HW vendor an

[Qemu-devel] [PATCH v2 for-2.4] i.MX: Fix UART driver to work with unitialized "chardev" device

2015-07-31 Thread Jean-Christophe Dubois
The "chardev" property initialization might have failed (for example because there are not enough chardevs provided by QEMU). The serial device emulator need to be able to work with an uninitialized (NULL) chardev device pointer. This patch add some missing tests on the chr pointer value before u

Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: fix overlapping metadata update

2015-07-31 Thread Vasiliy Tolstov
2015-07-30 16:27 GMT+03:00 Jeff Cody : > I'd rather see some sort consensus amongst Liu, Hitoshi, yourself, or > others more intimately familiar with sheepdog. > > Right now, we have Hitoshi's patch in the main git repo, slated for > 2.4 release (which is Monday). It sounds, from Liu's email, as t

Re: [Qemu-devel] [RFC] Towards an Heterogeneous QEMU

2015-07-31 Thread Christopher Covington
Hi Christian, On 07/27/2015 09:54 AM, Christian Pinto wrote: > Hi all, > > this message is to present, and get feedback, on a QEMU enhancement which we > are working on. Most of the state-of-the-art SoCs use the heterogeneous > paradigm, in which a Master processor is surrounded by multiple (Sla

[Qemu-devel] RFC: use of qemu-common.h include

2015-07-31 Thread Daniel P. Berrange
In fixing the mingw64 problem wrt to localtime_r availability, I relied on the fact that qemu-common.h is supposed to be included everywhere, to guarantee that we always have unistd.h included before time.h: https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg06202.html That's nice in theo

Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: fix overlapping metadata update

2015-07-31 Thread Vasiliy Tolstov
2015-07-31 14:55 GMT+03:00 Vasiliy Tolstov : > Liu's patch also works for me. But also like in Hitoshi patch breaks > when using discards in qemu =(. Please wait to performance comparison. As i see Liu's patch may be more slow then Hitoshi. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

Re: [Qemu-devel] RFC: use of qemu-common.h include

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 13:06, Daniel P. Berrange wrote: > In fixing the mingw64 problem wrt to localtime_r availability, I relied > on the fact that qemu-common.h is supposed to be included everywhere, > to guarantee that we always have unistd.h included before time.h: It's not really supposed to be

[Qemu-devel] [PATCH v2] Do not use slow [*] expansion for GPIO creation

2015-07-31 Thread Pavel Fedin
Expansion of [*] suffix is very slow because index expansion is done using trial and error strategy, starting every time from zero and retrying with the next index until insertion succeeds. With large number of already added properties this process takes huge amount of time (O(n^2) complexity). So

[Qemu-devel] [PATCH] configure: only add CONFIG_RDMA to config-host.h once

2015-07-31 Thread Daniel P. Berrange
For unknown reasons (probably a git rebase merge mistake) commit 2da776db4846eadcb808598a5d3484d149773c05 Author: Michael R. Hines Date: Mon Jul 22 10:01:54 2013 -0400 rdma: core logic Adds CONFIG_RDMA to config-host.h twice, as can be seen in the generated file: $ grep CONFIG_RDM

Re: [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time

2015-07-31 Thread Christopher Covington
On 07/29/2015 01:46 PM, John Snow wrote: > > > On 07/29/2015 01:29 PM, Manjong Han wrote: >> Thanks, Stefan. >> >> 2015-07-29 17:46 GMT+09:00 Stefan Hajnoczi : >>> >>> You should probably use qcow2 backing files instead: >>> >>> 10G.qcow2 <-- vm001.qcow2 >>> ^-- vm002.qcow2 >>> >>>

Re: [Qemu-devel] [PATCH v2] Do not use slow [*] expansion for GPIO creation

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 03:23:22PM +0300, Pavel Fedin wrote: > Expansion of [*] suffix is very slow because index expansion is done using > trial and error strategy, starting every time from zero and retrying with > the next index until insertion succeeds. With large number of already added > prope

Re: [Qemu-devel] RFC: use of qemu-common.h include

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 01:19:11PM +0100, Peter Maydell wrote: > On 31 July 2015 at 13:06, Daniel P. Berrange wrote: > > In fixing the mingw64 problem wrt to localtime_r availability, I relied > > on the fact that qemu-common.h is supposed to be included everywhere, > > to guarantee that we always

Re: [Qemu-devel] [PATCH v2] arm: change vendor ID for virtio-mmio

2015-07-31 Thread Peter Maydell
On 29 July 2015 at 20:16, Michael S. Tsirkin wrote: > ACPI spec 5.0 allows the use of PCI vendor IDs. > > Since we have one for virtio, it seems neater to use that > rather than LNRO. For the device ID, use 103F which is a legacy ID that > isn't used in virtio PCI spec - seems to make sense since

Re: [Qemu-devel] [PATCH v2] Do not use slow [*] expansion for GPIO creation

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 14:23, Pavel Fedin wrote: > Expansion of [*] suffix is very slow because index expansion is done using > trial and error strategy, starting every time from zero and retrying with > the next index until insertion succeeds. With large number of already added > properties this process

Re: [Qemu-devel] [PATCH 01/12] qapi/qmp-event.c: Don't manually include os-win32.h/os-posix.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:00PM +0100, Peter Maydell wrote: > qmp-event.c already includes qemu-common.h, so manually including > os-win32.h/os-posix.h is unnecessary (and potentially fragile, > since it's duplicating the #ifdef logic that chooses which of the > two we need). Remove the unnecess

Re: [Qemu-devel] [PATCH 02/12] osdep.h: Remove qemu_printf

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:01PM +0100, Peter Maydell wrote: > qemu_printf is an ancient remnant which has been a simple #define to > printf for over a decade, and is used in only a few places. Expand > it out in those places and remove the #define. > > Signed-off-by: Peter Maydell > --- > inc

Re: [Qemu-devel] [PATCH 03/12] osdep.h: Move some compiler-specific things to compiler.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:02PM +0100, Peter Maydell wrote: > osdep.h has a few things which are really compiler specific; > move them to compiler.h, and include compiler.h from osdep.h. > > Signed-off-by: Peter Maydell > --- > include/qemu/compiler.h | 47

Re: [Qemu-devel] [PATCH 04/12] compiler.h: Use glue() in QEMU_BUILD_BUG_ON define

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:03PM +0100, Peter Maydell wrote: > Rather than rolling custom concatenate-strings macros for the > QEMU_BUILD_BUG_ON macro to use, use the glue() macro we already > have (since it's now available to us in this header). > > Signed-off-by: Peter Maydell > --- > includ

Re: [Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:04PM +0100, Peter Maydell wrote: > qemu-common.h includes some fixups for things the Win32 > headers don't define or define weirdly. These really > belong in os-win32.h, so move them there. > > Signed-off-by: Peter Maydell > --- > include/qemu-common.h | 17

Re: [Qemu-devel] [PATCH for-2.4] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 12:17, Daniel P. Berrange wrote: > > CCutil/osdep.o > In file included from include/qemu-common.h:48:0, > from util/osdep.c:48: > include/sysemu/os-win32.h:77:12: error: redundant redeclaration of 'gmtime_r' > [-Werror=redundant-decls] > struct tm *gmtime_r

Re: [Qemu-devel] [PATCH 06/12] osdep.h: Move some OS header includes and fixups from qemu-common.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:05PM +0100, Peter Maydell wrote: > qemu-common.h has some system header includes and fixups for > things that might be missing. This is really an OS dependency > and belongs in osdep.h, so move it across. > > Signed-off-by: Peter Maydell > --- > include/qemu-common.

Re: [Qemu-devel] [PATCH for-2.4] acpi: avoid potential uninitialized access to cpu_hp_io_base

2015-07-31 Thread Igor Mammedov
On Fri, 31 Jul 2015 11:14:35 +0100 "Daniel P. Berrange" wrote: > When building QEMU with Mingw64 toolchain I see a warning > > CCx86_64-softmmu/hw/i386/acpi-build.o > hw/i386/acpi-build.c: In function 'acpi_build': > hw/i386/acpi-build.c:1138:9: warning: 'pm.cpu_hp_io_base' may be used

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:43:59PM +0100, Peter Maydell wrote: > This series makes a start at cleaning up some of our headers > to avoid the common problem of header files including qemu-common.h > (which then in turn can lead to awkward circular includes). > > One common cause of this is that we

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 13:54, Daniel P. Berrange wrote: > I broadly like the direction of this change. I think it is > probably worth being strict about requiring #include of > osdep.h as the first header in every .c file. And validating > such a rule programmatically at make check time or equiv. Yea

Re: [Qemu-devel] [PATCH] configure: only add CONFIG_RDMA to config-host.h once

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 14:23, Daniel P. Berrange wrote: > For unknown reasons (probably a git rebase merge mistake) > > commit 2da776db4846eadcb808598a5d3484d149773c05 > Author: Michael R. Hines > Date: Mon Jul 22 10:01:54 2013 -0400 > > rdma: core logic > > Adds CONFIG_RDMA to config-host

Re: [Qemu-devel] [RFC] Towards an Heterogeneous QEMU

2015-07-31 Thread Paolo Bonzini
On 27/07/2015 15:54, Christian Pinto wrote: > From the user point of view there is usually an operating system > booting on the Master processor (e.g. Linux) at platform startup, > while the other processors are used to offload the Master one from > some computation or to deal with real-time inte

Re: [Qemu-devel] [PATCH RFC v2 14/47] qapi-tests: New tests for union, alternate command arguments

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > On 07/21/2015 06:43 AM, Eric Blake wrote: >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> A command's 'data' must be a struct type, given either as a >>> dictionary, or as struct type name. >>> >>> Existing test case data-int.json covers simple type 'int'. Add test >

Re: [Qemu-devel] [PATCH for-2.4] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 02:49:49PM +0200, Paolo Bonzini wrote: > > > On 31/07/2015 12:17, Daniel P. Berrange wrote: > > > > CCutil/osdep.o > > In file included from include/qemu-common.h:48:0, > > from util/osdep.c:48: > > include/sysemu/os-win32.h:77:12: error: redundant

Re: [Qemu-devel] [PATCH RFC v2 22/47] qapi: QAPISchema code generation helper methods

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > On 07/27/2015 03:54 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 07/01/2015 02:22 PM, Markus Armbruster wrote: New methods c_name(), c_type(), c_null(), json_type(), alternate_qtype(). Signed-off-by: Markus Armbruster --- scri

Re: [Qemu-devel] [PATCH 0/3] tcg: fixes for MIPS and S390 hosts

2015-07-31 Thread Richard Henderson
On 07/30/2015 03:03 PM, Aurelien Jarno wrote: These are small fixes for MIPS and S390 hosts, found by testing various guests on these hosts. Aurelien Jarno (3): tcg/mips: fix TLB loading for BE host with 32-bit guests tcg/mips: Mask TCGMemOp appropriately for indexing tcg/s390x: Mask TC

[Qemu-devel] [PATCH 0/2] Replace trunc_shr_i32 with extr[lh]

2015-07-31 Thread Richard Henderson
I'd prefer to use these two patches instead of Aurelien's patch to rename INDEX_OP_trunc_i32. Thoughts? r~ Richard Henderson (2): tcg: Split trunc_shr_i32 opcode into extr[lh]_i64_i32 tcg: Remove tcg_gen_trunc_i64_i32 target-alpha/translate.c | 4 +-- target-arm/translate-a64.c

[Qemu-devel] [PATCH 1/2] tcg: Split trunc_shr_i32 opcode into extr[lh]_i64_i32

2015-07-31 Thread Richard Henderson
Rather than allow arbitrary shift+trunc, only concern ourselves with low and high parts. This is all that was being used anyway. Signed-off-by: Richard Henderson --- target-tricore/translate.c | 12 ++-- tcg/README | 14 ++ tcg/aarch64/tcg-target.h | 3 ++-

Re: [Qemu-devel] [PATCH 02/12] qga: use exit() when parsing options

2015-07-31 Thread Eric Blake
On 07/01/2015 05:47 AM, Marc-André Lureau wrote: > The option parsing is going to be moved to a seperate function, s/seperate/separate/ > use exit() consistantly. s/consistantly/consistently/ > > Signed-off-by: Marc-André Lureau > --- > qga/main.c | 24 > 1 file chang

Re: [Qemu-devel] [PATCH 0/2] Replace trunc_shr_i32 with extr[lh]

2015-07-31 Thread Aurelien Jarno
On 2015-07-31 07:24, Richard Henderson wrote: > I'd prefer to use these two patches instead of Aurelien's > patch to rename INDEX_OP_trunc_i32. Thoughts? That sounds better to me than the current trunc_shr_i32 implementation. I'll send a new version of my patchset based on this one. Reviewed-by:

[Qemu-devel] [PATCH] tcg/mips: fix add2

2015-07-31 Thread Aurelien Jarno
The add2 code in the tcg_out_addsub2 function doesn't take into account the case where rl == al == bl. In that case we can't compute the carry after the addition. As it corresponds to a multiplication by 2, the carry bit is the bit 31. While this is a corner case, this prevents x86-64 guests to bo

Re: [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation?

2015-07-31 Thread Artyom Tarasenko
On Thu, Jul 30, 2015 at 5:50 PM, Aurelien Jarno wrote: > On 2015-07-30 10:55, Aurelien Jarno wrote: >> On 2015-07-30 10:16, Dennis Luehring wrote: >> > Am 30.07.2015 um 09:52 schrieb Aurelien Jarno: >> > >On 2015-07-30 05:52, Dennis Luehring wrote: >> > >> Am 29.07.2015 um 17:01 schrieb Aurelien J

Re: [Qemu-devel] [PATCH v7 2/6] Implement GIC-500 base class

2015-07-31 Thread Peter Maydell
On 26 July 2015 at 14:52, Pavel Fedin wrote: > And could you be not so strict on this file? OK, so having thought about this this week, this is what I suggest. For this patch series we should retain this class hierarchy, but remove all the fields corresponding to state information which isn't u

Re: [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation?

2015-07-31 Thread Aurelien Jarno
On 2015-07-31 17:31, Artyom Tarasenko wrote: > On Thu, Jul 30, 2015 at 5:50 PM, Aurelien Jarno wrote: > > On 2015-07-30 10:55, Aurelien Jarno wrote: > >> On 2015-07-30 10:16, Dennis Luehring wrote: > >> > Am 30.07.2015 um 09:52 schrieb Aurelien Jarno: > >> > >On 2015-07-30 05:52, Dennis Luehring w

Re: [Qemu-devel] [PATCH] tcg/mips: fix add2

2015-07-31 Thread Richard Henderson
On 07/31/2015 08:31 AM, Aurelien Jarno wrote: The add2 code in the tcg_out_addsub2 function doesn't take into account the case where rl == al == bl. In that case we can't compute the carry after the addition. As it corresponds to a multiplication by 2, the carry bit is the bit 31. While this is

Re: [Qemu-devel] [PATCH v7 6/6] Add gicversion option to virt machine

2015-07-31 Thread Peter Maydell
On 24 July 2015 at 10:55, Pavel Fedin wrote: > Set kernel_irqchip_type according to value of the option and pass it > around where necessary. Instantiate devices and fdt nodes according > to the choice. > > max_cpus for virt machine increased to 64. GICv2 compatibility check > happens inside arm_g

[Qemu-devel] Modularizing QEMU RFC

2015-07-31 Thread Marc Marí
Hi everyone I propose improving the current modular driver system for QEMU so it can benefit everybody in speed and flexibility. I'm looking for other ideas, comments, critics, etc. - Background - In order to speed up QEMU, I'm looking at the high number of libraries and dependencies that it load

Re: [Qemu-devel] [PATCH v7 36/42] Host page!=target page: Cleanup bitmaps

2015-07-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Prior to the start of postcopy, ensure that everything that will > > be transferred later is a whole host-page in size. > > > > This is accomplished by discarding partia

[Qemu-devel] [kvm-unit-tests PATCH v5 02/11] README: add some CONTRIBUTING notes

2015-07-31 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v2 - mention consistency v3 - add r-b tag --- README | 26 ++ 1 file changed, 26 insertions(+) diff --git a/README b/README index e9869d1..9389a26 100644 --- a/README +++ b/README @@ -25,3 +25,29 @@ Directory

[Qemu-devel] [kvm-unit-tests PATCH v5 05/11] lib/printf: support the %u unsigned fmt field

2015-07-31 Thread Alex Bennée
--- lib/printf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/printf.c b/lib/printf.c index 89308fb..5d83605 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -180,6 +180,19 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va) break;

[Qemu-devel] [kvm-unit-tests PATCH v5 01/11] arm/run: set indentation defaults for emacs

2015-07-31 Thread Alex Bennée
Signed-off-by: Alex Bennée --- arm/run | 1 + 1 file changed, 1 insertion(+) diff --git a/arm/run b/arm/run index 662a856..6b42a2e 100755 --- a/arm/run +++ b/arm/run @@ -1,4 +1,5 @@ #!/bin/bash +# -*- sh-basic-offset:8 indent-tabs-mode: t -*- if [ ! -f config.mak ]; then echo run ./c

[Qemu-devel] [kvm-unit-tests PATCH v5 11/11] new: arm/barrier-test for memory barriers

2015-07-31 Thread Alex Bennée
From: Alex Bennée This test has been written mainly to stress multi-threaded TCG behaviour but will demonstrate failure by default on real hardware. The test takes the following parameters: - "lock" use GCC's locking semantics - "excl" use load/store exclusive semantics - "acqrel" use acqu

[Qemu-devel] [kvm-unit-tests PATCH v5 08/11] arm/unittests.cfg: add the tlbflush tests

2015-07-31 Thread Alex Bennée
--- arm/unittests.cfg | 24 1 file changed, 24 insertions(+) diff --git a/arm/unittests.cfg b/arm/unittests.cfg index ee655b2..19d72ad 100644 --- a/arm/unittests.cfg +++ b/arm/unittests.cfg @@ -35,3 +35,27 @@ file = selftest.flat smp = $(getconf _NPROCESSORS_CONF) extra

[Qemu-devel] [kvm-unit-tests PATCH v5 04/11] arm/run: introduce usingkvm var and use it

2015-07-31 Thread Alex Bennée
This makes the script a little cleaner by only checking for KVM support in one place. If KVM isn't available we can fall back to TCG emulation and echo the fact to the screen rather than let QEMU complain. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v2 - rm redundant M= statement

[Qemu-devel] [PATCH for-2.5] hw/intc/arm_gic_kvm: set up a flat irqchip routing table

2015-07-31 Thread Eric Auger
In case the kernel supports GSI routing, we set up irqchip routing entries for GIC SPIs. This is not mandated as long as MSI routing is not used (because the kernel sets a default irqchip routing table). However once MSI routing gets used (for VIRTIO-PCI vhost for example), the first call to KVM_SE

[Qemu-devel] [kvm-unit-tests PATCH v5 00/11] My current MTTCG tests

2015-07-31 Thread Alex Bennée
Hi, This is the current state of my MTTCG tests based on the KVM's unit testing framework. The earlier patches in the series have already been reviewed and will (with the exception of the emacs patch) be making their way upstream. There are a couple of addition to library functions: - printf %u

[Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm: query /dev/kvm for maximum vcpus

2015-07-31 Thread Alex Bennée
From: Alex Bennée The previous $(getconf _NPROCESSORS_CONF) isn't correct as the default maximum VCPU configuration is 4 on arm64 machines which typically have more actual cores. This introduces a simple utility program to query the KVM capabilities and use the correct maximum number of vcpus.

[Qemu-devel] [kvm-unit-tests PATCH v5 03/11] configure: emit HOST=$host to config.mak

2015-07-31 Thread Alex Bennée
This is useful information for the run scripts to know, especially if they want to drop to using TCG. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v3 - add r-b tag --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index b2ad32a..078b70c 100

[Qemu-devel] [kvm-unit-tests PATCH v5 06/11] lib/arm: add flush_tlb_page mmu function

2015-07-31 Thread Alex Bennée
This introduces a new flush_tlb_page function which does exactly what you expect. It's going to be useful for the future TLB torture test. Signed-off-by: Alex Bennée --- lib/arm/asm/mmu.h | 11 +++ lib/arm64/asm/mmu.h | 8 2 files changed, 19 insertions(+) diff --git a/lib/a

Re: [Qemu-devel] [PATCH for-2.5 07/10] tcg: implement real ext_i32_i64 and extu_i32_i64 ops

2015-07-31 Thread Alex Bennée
Aurelien Jarno writes: > Implement real ext_i32_i64 and extu_i32_i64 ops. They ensure that a > 32-bit value is always converted to a 64-bit value and not propagated > through the register allocator or the optimizer. > > Cc: Andrzej Zaborowski > Cc: Alexander Graf > Cc: Blue Swirl > Cc: Claudi

[Qemu-devel] [kvm-unit-tests PATCH v5 07/11] new arm/tlbflush-test: TLB torture test

2015-07-31 Thread Alex Bennée
This adds a fairly brain dead torture test for TLB flushes intended for stressing the MTTCG QEMU build. It takes the usual -smp option for multiple CPUs. By default it CPU0 will do a TLBIALL flush after each cycle. You can pass options via -append to control additional aspects of the test: - "p

Re: [Qemu-devel] [PATCH for-2.5 10/10] tcg: update README about size changing ops

2015-07-31 Thread Alex Bennée
Aurelien Jarno writes: > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno > --- > tcg/README | 18 +++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/tcg/README b/tcg/README > index 61b3899..a22f251 100644 > --- a/tcg/README > +++ b/tcg/README > @@ -46

Re: [Qemu-devel] [PATCH for-2.5 07/10] tcg: implement real ext_i32_i64 and extu_i32_i64 ops

2015-07-31 Thread Richard Henderson
On 07/31/2015 09:01 AM, Alex Bennée wrote: Aurelien Jarno writes: Implement real ext_i32_i64 and extu_i32_i64 ops. They ensure that a 32-bit value is always converted to a 64-bit value and not propagated through the register allocator or the optimizer. Cc: Andrzej Zaborowski Cc: Alexander G

  1   2   >