Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add

2015-09-16 Thread Wen Congyang
On 09/15/2015 07:12 PM, Markus Armbruster wrote: > Wen Congyang writes: > >> On 09/15/2015 03:37 PM, Markus Armbruster wrote: >>> Wen Congyang writes: >>> On 09/14/2015 11:47 PM, Eric Blake wrote: > On 09/14/2015 08:27 AM, Markus Armbruster

Re: [Qemu-devel] [PATCH 1/2] target-i386: disable LINT0 after reset

2015-09-16 Thread Nadav Amit
I'll try to reproduce the problem today. Nadav On Sep 16, 2015 8:23 AM, "Jan Kiszka" wrote: > On 2015-09-15 23:19, Alex Williamson wrote: > > On Mon, 2015-04-13 at 02:32 +0300, Nadav Amit wrote: > >> Due to old Seabios bug, QEMU reenable LINT0 after reset. This bug is >

Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child

2015-09-16 Thread Wen Congyang
On 09/15/2015 03:49 PM, Markus Armbruster wrote: > Wen Congyang writes: > >> On 09/14/2015 10:36 PM, Markus Armbruster wrote: >>> Wen Congyang writes: >>> Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang

Re: [Qemu-devel] [RFC PATCH] libcacard: move it to a standalone project

2015-09-16 Thread Gerd Hoffmann
Hi, > > Where are we going to host virglrenderer? Whatever we do for libcacard, > > we should probably also do for virglrenderer. > > I hadn't considered where to host virglrenderer yet, I was initially > considering > shipping it with mesa but gave up that idea, so I was contemplating just

Re: [Qemu-devel] [RFC 00/20] Do away with TB retranslation

2015-09-16 Thread Dennis Luehring
Am 15.09.2015 um 22:19 schrieb Richard Henderson: Indeed. It would indeed be good to add a bunch of bare-metal tests. Pre-compiled and checked in so that one doesn't have to have a suite of cross-compilers in order to use them. OTOH, I don't see myself (or anyone else) really having the time

Re: [Qemu-devel] [PATCH v2] target-mips: Fix RDHWR on CP0.Count

2015-09-16 Thread Aurelien Jarno
On 2015-09-08 11:34, Alex Smith wrote: > For RDHWR on the CP0.Count register, env->CP0_Count was being returned. > This value is a delta against the QEMU_CLOCK_VIRTUAL clock, not the > correct current value of CP0.Count. Use cpu_mips_get_count() instead. > > Signed-off-by: Alex Smith

Re: [Qemu-devel] [PATCH 1/2] target-i386: disable LINT0 after reset

2015-09-16 Thread Gerd Hoffmann
On Mi, 2015-09-16 at 07:23 +0200, Jan Kiszka wrote: > On 2015-09-15 23:19, Alex Williamson wrote: > > On Mon, 2015-04-13 at 02:32 +0300, Nadav Amit wrote: > >> Due to old Seabios bug, QEMU reenable LINT0 after reset. This bug is long > >> gone > >> and therefore this hack is no longer needed.

Re: [Qemu-devel] [PATCH] nbd: wait all read/write requests finished when shutdowning nbd socket

2015-09-16 Thread Paolo Bonzini
On 16/09/2015 10:22, Wen Congyang wrote: >>> >> if (exp->blk) { >>> >> +bdrv_drain(blk_bs(exp->blk)); >>> >> blk_remove_aio_context_notifier(exp->blk, blk_aio_attached, >>> >> blk_aio_detach, exp); >>> >>

Re: [Qemu-devel] [RFC 00/20] Do away with TB retranslation

2015-09-16 Thread Alex Bennée
Richard Henderson writes: > On 09/10/2015 11:55 AM, Alex Bennée wrote: >> I've only had a quick glance so far but I'm fairly familiar with the >> concept from a previous life. I'll aim to do a full review later once >> I've gotten through my MTTCG review backlog. >> >> Anyway

Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform, built by ndk-r10

2015-09-16 Thread Houcheng Lin
2015-09-16 16:09 GMT+08:00 Paolo Bonzini : > > >> >> I'll modify the bionic C library to support these functions and feedback >> to google's AOSP project. But the android kernel does not support shmem, > > It doesn't support tmpfs? /dev/shm is just a tmpfs. > > Paolo Oh, you

Re: [Qemu-devel] [PATCH v3 04/46] ivshmem: fix number of bytes to push to fifo

2015-09-16 Thread Claudio Fontana
On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > If the fifo has 0 bytes, and the read is of size 1, the call to > fifo8_push_all() will copy off boundary data. > > Signed-off-by: Marc-André Lureau >

Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long)

