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

2015-09-25 Thread Jason Wang
On 09/25/2015 03:18 PM, Yang Hongyang wrote: > > > On 09/24/2015 05:12 PM, Markus Armbruster wrote: >> Yang Hongyang writes: >> >>> This filter is to buffer/release packets, this feature can be used >>> when using MicroCheckpointing, or other Remus like VM FT solutions, you >> >> What's "Remus"?

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

2015-09-25 Thread Thomas Huth
On 25/09/15 10:03, Yang Hongyang wrote: > > > On 09/24/2015 05:12 PM, Markus Armbruster wrote: >> Yang Hongyang writes: > [...] >>> diff --git a/vl.c b/vl.c >>> index ec589e2..3cf89d5 100644 >>> --- a/vl.c >>> +++ b/vl.c >>> @@ -2794,7 +2794,12 @@ static bool object_create_initial(const char >>>

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

2015-09-25 Thread Yang Hongyang
On 09/25/2015 04:18 PM, Thomas Huth wrote: On 25/09/15 10:03, Yang Hongyang wrote: On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: [...] diff --git a/vl.c b/vl.c index ec589e2..3cf89d5 100644 --- a/vl.c +++ b/vl.c @@ -2794,7 +2794,12 @@ static bool object_create_in

Re: [Qemu-devel] [PATCH 1/1] migration: fix deadlock

2015-09-25 Thread Wen Congyang
On 09/25/2015 04:03 PM, Denis V. Lunev wrote: > On 09/25/2015 04:21 AM, Wen Congyang wrote: >> On 09/24/2015 08:53 PM, Denis V. Lunev wrote: >>> From: Igor Redko >>> >>> Release qemu global mutex before call synchronize_rcu(). >>> synchronize_rcu() waiting for all readers to finish their critical

Re: [Qemu-devel] [PATCH v4 2/2] spapr: generate DT node names

2015-09-25 Thread Laurent Vivier
On 25/09/2015 01:29, Gavin Shan wrote: > On Thu, Sep 24, 2015 at 12:27:39PM +0200, Laurent Vivier wrote: >> When DT node names for PCI devices are generated by SLOF, >> they are generated according to the type of the device >> (for instance, ethernet for virtio-net-pci device). >> >> Node name fo

[Qemu-devel] [PATCH v2 0/2] migration: fix deadlock

2015-09-25 Thread Denis V. Lunev
Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers to finish their critical sections. There is at least one critical section in which we try to get QGM (critical section is in address_space_rw() and prepare_mmio_access() is trying to aquire QGM). Bot

[Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0

2015-09-25 Thread Denis V. Lunev
we can omit calling of bitmap_set in migration_bitmap_extend and ram_save_setup just after bitmap_new, which properly zeroes memory inside. Signed-off-by: Denis V. Lunev CC: Igor Redko CC: Anna Melekhova CC: Juan Quintela CC: Amit Shah CC: Wen Congyang --- migration/ram.c | 2 -- 1 file cha

[Qemu-devel] [PATCH 2/2] migration: fix deadlock

2015-09-25 Thread Denis V. Lunev
Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers to finish their critical sections. There is at least one critical section in which we try to get QGM (critical section is in address_space_rw() and prepare_mmio_access() is trying to aquire QGM). Bot

Re: [Qemu-devel] [PATCH v4 2/2] spapr: generate DT node names

2015-09-25 Thread Michael S. Tsirkin
On Fri, Sep 25, 2015 at 10:29:41AM +0200, Laurent Vivier wrote: > > > On 25/09/2015 01:29, Gavin Shan wrote: > > On Thu, Sep 24, 2015 at 12:27:39PM +0200, Laurent Vivier wrote: > >> When DT node names for PCI devices are generated by SLOF, > >> they are generated according to the type of the devi

Re: [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0

2015-09-25 Thread Wen Congyang
On 09/25/2015 05:09 PM, Denis V. Lunev wrote: > we can omit calling of bitmap_set in migration_bitmap_extend and > ram_save_setup just after bitmap_new, which properly zeroes memory > inside. This patch is wrong. bitmap_set() is set all bits of the memory to 1, not 0. > > Signed-off-by: Denis V.

Re: [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0

2015-09-25 Thread Denis V. Lunev
On 09/25/2015 12:24 PM, Wen Congyang wrote: On 09/25/2015 05:09 PM, Denis V. Lunev wrote: we can omit calling of bitmap_set in migration_bitmap_extend and ram_save_setup just after bitmap_new, which properly zeroes memory inside. This patch is wrong. bitmap_set() is set all bits of the memory t

Re: [Qemu-devel] [PATCH 2/2] migration: fix deadlock

2015-09-25 Thread Wen Congyang
On 09/25/2015 05:09 PM, Denis V. Lunev wrote: > Release qemu global mutex before call synchronize_rcu(). > synchronize_rcu() waiting for all readers to finish their critical > sections. There is at least one critical section in which we try > to get QGM (critical section is in address_space_rw() an

Re: [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0

2015-09-25 Thread Wen Congyang
On 09/25/2015 05:31 PM, Denis V. Lunev wrote: > On 09/25/2015 12:24 PM, Wen Congyang wrote: >> On 09/25/2015 05:09 PM, Denis V. Lunev wrote: >>> we can omit calling of bitmap_set in migration_bitmap_extend and >>> ram_save_setup just after bitmap_new, which properly zeroes memory >>> inside. >> Thi

[Qemu-devel] [PATCH] doc: Refresh URLs in the qemu-tech documentation

2015-09-25 Thread Thomas Huth
The TwoOStwo and Willows page seem to have disappeared completely, and also some of the other links were not pointing to the right locations anymore. Signed-off-by: Thomas Huth --- qemu-tech.texi | 73 -- 1 file changed, 30 insertions(+), 4

Re: [Qemu-devel] [RfC PATCH 10/10] vnc-jobs: move buffer reset, use new buffer move

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- > ui/vnc-jobs.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c > index 50e6b37..dfc5139 100644 > --- a/ui/vnc-jobs.c > +++ b/ui/vnc-jobs.c > @@ -16

Re: [Qemu-devel] [PATCH v2 0/2] migration: fix deadlock

2015-09-25 Thread Wen Congyang
On 09/25/2015 05:09 PM, Denis V. Lunev wrote: > Release qemu global mutex before call synchronize_rcu(). > synchronize_rcu() waiting for all readers to finish their critical > sections. There is at least one critical section in which we try > to get QGM (critical section is in address_space_rw() an

Re: [Qemu-devel] [RfC PATCH 00/10] vnc buffer handling

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:41 schrieb Gerd Hoffmann: > Hi, > > Here is a patch series to improve the vnc buffer handling. It picks up > the qio_buffer patches from Daniel, adds move calls (move data from one > buffer to another) and tracing, makes vnc use the new features. Net > effect should be that

Re: [Qemu-devel] [RfC PATCH 04/10] io: add qio_buffer_init

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- > include/io/buffer.h | 12 > io/buffer.c | 11 +++ > 2 files changed, 23 insertions(+) > > diff --git a/include/io/buffer.h b/include/io/buffer.h > index 2b1b261..cffad19 100644 > ---

Re: [Qemu-devel] [RfC PATCH 05/10] io: add qio_buffer_move_empty

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- > include/io/buffer.h | 10 ++ > io/buffer.c | 14 ++ > 2 files changed, 24 insertions(+) > > diff --git a/include/io/buffer.h b/include/io/buffer.h > index cffad19..1dddc73 100644 > ---

Re: [Qemu-devel] [RfC PATCH 06/10] io: add qio_buffer_move

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- > include/io/buffer.h | 10 ++ > io/buffer.c | 16 > 2 files changed, 26 insertions(+) > > diff --git a/include/io/buffer.h b/include/io/buffer.h > index 1dddc73..5676aff 100644 > -

Re: [Qemu-devel] [RfC PATCH 09/10] vnc: kill jobs queue buffer

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- > ui/vnc-jobs.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c > index 7a234da..50e6b37 100644 > --- a/ui/vnc-jobs.c > +++ b/ui/vnc-jobs.c > @@ -54,7 +54,6 @@ struct Vnc

Re: [Qemu-devel] [RfC PATCH 02/10] io: pull Buffer code out of VNC module

2015-09-25 Thread Peter Lieven
Am 24.09.2015 um 10:42 schrieb Gerd Hoffmann: > From: "Daniel P. Berrange" > > The Buffer code in the VNC server is useful for the IO channel > code, so pull it out into a shared module, QIOBuffer. > > Signed-off-by: Daniel P. Berrange > --- > include/io/buffer.h | 118 > +++

Re: [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0

2015-09-25 Thread Denis V. Lunev
On 09/25/2015 12:37 PM, Wen Congyang wrote: On 09/25/2015 05:31 PM, Denis V. Lunev wrote: On 09/25/2015 12:24 PM, Wen Congyang wrote: On 09/25/2015 05:09 PM, Denis V. Lunev wrote: we can omit calling of bitmap_set in migration_bitmap_extend and ram_save_setup just after bitmap_new, which prope

Re: [Qemu-devel] [PATCH v4] docs: describe the QEMU build system structure / design

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 15:41, Daniel P. Berrange wrote: > Developers who are new to QEMU, or have a background familiarity > with GNU autotools, can have trouble getting their head around the > home-grown QEMU build system. This document attempts to explain > the structure / design of the configure script

Re: [Qemu-devel] [PATCH v2 0/4] qga: add local tests on linux

2015-09-25 Thread Marc-André Lureau
ping (that would be helpful to have basic qga testing in place) thanks On Fri, Sep 11, 2015 at 8:53 PM, wrote: > From: Marc-André Lureau > > v1->v2: > - do not loop forever when connection to qga (Michael Roth) > - add some config file tests > - fix config verbosity > - swallow virt-what stderr

Re: [Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class

2015-09-25 Thread Paolo Bonzini
On 18/09/2015 15:19, Daniel P. Berrange wrote: > +if (fds || nfds) { > +error_setg_errno(errp, EINVAL, > + "Channel does not support buffer descriptor > passing"); > +return -1; > +} Typo (file descriptor passing) and the check could be hoisted to

Re: [Qemu-devel] [PATCH v3 4/7] device-introspect-test: New, covering device introspection

2015-09-25 Thread Thomas Huth
On 24/09/15 20:57, Markus Armbruster wrote: > The test doesn't check that the output makes any sense, only that QEMU > survives. Useful since we've had an astounding number of crash bugs > around there. > > In fact, we have a bunch of them right now: several devices crash or > hang, and all CPUs

Re: [Qemu-devel] [PATCH v1 00/16] Introduce I/O channels framework

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 16:51, Daniel P. Berrange wrote: > Thanks, I'd still love one or more people to do a detailed review of > the I/O channel implementations before I think about sending a PULL > request, since there's a fair amount of code in there I did a review of the file, socket, command and

Re: [Qemu-devel] [PATCH] doc: Refresh URLs in the qemu-tech documentation

2015-09-25 Thread Paolo Bonzini
On 25/09/2015 11:38, Thomas Huth wrote: > The TwoOStwo and Willows page seem to have disappeared completely, > and also some of the other links were not pointing to the right > locations anymore. > > Signed-off-by: Thomas Huth > --- > qemu-tech.texi | 73 >

Re: [Qemu-devel] [PATCH v3 4/7] device-introspect-test: New, covering device introspection

2015-09-25 Thread Andreas Färber
Am 25.09.2015 um 12:17 schrieb Thomas Huth: > On 24/09/15 20:57, Markus Armbruster wrote: >> The test doesn't check that the output makes any sense, only that QEMU >> survives. Useful since we've had an astounding number of crash bugs >> around there. >> >> In fact, we have a bunch of them right n

Re: [Qemu-devel] [PATCH v1 00/16] Introduce I/O channels framework

2015-09-25 Thread Daniel P. Berrange
On Fri, Sep 25, 2015 at 12:18:05PM +0200, Paolo Bonzini wrote: > > > On 24/09/2015 16:51, Daniel P. Berrange wrote: > > Thanks, I'd still love one or more people to do a detailed review of > > the I/O channel implementations before I think about sending a PULL > > request, since there's a fair am

Re: [Qemu-devel] [PATCH v4 2/2] spapr: generate DT node names

2015-09-25 Thread Laurent Vivier
On 25/09/2015 11:12, Michael S. Tsirkin wrote: > On Fri, Sep 25, 2015 at 10:29:41AM +0200, Laurent Vivier wrote: >> >> >> On 25/09/2015 01:29, Gavin Shan wrote: >>> On Thu, Sep 24, 2015 at 12:27:39PM +0200, Laurent Vivier wrote: When DT node names for PCI devices are generated by SLOF,

Re: [Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class

2015-09-25 Thread Daniel P. Berrange
On Fri, Sep 25, 2015 at 12:15:46PM +0200, Paolo Bonzini wrote: > > > On 18/09/2015 15:19, Daniel P. Berrange wrote: > > +if (fds || nfds) { > > +error_setg_errno(errp, EINVAL, > > + "Channel does not support buffer descriptor > > passing"); > > +return

Re: [Qemu-devel] [PATCH v3 0/9] remove useless muldiv64()

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 18:21, Laurent Vivier wrote: > Hi, > > all the patches of the series have been reviewed, except: > > [PATCH v4 1/9] i6300esb: remove muldiv64(), > which is a rebased version. > [PATCH v3 5/9] openrisc: remove muldiv64() > > Any volunteers ? They both look g

Re: [Qemu-devel] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 06:33, David Gibson wrote: > When we have guest visible IOMMUs, we allow notifiers to be registered > which will be informed of all changes to IOMMU mappings. This is used by > vfio to keep the host IOMMU mappings in sync with guest IOMMU mappings. > > However, unlike with a memor

Re: [Qemu-devel] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-25 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 25/09/2015 07:24, David Gibson wrote: >> When memory_listener_register() replays mappings, it does so on >> an rcu copy of the flatview for each AddressSpace. Here we >> don't seem to have anything protecting against concurrency... do >> we ne

Re: [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling

2015-09-25 Thread Sergey Fedorov
On 18.09.2015 17:07, Sergey Fedorov wrote: > On 18.09.2015 16:50, Peter Maydell wrote: >> On 14 September 2015 at 11:51, Sergey Fedorov wrote: >> @@ -904,7 +913,16 @@ void arm_debug_excp_handler(CPUState *cs) >> arm_debug_target_el(env)); >> } >> } else { >> -

[Qemu-devel] [PATCHv2 2/7] vfio: Generalize vfio_listener_region_add failure path

2015-09-25 Thread David Gibson
If a DMA mapping operation fails in vfio_listener_region_add() it checks to see if we've already completed initial setup of the container. If so it reports an error so the setup code can fail gracefully, otherwise throws a hw_error(). There are other potential failure cases in vfio_listener_regio

[Qemu-devel] [PATCHv2 1/7] vfio: Remove unneeded union from VFIOContainer

2015-09-25 Thread David Gibson
Currently the VFIOContainer iommu_data field contains a union with different information for different host iommu types. However: * It only actually contains information for the x86-like "Type1" iommu * Because we have a common listener the Type1 fields are actually used on all IOMMU types,

[Qemu-devel] [PATCHv2 0/7] VFIO extensions to allow VFIO devices on spapr-pci-host-bridge

2015-09-25 Thread David Gibson
Hi Alex, Here are the parts of my recent series to allow VFIO devices on the spapr-pci-host-bridge device which affect the core VFIO code. They've been revised according to the comments from yourself and others. There's also one patch for the memory subsystem. Paolo can you let me know if this

[Qemu-devel] [PATCHv2 4/7] vfio: Record host IOMMU's available IO page sizes

2015-09-25 Thread David Gibson
Depending on the host IOMMU type we determine and record the available page sizes for IOMMU translation. We'll need this for other validation in future patches. Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier --- hw/vfio/common.c | 13

[Qemu-devel] [PATCHv2 6/7] vfio: Allow hotplug of containers onto existing guest IOMMU mappings

2015-09-25 Thread David Gibson
At present the memory listener used by vfio to keep host IOMMU mappings in sync with the guest memory image assumes that if a guest IOMMU appears, then it has no existing mappings. This may not be true if a VFIO device is hotplugged onto a guest bus which didn't previously include a VFIO device, a

Re: [Qemu-devel] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-25 Thread David Gibson
On Fri, Sep 25, 2015 at 01:20:12PM +0200, Paolo Bonzini wrote: > > > On 24/09/2015 06:33, David Gibson wrote: > > When we have guest visible IOMMUs, we allow notifiers to be registered > > which will be informed of all changes to IOMMU mappings. This is used by > > vfio to keep the host IOMMU ma

[Qemu-devel] [PATCHv2 7/7] vfio: Expose a VFIO PCI device's group for EEH

2015-09-25 Thread David Gibson
The Enhanced Error Handling (EEH) interface in PAPR operates on units of a Partitionable Endpoint (PE). For VFIO devices, the PE boundaries the guest sees must match the PE (i.e. IOMMU group) boundaries on the host. To implement this it will need to discover from VFIO which group a given device b

[Qemu-devel] [PATCHv2 3/7] vfio: Check guest IOVA ranges against host IOMMU capabilities

2015-09-25 Thread David Gibson
The current vfio core code assumes that the host IOMMU is capable of mapping any IOVA the guest wants to use to where we need. However, real IOMMUs generally only support translating a certain range of IOVAs (the "DMA window") not a full 64-bit address space. The common x86 IOMMUs support a wide

[Qemu-devel] [PATCHv2 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-25 Thread David Gibson
When we have guest visible IOMMUs, we allow notifiers to be registered which will be informed of all changes to IOMMU mappings. This is used by vfio to keep the host IOMMU mappings in sync with guest IOMMU mappings. However, unlike with a memory region listener, an iommu notifier won't be told ab

Re: [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling

2015-09-25 Thread Sergey Fedorov
On 25.09.2015 14:34, Sergey Fedorov wrote: > On 18.09.2015 17:07, Sergey Fedorov wrote: >> On 18.09.2015 16:50, Peter Maydell wrote: >>> On 14 September 2015 at 11:51, Sergey Fedorov wrote: >>> @@ -904,7 +913,16 @@ void arm_debug_excp_handler(CPUState *cs) >>> arm_debug_target

Re: [Qemu-devel] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-25 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 25/09/2015 13:33, David Gibson wrote: > 1) Is there a case where using the no-replay functions makes > sense? > > I'm not sure. I think vfio is the only user so far, so I guess > that's technically a no. I was reluctant to change the interfac

Re: [Qemu-devel] [PATCH 4/5] disk_deadlines: add control of requests time expiration

2015-09-25 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Tue, Sep 08, 2015 at 04:48:24PM +0200, Kevin Wolf wrote: > > Am 08.09.2015 um 16:23 hat Denis V. Lunev geschrieben: > > > On 09/08/2015 04:05 PM, Kevin Wolf wrote: > > > >Am 08.09.2015 um 13:27 hat Denis V. Lunev geschrieben: > > > >>interesting po

[Qemu-devel] [PATCH 7/7] string-input-visitor: Use qemu_strto[u]ll()

2015-09-25 Thread Andreas Färber
Switch from strtoll() and strtoull() to qemu_strtoll() and qemu_strtoull(), as recommended by checkpatch. Signed-off-by: Andreas Färber --- qapi/string-input-visitor.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/qapi/string-input-visitor.c b/qapi/string-in

[Qemu-devel] [PATCH 0/7] visitor: Fix uint64 parsing for scsi-disk wwn

2015-09-25 Thread Andreas Färber
Hello, This series fixes uint64 handling in the string input visitor. It was inspired by a patch from Lin Ma. Test coverage is provided for string input visitor, QOM, scsi-disk levels. Regards, Andreas Andreas Färber (7): string-input-visitor: Fix uint64 parsing test-string-input-visitor: A

[Qemu-devel] [PATCH 2/7] test-string-input-visitor: Add int test case

2015-09-25 Thread Andreas Färber
In addition to -42 also parse the maximum int64. Signed-off-by: Andreas Färber --- tests/test-string-input-visitor.c | 8 1 file changed, 8 insertions(+) diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c index 8e3433e..3c5c3d9 100644 --- a/tests/test-s

[Qemu-devel] [PATCH 3/7] test-string-input-visitor: Add uint64 test

2015-09-25 Thread Andreas Färber
Test parsing of decimal and hexadecimal uint64 numbers with most significient bit set. Signed-off-by: Andreas Färber --- tests/test-string-input-visitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-vis

[Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-25 Thread Andreas Färber
All integers would get parsed by strtoll(), not handling the case of UINT64 properties with the most significient bit set. Implement a .type_uint64 visitor callback, reusing the existing parse_str() code through a new argument, using strtoull(). As a bug fix, ignore warnings about preference of q

[Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature

2015-09-25 Thread Andreas Färber
Instead of using int64_t for qemu_strtoll() and uiint64_t for qemu_strtoull(), use long long and unsigned long long as their name implies. The only affected callers are our test cases. This prepares for following checkpatch's recommendation of using it more, by making it easier to switch from POS

[Qemu-devel] [PATCH 5/7] tests: Add scsi-disk test

2015-09-25 Thread Andreas Färber
Test scsi-{disk,hd,cd} wwn properties for correct 64-bit parsing. For now piggyback on virtio-scsi. Cc: Paolo Bonzini Signed-off-by: Andreas Färber --- MAINTAINERS| 1 + tests/Makefile | 3 ++ tests/scsi-disk-test.c | 83 ++

Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature

2015-09-25 Thread Paolo Bonzini
On 25/09/2015 14:39, Andreas Färber wrote: > Instead of using int64_t for qemu_strtoll() and uiint64_t for > qemu_strtoull(), use long long and unsigned long long as their name > implies. > > The only affected callers are our test cases. > > This prepares for following checkpatch's recommendati

[Qemu-devel] [PATCH 4/7] tests: Add QOM property unit tests

2015-09-25 Thread Andreas Färber
Add a test for parsing and setting a uint64 property. Signed-off-by: Andreas Färber --- MAINTAINERS | 1 + tests/Makefile | 3 ++ tests/check-qom-props.c | 120 3 files changed, 124 insertions(+) create mode 100644 tests/

Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature

2015-09-25 Thread Andreas Färber
Am 25.09.2015 um 14:42 schrieb Paolo Bonzini: > On 25/09/2015 14:39, Andreas Färber wrote: >> Instead of using int64_t for qemu_strtoll() and uiint64_t for >> qemu_strtoull(), use long long and unsigned long long as their name >> implies. >> >> The only affected callers are our test cases. >> >> Th

Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature

2015-09-25 Thread Paolo Bonzini
On 25/09/2015 14:44, Andreas Färber wrote: > > Do we actually use long long and unsigned long long anywhere? > > The next patch does, because checkpatch asks for it. :) > > qemu_strtoull() has some special handling for Windows apparently. No, I really mean the types. :) The qemu_strtoll/qemu_s

Re: [Qemu-devel] [PATCH v2 04/11] virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov

2015-09-25 Thread Gerd Hoffmann
On Do, 2015-09-24 at 13:16 +0300, Michael S. Tsirkin wrote: > On Thu, Sep 24, 2015 at 11:04:55AM +0200, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > It's easy to see this is what the patch does. But why? Some > explanation in the commit log about why it's done, as opposed to what i

Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature

2015-09-25 Thread Andreas Färber
Am 25.09.2015 um 14:56 schrieb Paolo Bonzini: > On 25/09/2015 14:44, Andreas Färber wrote: >>> Do we actually use long long and unsigned long long anywhere? >> >> The next patch does, because checkpatch asks for it. :) >> >> qemu_strtoull() has some special handling for Windows apparently. > > No,

Re: [Qemu-devel] [PATCH v2 00/11] add virgl rendering support

2015-09-25 Thread Gerd Hoffmann
On Do, 2015-09-24 at 19:09 +0200, Marc-André Lureau wrote: > Hi Gerd > > On Thu, Sep 24, 2015 at 11:04 AM, Gerd Hoffmann wrote: > > Hi, > > > > This patch series adds infrastructure for opengl rendering > > (context management, define scanout textures), adds support > > for this to sdl2 and gtk

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-25 Thread Thomas Huth
On 24/09/15 20:57, Markus Armbruster wrote: > Several devices don't survive object_unref(object_new(T)): they crash > or hang during cleanup, or they leave dangling pointers behind. > > This breaks at least device-list-properties, because > qmp_device_list_properties() needs to create a device to

[Qemu-devel] [PATCH] block: disable I/O limits at the beginning of bdrv_close()

2015-09-25 Thread Alberto Garcia
Disabling I/O limits from a BDS also drains all pending throttled requests, so it should be done at the beginning of bdrv_close() with the rest of the bdrv_drain() calls before the BlockDriver is closed. Signed-off-by: Alberto Garcia --- block.c | 11 ++- 1 file changed, 6 insertions(+),

Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature

2015-09-25 Thread Paolo Bonzini
On 25/09/2015 15:27, Andreas Färber wrote: >> > >> > No, I really mean the types. :) The qemu_strtoll/qemu_strtoull functions >> > use {,u}int64_t because they are much more used than long long and >> > unsigned long long. > Well, my answer still stands: The next patch has code using long long.

[Qemu-devel] [PATCH 2/2] pc: memhp: force gaps between DIMM's GPA

2015-09-25 Thread Igor Mammedov
mapping DIMMs non contiguously allows to workaround virtio bug reported earlier: http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg00522.html in this case guest kernel doesn't allocate buffers that can cross DIMM boundary keeping each buffer local to a DIMM. Suggested-by: Michael S. Tsirk

[Qemu-devel] [RFC 3/6] monitor: Split MonitorQAPIEventConf off MonitorQAPIEventState

2015-09-25 Thread Markus Armbruster
In preparation of turning monitor_qapi_event_state[] into a hash table for finer grained throttling. Signed-off-by: Markus Armbruster --- monitor.c | 79 ++- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/monitor.c b/mo

[Qemu-devel] [RFC 2/6] monitor: Simplify event throttling

2015-09-25 Thread Markus Armbruster
The event throttling state machine is hard to understand. I'm not sure it's entirely correct. Rewrite it in a more straightforward manner: State 1: No event sent recently (less than evconf->rate ns ago) Invariant: evstate->timer is not pending, evstate->qdict is null On event: send eve

[Qemu-devel] [RFC 5/6] monitor: Throttle event VSERPORT_CHANGE separately by "id"

2015-09-25 Thread Markus Armbruster
VSERPORT_CHANGE is emitted when the guest opens or closes a virtio-serial port. The event's member "id" identifies the port. When several events arrive quickly, throttling drops all but the last of them. Because of that, a QMP client must assume that *any* port may have changed state when it rec

[Qemu-devel] [RFC 4/6] monitor: Turn monitor_qapi_event_state[] into a hash table

2015-09-25 Thread Markus Armbruster
In preparation of finer grained throttling. Signed-off-by: Markus Armbruster --- monitor.c | 55 ++- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/monitor.c b/monitor.c index 75c9580..9807a5b 100644 --- a/monitor.c +++ b/monit

[Qemu-devel] [RFC 0/6] Throttle event VSERPORT_CHANGE separately by "id"

2015-09-25 Thread Markus Armbruster
VSERPORT_CHANGE is emitted when the guest opens or closes a virtio-serial port. The event's member "id" identifies the port. When several events arrive quickly, throttling drops all but the last of them. Because of that, a QMP client must assume that *any* port may have changed state when it rec

[Qemu-devel] [RFC 1/6] monitor: Reduce casting of QAPI event QDict

2015-09-25 Thread Markus Armbruster
Make the variables holding the event QDict instead of QObject. Signed-off-by: Markus Armbruster --- monitor.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/monitor.c b/monitor.c index d0edb3b..2cbb2d9 100644 --- a/monitor.c +++ b/mon

[Qemu-devel] [PATCH 02/36] qapi: add missing @

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- qapi/block.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block.json b/qapi/block.json index aad645c..84022f1 100644 --- a/qapi/block.json +++ b/qapi/block.json @@ -6,7 +6,7 @@ { 'include': 'block-core.

[Qemu-devel] [PATCH 03/36] qapi: add some line spacing to help doc parser

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Paragraphs are seperated by empty lines. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 14 ++ qapi/block-core.json | 26 ++ 2 files changed, 40 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 3e2e53

[Qemu-devel] [PATCH 06/36] qapi: move documentation bits in schema files

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Moving the remaining bits of documentation to the schema files. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 48 ++- qmp-commands.hx | 62 2 files changed, 47 in

[Qemu-devel] [PATCH 04/36] monitor: use qapi for qmp_capabilities command

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau This was initially done to add qmp_capabilities documentation to the schema. Then I figured it would also help to get rid of the "middle mode" monitor dispatch code. Signed-off-by: Marc-André Lureau --- monitor.c| 4 ++-- qapi-schema.json | 17 +

[Qemu-devel] [PATCH 08/36] qapi: add qapi2texi script

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau As the name suggests, the qapi2texi script converts JSON QAPI description into a standalone texi file suitable for different target formats. It parses the following kind of blocks with some little variations: ## # = Section # == Subsection # # Some text foo wit

[Qemu-devel] [PATCH 00/36] post-Eric's fixes, QAPI improvements

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Hi, I have grown a qapi branch during the past 2 months that was post-poned for review until the introspection and other fixes got merged or ready. It could be splitted roughly in 3 parts, but since they depend on each other, it make sense to send as one: 1. generate QA

[Qemu-devel] [PATCH 07/36] qapi: add some headings in docs

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Add some missing double-#, the doc parser can't easily distinguish doc comments from comments to be ignored otherwise. Also add some more section headings. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 12 ++-- qapi/block-core.json | 6 -- qa

[Qemu-devel] [PATCH 10/36] texi2pod: learn quotation, deftp and deftypefn

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Learn a few more markups used for API documentation. Signed-off-by: Marc-André Lureau --- scripts/texi2pod.pl | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl index

[Qemu-devel] [PATCH 15/36] monitor: register gen:false commands manually

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Since some commands are using 'gen': false, they are not registered automatically by the generator. Register manually instead. Signed-off-by: Marc-André Lureau --- monitor.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/monitor.c b/monitor.c index 410c

[Qemu-devel] [PATCH 01/36] qapi: add comment block before ChardevDummy

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau This is mainly to please the doc generation that requires comment block before the declaration. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index 516c9

[Qemu-devel] [PATCH 12/36] build-sys: generate qmp-commands.txt

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Not sure this is really necessary, but it's easy to provide Signed-off-by: Marc-André Lureau --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 918ad4e..5e09e88 100644 --- a/Makefile +++ b/Makefile @@ -525,8 +

[Qemu-devel] [PATCH 11/36] build-sys: generate QAPI doc based on json

2015-09-25 Thread marcandre . lureau
From: Marc-André Lureau Learn to generate info/html/pdf/man documentation for QEMU and agent QMP APIs. This allows to provide missing agent documentation, and should help getting rid of the duplicate documentation in qmp-commands.hx. Signed-off-by: Marc-André Lureau --- Makefile | 36

<    1   2   3