Re: [Qemu-devel] virtio 1 issues

2015-08-06 Thread Jason Wang
On 08/07/2015 06:31 AM, Michael S. Tsirkin wrote: > Going over the code, I found a couple of issues. > Recording them here since I won't be able to work > on them until after the forum. > > > 1. I realized we don't save/restore > serialize the following fields in virtio pci: > > uint32_t dfse

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

2015-08-06 Thread Lin Ma
Hi Paolo, As mentioned in below email, The type of wwn is reported as uint64, But in qemu command line, The max valid value for wwn is 0x7fff. Obviously, it's treated as int64 there. I'd like to know that does the highest bit of _world wide name_ have special meaning and must be z

Re: [Qemu-devel] QEMU fw_cfg DMA interface

2015-08-06 Thread Kevin O'Connor
Trimming CC list. On Thu, Aug 06, 2015 at 05:53:26PM +0200, Marc Marí wrote: > On Thu, 6 Aug 2015 11:30:43 -0400 > "Kevin O'Connor" wrote: > > On Thu, Aug 06, 2015 at 02:37:45PM +0200, Marc Marí wrote: > > > On Thu, 6 Aug 2015 13:27:16 +0100 > > > Stefan Hajnoczi wrote: > > > > > > > On Thu, Au

[Qemu-devel] [RFC PATCH v2 11/12] qapi: Forbid empty unions and useless alternates

2015-08-06 Thread Eric Blake
Empty unions serve no purpose, and while we compile with gcc which permits them, strict C99 forbids them. We could inject a dummy member (and in fact, we do for empty structs), but while empty structs make sense in qapi, empty unions don't add any expressiveness to the QMP language. So prohibit t

[Qemu-devel] [RFC PATCH v2 06/12] qapi: Simplify visiting of alternate types

2015-08-06 Thread Eric Blake
Previously, working with alternates required two enums, and some indirection: for type Foo, we created Foo_qtypes[] which maps each qtype to a member of FooKind_lookup[], then use FooKind_lookup[] like we do for other union types. This has a subtle bug: since the values of FooKind_lookup start at

[Qemu-devel] [RFC PATCH v2 08/12] qapi: Add tests for empty unions

2015-08-06 Thread Eric Blake
The documentation claims that alternates are useful for allowing two types, although nothing enforces this. Meanwhile, it is silent on whether empty unions are allowed. In practice, the generated code will compile, in part because we have a 'void *data' branch; but for an empty alternate it alway

[Qemu-devel] [RFC PATCH v2 07/12] qapi: Fix alternates that accept 'number' but not 'int'

2015-08-06 Thread Eric Blake
The QMP input visitor allows integral values to be assigned by promotion to a QTYPE_QFLOAT. However, when parsing an alternate, we did not take this into account, such that an alternate that accepts 'number' but not 'int' would reject integral values. With this patch, we now have the following de

[Qemu-devel] [RFC PATCH v2 02/12] vnc: hoist allocation of VncBasicInfo to callers

2015-08-06 Thread Eric Blake
A future qapi patch will rework generated structs with a base class to be unboxed. In preparation for that, change the code that allocates then populates an info struct to instead merely populate the fields of an info field passed in as a parameter. Add rudimentary Error handling for cases where t

[Qemu-devel] [RFC PATCH v2 10/12] qapi: Avoid use of 'data' member of qapi unions

2015-08-06 Thread Eric Blake
qapi code generators currently create a 'void *data' member as part of the anonymous union embedded in the C struct corresponding to a qapi union. However, directly assigning to this member of the union feels a bit fishy, when we can directly use the rest of the struct instead. Signed-off-by: Eri

[Qemu-devel] [RFC PATCH v2 01/12] qapi: use 'type' in generated C code to match QMP union wire form

2015-08-06 Thread Eric Blake
When dealing with simple qapi unions, the code was generating a discriminator field of 'kind' even though the discriminator is sent as 'type' over QMP. Renaming things to match gets us one step closer to reusing common generator code for both simple and flat unions, without having to special case

[Qemu-devel] [RFC PATCH v2 12/12] qapi: Drop useless 'data' member of unions

2015-08-06 Thread Eric Blake
Now that we no longer have any clients of the 'void *data' member injected into unions, we can drop it. Update the testsuite to prove that we no longer have a name collision. Signed-off-by: Eric Blake --- scripts/qapi-types.py | 9 - tests/qapi-schema/qapi-schema-test.

[Qemu-devel] [RFC PATCH v2 04/12] qapi-visit: Remove redundant functions for flat union base

2015-08-06 Thread Eric Blake
The code for visiting the base class of a child struct created visit_type_Base_fields(); the code for visiting the base class of a flat union created visit_type_Union_fields(). If the same type is shared between a struct and a union, the two functions differed only by whether they visited the discr