2015-09-16 Thread Claudio Fontana
On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > ivshmem_read() only reads sizeof(long) from the input buffer. Accepting > more could lead to fifo8 abort() on 32bit systems if fifo is not empty. > > Signed-off-by: Marc-André

Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long)

2015-09-16 Thread Marc-André Lureau
Hi - Original Message - > On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > ivshmem_read() only reads sizeof(long) from the input buffer. Accepting > > more could lead to fifo8 abort() on 32bit systems if fifo is

[Qemu-devel] [PATCH 3/3] kvm/x86: Hyper-V HV_X64_MSR_VP_RUNTIME support

2015-09-16 Thread Denis V. Lunev
From: Andrey Smetanin HV_X64_MSR_VP_RUNTIME msr used by guest to get "the time the virtual processor consumes running guest code, and the time the associated logical processor spends running hypervisor code on behalf of that guest." Calculation of this time is performed

Re: [Qemu-devel] [PATCH v10 09/10] netfilter: add a netbuffer filter

2015-09-16 Thread Jason Wang
On 09/09/2015 03:24 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 option, if supplied, this filter will

Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform, built by ndk-r10

2015-09-16 Thread Houcheng Lin
2015-09-16 17:38 GMT+08:00 Paolo Bonzini : > > Actually it's even simpler. shm_open is basically just > > char *s; > int fd; > > asprintf(, "/dev/shm/%s", name); > fd = open(s, name | O_CLOEXEC, mode); > free(s); > return fd; >

Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add

2015-09-16 Thread Wen Congyang
On 09/15/2015 09:11 PM, Eric Blake wrote: > On 09/14/2015 09:58 PM, Wen Congyang wrote: >> On 09/15/2015 11:46 AM, Eric Blake wrote: >>> On 09/14/2015 08:27 PM, Wen Congyang wrote: > Building fails: > GEN qmp-commands.h > In file included from /work/src/qemu/qapi-schema.json:9:

Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform, built by ndk-r10

2015-09-16 Thread Paolo Bonzini
On 15/09/2015 19:34, Houcheng Lin wrote: > Hi Paolo, > > (Please ignore the previous mail that did not include "qemu-devel") > > Thanks for your review and suggestions. I'll fix this patch > accordingly and please see my replies below. > > best regards, > Houcheng Lin > > 2015-09-15 17:41

Re: [Qemu-devel] [PATCH 0/7 v9] vhost-user multiple queue support

2015-09-16 Thread Yuanhan Liu
On Wed, Sep 16, 2015 at 11:12:08AM +0300, Michael S. Tsirkin wrote: > On Tue, Sep 15, 2015 at 03:10:27PM +0800, Yuanhan Liu wrote: > > Hi, > > > > Here is the updated patch set for enabling vhost-user multiple queue. > > Will review, thanks. Thank you! > BTW, please use git format-patch -vX to

Re: [Qemu-devel] [PATCH] nbd: wait all read/write requests finished when shutdowning nbd socket

2015-09-16 Thread Paolo Bonzini
On 16/09/2015 09:16, Wen Congyang wrote: > If the socket fd is shutdown, there may be some data which is received before > shutdown. We will read the data and do read/write in nbd_trip(). But the exp's > blk is NULL, and it will cause qemu crashed. > > Reported-by: Li Zhijian

Re: [Qemu-devel] [PATCH] specs/vhost-user.txt: fix name of messages

2015-09-16 Thread Marc-André Lureau
Hi On Fri, Sep 11, 2015 at 9:24 AM, Michael Tokarev wrote: > The patch doesn't apply to qemu master as vhost-user.txt does not > have VHOST_GET_PROTOCOL_FEATURES in here. What treee you're basing > your patch on? It is after your pending protocol feature patches. > Besides,

[Qemu-devel] [PATCH v12 5/5] icc_bus: drop the unused files

2015-09-16 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 -

[Qemu-devel] [PATCH v12 3/5] x86: use new method to correct reset sequence

2015-09-16 Thread Zhu Guihua
During reset some devices (such as hpet, rtc) might send IRQ to APIC which changes APIC's state from default one it's supposed to have at machine startup time. Fix this by resetting APIC after devices have been reset to cancel any changes that qemu_devices_reset() might have done to its state.

[Qemu-devel] [PATCH v12 0/5] remove icc bus/bridge

2015-09-16 Thread Zhu Guihua
ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new pc-cpu-test. And I have tested with kvm along with kernel_irqchip=on/off, it works fine. This patch series is based on the

Re: [Qemu-devel] [PATCH 4/8] target-i386: Re-introduce optimal breakpoint removal

