Re: [Qemu-devel] [PATCH RFC 02/19] qapi: Fix C identifiers generated for names containing '.'

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > On 04/02/2015 11:28 AM, Markus Armbruster wrote: >> c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in >> QAPI names that get passed to c_var(). >> >> Which QAPI names get passed to c_fun(), to c_var(), or to both is not >> obvious. Names of command paramete

Re: [Qemu-devel] [PATCH RFC 12/19] qapi: Turn generators' mandatory option -i into an argument

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > On 04/02/2015 11:28 AM, Markus Armbruster wrote: >> Mandatory option is silly, and the error handling is missing: the >> programs crash when -i isn't supplied. Make it an argument, and check >> it properly. >> >> Signed-off-by: Markus Armbruster >> --- >> Makefile

Re: [Qemu-devel] [PATCH RFC 17/19] qobject: Add a special null QObject

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > On 04/02/2015 11:29 AM, Markus Armbruster wrote: >> I'm going to fix the JSON parser to recognize null. The obvious >> representation of JSON null as (QObject *)NULL doesn't work, because >> the parser already uses it as an error value. Perhaps we should >> change it to fre

Re: [Qemu-devel] [PATCH 2/3] xhci: remove unused code

2015-04-29 Thread Gonglei
On 2015/4/29 14:48, Michael Tokarev wrote: > 28.04.2015 12:11, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> Value from xfer->packet.ep is assigned to ep here, but that >> stored value is not used before it is overwritten. Remove it. >> >> Cc: Gerd Hoffmann >> Signed-off-by: Gonglei >> -

[Qemu-devel] [Bug 1443462] Re: alt-gr not working with non-US keyboard

2015-04-29 Thread Mr J
Alt-gr seems to be pressed in VM, but when pressing for example AltGr + e, then the altgr-button is released just before e is pressed. When e is released, altgr is pressed again. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:/

Re: [Qemu-devel] [PATCH 0/3] Extend check callback usability for irq connect notifier

2015-04-29 Thread Eric Auger
Hi Peter, On 04/28/2015 08:21 PM, Peter Crosthwaite wrote: > On Tue, Apr 28, 2015 at 2:18 AM, Eric Auger wrote: >> The VFIO platform device gets connected to the platform bus >> on a machine init done notifier. Only at that point irqfd can be >> setup. An irq connect notifier would be helpful to d

[Qemu-devel] [PATCH 6/6] sdl2: Fix RGB555

2015-04-29 Thread Gerd Hoffmann
From: Max Reitz Reproducable with: $ x86_64-softmmu/qemu-system-x86_64 \ -kernel $vmlinuz_of_your_choice \ -append vga=0x313 -sdl Signed-off-by: Max Reitz Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 5 + ui/sdl2-2d.c | 15 +-- 2 files changed, 18

[Qemu-devel] [PATCH 1/6] opengl: add shader build infrastructure

2015-04-29 Thread Gerd Hoffmann
perl script to transform shader programs into c include files with static string constands containing the shader programs, so we can easily embed them into qemu. Also some Makefile logic for them. Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- Makefile | 14 +++

[Qemu-devel] [PATCH 2/6] opengl: add shader helper functions.

2015-04-29 Thread Gerd Hoffmann
Helper functions to compile, link and run opengl shader programs. Signed-off-by: Gerd Hoffmann --- include/ui/shader.h | 9 + ui/Makefile.objs| 5 +++ ui/shader.c | 95 + 3 files changed, 109 insertions(+) create mode 100644

[Qemu-devel] [PATCH 0/6] sdl2: add opengl rendering support.

2015-04-29 Thread Gerd Hoffmann
Hi, This series adds some opengl bits and puts them into use for sdl2. No major changes since the last post (somewhen during early 2.3 freeze). I've coded up opengl support for other UIs on top of this and the code has seen some minor refactorings due to this. opengl shader handling moved to i

[Qemu-devel] [PATCH 4/6] sdl2: move SDL_* includes to sdl2.h

2015-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- include/ui/sdl2.h | 6 ++ ui/sdl2-2d.c | 6 -- ui/sdl2-input.c | 6 -- ui/sdl2.c | 6 -- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index 51fff2e..e21

[Qemu-devel] [PATCH 3/6] console-gl: add opengl rendering helper functions

2015-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- Makefile| 3 + configure | 2 +- include/ui/console.h| 31 include/ui/shader.h | 2 + ui/Makefile.objs| 1 + ui/console-gl.c | 168 +

[Qemu-devel] [PATCH] tcg: Delete unused cpu_pc_from_tb()

2015-04-29 Thread Peter Crosthwaite
No code uses the cpu_pc_from_tb() function. Delete from tricore and arm which each provide an unused implementation. Update the comment in tcg.h to reflect that this is obsoleted by synchronize_from_tb. Signed-off-by: Peter Crosthwaite --- target-arm/cpu.h | 9 - target-tricore/cpu.h