[Qemu-devel] [RFC PATCH v2 05/12] qapi: Test use of 'number' within alternates

2015-08-06 Thread Eric Blake
Add some testsuite exposure for use of a 'number' as part of an alternate. The current state of the tree has a few bugs exposed by this: our input parser depends on the ordering of how the qapi schema declared the alternate, and the parser does not accept integers for a 'number' in an alternate ev

[Qemu-devel] [RFC PATCH v2 09/12] qapi: Rework deallocation of partial struct

2015-08-06 Thread Eric Blake
Commit cee2dedb noticed that if you have a partial flat union (such as if an input parse failed due to a missing discriminator), calling the dealloc visitor could result in trying to dereference the NULL pointer. But the fix it proposed requires the use of a 'data' member in the union, which may or

[Qemu-devel] [RFC PATCH v2 03/12] qapi: Unbox base members

2015-08-06 Thread Eric Blake
Rather than storing a base class as a pointer to a box, just store the fields of that base class in the same order, so that a child struct can be safely cast to its parent. This gives less malloc overhead, less pointer dereferencing, and even less generated code. Without boxing, the corner case o

[Qemu-devel] [RFC PATCH v2 00/12] post-introspection qapi cleanups

2015-08-06 Thread Eric Blake
Still RFC because it depends on Markus' RFC v3: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00426.html v1 was here: https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05266.html https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05325.html In v2: rebase to Markus' v3 seri

[Qemu-devel] [PATCH v3 3/3] sPAPR: Support RTAS call ibm,errinjct

2015-08-06 Thread Gavin Shan
The patch supports RTAS call "ibm,errinjct" to allow injecting EEH errors to VFIO PCI devices. The implementation is similiar to EEH support for VFIO PCI devices: The RTAS request is captured by QEMU and routed to sPAPRPHBClass::eeh_inject_error() where the request is translated to VFIO container I

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-08-06 Thread Sam Bobroff
Hello Aravinda and all, On Wed, Jul 08, 2015 at 01:58:13PM +0530, Aravinda Prasad wrote: > On Friday 03 July 2015 11:31 AM, David Gibson wrote: > > On Thu, Jul 02, 2015 at 07:11:52PM +1000, Alexey Kardashevskiy wrote: > >> On 04/02/2015 03:46 PM, David Gibson wrote: > >>> On Thu, Apr 02, 2015 at 0

Re: [Qemu-devel] [PATCH v9 08/10] qcow2: Invoke refcount order amendment function