2015-09-16 Thread Paolo Bonzini
On 15/09/2015 20:45, Richard Henderson wrote: > +/* Fold the global and local enable bits together into the > + global fields, then xor to show which registers have > + changed collective enable state. */ > +int mod = ((old_dr7 | old_dr7 * 2) ^ (new_dr7 |

Re: [Qemu-devel] [PATCH v2] target-mips: Fix RDHWR on CP0.Count

2015-09-16 Thread Leon Alrae
On 16/09/15 06:27, Aurelien Jarno wrote: > Independently of your patch, I do wonder if we shouldn't change the > return type of cpu_mips_get_count to int32_t. With your patch, there > are now 2 calls to this functions, and both cast the value to int32_t. Yes, I think that will make more sense if

Re: [Qemu-devel] [PATCH v10 06/10] netfilter: add an API to pass the packet to next filter

2015-09-16 Thread Jason Wang
On 09/09/2015 03:24 PM, Yang Hongyang wrote: > add an API qemu_netfilter_pass_to_next() to pass the packet > to next filter. > > Signed-off-by: Yang Hongyang > Reviewed-by: Thomas Huth > --- > v10: adjust as a NetQueueDeliverFunc > v9: fix a bug when

Re: [Qemu-devel] [PATCH v3 16/46] ivshmem: remove max_peer field

2015-09-16 Thread Claudio Fontana
On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > max_peer isn't really useful, it tracks the maximum received VM id, but > that quickly matches nb_peers, the size of the peers array. Since VM > come and go, there might be sparse

Re: [Qemu-devel] [PATCH: 2/2] maintainers: changed companies, use an email that doesn't change

2015-09-16 Thread Paolo Bonzini
On 15/09/2015 19:46, mhi...@digitalocean.com wrote: > From: "Michael R. Hines" > > Is there a procedure for updating this file besides just updating the > file? Not really, more maintainers are always welcome. :) Paolo > Signed-off-by: Michael R. Hines

Re: [Qemu-devel] [PATCH: 1/2] rdma: changed companies, use an email that doesn't change

2015-09-16 Thread Paolo Bonzini
On 15/09/2015 19:46, mhi...@digitalocean.com wrote: > From: "Michael R. Hines" > > Is change this kosher --- changing the header like this? I often see really > outdated emails in other projects sometimes, so I'm not sure if that's > to preserve some kind of providence or

Re: [Qemu-devel] [PATCH 0/3] KVM: ecessary simple pre-requisites for VMBus emulation

2015-09-16 Thread Paolo Bonzini
On 16/09/2015 11:29, Denis V. Lunev wrote: > Hyper-V reset, vp index, vp runtime support is required to > support loading Windows guest driver Winhv.sys. Winhv.sys in guest > is required to support Windows VMBus. > > These changes are simple and straightforward. Let's them go first. > >

Re: [Qemu-devel] Could not boot a guest vm from kvm mode based on APM X-Gene Host and latest qemu

2015-09-16 Thread Peter Maydell
On 15 September 2015 at 01:03, liang yan wrote: > Hello, All, > > I am trying to enable kvm for a guest vm on an APM X-Gene Host with latest > qemu, but could not make it work. > > The host is APM X-Gene 8-core, Linux kernel is 4.1.0-rc7-1-arm64, > > Guest kernel is linux-3.16rc3

Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support

2015-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2015 at 10:06:56AM +0800, Yuanhan Liu wrote: > If not, I'd like to put them into the commit log, as putting it > outside the commit log gives unnecessary extra burden to patch > author when he need update several version change information > in a patch set: he has to format the

Re: [Qemu-devel] [PATCH] nbd: wait all read/write requests finished when shutdowning nbd socket

2015-09-16 Thread Wen Congyang
On 09/16/2015 04:17 PM, Paolo Bonzini wrote: > > > On 16/09/2015 09:16, Wen Congyang wrote: >> If the socket fd is shutdown, there may be some data which is received before >> shutdown. We will read the data and do read/write in nbd_trip(). But the >> exp's >> blk is NULL, and it will cause

Re: [Qemu-devel] [PATCH v2] nbd: release exp->blk after all clients are closed

2015-09-16 Thread Paolo Bonzini
On 16/09/2015 10:35, Wen Congyang wrote: > If the socket fd is shutdown, there may be some data which is received before > shutdown. We will read the data and do read/write in nbd_trip(). But the exp's > blk is NULL, and it will cause qemu crashed. > > Reported-by: Li Zhijian

Re: [Qemu-devel] [PATCH v3 07/46] ivshmem: remove superflous ivshmem_attr field

2015-09-16 Thread Claudio Fontana
only a small nitpick below on extra ";" character. On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 16 +++- > 1 file

[Qemu-devel] [PATCH 1/3] kvm/x86: Hyper-V HV_X64_MSR_RESET msr

2015-09-16 Thread Denis V. Lunev
From: Andrey Smetanin HV_X64_MSR_RESET msr is used by Hyper-V based Windows guest to reset guest VM by hypervisor. Necessary to support loading of winhv.sys in guest, which in turn is required to support Windows VMBus. Signed-off-by: Andrey Smetanin

[Qemu-devel] [PATCH 0/3] KVM: ecessary simple pre-requisites for VMBus emulation

2015-09-16 Thread Denis V. Lunev
Hyper-V reset, vp index, vp runtime support is required to support loading Windows guest driver Winhv.sys. Winhv.sys in guest is required to support Windows VMBus. These changes are simple and straightforward. Let's them go first. Signed-off-by: Andrey Smetanin

Re: [Qemu-devel] [PATCH v3 16/46] ivshmem: remove max_peer field

2015-09-16 Thread Marc-André Lureau
Hi - Original Message - > On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > max_peer isn't really useful, it tracks the maximum received VM id, but > > that quickly matches nb_peers, the size of the peers array.

Re: [Qemu-devel] [PATCH 0/7 v9] vhost-user multiple queue support

2015-09-16 Thread Michael S. Tsirkin
On Tue, Sep 15, 2015 at 03:10:27PM +0800, Yuanhan Liu wrote: > Hi, > > Here is the updated patch set for enabling vhost-user multiple queue. Will review, thanks. BTW, please use git format-patch -vX to format patches. This will ensure that all patches include the version # in the subject. --

[Qemu-devel] [PATCH v2] nbd: release exp->blk after all clients are closed

2015-09-16 Thread Wen Congyang
If the socket fd is shutdown, there may be some data which is received before shutdown. We will read the data and do read/write in nbd_trip(). But the exp's blk is NULL, and it will cause qemu crashed. Reported-by: Li Zhijian Signed-off-by: Wen Congyang

[Qemu-devel] [PATCH v12 4/5] cpu/apic: drop icc bus/bridge

2015-09-16 Thread Zhu Guihua
From: Chen Fan After CPU hotplug has been converted to BUS-less hot-plug infrastructure, the only function ICC bus performs is to propagate reset to LAPICs. However LAPIC could be reset by registering its reset handler after all device are initialized. Do so and

[Qemu-devel] [PATCH v12 1/5] apic: move APIC's MMIO region mapping into APIC

2015-09-16 Thread Zhu Guihua
From: Chen Fan When ICC bus/bridge is removed, APIC MMIO will be left unmapped since it was mapped into system's address space indirectly by ICC bridge. Fix it by moving mapping into APIC code, so it would be possible to remove ICC bus/bridge code later.

[Qemu-devel] [PATCH v12 2/5] apic: use per CPU AS to map APIC MMIO for TCG

2015-09-16 Thread Zhu Guihua
TCG supports per CPU address space, and the emulation quality is a bit better with it. So use per CPU address space to map APIC MMIO area. This allows the APIC base address of each cpu to be moved independent of others. Signed-off-by: Zhu Guihua --- target-i386/cpu.c

Re: [Qemu-devel] [PATCH v10 00/10] Add a netfilter object and netbuffer filter

2015-09-16 Thread Jason Wang
On 09/14/2015 01:36 PM, Yang Hongyang wrote: > > > On 09/14/2015 01:22 PM, Jason Wang wrote: >> >> >> On 09/14/2015 01:09 PM, Yang Hongyang wrote: >>> Hi Stefan,Jason, >>> >>> I've convert this series to base on QOM, and introducing NetQueue apis >>> instead of using Netqueue internals as Stefan

Re: [Qemu-devel] [PATCH] ppc/spapr: Allow VIRTIO_VGA

2015-09-16 Thread Gerd Hoffmann
On Mi, 2015-09-16 at 07:08 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2015-09-15 at 11:19 +0200, Gerd Hoffmann wrote: > > On Di, 2015-09-15 at 15:51 +1000, Benjamin Herrenschmidt wrote: > > > It works fine with the Linux driver out of the box > > > > Do you actually want the vga compatibility

Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add

2015-09-16 Thread Markus Armbruster
Wen Congyang writes: > On 09/15/2015 07:12 PM, Markus Armbruster wrote: >> Wen Congyang writes: >> >>> On 09/15/2015 03:37 PM, Markus Armbruster wrote: Wen Congyang writes: > On 09/14/2015 11:47 PM, Eric Blake

Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support

2015-09-16 Thread Yuanhan Liu
On Wed, Sep 16, 2015 at 11:10:35AM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 16, 2015 at 10:06:56AM +0800, Yuanhan Liu wrote: > > If not, I'd like to put them into the commit log, as putting it > > outside the commit log gives unnecessary extra burden to patch > > author when he need update

Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child

2015-09-16 Thread Markus Armbruster
Wen Congyang writes: > On 09/15/2015 03:49 PM, Markus Armbruster wrote: >> Wen Congyang writes: >> >>> On 09/14/2015 10:36 PM, Markus Armbruster wrote: Wen Congyang writes: > Signed-off-by: Wen Congyang

Re: [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-09-16 Thread Vladimir Sementsov-Ogievskiy
On 15.09.2015 19:24, Eric Blake wrote: On 09/05/2015 10:43 AM, Vladimir Sementsov-Ogievskiy wrote: Persistent dirty bitmaps will be saved into qcow2 files. It may be used as 'internal' bitmaps (for qcow2 drives) or as 'external' bitmaps for other drives (there may be qcow2 file with zero disk

Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform, built by ndk-r10

2015-09-16 Thread Paolo Bonzini
On 16/09/2015 11:28, Houcheng Lin wrote: > 2015-09-16 16:09 GMT+08:00 Paolo Bonzini : >> >> >>> >>> I'll modify the bionic C library to support these functions and feedback >>> to google's AOSP project. But the android kernel does not support shmem, >> >> It doesn't support

[Qemu-devel] [PATCH] nbd: wait all read/write requests finished when shutdowning nbd socket

2015-09-16 Thread Wen Congyang
If the socket fd is shutdown, there may be some data which is received before shutdown. We will read the data and do read/write in nbd_trip(). But the exp's blk is NULL, and it will cause qemu crashed. Reported-by: Li Zhijian Signed-off-by: Wen Congyang

Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add

2015-09-16 Thread Wen Congyang
On 09/16/2015 04:21 PM, Markus Armbruster wrote: > Wen Congyang writes: > >> On 09/15/2015 07:12 PM, Markus Armbruster wrote: >>> Wen Congyang writes: >>> On 09/15/2015 03:37 PM, Markus Armbruster wrote: > Wen Congyang

Re: [Qemu-devel] Could not boot a guest vm from kvm mode based on APM X-Gene Host and latest qemu

2015-09-16 Thread Tushar Jagad
Hi, On Mon, Sep 14, 2015 at 06:03:48PM -0600, liang yan wrote: > Hello, All, > > I am trying to enable kvm for a guest vm on an APM X-Gene Host with > latest qemu, but could not make it work. > > The host is APM X-Gene 8-core, Linux kernel is 4.1.0-rc7-1-arm64, > > Guest kernel is linux-3.16rc3 >

Re: [Qemu-devel] [PATCH v10 02/10] init/cleanup of netfilter object

2015-09-16 Thread Jason Wang
On 09/09/2015 03:24 PM, Yang Hongyang wrote: > Add a netfilter object based on QOM. > > A netfilter is attached to a netdev, captures all network packets > that pass through the netdev. When we delete the netdev, we also > delete the netfilter object attached to it, because if the netdev is >

[Qemu-devel] [PATCH 2/3] kvm/x86: Hyper-V HV_X64_MSR_VP_INDEX export for QEMU.

2015-09-16 Thread Denis V. Lunev
From: Andrey Smetanin Insert Hyper-V HV_X64_MSR_VP_INDEX into msr's emulated list, so QEMU can set Hyper-V features cpuid HV_X64_MSR_VP_INDEX_AVAILABLE bit correctly. KVM emulation part is in place already. Necessary to support loading of winhv.sys in guest, which in

Re: [Qemu-devel] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type

2015-09-16 Thread Michael Tokarev
07.09.2015 21:06, Sai Pavan Boddu wrote: > Fix compile time warnings, because of type mismatch for unsigned long > long type. Applied to the trivial-patches tree, thanks! /mjt

[Qemu-devel] [PATCH v8 00/26] qapi: QMP introspection

2015-09-16 Thread Markus Armbruster
Series needs my "[PATCH for-2.4 0/2] qom: Fix misuse of Error API" to pass tests. It's in Andreas's qom-next (currently at commit de1da05), so I based on that. You can fetch it from my git://repo.or.cz/qemu/armbru.git branch qapi-introspect. Review of v6 found a small flaw in the PATCH 20.

[Qemu-devel] [PATCH v8 04/26] qapi: New QAPISchemaVisitor

2015-09-16 Thread Markus Armbruster
The visitor will help keeping the code generation code simple and reasonably separated from QAPISchema details. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 64 + 1 file changed, 64 insertions(+) diff --git

[Qemu-devel] [PATCH v8 02/26] qapi: New QAPISchema intermediate reperesentation

2015-09-16 Thread Markus Armbruster
The QAPI code generators work with a syntax tree (nested dictionaries) plus a few symbol tables (also dictionaries) on the side. They have clearly outgrown these simple data structures. There's lots of rummaging around in dictionaries, and information is recomputed on the fly. For the work I'm

[Qemu-devel] [PATCH v8 21/26] qapi: Introduce a first class 'any' type

2015-09-16 Thread Markus Armbruster
It's first class, because unlike '**', it actually works, i.e. doesn't require 'gen': false. '**' will go away next. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- docs/qapi-code-gen.txt

[Qemu-devel] [PATCH v8 24/26] qapi: Pseudo-type '**' is now unused, drop it

2015-09-16 Thread Markus Armbruster
'gen': false needs to stay for now, because netdev_add is still using it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- docs/qapi-code-gen.txt| 18 ++

Re: [Qemu-devel] [PATCH v10 00/10] Add a netfilter object and netbuffer filter

2015-09-16 Thread Yang Hongyang
On 09/16/2015 05:48 PM, Jason Wang wrote: On 09/14/2015 01:36 PM, Yang Hongyang wrote: On 09/14/2015 01:22 PM, Jason Wang wrote: On 09/14/2015 01:09 PM, Yang Hongyang wrote: Hi Stefan,Jason, I've convert this series to base on QOM, and introducing NetQueue apis instead of using

Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long)

2015-09-16 Thread Claudio Fontana
On 16.09.2015 11:33, Marc-André Lureau wrote: > Hi > > - Original Message - >> On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> ivshmem_read() only reads sizeof(long) from the input buffer. Accepting >>> more could

[Qemu-devel] [PATCH v11 05/12] net/queue: introduce NetQueueDeliverFunc

2015-09-16 Thread Yang Hongyang
net/queue.c has logic to send/queue/flush packets but a qemu_deliver_packet_iov() call is hardcoded. Abstract this func so that we can use our own deliver function in netfilter. Signed-off-by: Yang Hongyang Cc: Stefan Hajnoczi --- include/net/queue.h

[Qemu-devel] [PATCH v11 03/12] netfilter: hook packets before net queue send

2015-09-16 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth --- v11: introduce qemu_netfilter_receive() a avoid dup code v10: adjust due to QOM v5: do not check ret against iov_size pass sent_cb to filters ---

[Qemu-devel] [PULL 07/24] i386/kvm: Hyper-v crash msrs set/get'ers and migration

2015-09-16 Thread Paolo Bonzini
From: Andrey Smetanin KVM Hyper-V based guests can notify hypervisor about occurred guest crash by writing into Hyper-V crash MSR's. This patch does handling and migration of HV_X64_MSR_CRASH_P0-P4, HV_X64_MSR_CRASH_CTL msrs. User can enable these MSR's by 'hv-crash'

[Qemu-devel] [PULL 05/24] cpu: Add crash_occurred flag into CPUState

2015-09-16 Thread Paolo Bonzini
From: Andrey Smetanin CPUState::crash_occurred field inside CPUState marks that guest crash occurred. This value is added into cpu common migration subsection. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC:

[Qemu-devel] [PULL 10/24] hmp-commands.hx: fix end of table info

2015-09-16 Thread Paolo Bonzini
From: Pavel Butsykin The table info(information about the system state) closes earlier and some of its elements are outside(trace-events, rocker, etc). This can be confusing and lead to additional bugs. Signed-off-by: Pavel Butsykin

[Qemu-devel] [PULL 22/24] checkpatch: Escape left braces in regex

2015-09-16 Thread Paolo Bonzini
From: Fam Zheng Latest perl now deprecates "{" literal in regex and print warnings like "unescaped left brace in regex is deprecated". Add escape to keep it happy. Signed-off-by: Fam Zheng Message-Id: <1441969656-2640-1-git-send-email-f...@redhat.com>

[Qemu-devel] [PULL 11/24] monitor: added generation of documentation for hmp-commands-info.hx

2015-09-16 Thread Paolo Bonzini
From: Pavel Butsykin It will be easier if you need to add info-commands to edit only hmp-commands-info.hx, before this had to edit monitor.c and hmp-commands.hx. >From the build point of view all documentation is saved into qemu-monitor-info.texi which from now on is

Re: [Qemu-devel] [PATCH] pc: check for underflow in load_linux

2015-09-16 Thread Michael Tokarev
14.09.2015 13:07, Paolo Bonzini wrote: > If (setup_size+1)*512 is small enough, kernel_size -= setup_size can allocate > a huge amount of memory. Avoid that. Applied to -trivial, thanks! /mjt

[Qemu-devel] [PATCH v8 13/26] qapi: Clean up after recent conversions to QAPISchemaVisitor

2015-09-16 Thread Markus Armbruster
Generate just 'FOO' instead of 'struct FOO' when possible. Drop helper functions that are now unused. Make pep8 and pylint reasonably happy. Rename generate_FOO() functions to gen_FOO() for consistency. Use more consistent and sensible variable names. Consistently use c_ for mapping keys when

Re: [Qemu-devel] [PATCH v3 21/46] ivshmem: use common return

2015-09-16 Thread Claudio Fontana
On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Both if branches return, move this out to common end. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 3 +-- > 1 file changed, 1

Re: [Qemu-devel] [PATCH v3 29/46] ivshmem: error on too many eventfd received

2015-09-16 Thread Claudio Fontana
On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The number of eventfd that can be handled per peer is limited by the > number of vectors. Return an error when receiving too many of them. > > Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-16 Thread Yang Hongyang
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 option, if supplied, this filter will release packets by interval. Usage: -netdev

[Qemu-devel] [PATCH v11 10/12] tests: add test cases for netfilter object

2015-09-16 Thread Yang Hongyang
Using qtest qmp interface to implement following cases: 1) add/remove netfilter 2) add a netfilter then delete the netdev 3) add/remove more than one netfilters 4) add more than one netfilters and then delete the netdev Signed-off-by: Yang Hongyang --- v10: qmp command