[Qemu-devel] [PATCH 5/6] sdl2: add support for display rendering using opengl.

2015-04-29 Thread Gerd Hoffmann
Add new sdl2-gl.c file, with display rendering functions using opengl. Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- include/ui/console.h | 1 + include/ui/sdl2.h| 11 + ui/Makefile.objs | 3 ++ ui/sdl.c | 10 + ui/sdl2-2d.c | 7 ui/sdl

[Qemu-devel] [Bug 1443462] Re: alt-gr not working with non-US keyboard

2015-04-29 Thread Mr J
When doing some more digging, it doesn't seem to be a QEMU issue as the client releases altgr when pressing a key-combination. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://

[Qemu-devel] [PATCH v2 0/2] spapr: move pci device creation to Qemu

2015-04-29 Thread Nikunj A Dadhania
The patch series creates PCI DT nodes in QEMU. The new hotplug code needs the device node creation in Qemu. While during boot, nodes were created in SLOF. It makes more sense to consolidate the code to one place for better maintainability. Based on sPAPR PCI Hotplug patches by Michael Roth https

[Qemu-devel] [PATCH v2 1/2] spapr: enumerate and add PCI device tree

2015-04-29 Thread Nikunj A Dadhania
All the PCI enumeration and device node creation was off-loaded to SLOF. With PCI hotplug support, code needed to be added to add device node. This creates multiple copy of the code one in SLOF and other in hotplug code. To unify this, the patch adds the pci device node creation in Qemu. For backwa

[Qemu-devel] [PATCH v2 2/2] spapr: populate ibm,loc-code

2015-04-29 Thread Nikunj A Dadhania
Each hardware instance has a platform unique location code. The OF device tree that describes a part of a hardware entity must include the “ibm,loc-code” property with a value that represents the location code for that hardware entity. Populate ibm,loc-code. 1) PCI passthru devices need to identi

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tcg: Delete unused cpu_pc_from_tb()

2015-04-29 Thread Michael Tokarev
29.04.2015 10:52, Peter Crosthwaite wrote: > No code uses the cpu_pc_from_tb() function. Delete from tricore and > arm which each provide an unused implementation. Update the comment > in tcg.h to reflect that this is obsoleted by synchronize_from_tb. This one looks much better! Thank you, applie

Re: [Qemu-devel] [REBASE PATCH v5 1/2] machine: add default_ram_size to machine class

2015-04-29 Thread Nikunj A Dadhania
Hi Paolo, David Gibson writes: > On Tue, Apr 28, 2015 at 01:30:29PM +0200, Thomas Huth wrote: >> On Tue, 28 Apr 2015 12:23:25 +0530 >> Nikunj A Dadhania wrote: > [snip] >> Looks good to me. >> >> Reviewed-by: Thomas Huth > > Same here, > > Reviewed-by: David Gibson Can you push this patch v

Re: [Qemu-devel] [PULL 00/22] Memory, TCG, NBD, build system changes for 2015-04-27

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 03:53, Fam Zheng wrote: > On Tue, 04/28 16:54, Peter Maydell wrote: >> On 28 April 2015 at 15:40, Paolo Bonzini wrote: >>> The following changes since commit e1a5476354d396773e4c555f126d752d4ae58fa9: >>> >>> Open 2.4 development tree (2015-04-25 22:05:07 +0100) >>> >>> are availa

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Christian Borntraeger
Am 28.04.2015 um 20:32 schrieb Michael S. Tsirkin: > On Tue, Apr 28, 2015 at 08:14:44PM +0200, Michael S. Tsirkin wrote: >> On Tue, Apr 28, 2015 at 04:35:16PM +0200, Michael S. Tsirkin wrote: >>> On Tue, Apr 28, 2015 at 03:24:19PM +0200, Cornelia Huck wrote: On Tue, 28 Apr 2015 14:16:40 +0100

Re: [Qemu-devel] [PATCH] mb: cpu: Renumber EXCP_* constants to close gap

2015-04-29 Thread Edgar E. Iglesias
On Wed, Apr 29, 2015 at 08:40:01AM +0300, Michael Tokarev wrote: > After removal of EXCP_NMI there's a gap in EXCP_* > numbering. Let's remove it. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Michael Tokarev > --- > Since I applied Peter's series already, without renumbering, > b/c he w