2015-08-06 Thread Eric Blake
On 08/06/2015 09:10 AM, Alberto Garcia wrote: > On Mon 27 Jul 2015 05:51:38 PM CEST, Max Reitz wrote: > >> +if (refcount_bits <= 0 || refcount_bits > 64 || >> +!is_power_of_2(refcount_bits)) >> +{ >> +error_report("Refcount width must be a po

[Qemu-devel] [PATCH v3 1/3] linux-headers: Add eeh.h

2015-08-06 Thread Gavin Shan
The header file was introduced by following Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") Signed-off-by: Gavin Shan --- linux-headers/asm-powerpc/eeh.h | 56 +++

[Qemu-devel] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-06 Thread Gavin Shan
The patch supports RTAS calls "ibm,{open,close}-errinjct" to manupliate the token, which is passed to RTAS call "ibm,errinjct" to indicate the valid context for error injection. Each VM is permitted to have only one token at once and we simply have one random number for that. Signed-off-by: Gavin

[Qemu-devel] [PATCH v3 0/3] sPAPR: Support EEH Error Injection

2015-08-06 Thread Gavin Shan
The patchset depends on below Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") According to PAPR specification 2.7, there're 3 RTAS calls relevent to error injection: "ibm,open-errinjct", "ibm,

Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy

2015-08-06 Thread zhanghailiang
On 2015/8/6 22:55, Dr. David Alan Gilbert wrote: * Juan Quintela (quint...@redhat.com) wrote: Amit Shah wrote: On (Tue) 14 Jul 2015 [17:22:13], Juan Quintela wrote: "Dr. David Alan Gilbert (git)" wrote: +if (enable_mlock) { +if (os_mlock() < 0) { +error_report("mlo

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

2015-08-06 Thread Yang Hongyang
add an API qemu_netfilter_pass_to_next() to pass the packet to next filter. Signed-off-by: Yang Hongyang --- v5: fold params to NetPacket struct --- include/net/filter.h | 3 +++ net/filter.c | 33 + 2 files changed, 36 insertions(+) diff --git a/includ

[Qemu-devel] [PATCH v6 09/10] filter/buffer: update command description and help

2015-08-06 Thread Yang Hongyang
now that we have a buffer netfilter, update the command description and help. Signed-off-by: Yang Hongyang CC: Luiz Capitulino CC: Markus Armbruster --- hmp-commands.hx | 2 +- qemu-options.hx | 5 - qmp-commands.hx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hmp

[Qemu-devel] [PATCH v6 03/10] netfilter: add netfilter_{add|del} commands

2015-08-06 Thread Yang Hongyang
add netfilter_{add|del} commands This is mostly the same with netdev_{add|del} commands. When we delete the netdev, we also delete the netfilter object attached to it, because if the netdev is removed, the filters which attached to it is useless. Signed-off-by: Yang Hongyang CC: Luiz Capitulino

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

2015-08-06 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 --- tests/.gitignore | 1 + tests/Makef

[Qemu-devel] [PATCH v6 02/10] init/cleanup of netfilter object

2015-08-06 Thread Yang Hongyang
QTAILQ_ENTRY global_list but used by filter layer, so that we can manage all filters together. QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev is in this queue. This is mostly the same with init/cleanup of netdev object. Signed-off-by: Yang Hongyang --- v6: add multiqueue

[Qemu-devel] [PATCH v6 00/10] For QEMU 2.5: Add a netfilter object and netbuffer filter

2015-08-06 Thread Yang Hongyang
Add multiqueue support in v6. This patch add a new object netfilter, capture all network packets. Also implement a netbuffer based on this object. the "buffer" netfilter could be used by VM FT solutions like MicroCheckpointing, to buffer/release packets. Or to simulate packet delay. You can also

[Qemu-devel] [PATCH v6 08/10] netfilter: add a netbuffer filter

2015-08-06 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 tap,id=bn0

[Qemu-devel] [PATCH v6 07/10] net/queue: export qemu_net_queue_append_iov

2015-08-06 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/net/queue.h b/include/net/queue.h index 1d65e47..e139cc7 100644 --- a/include/net/queue.h +++ b/include/net/queue.h @@

[Qemu-devel] [PATCH v6 01/10] net: add a new object netfilter

2015-08-06 Thread Yang Hongyang
Add the framework for a new netfilter object and a new -netfilter CLI option as a basis for the following patches. Signed-off-by: Yang Hongyang CC: Paolo Bonzini CC: Eric Blake Reviewed-by: Thomas Huth --- include/net/filter.h| 15 +++ include/sysemu/sysemu.h | 1 + net/Makef

[Qemu-devel] [PATCH v6 04/10] netfilter: hook packets before net queue send

2015-08-06 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang --- v5: do not check ret against iov_size pass sent_cb to filters --- net/net.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/net/net.c b/net/net.c index 6e6

[Qemu-devel] [PATCH v6 05/10] move out net queue structs define

2015-08-06 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- include/net/queue.h | 19 +++ net/queue.c | 19 --- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/net/queue.h b/include/net/queue.h index fc02b33..1d65e47 100644 --- a/include/net/queue.h +++ b/inc

Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: drop _ADR entry from SPCR

2015-08-06 Thread Andrew Jones
On Thu, Aug 06, 2015 at 01:55:14PM +0100, Leif Lindholm wrote: > On Thu, Aug 06, 2015 at 02:28:03PM +0200, Andrew Jones wrote: > > On Thu, Aug 06, 2015 at 12:24:27PM +0100, Leif Lindholm wrote: > > > The _ADR entry in SPCR is optional and redundant. The same information > > > is already provided in

Re: [Qemu-devel] [PATCH v7 30/42] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command

2015-08-06 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:43], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Add MIG_RP_MSG_REQ_PAGES command on Return path for the postcopy > > destination to request a page from the source. > > > > Signed-off-by: D

Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy

2015-08-06 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Amit Shah wrote: > > On (Tue) 14 Jul 2015 [17:22:13], Juan Quintela wrote: > >> "Dr. David Alan Gilbert (git)" wrote: > > > >> > +if (enable_mlock) { > >> > +if (os_mlock() < 0) { > >> > +error_report("mlock: %s", strerror(err

Re: [Qemu-devel] QEMU fw_cfg DMA interface

2015-08-06 Thread Marc Marí
On Thu, 6 Aug 2015 11:30:43 -0400 "Kevin O'Connor" wrote: > On Thu, Aug 06, 2015 at 02:37:45PM +0200, Marc Marí wrote: > > On Thu, 6 Aug 2015 13:27:16 +0100 > > Stefan Hajnoczi wrote: > > > > > On Thu, Aug 6, 2015 at 12:00 PM, Marc Marí > > > wrote: > > > > When running a Linux guest on top of

Re: [Qemu-devel] [ARM SMBIOS V2 PATCH 6/6] smbios: implement smbios support for mach-virt

2015-08-06 Thread Shannon Zhao
On 2015/8/7 1:15, Wei Huang wrote: > This patch generates smbios tables for ARM mach-virt. Also add > CONFIG_SMBIOS=y for ARM default config. > > Signed-off-by: Wei Huang Reviewed-by: Shannon Zhao > --- > default-configs/arm-softmmu.mak | 1 + > hw/arm/virt.c| 27 +

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Marc Marí
On Thu, 6 Aug 2015 22:49:12 +0200 Laszlo Ersek wrote: [...] > > +static void fw_cfg_dma_mem_write(void *opaque, hwaddr addr, > > + uint64_t value, unsigned size) > > +{ > > +FWCfgState *s = opaque; > > + > > +s->dma_addr = be64_to_cpu(value); > > +fw_c

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

2015-08-06 Thread Wen Congyang
On 08/06/2015 10:33 PM, Alberto Garcia wrote: > On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote: > >> +/* >> + * Hot add/remove a BDS's child. So the user can take a child offline when >> + * it is broken and take a new child online >> + */ >> +void bdrv_add_child(BlockDriverState *bs, QDi

Re: [Qemu-devel] [PATCH RFC v3 11/32] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-08-06 Thread Eric Blake
On 08/04/2015 09:57 AM, Markus Armbruster wrote: > 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,

[Qemu-devel] virtio 1 issues

2015-08-06 Thread Michael S. Tsirkin
Going over the code, I found a couple of issues. Recording them here since I won't be able to work on them until after the forum. 1. I realized we don't save/restore serialize the following fields in virtio pci: uint32_t dfselect; uint32_t gfselect; uint32_t guest_features[2]; st

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Laszlo Ersek
On 08/06/15 23:11, Marc Marí wrote: > On Thu, 6 Aug 2015 22:49:12 +0200 > Laszlo Ersek wrote: > > [...] > >>> +static void fw_cfg_dma_mem_write(void *opaque, hwaddr addr, >>> + uint64_t value, unsigned size) >>> +{ >>> +FWCfgState *s = opaque; >>> + >>> +s

Re: [Qemu-devel] Incomplete address decoding

2015-08-06 Thread Peter Maydell
On 6 August 2015 at 23:07, Pavel Dovgalyuk wrote: > Hello! > > What is the best way of emulating memory region with incomplete decoding of > address? > E.g., when 2k RAM is mapped on every 2k'th offset of 16-bit machine. > > I figured out two possible solutions: > - manually create many region's a

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Laszlo Ersek
On 08/06/15 13:01, Marc Marí wrote: > Based on the specifications on docs/specs/fw_cfg.txt > > This interface is an addon. The old interface can still be used as usual. > > For x86 arch, this addon will use one extra port (0x512). For ARM, it will > use 8 more bytes, following the actual implemen

[Qemu-devel] [PATCH 07/25] qapi: qapi for audio backends

2015-08-06 Thread Kővágó, Zoltán
This patch adds structures into qapi to replace the existing configuration structures used by audio backends currently. This qapi will be the base of the -audiodev command line parameter (that replaces the old environment variables based config). This is not a 1:1 translation of the old options, I

[Qemu-devel] Incomplete address decoding

2015-08-06 Thread Pavel Dovgalyuk
Hello! What is the best way of emulating memory region with incomplete decoding of address? E.g., when 2k RAM is mapped on every 2k'th offset of 16-bit machine. I figured out two possible solutions: - manually create many region's aliases - somehow modify the MemoryRegion to support aliases dupl

[Qemu-devel] [PATCH 23/25] audio: make mixeng optional

2015-08-06 Thread Kővágó, Zoltán
Implementation of the previously added mixeng option. Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 70 +- audio/audio_template.h | 22 +++- 2 files changed, 79 insertions(+), 13 deletions(-) diff --git a/audio/audio.c b/a

[Qemu-devel] [PATCH 09/25] audio: use qapi AudioFormat instead of audfmt_e

2015-08-06 Thread Kővágó, Zoltán
I had to include an enum for audio sampling formats into qapi, but that meant duplicating the audfmt_e enum. This patch replaces audfmt_e and associated values with the qapi generated AudioFormat enum. This patch is mostly a search-and-replace, except for switches where the qapi generated AUDIO_F

[Qemu-devel] [PATCH 07/18] aio-win32: remove walking_handlers, protecting AioHandler list with list_lock

2015-08-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- aio-win32.c | 81 + 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index 2b4b156..a7994b3 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -40,6 +40,7 @@ void aio_s

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Marc Marí
On Thu, 6 Aug 2015 10:47:21 -0400 "Kevin O'Connor" wrote: > On Thu, Aug 06, 2015 at 01:01:16PM +0200, Marc Marí wrote: > > Based on the specifications on docs/specs/fw_cfg.txt > > > > This interface is an addon. The old interface can still be used as > > usual. > > > > For x86 arch, this addon

Re: [Qemu-devel] Logging number of translated instructions per basic block

2015-08-06 Thread Christopher Covington
On 08/05/2015 01:11 PM, Christopher Covington wrote: > Hi Anthony, > > On 07/28/2015 05:20 PM, Anthony Carno wrote: >> Hi there, >> >> As the subject of my email suggests, is there a way to log the number of >> translated instructions per basic block? I've dug into the debug code a bit >> (specif

[Qemu-devel] [ARM SMBIOS V2 PATCH 4/6] smbios: move smbios code into a common folder

2015-08-06 Thread Wei Huang
To share smbios among different architectures, this patch moves SMBIOS code (smbios.c and smbios.h) from x86 specific folders into new hw/smbios directories. As a result, CONFIG_SMBIOS=y is defined in x86 default config files. Signed-off-by: Wei Huang --- arch_init.c | 2

Re: [Qemu-devel] [PATCH v2 4/5] vhost-user: Enable 'nowait' and 'reconnect' option

2015-08-06 Thread Marc-André Lureau
Hi On Mon, Jun 22, 2015 at 5:50 AM, Tetsuya Mukawa wrote: > The patch enables 'nowait' option for server mode, and 'reconnect' > option for client mode. > > Signed-off-by: Tetsuya Mukawa > --- > net/vhost-user.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/net/vhost-user.c b/n

[Qemu-devel] [PATCH 04/25] net: use Netdev instead of NetClientOptions in client init

2015-08-06 Thread Kővágó, Zoltán
This way we no longer need NetClientOptions and can convert Netdev into a flat union. Signed-off-by: Kővágó, Zoltán --- net/clients.h| 20 ++-- net/dump.c | 6 +++--- net/hub.c| 6 +++--- net/l2tpv3.c | 6 +++--- net/net.c| 29 ++--

[Qemu-devel] [PATCH 06/25] qapi: reorder NetdevBase and Netdev

2015-08-06 Thread Kővágó, Zoltán
Probably more logical if NetdevBase comes before Netdev. No schematic changes. Signed-off-by: Kővágó, Zoltán --- qapi-schema.json | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index fd6b6a2

Re: [Qemu-devel] [PATCH v2 1/2] make: fix where dependency *.d are stored.

2015-08-06 Thread Alex Bennée
Michael S. Tsirkin writes: > On Thu, Aug 06, 2015 at 09:57:03AM +0100, Alex Bennée wrote: >> >> Victor Kaplansky writes: >> >> > >> > As a hack, we also touch two sources for generated *.hex files. This is >> > to ensure *.hex rebuild, when old revision is switched to the new one. >> >> Whi

[Qemu-devel] [ARM SMBIOS V2 PATCH 6/6] smbios: implement smbios support for mach-virt

2015-08-06 Thread Wei Huang
This patch generates smbios tables for ARM mach-virt. Also add CONFIG_SMBIOS=y for ARM default config. Signed-off-by: Wei Huang --- default-configs/arm-softmmu.mak | 1 + hw/arm/virt.c| 27 +++ include/hw/arm/virt-acpi-build.h | 1 + 3 files changed

[Qemu-devel] [PATCH 15/25] paaudio: do not create multiple connections to the same server

2015-08-06 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 301 1 file changed, 175 insertions(+), 126 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index a53aaf6..e3b8207 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -9,10

Re: [Qemu-devel] [PATCH v2 2/2] fw_cfg: document MMIO registers for arm, sun4*, and ppc/mac_*

2015-08-06 Thread Gabriel L. Somlo
On Thu, Aug 06, 2015 at 02:15:11PM +0100, Peter Maydell wrote: > On 6 August 2015 at 10:14, Laszlo Ersek wrote: > > On 08/06/15 01:47, Gabriel L. Somlo wrote: > > >> +=== arm Register Locations === > >> + > >> +Selector Register MMIO addr: 0x9020008 (16-bit, big-endian) > >> +Data Register MMIO a

[Qemu-devel] [PATCH 08/25] qapi: support nested structs in OptsVisitor

2015-08-06 Thread Kővágó, Zoltán
The current OptsVisitor flattens the whole structure, if there are same named fields under different paths (like `in' and `out' in `Audiodev'), the current visitor can't cope with them (for example setting `frequency=44100' will set the in's frequency to 44100 and leave out's frequency unspecified)

[Qemu-devel] [ARM SMBIOS V2 PATCH 0/6] SMBIOS Support for ARM

2015-08-06 Thread Wei Huang
SMBIOS tables present userful system hardware info to management applications, such as DMI tools. Even though SMBIOS was originally developed for Intel x86, it has been extended to both Itanium and ARM (32bit & 64bit). More and more ARM server releases, such as RHEL Server for ARM, start to integ

[Qemu-devel] [PATCH 12/25] audio: basic support for multi backend audio

2015-08-06 Thread Kővágó, Zoltán
Audio functions no longer access glob_audio_state, instead they get an AudioState as a parameter. This is required in order to support multiple backends. glob_audio_state is also gone, and replaced with a tailq so we can store more than one states. Signed-off-by: Kővágó, Zoltán --- audio/audio

[Qemu-devel] [PATCH 24/25] paaudio: get/put_buffer functions

2015-08-06 Thread Kővágó, Zoltán
This lets us avoid some buffer copying when using mixeng. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 83 + 1 file changed, 83 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index a0b17c8..97e12ba 100644 --- a/audio/p

[Qemu-devel] [PATCH 09/18] aio: push aio_context_acquire/release down to dispatching

2015-08-06 Thread Paolo Bonzini
The AioContext data structures are now protected by list_lock and/or they are walked with FOREACH_RCU primitives. There is no need anymore to acquire the AioContext for the entire duration of aio_dispatch. Instead, just acquire it before and after invoking the callbacks. The next step is then to p

Re: [Qemu-devel] QEMU 2.4 for Windows - current status

2015-08-06 Thread Richard Henderson
On 08/06/2015 03:12 AM, Stefan Weil wrote: > (sig)setjmp/(sig)longjmp without TCG generated code on the stack > does not need special handling because stack unwinding works > for compiled normal C code. > > We only have a problem on 64 bit Windows with code generated > at run time by TCG because s

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

2015-08-06 Thread Dennis Luehring
using (later) git qemu 2.3.93 ~/qemu/sparc64-softmmu/qemu-system-sparc64 -m 1024 -nographic -monitor telnet::4440,server,nowait -serial telnet::3000,server -hda ./netbsd-615-sparc64.raw -cdrom ./NetBSD-6.1.5-sparc64.iso -boot d -net nic,model=i82551 -net user gives me unlimited lines of (on

[Qemu-devel] [PATCH v3 09/16] vhost-user: document migration log

2015-08-06 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 42 ++ 1 file changed, 42 insertions(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 0062baa..0322bcf 100644 --- a/docs/specs/vhost-user.

[Qemu-devel] [PATCH v3 12/16] vhost-user-test: remove useless static check

2015-08-06 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 551a664..68badf9 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -262,7 +262,6 @@

[Qemu-devel] [Bug 1481990] [NEW] 2.3.0 build fails on Ubuntu 12.04

2015-08-06 Thread Luther Stanton
Public bug reported: Build of 2.3.0 fails on Ubuntu 12.04: sudo make clean sudo ./configure --prefix=/usr/local --target-list=i386-softmmu,arm-softmmu,x86_64-softmmu sudo make GEN config-host.h GEN qemu-options.def GEN qmp-commands.h GEN qapi-types.h GEN qapi-visit.h GEN

Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: drop _ADR entry from SPCR

2015-08-06 Thread Leif Lindholm
On Thu, Aug 06, 2015 at 02:28:03PM +0200, Andrew Jones wrote: > On Thu, Aug 06, 2015 at 12:24:27PM +0100, Leif Lindholm wrote: > > The _ADR entry in SPCR is optional and redundant. The same information > > is already provided in _CRS (which is mandatory). > > > > Signed-off-by: Leif Lindholm > >

Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: Shutdown vhost-user connection when wrong messages are passed

2015-08-06 Thread Marc-André Lureau
Hi On Mon, Jun 22, 2015 at 5:50 AM, Tetsuya Mukawa wrote: > When wrong vhost-user message are passed, the connection should be shutdown. > > Signed-off-by: Tetsuya Mukawa > --- > hw/virtio/vhost-user.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/

[Qemu-devel] [PATCH 11/25] audio: reduce glob_audio_state usage

2015-08-06 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 41 - audio/audio_int.h | 4 audio/audio_template.h | 46 ++ 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/audio/audio.c b/a

[Qemu-devel] [PATCH 05/25] qapi: change Netdev into a flat union

2015-08-06 Thread Kővágó, Zoltán
Except qapi-schema.json, this patch was geenrated by: find . -name .git -prune -o -type f \! -name '*~' -print0 | \ xargs -0 sed -i \ -e 's/NetClientOptionsKind/NetClientDriver/g' \ -e 's/NET_CLIENT_OPTIONS_KIND_/NET_CLIENT_DRIVER_/g' \ -e 's/netdev->opts/netdev/g' Signed-off-by: Kő

[Qemu-devel] [PATCH 19/25] paaudio: fix playback glitches

2015-08-06 Thread Kővágó, Zoltán
Pulseaudio normally assumes that when the server wants it, the client can generate the audio samples and send it right away. Unfortunately this is not the case with QEMU -- it's up to the emulated system when does it generate the samples. Buffering the samples and sending them from a background t

[Qemu-devel] [PATCH 04/18] aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh

2015-08-06 Thread Paolo Bonzini
This will make it possible to walk the list of bottom halves without holding the AioContext lock---and in turn to call bottom half handlers without holding the lock. Signed-off-by: Paolo Bonzini --- async.c | 28 include/block/aio.h | 12 +--- 2 f

[Qemu-devel] [PATCH 17/18] block: explicitly acquire aiocontext in aio callbacks that need it

2015-08-06 Thread Paolo Bonzini
todo: qed Signed-off-by: Paolo Bonzini --- block/archipelago.c| 3 --- block/blkdebug.c | 4 block/blkverify.c | 9 - block/block-backend.c | 4 block/curl.c | 2 +- block/io.c | 13 +++-- block/linux-aio.c | 7 --- b

[Qemu-devel] [PATCH v3 06/16] vhost: use variable arguments for vhost_call()

2015-08-06 Thread marcandre . lureau
From: Marc-André Lureau It is useful to pass extra arguments to the funtions, for various backend needs. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-backend.c | 4 ++-- hw/virtio/vhost-user.c| 4 ++-- include/hw/virtio/vhost-backend.h | 6 -- 3 files changed, 8

[Qemu-devel] [PATCH v3 13/16] vhost-user-test: wrap server in TestServer struct

2015-08-06 Thread marcandre . lureau
From: Marc-André Lureau In the coming patches, a test will use several servers simultaneously. Wrap the server in a struct, out of the global scope. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 146 ++-- 1 file changed, 92 insertion

[Qemu-devel] [PATCH 21/25] audio: common rate control code for timer based outputs

2015-08-06 Thread Kővágó, Zoltán
This commit removes the ad-hoc rate-limiting code from noaudio and wavaudio, and replaces them with a (slightly modified) code from spiceaudio. This way multiple write calls (for example when the circular buffer wraps around) do not cause problems. Signed-off-by: Kővágó, Zoltán --- audio/audio.

[Qemu-devel] [PATCH 13/25] audio: add audiodev properties to frontends

2015-08-06 Thread Kővágó, Zoltán
Finally add audiodev= options to audio frontends so users can specify which backend to use when multiple backends exist. Not specifying an audiodev= option currently causes the first audiodev to be used, this is fixed in the next commit. Example usage: -audiodev pa,id=foo -device AC97,audiodev=fo

[Qemu-devel] [PATCH v3 07/16] vhost-user: start and end the va_list

2015-08-06 Thread marcandre . lureau
From: Marc-André Lureau Use a common start and exit branch to open and cleanup the va_list. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhos

[Qemu-devel] [ARM SMBIOS V2 PATCH 2/6] smbios: remove dependency on x86 e820 tables

2015-08-06 Thread Wei Huang
Current smbios builds type 19 table from e820, which is x86 specific. This patch removes smbios' dependency on e820 by passing an array of memory area to smbios_get_tables(). Signed-off-by: Wei Huang --- hw/i386/pc.c | 18 +- hw/i386/smbios.c | 14 +++-

[Qemu-devel] [PATCH 22/25] audio: add mixeng option (documentation)

2015-08-06 Thread Kővágó, Zoltán
This will allow us to disable mixeng when we use a decent backend. Disabling mixeng have a few advantages: * we no longer convert the audio output from one format to another, when the underlying audio system would just convert it to a third format. We no longer convert, only the underlying sys

[Qemu-devel] [PATCH 14/25] audio: audiodev= parameters no longer optional when -audiodev present

2015-08-06 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 10b9871..7468b94 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -69,6 +69,8 @@ const struct mixeng_volume nominal_volume = { #e

Re: [Qemu-devel] [PATCH 3/5] Implement fw_cfg DMA interface

2015-08-06 Thread Kevin O'Connor
On Thu, Aug 06, 2015 at 01:01:16PM +0200, Marc Marí wrote: > Based on the specifications on docs/specs/fw_cfg.txt > > This interface is an addon. The old interface can still be used as usual. > > For x86 arch, this addon will use one extra port (0x512). For ARM, it will > use 8 more bytes, follow

[Qemu-devel] [PATCH 17/25] audio: remove gcc specific audio_MIN, audio_MAX

2015-08-06 Thread Kővágó, Zoltán
Currently the gcc specific version only evaluates the arguments once, while the generic version evaluates one argument twice, which can cause debugging headaches when an argument has a side effect. This patch at least provides consistent behavior between compilers. Signed-off-by: Kővágó, Zoltán

[Qemu-devel] [PATCH 25/25] audio: split ctl_* functions into enable_* and volume_*

2015-08-06 Thread Kővágó, Zoltán
This way we no longer need vararg functions, improving compile time error detection. Also now it's possible to check actually what commands are supported, without needing to manually update ctl_caps. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 56 +- audio/au

Re: [Qemu-devel] [PATCH 2/3] scsi-disk: identify AIO callbacks more clearly

2015-08-06 Thread Fam Zheng
On Thu, 08/06 12:01, Paolo Bonzini wrote: > /* Actually issue a read to the block device. */ > -static void scsi_do_read(void *opaque, int ret) > +static void scsi_do_read(SCSIDiskReq *r, int ret) > { > -SCSIDiskReq *r = opaque; > SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req

[Qemu-devel] [PATCH 00/25] audio: -audiodev option, multiple options

2015-08-06 Thread Kővágó, Zoltán
This patch series adds support to multiple audio backends. The first part of the series (until -audiodev command line option) was submitted multiple times, see http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg05037.html and http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00920

[Qemu-devel] [PATCH] hw/arm/virt-acpi-build: drop _ADR entry from SPCR

2015-08-06 Thread Leif Lindholm
The _ADR entry in SPCR is optional and redundant. The same information is already provided in _CRS (which is mandatory). Signed-off-by: Leif Lindholm --- So, this _ADR entry is only consumed by a set of not-widely-circulated patches for the Linux kernel. And while the ARM Server Base Boot Requir

[Qemu-devel] [ARM SMBIOS V2 PATCH 3/6] smbios: pass ram size as a parameter to build smbios tables

2015-08-06 Thread Wei Huang
This patch adds a new parameter, mem_size, to smbios_get_tables() function. This step is required to make smbios code architect-independent. Signed-off-by: Wei Huang --- hw/i386/pc.c | 2 +- hw/i386/smbios.c | 8 include/hw/i386/smbios.h | 2 ++ 3 files changed, 7 in

[Qemu-devel] [PATCH 18/25] audio: do not run each backend in audio_run

2015-08-06 Thread Kővágó, Zoltán
audio_run is called manually by alsa and oss backends when polling. In this case only the requesting backend should be run, not all of them. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 +-- audio/audio.c | 17 +++-- audio/audio_int.h | 2 +- audio/ossaudio.c |

[Qemu-devel] [ARM SMBIOS V2 PATCH 1/6] smbios: extract x86 smbios building code into a function

2015-08-06 Thread Wei Huang
This patch extracts out the procedure of buidling x86 SMBIOS tables into a dedicated function. Signed-off-by: Wei Huang --- hw/i386/pc.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7661ea9..00e45f3

[Qemu-devel] [PATCH 11/18] qemu-timer: optimize timerlist_run_timers

2015-08-06 Thread Paolo Bonzini
The case of no active timers is relatively common. Check it outside the lock. Signed-off-by: Paolo Bonzini --- qemu-timer.c | 4 1 file changed, 4 insertions(+) diff --git a/qemu-timer.c b/qemu-timer.c index 2463fe6..dc11ab9 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -476,6 +476,10 @

Re: [Qemu-devel] PO makefile rules touching source

2015-08-06 Thread Peter Maydell
On 6 August 2015 at 18:14, Stefan Weil wrote: > That's why I have sent a patch to update the > *.po files for QEMU 2.4.0. With this patch > (which is still not applied) Sorry, I didn't notice that patch when I was collecting up last minute fixes, and it's now missed the 2.4 release. -- PMM

[Qemu-devel] [PATCH 01/25] qapi: support implicit structs in OptsVisitor

2015-08-06 Thread Kővágó, Zoltán
They are required for flat unions (you still have to allocate the structs). Signed-off-by: Kővágó, Zoltán --- qapi/opts-visitor.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index 7ae33b3..aa68814 100644 --- a/qapi/opts-visitor.c

[Qemu-devel] [PATCH 02/25] qapi: convert NumaOptions into a flat union

2015-08-06 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- numa.c | 2 +- qapi-schema.json | 47 --- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/numa.c b/numa.c index 402804b..376f990 100644 --- a/numa.c +++ b/numa.c @@ -227,7 +227,7 @@ static in

[Qemu-devel] [PATCH 16/25] paaudio: properly disconnect streams in fini_*

2015-08-06 Thread Kővágó, Zoltán
Currently this needs a workaround due to bug #74624 in pulseaudio. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index e3b8207..2aee22f 100644 --- a/audio/paaudio.c

  1   2   3   >