[Qemu-devel] [PULL 00/24] Misc patches for 2015-09-16

2015-09-16 Thread Paolo Bonzini
The following changes since commit 007e620a7576e4ce2ea6955541e87d8ae8ed32ae: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-09-14 18:51:09 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

[Qemu-devel] [PULL 06/24] kvm: Add kvm system event crash handler

2015-09-16 Thread Paolo Bonzini
From: Andrey Smetanin KVM kernel can send guest crash events into userspace. Appropriate guest crash handler is called when kernel guest crash event received. Guest crash event recognized by a KVM_SYSTEM_EVENT_CRASH type of system event. Signed-off-by: Andrey Smetanin

[Qemu-devel] [PULL 01/24] pci: remove Link Training error from AER error list

2015-09-16 Thread Paolo Bonzini
The spec says: Undefined – The value read from this bit is undefined. In previous versions of this specification, this bit was used to indicate a Link Training Error. System software must ignore the value read from this bit. System software is permitted to write any value

[Qemu-devel] [PULL 18/24] cputlb: move CPU_LOOP() for tlb_reset() to exec.c

2015-09-16 Thread Paolo Bonzini
From: Peter Crosthwaite To prepare for multi-arch, cputlb.c should only have awareness of one single architecture. This means it should not have access to the full CPU lists which may be heterogeneous. Instead, push the CPU_LOOP() up to the one and only caller in