Re: [Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-29 Thread Paolo Bonzini
On 28/04/2015 18:51, Eric Auger wrote: > -prop->check(obj, name, new_target, &local_err); > +object_ref(new_target); > +*child = new_target; > + > +prop->check(obj, name, child, &local_err); > if (local_err) { > error_propagate(errp, local_err); > +*child = o

Re: [Qemu-devel] [REBASE PATCH v5 1/2] machine: add default_ram_size to machine class

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 10:14, Nikunj A Dadhania wrote: > > Hi Paolo, > > David Gibson writes: >> On Tue, Apr 28, 2015 at 01:30:29PM +0200, Thomas Huth wrote: >>> On Tue, 28 Apr 2015 12:23:25 +0530 >>> Nikunj A Dadhania wrote: >> [snip] >>> Looks good to me. >>> >>> Reviewed-by: Thomas Huth >> >> Same

[Qemu-devel] [PULL v2 00/22] Memory, TCG, NBD, build system changes for 2015-04-27

2015-04-29 Thread Paolo Bonzini
The following changes since commit e1a5476354d396773e4c555f126d752d4ae58fa9: Open 2.4 development tree (2015-04-25 22:05:07 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to d064d9f381b00538e41f14104b88a1ae85d78

[Qemu-devel] [PULL v2 17/22] configure: Add support for tcmalloc

2015-04-29 Thread Paolo Bonzini
From: Fam Zheng This adds "--enable-tcmalloc" and "--disable-tcmalloc" to allow linking to libtcmalloc from gperftools. tcmalloc is a malloc implementation that works well with threads and is fast, so it is good for performance. It is disabled by default, because the MALLOC_PERTURB_ flag we use

Re: [Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-29 Thread Eric Auger
On 04/29/2015 10:22 AM, Paolo Bonzini wrote: > > > On 28/04/2015 18:51, Eric Auger wrote: >> -prop->check(obj, name, new_target, &local_err); >> +object_ref(new_target); >> +*child = new_target; >> + >> +prop->check(obj, name, child, &local_err); >> if (local_err) { >>

Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > On 04/02/2015 11:29 AM, Markus Armbruster wrote: >> Caution, rough edges. >> >> qapi/introspect.json defines the introspection schema. It should do >> for uses other than QMP. > > That is, QGA should also be able to reuse it for introspection. > >> FIXME it's almost entirel

Re: [Qemu-devel] [PATCH v5 19/20] hw/arm/virt-acpi-build: Add PCIe controller in ACPI DSDT table

2015-04-29 Thread Igor Mammedov
On Wed, 29 Apr 2015 11:12:04 +0800 Shannon Zhao wrote: > On 2015/4/28 23:54, Michael S. Tsirkin wrote: > > On Tue, Apr 28, 2015 at 05:13:10PM +0200, Igor Mammedov wrote: > >>> Here I need to set the value of buffer to 1 or 0, we could > >>> createbitfield, but if we want to set the value to non o

[Qemu-devel] [PATCH RFC v6 11/11] vfio: add bus reset notifier for host bus reset

2015-04-29 Thread Chen Fan
add host secondary bus reset for vfio when AER occurs, if reset failed, we should stop vm. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 151 +- 1 file changed, 138 insertions(+), 13 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c in

[Qemu-devel] [PATCH RFC v6 02/11] aer: impove pcie_aer_init to support vfio device

2015-04-29 Thread Chen Fan
pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen Fan --- hw/pci

[Qemu-devel] [PATCH RFC v6 04/11] pcie_aer: expose pcie_aer_msg() interface

2015-04-29 Thread Chen Fan
For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_aer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie_aer.c b/

[Qemu-devel] [PATCH RFC v6 00/11] vfio-pci: pass the aer error to guest

2015-04-29 Thread Chen Fan
For now, for vfio pci passthough devices when qemu receives an error from host aer report, there just terminate the guest, but usually user want to know what error occurred but stop the guest, so this patches add aer capability support for vfio device, and pass the error to guest, and have guest dr

[Qemu-devel] [PATCH RFC v6 01/11] vfio: add pcie extanded capability support

2015-04-29 Thread Chen Fan
For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 73 +

[Qemu-devel] [PATCH RFC v6 06/11] vfio: add 'aer' property to expose aercap

2015-04-29 Thread Chen Fan
add 'aer' property to let user able to decide whether expose the aer capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index cdd8f24..c306efc 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -159,6 +15

[Qemu-devel] [PATCH RFC v6 03/11] vfio: add aer support for vfio device

2015-04-29 Thread Chen Fan
Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 47 ++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --gi

[Qemu-devel] [PATCH RFC v6 08/11] vfio: extract vfio_get_hot_reset_info as a single function

2015-04-29 Thread Chen Fan
the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 69 --- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/hw/vfio/pci.c b/hw

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Cornelia Huck
On Wed, 29 Apr 2015 10:17:55 +0200 Christian Borntraeger wrote: > Am 28.04.2015 um 20:32 schrieb Michael S. Tsirkin: > > On Tue, Apr 28, 2015 at 08:14:44PM +0200, Michael S. Tsirkin wrote: > >> On Tue, Apr 28, 2015 at 04:35:16PM +0200, Michael S. Tsirkin wrote: > >>> On Tue, Apr 28, 2015 at 03:24

[Qemu-devel] [PATCH RFC v6 05/11] vfio-pci: pass the aer error to guest

2015-04-29 Thread Chen Fan
when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and have the guest driver recover from the error. Signed-of

[Qemu-devel] [PATCH RFC v6 07/11] pc: add HW_COMPAT_2_2 to disable aercap for vifo device

2015-04-29 Thread Chen Fan
for piix4 chipset, we don't need to expose aer, so introduce HW_COMPAT_2_2 to disable aercap for all lower than 2.3. Signed-off-by: Chen Fan --- hw/i386/pc_q35.c| 4 include/hw/compat.h | 8 2 files changed, 12 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c ind

[Qemu-devel] [PATCH RFC v6 09/11] qdev: add bus reset_notifiers callbacks for host bus reset

2015-04-29 Thread Chen Fan
when recovery AER, we always need to reset the host bus to recovery the devices under the bus, so add pci bus callbacks to reset host bus when vfio support AER. Signed-off-by: Chen Fan --- hw/pci/pci.c | 6 ++ hw/pci/pci_bridge.c | 3 +++ include/hw/pci/pci.h | 2 ++ inc

[Qemu-devel] [PATCH RFC v6 10/11] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-04-29 Thread Chen Fan
squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index b42c2a4..060fb

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-29 Thread Gonglei
On 2015/4/29 16:29, Paolo Bonzini wrote: > > > On 27/04/2015 11:37, Stefan Hajnoczi wrote: But it's only for the failover case. Quorum (or a new block/colo.c driver or filter) is fine for normal colo operation. >> Perhaps this patch series should mirror the Secondary's disk to a

Re: [Qemu-devel] [Qemu-block] [PULL 76/76] block: move I/O request processing to block/io.c

2015-04-29 Thread Kevin Wolf
Am 28.04.2015 um 19:15 hat Eric Blake geschrieben: > On 04/28/2015 09:00 AM, Kevin Wolf wrote: > > From: Stefan Hajnoczi > > > > The block.c file has grown to over 6000 lines. It is time to split this > > file so there are fewer conflicts and the code is easier to maintain. > > > > Extract I/O

Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-04-29 Thread Alexander Graf
On 18.03.15 20:10, Andrew Jones wrote: > Introduce a new memory region flag, KVM_MEM_UNCACHED, which > is needed by ARM. This flag informs KVM that the given memory > region is typically mapped by the guest as uncached. KVM for > ARM then maps that region as uncached for userspace as well, > in o

Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection

2015-04-29 Thread Markus Armbruster
Kevin Wolf writes: > One question in addition to what Eric already asked: > > Am 02.04.2015 um 19:29 hat Markus Armbruster geschrieben: >> +{ 'enum': 'SchemaMetaType', >> + 'data': [ 'builtin', 'enum', 'array', 'object', 'alternate', >> +'command', 'event' ] } >> + >> +{ 'type': 'Sch

Re: [Qemu-devel] [REBASE PATCH v5 1/2] machine: add default_ram_size to machine class

2015-04-29 Thread Nikunj A Dadhania
Hi Paolo, Paolo Bonzini writes: > On 29/04/2015 10:14, Nikunj A Dadhania wrote: >> >> Hi Paolo, >> >> David Gibson writes: >>> On Tue, Apr 28, 2015 at 01:30:29PM +0200, Thomas Huth wrote: On Tue, 28 Apr 2015 12:23:25 +0530 Nikunj A Dadhania wrote: >>> [snip] Looks good to me.

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-29 Thread Igor Mammedov
On Wed, 22 Apr 2015 14:18:55 -0400 Stefan Berger wrote: > On 04/22/2015 03:00 AM, Igor Mammedov wrote: > > On Thu, 16 Apr 2015 10:05:35 -0400 > > Stefan Berger wrote: > > > >> On 04/16/2015 09:35 AM, Igor Mammedov wrote: > >>> On Wed, 15 Apr 2015 18:38:43 -0400 [...] > >>> Is it possible to use

Re: [Qemu-devel] [REBASE PATCH v5 1/2] machine: add default_ram_size to machine class

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 11:06, Nikunj A Dadhania wrote: > > so David can push both patches. > > > > But isn't 1G a bit too much? At least on x86 you can easily boot with 512M. > > I understood this number as not the _minimum memory_ to boot the > VM. And this will only come in picture when the user has n

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-29 Thread Paolo Bonzini
On 27/04/2015 11:37, Stefan Hajnoczi wrote: >>> But it's only for the failover case. Quorum (or a new >>> block/colo.c driver or filter) is fine for normal colo >>> operation. > Perhaps this patch series should mirror the Secondary's disk to a > Backup Secondary so that the system can be prot

Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-04-29 Thread Peter Maydell
On 29 April 2015 at 10:03, Alexander Graf wrote: > > > On 18.03.15 20:10, Andrew Jones wrote: >> Introduce a new memory region flag, KVM_MEM_UNCACHED, which >> is needed by ARM. This flag informs KVM that the given memory >> region is typically mapped by the guest as uncached. KVM for >> ARM then

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Shannon Zhao
On 2015/4/28 21:16, Peter Maydell wrote: > On 28 April 2015 at 14:13, Michael S. Tsirkin wrote: >> > The patches look correct to me too, but I want s390 >> > cleaned up so it does not include COMMON_FEATURES >> > in 100 places, and I prefer merging it all together. > It seems a bit harsh to ask

Re: [Qemu-devel] [PATCH v4 0/7] aio: Support epoll by introducing qemu_poll abstraction

2015-04-29 Thread Stefan Hajnoczi
On Wed, Apr 29, 2015 at 11:24:24AM +0800, Fam Zheng wrote: > v4: Rebase to 2.3 and rerun tests. timerfd+epoll shows clear improvement over > current master when the virtio-console device attaches more fds to the > main > loop: > > syscall high # of fd low # of fd > -

Re: [Qemu-devel] [PATCH v4 0/2] virtio: Move host features to backends

2015-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2015 at 10:52:15AM +0200, Cornelia Huck wrote: > On Wed, 29 Apr 2015 10:17:55 +0200 > Christian Borntraeger wrote: > > > Am 28.04.2015 um 20:32 schrieb Michael S. Tsirkin: > > > On Tue, Apr 28, 2015 at 08:14:44PM +0200, Michael S. Tsirkin wrote: > > >> On Tue, Apr 28, 2015 at 04:3

Re: [Qemu-devel] [PATCH v13 01/12] linux-headers: update headers according to 4.1-rc0

2015-04-29 Thread Christian Borntraeger
Am 28.04.2015 um 18:51 schrieb Eric Auger: > This includes, among other things, VFIO platform driver and > irqfd/arm. > > Signed-off-by: Eric Auger > > --- > > v12 -> v13: > - update for 4.1-rc0 headers If you have a chance to update the subject before the pull request, its 4.1-rc1 instead of

[Qemu-devel] [RFC PATCH 0/8] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2

2015-04-29 Thread Fam Zheng
This carries out the mandate in the comment of qemu_set_fd_handler2 and removes fd_read_poll from the code base, because it will make the work easier to convert ppoll to epoll in main loop, as well as convert iohandler to GSource. Also, the aio interface doesn't have a read poll callback, which mea

[Qemu-devel] [RFC PATCH 8/8] main-loop: Drop qemu_set_fd_handler2

2015-04-29 Thread Fam Zheng
All users are converted to qemu_set_fd_handler now, drop qemu_set_fd_handler2 and IOHandlerRecord.fd_read_poll. Signed-off-by: Fam Zheng --- include/block/aio.h | 2 +- include/qemu/main-loop.h | 49 +--- iohandler.c | 26 +--

[Qemu-devel] [RFC PATCH 5/8] net/socket: Drop net_socket_can_send

2015-04-29 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be sent to peer when it arrives. If the device can't receive, it will be queued to incomi

[Qemu-devel] [RFC PATCH 1/8] stubs: Add qemu_set_fd_handler

2015-04-29 Thread Fam Zheng
Some qemu_set_fd_handler2 stub callers will be converted to call qemu_set_fd_handler, add this stub for them before making the change. Signed-off-by: Fam Zheng --- stubs/set-fd-handler.c | 8 1 file changed, 8 insertions(+) diff --git a/stubs/set-fd-handler.c b/stubs/set-fd-handler.c i

[Qemu-devel] [RFC PATCH 4/8] netmap: Drop netmap_can_send

2015-04-29 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be copied from s->fd to s->iov when it arrives. If the device can't receive, it will be q

[Qemu-devel] [RFC PATCH 3/8] l2tpv3: Drop l2tpv3_can_send

2015-04-29 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be copied from s->fd to s->msgvec when it arrives. If the device can't receive, it will b

Re: [Qemu-devel] [RFC PATCH 2/8] qemu-nbd: Switch to qemu_set_fd_handler

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 12:37, Fam Zheng wrote: > Achieved by: > > - Remembering the server fd with a global variable, in order to access > it from nbd_client_closed. > > - Checking nbd_can_accept() and updating server_fd handler whenever > client connects or disconnects. > > Signed-off-by: Fam Zheng

[Qemu-devel] [RFC PATCH 6/8] tap: Drop tap_can_send

2015-04-29 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be sent to peer when it arrives. If the device can't receive, it will be queued to incomi

[Qemu-devel] [RFC PATCH 7/8] Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler

2015-04-29 Thread Fam Zheng
Done with following Coccinelle semantic patch, plus manual coding style cosmetic changes in net/*.c. @@ expression E1, E2, E3, E4; @@ - qemu_set_fd_handler2(E1, NULL, E2, E3, E4); + qemu_set_fd_handler(E1, E2, E3, E4); Signed-off-by: Fam Zheng --- blockdev-nbd.c

Re: [Qemu-devel] [PATCH v2] qga/commands-posix: Fix bug in guest-fstrim

2015-04-29 Thread Thomas Huth
Hi Justin, On Wed, 1 Apr 2015 14:35:51 +0200 Justin Ossevoort wrote: > The FITRIM ioctl updates the fstrim_range structure it receives. This > way the caller can determine how many bytes were trimmed. The > guest-fstrim logic reuses the same fstrim_range for each filesystem, > effectively lim

[Qemu-devel] [RFC PATCH 2/8] qemu-nbd: Switch to qemu_set_fd_handler

2015-04-29 Thread Fam Zheng
Achieved by: - Remembering the server fd with a global variable, in order to access it from nbd_client_closed. - Checking nbd_can_accept() and updating server_fd handler whenever client connects or disconnects. Signed-off-by: Fam Zheng --- qemu-nbd.c | 21 + 1 file chan

Re: [Qemu-devel] [PATCH v2 2/4] qapi: Drop duplicate c_fun() in favor of c_var()

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > Now that the two functions are identical, we only need one of them. > > Signed-off-by: Eric Blake c_var() isn't the possible best name, but it'll do. Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [RFC PATCH 6/8] tap: Drop tap_can_send

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 12:37, Fam Zheng wrote: > @@ -190,10 +181,13 @@ static void tap_send(void *opaque) > TAPState *s = opaque; > int size; > int packets = 0; > +bool can_send = true; > > -while (qemu_can_send_packet(&s->nc)) { > +while (can_send) { This is effectively a wh

Re: [Qemu-devel] [PATCH 1/8] tls: require compiler support for __thread

2015-04-29 Thread Paolo Bonzini
On 28/04/2015 23:04, Emilio G. Cota wrote: > > commit ad45e590025c1197a7aef5164e1ae174894b0969 > Author: Emilio G. Cota > Date: Tue Apr 28 16:54:44 2015 -0400 > > configure: require __thread support > > The codebase doesn't build without __thread support. > Formalise this re

Re: [Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-29 Thread Paolo Bonzini
On 29/04/2015 10:37, Eric Auger wrote: >> > This should be an unref. > oups yes. > > Thanks! Do I keep this series or do I revert to sysbus irq connect irq > temporary patch as per Peter's last email? I think reverting is better since you need a respin and Peter offered to touch the code later.

Re: [Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-29 Thread Eric Auger
On 04/29/2015 01:12 PM, Paolo Bonzini wrote: > I think reverting is better since you need a respin and Peter offered to > touch the code later. OK Thanks Eric > > Paolo

Re: [Qemu-devel] [PATCH v13 01/12] linux-headers: update headers according to 4.1-rc0

2015-04-29 Thread Eric Auger
On 04/29/2015 12:36 PM, Christian Borntraeger wrote: > Am 28.04.2015 um 18:51 schrieb Eric Auger: >> This includes, among other things, VFIO platform driver and >> irqfd/arm. >> >> Signed-off-by: Eric Auger >> >> --- >> >> v12 -> v13: >> - update for 4.1-rc0 headers > > If you have a chance to up

Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-04-29 Thread Andrew Jones
On Wed, Apr 29, 2015 at 10:19:55AM +0100, Peter Maydell wrote: > On 29 April 2015 at 10:03, Alexander Graf wrote: > > > > > > On 18.03.15 20:10, Andrew Jones wrote: > >> Introduce a new memory region flag, KVM_MEM_UNCACHED, which > >> is needed by ARM. This flag informs KVM that the given memory >

Re: [Qemu-devel] [PATCH 25/27] block/parallels: add prealloc-mode and prealloc-size open paramemets

2015-04-29 Thread Roman Kagan
On Tue, Apr 28, 2015 at 01:59:56PM +0300, Roman Kagan wrote: > On Tue, Apr 28, 2015 at 10:46:58AM +0300, Denis V. Lunev wrote: > > This is preparational commit for tweaks in Parallels image expansion. > > The idea is that enlarge via truncate by one data block is slow. It > > would be much better t

Re: [Qemu-devel] [PATCH v2 3/4] qapi: Correctly handle downstream extensions in more locations

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > Now that c_var() handles '.' in downstream extension names, fix > the generator to support such names as additional types, enums, > members within an enum, branches of a union or alternate, and > in arrays. > > Signed-off-by: Eric Blake > --- > scripts/qapi-commands.py | 4

Re: [Qemu-devel] [PATCH v2 4/4] qapi: Test name mangling of downstream extensions

2015-04-29 Thread Markus Armbruster
Eric Blake writes: > So that we don't regress in supporting downstream extensions, make > sure that our testsuite covers downstream naming choices in as many > places as possible. > > Signed-off-by: Eric Blake > --- > tests/qapi-schema/qapi-schema-test.json | 19 +++ > tests/qap

Re: [Qemu-devel] [PATCH 3/7] target-mips: add CP0.PageGrain.ELPA support

2015-04-29 Thread Leon Alrae
Hi James, On 28/04/2015 16:08, James Hogan wrote: >> diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h >> index 1784227..20aa87c 100644 >> --- a/target-mips/mips-defs.h >> +++ b/target-mips/mips-defs.h >> @@ -10,11 +10,11 @@ >> >> #if defined(TARGET_MIPS64) >> #define TARGET_LONG_

Re: [Qemu-devel] [PATCH v6 00/36] drop qapi nested structs

2015-04-29 Thread Eric Blake
On 04/29/2015 12:48 AM, Markus Armbruster wrote: > General question first: through which tree should this go? > > MAINTAINERS doesn't cover the QAPI generators. Closest related stanza > is QAPI (Luiz, Michael R.). Should it cover the generators? Next > closest is QAPI Schema (Luiz, you, myself)

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-04-29 Thread Luiz Capitulino
On Mon, 27 Apr 2015 14:23:20 -0300 Eduardo Habkost wrote: > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: > > Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: > > > The QJSON code used casts to (QJSON*) directly, instead of OBJECT_CHECK. > > > There were even some functions using

Re: [Qemu-devel] [PATCH v6 00/36] drop qapi nested structs

2015-04-29 Thread Luiz Capitulino
On Wed, 29 Apr 2015 06:34:12 -0600 Eric Blake wrote: > On 04/29/2015 12:48 AM, Markus Armbruster wrote: > > General question first: through which tree should this go? > > > > MAINTAINERS doesn't cover the QAPI generators. Closest related stanza > > is QAPI (Luiz, Michael R.). Should it cover t

Re: [Qemu-devel] [PATCH 2/6] watchdog: Add watchdog device diag288 to the sysbus

2015-04-29 Thread Markus Armbruster
Cornelia Huck writes: > From: Xu Wang > > A new sysbus device for diag288 watchdog, it monitors the kvm guest > status, and take corresponding actions when it detects that the guest > is not responding. > > Signed-off-by: Xu Wang > Reviewed-by: David Hildenbrand > Signed-off-by: Cornelia Huck

Re: [Qemu-devel] [PATCH V15 4/5] i386: add a Virtual Machine Generation ID device

2015-04-29 Thread Gal Hammer
On 27/04/2015 16:38, Michael S. Tsirkin wrote: On Mon, Apr 27, 2015 at 02:19:50PM +0300, Gal Hammer wrote: Based on Microsoft's sepecifications (paper can be dowloaded from http://go.microsoft.com/fwlink/?LinkId=260709), add a device description to the SSDT ACPI table and its implementation. Th

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-04-29 Thread Andreas Färber
Am 29.04.2015 um 14:38 schrieb Luiz Capitulino: > On Mon, 27 Apr 2015 14:23:20 -0300 > Eduardo Habkost wrote: > >> On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: >>> Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: The QJSON code used casts to (QJSON*) directly, instead of OB

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-04-29 Thread Luiz Capitulino
On Wed, 29 Apr 2015 14:46:38 +0200 Andreas Färber wrote: > Am 29.04.2015 um 14:38 schrieb Luiz Capitulino: > > On Mon, 27 Apr 2015 14:23:20 -0300 > > Eduardo Habkost wrote: > > > >> On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: > >>> Am 25.04.2015 um 17:28 schrieb Eduardo Habk

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-04-29 Thread Eduardo Habkost
On Wed, Apr 29, 2015 at 08:38:02AM -0400, Luiz Capitulino wrote: > On Mon, 27 Apr 2015 14:23:20 -0300 > Eduardo Habkost wrote: > > > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: > > > Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: > > > > The QJSON code used casts to (QJSON*)

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-04-29 Thread Luiz Capitulino
On Wed, 29 Apr 2015 09:55:48 -0300 Eduardo Habkost wrote: > > > Also, why do we have two JSON writers in QEMU? And why do they have > > > exactly the same name? > > > > Not sure I got it, which writers? > > qjson.c and qobject/qjson.c:to_json(). Hmm, yeah, you're right.

[Qemu-devel] [PATCH v7 10/39] qapi: Forbid base without discriminator in unions

2015-04-29 Thread Eric Blake
None of the existing QMP or QGA interfaces uses a union with a base type but no discriminator; it is easier to avoid this in the generator to save room for other future extensions more likely to be useful. An earlier commit added a union-base-no-discriminator test to ensure that we eventually give

[Qemu-devel] [PATCH v7 06/39] qapi: Add some enum tests

2015-04-29 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal well with enums that aren't up to par. Later patches will update the expected results as the generator is made stricter. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- v7: tweak comments in enum-max-member test --- tests/Makefile

[Qemu-devel] [PATCH v7 03/39] qapi: Simplify builtin type handling

2015-04-29 Thread Eric Blake
There was some redundancy between builtin_types[] and builtin_type_qtypes{}. Merge them into one. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- scripts/qapi-types.py | 10 +- scripts/qapi-visit.py | 6 +++--- scripts/qapi.py | 8 +--- 3 files changed, 9 inser

[Qemu-devel] [PATCH v7 12/39] qapi: Prepare for catching more semantic parse errors

2015-04-29 Thread Eric Blake
This patch widens the scope of a try block (with the attending reindentation required by Python) in preparation for a future patch adding more instances of QAPIExprError inside the block. It's easier to separate indentation from semantic changes, so this patch has no real behavior change. Signed-o

[Qemu-devel] [PATCH v7 02/39] qapi: Document type-safety considerations

2015-04-29 Thread Eric Blake
Go into more details about the various types of valid expressions in a qapi schema, including tweaks to document fixes being done later in the current patch series. Also fix some stale and missing documentation in the QMP specification. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH v7 15/39] qapi: Document new 'alternate' meta-type

2015-04-29 Thread Eric Blake
The next patch will quit special-casing "'union':'Foo', 'discriminator':{}" and instead use "'alternate':'Foo'". Separating docs from implementation makes it easier to focus on wording without holding up code. In particular, making alternate a separate type makes for a nice type hierarchy:

[Qemu-devel] [PATCH v7 22/39] qapi: Unify type bypass and add tests

2015-04-29 Thread Eric Blake
For a few QMP commands, we are forced to pass an arbitrary type without tracking it properly in QAPI. Among the existing clients, this unnamed type was spelled 'dict', 'visitor', and '**'; this patch standardizes on '**', matching the documentation changes earlier in the series. Meanwhile, for bo

[Qemu-devel] [PATCH v7 11/39] qapi: Tighten checking of unions

2015-04-29 Thread Eric Blake
Previous commits demonstrated that the generator had several flaws with less-than-perfect unions: - a simple union that listed the same branch twice (or two variant names that map to the same C enumerator, including the implicit MAX sentinel) ended up generating invalid C code - an anonymous union

[Qemu-devel] [PATCH v7 27/39] qapi: More rigorous checking for type safety bypass

2015-04-29 Thread Eric Blake
Now that we have a way to validate every type, we can also be stricter about enforcing that callers that want to bypass type safety in generated code. Prior to this patch, it didn't matter what value was associated with the key 'gen', but it looked odd that 'gen':'yes' could result in bypassing th

[Qemu-devel] [PATCH v7 14/39] qapi: Rename anonymous union type in test

2015-04-29 Thread Eric Blake
Reduce churn in the future patch that replaces anonymous unions with a new metatype 'alternate' by changing 'AnonUnion' to 'Alternate'. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- tests/qapi-schema/qapi-schema-test.json | 2 +- tests/qapi-schema/qapi-schema-test.out | 4 ++--

[Qemu-devel] [PATCH v7 26/39] qapi: Whitelist commands that don't return dictionary

2015-04-29 Thread Eric Blake
...or an array of dictionaries. Although we have to cater to existing commands, returning a non-dictionary means the command is not extensible (no new name/value pairs can be added if more information must be returned in parallel). By making the whitelist explicit, any new command that falls foul

[Qemu-devel] [PATCH v7 19/39] qapi: Add tests of redefined expressions

2015-04-29 Thread Eric Blake
Demonstrate that the qapi generator doesn't deal very well with redefined expressions. At the parse level, they are silently accepted; and while the testsuite just stops at parsing, I've further tested that many of them cause generator crashes or invalid C code if they were appended to qapi-schema

[Qemu-devel] [PATCH v7 13/39] qapi: Segregate anonymous unions into alternates in generator

2015-04-29 Thread Eric Blake
Special-casing 'discriminator == {}' for handling anonymous unions is getting awkward; since this particular type is not always a dictionary on the wire, it is easier to treat it as a completely different class of type, "alternate", so that if a type is listed in the union_types array, we know it i

  1   2   3   >