[Qemu-devel] [PULL 12/24] qemu-char: Use g_new() & friends where that makes obvious sense

2015-09-16 Thread Paolo Bonzini
From: Markus Armbruster g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches

[Qemu-devel] [PATCH 3/3] target-i386/kvm: Hyper-V HV_X64_MSR_VP_RUNTIME support

2015-09-16 Thread Denis V. Lunev
From: Andrey Smetanin HV_X64_MSR_VP_RUNTIME msr used by guest to get "the time the virtual processor consumes running guest code, and the time the associated logical processor spends running hypervisor code on behalf of that guest." Calculation of that time is performed

Re: [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally

2015-09-16 Thread Michael Tokarev
07.09.2015 21:06, Sai Pavan Boddu wrote: > Conditional compilation hides few type mismatch warnings, fix it to > compile unconditionally. Applied to the trivial-patches tree, thanks! /mjt

[Qemu-devel] [PATCH v8 10/26] qapi-event: Eliminate global variable event_enum_value

2015-09-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- scripts/qapi-event.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py

[Qemu-devel] [PATCH v8 01/26] qapi: Rename class QAPISchema to QAPISchemaParser

2015-09-16 Thread Markus Armbruster
I want to name a new class QAPISchema. While there, make it a new-style class. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- scripts/qapi.py | 8 1 file changed, 4

[Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-09-16 Thread Markus Armbruster
Fixes flat unions to get the base's base members. Test case is from commit 2fc0043, in qapi-schema-test.json: { 'union': 'UserDefFlatUnion', 'base': 'UserDefUnionBase', 'discriminator': 'enum1', 'data': { 'value1' : 'UserDefA', 'value2' : 'UserDefB',

[Qemu-devel] [PATCH v8 07/26] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-09-16 Thread Markus Armbruster
Fixes flat unions to visit the base's base members (the previous commit merely added them to the struct). Same test case. Patch's effect on visit_type_UserDefFlatUnion(): static void visit_type_UserDefFlatUnion_fields(Visitor *m, UserDefFlatUnion **obj, Error **errp) { Error

[Qemu-devel] [PATCH v8 18/26] qapi-commands: De-duplicate output marshaling functions

2015-09-16 Thread Markus Armbruster
gen_marshal_output() uses its parameter name only for name of the generated function. Name it after the type being marshaled instead of its caller, and drop duplicates. Saves 7 copies of qmp_marshal_output_int() in qemu-ga, and one copy of qmp_marshal_output_str() in qemu-system-*.

[Qemu-devel] [PATCH v8 20/26] qapi: Make output visitor return qnull() instead of NULL

2015-09-16 Thread Markus Armbruster
Before commit 1d10b44, it crashed. Since then, it returns NULL, with a FIXME comment. The FIXME is valid: code that assumes QObject * can't be null exists. I'm not aware of a way to feed this problematic return value to code that actually chokes on null in the current code, but the next few

[Qemu-devel] [PATCH v8 09/26] qapi: De-duplicate enum code generation

2015-09-16 Thread Markus Armbruster
Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but that's no excuse. Move the helpers from qapi-types.py to qapi.py, and replace the duplicates in qapi-event.py. The generated event enumeration type's lookup table becomes const-correct (see commit 2e4450f), and uses explicit

[Qemu-devel] [PATCH v8 17/26] qapi: De-duplicate parameter list generation

2015-09-16 Thread Markus Armbruster
Generated qapi-event.[ch] lose line breaks. No change otherwise. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- scripts/qapi-commands.py | 11 ++- scripts/qapi-event.py| 18

[Qemu-devel] [PATCH v8 23/26] qapi-schema: Fix up misleading specification of netdev_add

2015-09-16 Thread Markus Armbruster
It doesn't take a 'props' argument, let alone one in the format "NAME=VALUE,..." The bogus arguments specification doesn't matter due to 'gen': false. Clean it up to be incomplete rather than wrong, and document the incompleteness. While there, improve netdev_add usage example in the manual: add

[Qemu-devel] [PATCH v8 26/26] qapi-introspect: Hide type names

2015-09-16 Thread Markus Armbruster
To eliminate the temptation for clients to look up types by name (which are not ABI), replace all type names by meaningless strings. Reduces output of query-schema by 13 out of 85KiB. As a debugging aid, provide option -u to suppress the hiding. Signed-off-by: Markus Armbruster

[Qemu-devel] [PATCH v8 11/26] qapi-event: Convert to QAPISchemaVisitor, fixing data with base

2015-09-16 Thread Markus Armbruster
Fixes events whose data is struct with base to include the struct's base members. Test case is qapi-schema-test.json's event __org.qemu_x-command: { 'event': '__ORG.QEMU_X-EVENT', 'data': '__org.qemu_x-Struct' } { 'struct': '__org.qemu_x-Struct', 'base': '__org.qemu_x-Base',

Re: [Qemu-devel] [PATCH v10 09/10] netfilter: add a netbuffer filter

2015-09-16 Thread Yang Hongyang
On 09/16/2015 05:42 PM, Jason Wang wrote: On 09/09/2015 03:24 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

Re: [Qemu-devel] help with understanding qcow2 file format

2015-09-16 Thread Vasiliy Tolstov
2015-09-16 14:04 GMT+03:00 Laszlo Ersek : > All I can say is, "docs/specs/qcow2.txt". > Thanks! Can you provide me ordered steps that i need to do to get file contents? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

Re: [Qemu-devel] [PATCH v3 24/46] ivshmem: shmfd can be 0

2015-09-16 Thread Claudio Fontana
On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > 0 is a valid fd value, so change conditions and set -1 value early > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 6 +++--- > 1

Re: [Qemu-devel] [PATCH v7 04/11] target-mips: improve exception handling

2015-09-16 Thread Pavel Dovgaluk
> From: Leon Alrae [mailto:leon.al...@imgtec.com] > On 28/08/2015 10:08, Pavel Dovgaluk wrote: > >> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > >> On 2015-08-13 14:12, Leon Alrae wrote: > >>> On 10/07/2015 10:57, Pavel Dovgalyuk wrote: > @@ -2364,14 +2363,12 @@ static void

[Qemu-devel] [PATCH v11 08/12] net/queue: export qemu_net_queue_append_iov

2015-09-16 Thread Yang Hongyang
This will be used by buffer filter implementation later to queue packets. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6

  1   2   3   >