Re: [Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the include/sysemu/rng*.h files

2016-02-25 Thread Amit Shah
On (Thu) 25 Feb 2016 [13:44:20], Thomas Huth wrote: > These headers are used by the virtio-rng and rng backends code, > so they should be listed in the same section in MAINTAINERS, too. > > Signed-off-by: Thomas Huth Reviewed-by: Amit Shah Amit

[Qemu-devel] Question on ioeventfd behavior

2016-02-25 Thread Markus Armbruster
Unlike much of QEMU, memory.h actually has useful contracts, much appreciated. Here's the one in question: /** * memory_region_add_eventfd: Request an eventfd to be triggered when a word *is written to a location. * * Marks a word in an IO region (initialized with

Re: [Qemu-devel] [PATCH V6 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-25 Thread Zhang Chen
On 02/26/2016 03:06 PM, Jason Wang wrote: On 02/24/2016 04:08 PM, Jason Wang wrote: On 02/24/2016 02:54 PM, Zhang Chen wrote: Filter-mirror is a netfilter plugin. It gives qemu the ability to mirror packets to a chardev. v6: - Address Jason's comments. v5: - Address Jason's comments.

Re: [Qemu-devel] [PATCH v7 2/3] qmp event: Refactor QUORUM_REPORT_BAD

2016-02-25 Thread Alberto Garcia
On Fri 26 Feb 2016 02:39:01 AM CET, Changlong Xie wrote: > Introduce QuorumOpType, and make QUORUM_REPORT_BAD compatible > with it. > > Cc: Dr. David Alan Gilbert > Cc: Wen Congyang > Signed-off-by: Wen Congyang > Signed-off-by: Changlong Xie Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: eliminate memory leak

2016-02-25 Thread Alberto Garcia
On Thu 25 Feb 2016 11:53:54 PM CET, Paolo Bonzini wrote: > Not particularly important since qemu-img exits immediately after > calling img_rebase, but easily fixed. Coverity says thanks. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH] filter/fiter-buffer: Add a 'status' property for filter object

2016-02-25 Thread Hailiang Zhang
On 2016/2/26 14:49, Jason Wang wrote: On 02/25/2016 12:05 PM, zhanghailiang wrote: With this property, users can control if this filter is 'enable' or 'disable'. The default behavior for filter is enabled. For buffer filter, we need to release all the buffered packets while disabled it. Here

Re: [Qemu-devel] [PATCH] net: simplify net_init_tap_one logic

2016-02-25 Thread Jason Wang
On 02/26/2016 07:05 AM, Paolo Bonzini wrote: > net_init_tap_one receives in vhostfdname a fd name from vhostfd= or > vhostfds=, or NULL if there is no vhostfd=/vhostfds=. It is simpler > to just check vhostfdname, than it is to check for vhostfd= or > vhostfds=. This also calms down Coverity, w

Re: [Qemu-devel] [PATCH V6 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-25 Thread Jason Wang
On 02/24/2016 04:08 PM, Jason Wang wrote: > > On 02/24/2016 02:54 PM, Zhang Chen wrote: >> Filter-mirror is a netfilter plugin. >> It gives qemu the ability to mirror >> packets to a chardev. >> >> v6: >> - Address Jason's comments. >> >> v5: >> - Address Jason's comments. >> >> v4: >> - Addre

Re: [Qemu-devel] [PATCH] filter/fiter-buffer: Add a 'status' property for filter object

2016-02-25 Thread Jason Wang
On 02/25/2016 12:05 PM, zhanghailiang wrote: > With this property, users can control if this filter is 'enable' > or 'disable'. The default behavior for filter is enabled. > > For buffer filter, we need to release all the buffered packets > while disabled it. Here we use the 'disable' callback of

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add entries for include/net/ files

2016-02-25 Thread Jason Wang
On 02/25/2016 07:56 PM, Thomas Huth wrote: > The include/net/ files correspond to the files in the net/ directory, > thus there should be corresponding entries in the MAINTAINERS file. > > Signed-off-by: Thomas Huth > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/

Re: [Qemu-devel] Regarding Cortex-A7 CPU definition

2016-02-25 Thread Deepak kumar Raju
Hi Peter, We have GIC & generic timer enabled on Linux kernel side. Need help from you how to enable GIC & generic timer on QEMU side. Can you please help. Thanks, Best Regads, -Deepak On Wed, Feb 24, 2016 at 7:20 PM, Deepak kumar Raju < raju.deepakku...@gmail.com> wrote: > Hi Peter, > > We are

[Qemu-devel] 答复: [PATCH v2] net: ne2000: check ring buffer control registers

2016-02-25 Thread yanghongke
On 02/24/2016 02:11 PM, P J P wrote: > From: Prasad J Pandit > > Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152) bytes to process > network packets. Registers PSTART & PSTOP define ring buffer size & > location. Setting these registers to invalid values could lead to > infinite loop or O

Re: [Qemu-devel] [PATCH] vhost-user: verify that number of queues is less than MAX_QUEUE_NUM

2016-02-25 Thread Jason Wang
On 02/24/2016 06:44 PM, Ilya Maximets wrote: > Fix QEMU crash when -netdev vhost-user,queues=n is passed with number > of queues greater than MAX_QUEUE_NUM. > > Signed-off-by: Ilya Maximets > --- > net/vhost-user.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/ne

Re: [Qemu-devel] [PATCH] net: filter: correctly remove filter from the list during finalization

2016-02-25 Thread Jason Wang
On 02/24/2016 07:53 PM, Yang Hongyang wrote: > > On Wed, Feb 24, 2016 at 11:44 AM, Jason Wang > wrote: > > Qemu may crash when we want to add two filters on the same netdev but > the initialization of second fails (e.g missing parameters): > > ./qemu-syste

Re: [Qemu-devel] [V6 1/4] hw/i386: Introduce AMD IOMMU

2016-02-25 Thread David Kiarie
On Thu, Feb 25, 2016 at 6:43 PM, Marcel Apfelbaum wrote: > On 02/21/2016 08:10 PM, David Kiarie wrote: >> >> Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU >> The IOMMU does basic translation, error checking and has a >> mininal IOTLB implementation > > > Hi, > >> >> Signed-off-by: Davi

Re: [Qemu-devel] 答复: [PATCH v2] net: ne2000: check ring buffer control registers

2016-02-25 Thread Jason Wang
On 02/24/2016 05:25 PM, yanghongke wrote: > Good day to you! > > After my test, I find that the issue is fixed with this patch. > When receiving packet, ne2000_buffer_full return 1, ne2000_receive > immediately return -1,so it avoid infinite loop or OOB r/w access issues. Thanks for

Re: [Qemu-devel] [PATCH v2 1/2] net: check packet payload length

2016-02-25 Thread Jason Wang
On 02/24/2016 12:08 AM, P J P wrote: > From: Prasad J Pandit > > While computing IP checksum, 'net_checksum_calculate' reads > payload length from the packet. It could exceed the given 'data' > buffer size. Add a check to avoid it. > > Reported-by: Liu Ling > Signed-off-by: Prasad J Pandit > -

Re: [Qemu-devel] [PATCH v4 2/3] block/backup: avoid copying less than full target clusters

2016-02-25 Thread Fam Zheng
On Thu, 02/25 15:58, John Snow wrote: > During incremental backups, if the target has a cluster size that is > larger than the backup cluster size and we are backing up to a target > that cannot (for whichever reason) pull clusters up from a backing image, > we may inadvertantly create unusable inc

Re: [Qemu-devel] [PULL 0/9] qemu-ga patch queue for 2.6

2016-02-25 Thread Stefan Weil
Am 25.02.2016 um 22:27 schrieb Michael Roth: > Quoting Peter Maydell (2016-02-25 12:18:17) [...] >> I'm open to the idea of dropping old-mingw from the build rotation >> if it looks like it really is just totally hopeless, since I have >> a newer setup for it now. > > I wouldn't want to speak for

Re: [Qemu-devel] [RFC PATCH v0 2/6] spapr: CPU core device

2016-02-25 Thread Bharata B Rao
On Fri, Feb 26, 2016 at 01:57:44PM +1100, David Gibson wrote: > On Thu, Feb 25, 2016 at 09:52:38PM +0530, Bharata B Rao wrote: > > Add sPAPR specific CPU core device that is based on generic CPU core device. > > Creating this core device will result in creation of all the CPU thread > > devices tha

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: disable vmdesc submission for old machines

2016-02-25 Thread David Gibson
On Tue, Feb 23, 2016 at 05:47:59PM +0100, Greg Kurz wrote: > Since QEMU 2.3, we have a vmdesc section in the migration stream. > This section is not mandatory but when migrating a pseries-2.2 > machine from QEMU 2.2, you get a warning at the destination: > > qemu-system-ppc64: Expected vmdescripti

Re: [Qemu-devel] [Qemu-ppc] [PATCH] dbdma: warn when using unassigned channel

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 01:02:11PM +0100, Hervé Poussineau wrote: > With this, it's easier to know if a guest uses an invalid and/or unimplemented > DMA channel. > > Signed-off-by: Hervé Poussineau Merged to ppc-for-2.6, thanks. Btw, you're likely to get a prompter response if you CC me directl

Re: [Qemu-devel] [PATCH qemu] migration/vmstate: document VMStateFlags

2016-02-25 Thread Amit Shah
On (Thu) 25 Feb 2016 [21:45:23], Sascha Silbe wrote: > Dear Amit, > > > Amit Shah writes: > > > >> On (Thu) 21 Jan 2016 [21:39:27], Sascha Silbe wrote: > >>> The VMState API is rather sparsely documented. Start by describing the > >>> meaning of all VMStateFlags. > > > >> Thanks, I've pulled this

[Qemu-devel] [Bug 1546445] Re: support vhost user without specifying vhostforce

2016-02-25 Thread Serge Hallyn
** Changed in: qemu (Ubuntu) Status: New => Fix Released ** Changed in: qemu Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1546445 Title: support

Re: [Qemu-devel] [Qemu-ppc] Migrating decrementer

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 09:50:20AM +, Mark Cave-Ayland wrote: > On 25/02/16 05:00, Mark Cave-Ayland wrote: > > > On 25/02/16 04:33, Mark Cave-Ayland wrote: > > > >> cpu_start/resume(): > >> cpu->tb_env->tb_offset = > >> qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) * tb_env->tb_freq + > >

Re: [Qemu-devel] [RFC PATCH v0 5/6] qmp, spapr: Show hot-plugged/pluggable CPU slots in the Machine

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 09:52:41PM +0530, Bharata B Rao wrote: > Implement query cpu-slots that provides information about hot-plugged > as well as hot-pluggable CPU slots that the machine supports. > > TODO: As Eric suggested use enum for type instead of str. > TODO: @hotplug-granularity probably

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 01:43:05PM +0100, Igor Mammedov wrote: > On Thu, 25 Feb 2016 12:25:43 +1100 > David Gibson wrote: > > > On Wed, Feb 24, 2016 at 03:17:54PM +0100, Igor Mammedov wrote: > > > On Wed, 24 Feb 2016 12:54:17 +1100 > > > David Gibson wrote: > > > > > > > On Tue, Feb 23, 2016

Re: [Qemu-devel] [RFC PATCH v0 3/6] spapr: Represent boot CPUs as spapr-cpu-core devices

2016-02-25 Thread Bharata B Rao
On Fri, Feb 26, 2016 at 02:45:35PM +1100, David Gibson wrote: > On Thu, Feb 25, 2016 at 09:52:39PM +0530, Bharata B Rao wrote: > > Initialize boot CPUs as spapr-cpu-core devices and create links from > > machine object to these core devices. These links can be considered > > as CPU slots in which c

Re: [Qemu-devel] [RFC PATCH v0 3/6] spapr: Represent boot CPUs as spapr-cpu-core devices

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 09:52:39PM +0530, Bharata B Rao wrote: > Initialize boot CPUs as spapr-cpu-core devices and create links from > machine object to these core devices. These links can be considered > as CPU slots in which core devices will get hot-plugged. spapr-cpu-core > device's slot prope

Re: [Qemu-devel] [RFC PATCH v0 4/6] spapr: CPU hotplug support

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 09:52:40PM +0530, Bharata B Rao wrote: > Set up device tree entries for the hotplugged CPU core and use the > exising EPOW event infrastructure to send CPU hotplug notification to > the guest. > > Signed-off-by: Bharata B Rao > --- > hw/ppc/spapr.c | 136 > ++

Re: [Qemu-devel] [RFC PATCH v0 2/6] spapr: CPU core device

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 09:52:38PM +0530, Bharata B Rao wrote: > Add sPAPR specific CPU core device that is based on generic CPU core device. > Creating this core device will result in creation of all the CPU thread > devices that are part of this core. > > Signed-off-by: Bharata B Rao Looks goo

[Qemu-devel] Implementing QKeyCode in cocoa.m

2016-02-25 Thread Programmingkid
A long time ago we talked about removing the pc/xt keyboard layout in the ui/cocoa.m file and replacing it with QKeyCode. I wanted to do this originally because the pc/xt layout does not support several keys found on a Macintosh keyboard (like keypad =). https://lists.gnu.org/archive/html/qemu-

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 1/3] hw/timer: Add ASPEED AST2400 timer device model

2016-02-25 Thread Andrew Jeffery
Hi Peter, On Thu, 2016-02-25 at 16:11 +, Peter Maydell wrote: > On 16 February 2016 at 11:34, Andrew Jeffery wrote: > > Implement basic AST2400 timer functionality: Timers can be configured, > > enabled, reset and disabled. > > > > A number of hardware features are not implemented: > > > >

Re: [Qemu-devel] [PATCH] doc/memory.txt: fix typo

2016-02-25 Thread Cao jin
On 02/25/2016 10:24 PM, Peter Maydell wrote: On 25 February 2016 at 13:30, Cao jin wrote: You're certainly right that the documentation as it stands is wrong. I don't think this is a simple typo though. Probably what happened was that when the API was being designed it started off with an

[Qemu-devel] [PATCH v7 2/3] qmp event: Refactor QUORUM_REPORT_BAD

2016-02-25 Thread Changlong Xie
Introduce QuorumOpType, and make QUORUM_REPORT_BAD compatible with it. Cc: Dr. David Alan Gilbert Cc: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/quorum.c | 17 - docs/qmp-events.txt | 11 ++- qapi/block.json | 16 ++

[Qemu-devel] [PATCH v7 0/3] modify vote rules for flush operation

2016-02-25 Thread Changlong Xie
ChangLog: v7: 1. Fix coding style in doc/qmp-event.txt v6: 1. Make "type" mandatory for [PATCH 2/3] v5: 1. Fix invalid node name in docs/qmp-events.txt 2. Address comments from Eric, drop QUORUM_FLUSH_ERROR. Instead of reworking QUORUM_REPORT_BAD to make it compatible with quorum read/write/flush

[Qemu-devel] [PATCH v7 3/3] quorum: modify vote rules for flush operation

2016-02-25 Thread Changlong Xie
Keep flush interface the same logic as quorum read/write, Otherwise in following scenario, we'll encounter unexpected errors. Quorum has two children(A, B). A do flush sucessfully, but B flush failed. This cause the filesystem of guest become read-only with following errors: end_request: I/O erro

[Qemu-devel] [PATCH v7 1/3] docs: fix invalid node name in qmp event

2016-02-25 Thread Changlong Xie
Cc: Dr. David Alan Gilbert Cc: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Reviewed-by: Alberto Garcia --- docs/qmp-events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt index 4e3eb9e..d6b9aea 100644

Re: [Qemu-devel] [PATCH v6 2/3] qmp event: Refactor QUORUM_REPORT_BAD

2016-02-25 Thread Changlong Xie
On 02/25/2016 06:57 PM, Alberto Garcia wrote: On Thu 25 Feb 2016 06:33:08 AM CET, Changlong Xie wrote: +Read/Write operation: { "event": "QUORUM_REPORT_BAD", - "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5 }, + "data": { "node-name": "node0", "sector-num":

Re: [Qemu-devel] [PATCH 3/3] xics: report errors with the QEMU Error API

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 07:02:25PM +0100, Greg Kurz wrote: > Using the return value to report errors is error prone: > - xics_alloc() returns -1 on error but spapr_vio_busdev_realize() errors > on 0 > - xics_alloc_block() returns the unclear value of ics->offset - 1 on error > but both rtas_ibm

Re: [Qemu-devel] [PATCH 0/3] spapr_pci and xics fixes

2016-02-25 Thread David Gibson
On Thu, Feb 25, 2016 at 07:02:06PM +0100, Greg Kurz wrote: > Hi, > > This series fixes some issues when sPAPR allocates interrupts. Especially > a potential IRQ leak (patch 2) and bogus interrupt numbers stored in the > MSI table because of poor error reporting from the XICS layer (patch 3). > >

[Qemu-devel] [PATCH v2 14/19] qapi: Don't special-case simple union wrappers

2016-02-25 Thread Eric Blake
Simple unions were carrying a special case that hid their 'data' QMP member from the resulting C struct, via the hack method QAPISchemaObjectTypeVariant.simple_union_type(). But using the work we started by unboxing flat union and alternate branches, we expose the simple union's implicit type in q

[Qemu-devel] [PATCH v2 19/19] qapi: Make c_type() more OO-like

2016-02-25 Thread Eric Blake
QAPISchemaType.c_type() was a bit awkward. Rather than having two optional orthogonal boolean flags that should never both be true, and where all callers pass a compile-time constant, provide three different method names that can be overridden as needed, and where the caller just uses the right va

[Qemu-devel] [PATCH v2 12/19] qapi: Fix command with named empty argument type

2016-02-25 Thread Eric Blake
The generator special-cased { 'command':'foo', 'data': {} } to avoid emitting a visitor variable, but failed to see that { 'struct':'NamedEmptyType, 'data': {} } { 'command':'foo', 'data':'NamedEmptyType' } needs the same treatment. There, the generator happily generates a visitor to get no

[Qemu-devel] [PATCH v2 07/19] qapi: Avoid use of 'data' member of qapi unions

2016-02-25 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] [PATCH v2 16/19] qapi: Allow anonymous base for flat union

2016-02-25 Thread Eric Blake
Rather than requiring all flat unions to explicitly create a separate base struct, we can allow the qapi schema to specify the common members via an inline dictionary. This is similar to how commands can specify an inline anonymous type for its 'data', and matches the fact that our code base alread

[Qemu-devel] [PATCH v2 17/19] qapi: Use anonymous base in SchemaInfo

2016-02-25 Thread Eric Blake
Now that the generator supports it, we might as well use an anonymous base rather than breaking out a single-use SchemaInfoBase structure. Oddly enough, this change does not affect the resulting introspection output (because we already inline the members of a base type into an object, and had no i

[Qemu-devel] [PATCH v2 15/19] qapi-visit: Move error check into gen_visit_members_call()

2016-02-25 Thread Eric Blake
When first introduced, neither branch of gen_visit_members_call() would output a goto. But now that the implicit struct visit always ends with a goto, we should do the same for regular struct visits, so that callers don't have to worry about whether they are creating two identical goto's in a row.

[Qemu-devel] [PATCH v2 03/19] qapi: Update docs to match recent generator changes

2016-02-25 Thread Eric Blake
Several commits have been changing the generator, but not updating the docs to match: - The implicit tag member is named "type", not "kind". Screwed up in commit 39a1815. - Commit 9f08c8ec made list types lazy, and thereby dropped UserDefOneList if nothing explicitly uses the list type. - Commit 5

[Qemu-devel] [PATCH v2 01/19] qapi: Rename 'fields' to 'members' in internal interface

2016-02-25 Thread Eric Blake
C types and JSON objects don't have fields, but members. We shouldn't gratuitously invent terminology. This patch is a strict renaming of generator code and static genarated functions, plus the naming of the dummy filler member for empty structs, before the next patch exposes some of that naming

[Qemu-devel] [PATCH v2 18/19] qapi: Use anonymous base in CpuInfo

2016-02-25 Thread Eric Blake
Now that the generator supports it, we might as well use an anonymous base rather than breaking out a single-use CpuInfoBase structure. Signed-off-by: Eric Blake --- v2: no change v1: no change Previously posted as part of qapi cleanup subset F: v6: new patch --- scripts/qapi.py | 2 +- qapi-

[Qemu-devel] [PATCH v2 05/19] util: Shorten references into SocketAddress

2016-02-25 Thread Eric Blake
An upcoming patch will alter how simple unions, like SocketAddress, are laid out, which will impact all lines of the form 'addr->u.XXX'. To minimize the impact of that patch, use C99 initialization or a temporary variable to reduce the number of lines needing modification when an internal reference

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

2016-02-25 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 drop the negative test union-clash-data, and replace it with a positive test in qapi-schema-test that proves that we no longer have a name collision. Signed-off-by: Eric

[Qemu-devel] [PATCH v2 04/19] chardev: Shorten references into ChardevBackend

2016-02-25 Thread Eric Blake
An upcoming patch will alter how simple unions, like ChardevBackend, are laid out, which will impact all lines of the form 'backend->u.XXX'. To minimize the impact of that patch, use a temporary variable to reduce the number of lines needing modification when an internal reference within ChardevBac

[Qemu-devel] [PATCH v2 08/19] chardev: Drop useless ChardevDummy type

2016-02-25 Thread Eric Blake
Commit d0d7708b made ChardevDummy be an empty wrapper type around ChardevCommon. But there is no technical reason for this indirection, so simplify the code by directly using the base type. Also change the fallback assignment to assign u.null rather than u.data, since a future patch will remove t

[Qemu-devel] [PATCH v2 11/19] qapi: Add type.is_empty() helper

2016-02-25 Thread Eric Blake
And use it in qapi-types and qapi-event. Down the road, we may want to lift our artificial restriction of no variants at the top level of an event, at which point, inlining our check for whether members is empty will no longer be sufficient, but adding a check for variants adds verbosity; in the m

[Qemu-devel] [PATCH v2 13/19] qapi-visit: Simplify visit of empty branch in union

2016-02-25 Thread Eric Blake
Now that we have is_empty() and gen_visit_fields_call(), it's fairly easy to skip the visit of a variant type that has no members. Only one such instance exists at the moment (CpuInfoOther), but the idea of a union where some branches add no fields beyond the base type is common enough that we may

[Qemu-devel] [PATCH v2 02/19] qapi-visit: Expose visit_type_FOO_members()

2016-02-25 Thread Eric Blake
Dan Berrange reported a case where he needs to work with a QCryptoBlockOptions union type using the OptsVisitor, but only visit one of the branches of that type (the discriminator is not visited directly, but learned externally). When things were boxed, it was easy: just visit the variant directly

[Qemu-devel] [PATCH v2 06/19] ui: Shorten references into InputEvent

2016-02-25 Thread Eric Blake
An upcoming patch will alter how simple unions, like InputEvent, are laid out, which will impact all lines of the form 'evt->u.XXX'. To minimize the impact of that patch, use a temporary variable to reduce the number of lines needing modification when an internal reference within InputEvent changes

[Qemu-devel] [PATCH v2 10/19] qapi-visit: Factor out gen_visit_members_call()

2016-02-25 Thread Eric Blake
Upcoming patches will be adding several contexts where we want to handle the visit of an implicit type (an anonymous base type, or an anonymous branch of a flat union) by directly inlining the visit of each member of the implicit type. The work is made easier by factoring out a new helper, gen_visi

[Qemu-devel] [PATCH v2 00/19] easier unboxed visits/qapi implicit types

2016-02-25 Thread Eric Blake
Merge of two previous series: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg05492.html https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04703.html Depends on Markus' qapi-next branch. Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-impli

Re: [Qemu-devel] [PULL 4/8] spice: reset cursor on resize

2016-02-25 Thread Paolo Bonzini
On 26/02/2016 00:23, Marc-André Lureau wrote: > Hi > > On Fri, Feb 26, 2016 at 12:10 AM, Paolo Bonzini wrote: >> >> >> On 23/02/2016 15:24, Gerd Hoffmann wrote: >>> qemu_mutex_lock(&ssd->lock); >>> +if (c) { >>> +cursor_get(c); >>> +} >>> +cursor_put(ssd->cursor); >>> +

Re: [Qemu-devel] [PULL 4/8] spice: reset cursor on resize

2016-02-25 Thread Marc-André Lureau
Hi On Fri, Feb 26, 2016 at 12:10 AM, Paolo Bonzini wrote: > > > On 23/02/2016 15:24, Gerd Hoffmann wrote: >> qemu_mutex_lock(&ssd->lock); >> +if (c) { >> +cursor_get(c); >> +} >> +cursor_put(ssd->cursor); >> +ssd->cursor = c; >> ssd->hot_x = c->hot_x; >> ssd

Re: [Qemu-devel] [PULL 4/8] spice: reset cursor on resize

2016-02-25 Thread Paolo Bonzini
On 23/02/2016 15:24, Gerd Hoffmann wrote: > qemu_mutex_lock(&ssd->lock); > +if (c) { > +cursor_get(c); > +} > +cursor_put(ssd->cursor); > +ssd->cursor = c; > ssd->hot_x = c->hot_x; > ssd->hot_y = c->hot_y; Coverity complains that this would dereference a NU

[Qemu-devel] [PATCH] net: simplify net_init_tap_one logic

2016-02-25 Thread Paolo Bonzini
net_init_tap_one receives in vhostfdname a fd name from vhostfd= or vhostfds=, or NULL if there is no vhostfd=/vhostfds=. It is simpler to just check vhostfdname, than it is to check for vhostfd= or vhostfds=. This also calms down Coverity, which otherwise thinks that monitor_fd_param could deref

Re: [Qemu-devel] [Qemu-ppc] [PATCH] dbdma: warn when using unassigned channel

2016-02-25 Thread Mark Cave-Ayland
On 25/02/16 12:02, Hervé Poussineau wrote: > With this, it's easier to know if a guest uses an invalid and/or unimplemented > DMA channel. > > Signed-off-by: Hervé Poussineau > --- > hw/misc/macio/mac_dbdma.c | 25 +++-- > 1 file changed, 23 insertions(+), 2 deletions(-) >

[Qemu-devel] [PATCH] qemu-img: eliminate memory leak

2016-02-25 Thread Paolo Bonzini
Not particularly important since qemu-img exits immediately after calling img_rebase, but easily fixed. Coverity says thanks. Signed-off-by: Paolo Bonzini --- qemu-img.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 2edb139..3103150 1

[Qemu-devel] [PATCH v4 1/2] sdhci: Revert "add optional quirk property to disable card insertion/removal interrupts"

2016-02-25 Thread Andrew Baumann
This reverts commit 723697551a7e926abe7d3c7f2966012b8075143d. This change was poorly tested on my part. It squelched card insertion interrupts on reset, but that was not necessary because sdhci_reset() clears all the registers (via the call to memset), so the subsequent sdhci_insert_eject_cb() cal

[Qemu-devel] [PATCH v4 0/2] sdhci: pending insert quirk for raspberry pi

2016-02-25 Thread Andrew Baumann
This is a small series to correctly implement a quirk modelling the behaviour of the card insert interrupt bit on Raspberry Pi, and on which Windows' UEFI loader sadly depends. This should be the last change required to support Windows on Pi2, outside of adding devices and enabling the quirk, whic

[Qemu-devel] [PATCH v4 2/2] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2016-02-25 Thread Andrew Baumann
This quirk is a workaround for the following hardware behaviour, on which UEFI (specifically, the bootloader for Windows on Pi2) depends: 1. at boot with an SD card present, the interrupt status/enable registers are initially zero 2. upon enabling it in the interrupt enable register, the card i

Re: [Qemu-devel] [PULL 0/9] qemu-ga patch queue for 2.6

2016-02-25 Thread Michael Roth
Quoting Peter Maydell (2016-02-25 12:18:17) > On 25 February 2016 at 17:11, Michael Roth wrote: > > The following changes since commit 774ae4254d3910f1c94ad6ed44d14cbea0e6a2f2: > > > > Merge remote-tracking branch > > 'remotes/bkoppelmann/tags/pull-tricore-20

Re: [Qemu-devel] [PATCH v2 4/4] i.MX: Add SPI NOR FLASH memory to sabrelite board.

2016-02-25 Thread Peter Maydell
On 25 February 2016 at 20:37, Jean-Christophe DUBOIS wrote: > Le 25/02/2016 15:33, Peter Maydell a écrit : >> >> On 15 February 2016 at 11:18, Jean-Christophe Dubois >> wrote: >>> >>> Signed-off-by: Jean-Christophe Dubois >>> --- >>> >>> Changes since v1: >>> * Not present on v1. >>> >>> hw/

[Qemu-devel] [PATCH v4 3/3] iotests/124: Add cluster_size mismatch test

2016-02-25 Thread John Snow
If a backing file isn't specified in the target image and the cluster_size is larger than the bitmap granularity, we run the risk of creating bitmaps with allocated clusters but empty/no data which will prevent the proper reading of the backup in the future. Signed-off-by: John Snow Reviewed-by:

[Qemu-devel] [PATCH v4 2/3] block/backup: avoid copying less than full target clusters

2016-02-25 Thread John Snow
During incremental backups, if the target has a cluster size that is larger than the backup cluster size and we are backing up to a target that cannot (for whichever reason) pull clusters up from a backing image, we may inadvertantly create unusable incremental backup images. For example: If the

[Qemu-devel] [PATCH v4 1/3] block/backup: make backup cluster size configurable

2016-02-25 Thread John Snow
64K might not always be appropriate, make this a runtime value. Signed-off-by: John Snow Reviewed-by: Fam Zheng --- block/backup.c | 64 +- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/block/backup.c b/block/backup.c ind

[Qemu-devel] [PATCH v4 0/3] blockjob: correct backup cluster size for backups

2016-02-25 Thread John Snow
Backups sometimes need a non-64KiB transfer cluster size. See patch #2 for the detailed justificaton. === v4: === 02: Polished the error message. === v3: === 01: +R-B 02: Added failure mode for bdrv_get_info, including critical failure for when we don't have a backing file but couldn't retr

Re: [Qemu-devel] [PATCH qemu] migration/vmstate: document VMStateFlags

2016-02-25 Thread Sascha Silbe
Dear Amit, > Amit Shah writes: > >> On (Thu) 21 Jan 2016 [21:39:27], Sascha Silbe wrote: >>> The VMState API is rather sparsely documented. Start by describing the >>> meaning of all VMStateFlags. > >> Thanks, I've pulled this in my queue. >> >> There's one new flag added: VMS_MULTIPLY_ELEMENTS.

Re: [Qemu-devel] [PATCH v2 4/4] i.MX: Add SPI NOR FLASH memory to sabrelite board.

2016-02-25 Thread Jean-Christophe DUBOIS
Le 25/02/2016 15:33, Peter Maydell a écrit : On 15 February 2016 at 11:18, Jean-Christophe Dubois wrote: Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * Not present on v1. hw/arm/sabrelite.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/arm/sabrelite.c b/

Re: [Qemu-devel] [PATCH qemu] migration/vmstate: document VMStateFlags

2016-02-25 Thread Sascha Silbe
Dear Amit, Amit Shah writes: > On (Thu) 21 Jan 2016 [21:39:27], Sascha Silbe wrote: >> The VMState API is rather sparsely documented. Start by describing the >> meaning of all VMStateFlags. > Thanks, I've pulled this in my queue. > > There's one new flag added: VMS_MULTIPLY_ELEMENTS. Do you wa

Re: [Qemu-devel] drive-backup

2016-02-25 Thread John Snow
On 02/25/2016 02:49 AM, Stefan Priebe - Profihost AG wrote: > > Am 22.02.2016 um 23:08 schrieb John Snow: >> >> >> On 02/22/2016 03:21 PM, Stefan Priebe wrote: >>> Hello, >>> >>> is there any chance or hack to work with a bigger cluster size for the >>> drive backup job? >>> >>> See: >>> http://

Re: [Qemu-devel] [PATCH COLO-Frame v15 00/38] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-02-25 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > From: root > > This is the 15th version of COLO (Still only support periodic checkpoint). > > Here is only COLO frame part, you can get the whole codes from github: > https://github.com/coloft/qemu/commits/colo-v2.6-periodic-mode > > The

Re: [Qemu-devel] how Windows treats BARs of driver-less devices when other devices are hotplugged

2016-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2016 at 06:37:56PM +0100, Laszlo Ersek wrote: > On 02/25/16 15:18, Michael S. Tsirkin wrote: > > On Thu, Feb 25, 2016 at 03:05:08PM +0100, Laszlo Ersek wrote: > >> On 02/25/16 14:30, Michael S. Tsirkin wrote: > > >>> virtio? > >> > >> ... was my first thought as well, but OVMF at t

Re: [Qemu-devel] [PATCH v3 2/2] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2016-02-25 Thread Peter Maydell
On 25 February 2016 at 19:00, Andrew Baumann wrote: > Hmm. This thought had occurred to me, but I could not find any > system reset logic in sdhci.c -- sdhci_reset() is only referenced > by the code path for a guest-initiated write to the reset register. > There is no system reset handler logic an

Re: [Qemu-devel] [PATCH v3 2/2] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2016-02-25 Thread Andrew Baumann
Hi Peter, > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Thursday, 25 February 2016 10:51 AM > > On 24 February 2016 at 22:47, Andrew Baumann > wrote: > > This quirk is a workaround for the following hardware behaviour, on > > which UEFI (specifically, the bootloader for Windows

[Qemu-devel] cpu_memory_rw_debug doesn't work on MIPS?

2016-02-25 Thread Igor R
If I understand correctly, the most advanced MMU that QEMU emulates for MIPS is "R4000-style" MMU - i.e. a "software-managed" TLB, where on TLB miss QEMU just emulates exception that should be handled by the guest OS. So, QEMU doesn't walk through the page directory, like it does when emulating e.g

Re: [Qemu-devel] [PATCH v3 2/2] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2016-02-25 Thread Peter Maydell
On 24 February 2016 at 22:47, Andrew Baumann wrote: > This quirk is a workaround for the following hardware behaviour, on > which UEFI (specifically, the bootloader for Windows on Pi2) depends: > > 1. at boot with an SD card present, the interrupt status/enable >registers are initially zero >

Re: [Qemu-devel] [PATCH v2 8/8] target-arm: Use isyn.swstep.ex to hold the is_ldex state

2016-02-25 Thread Peter Maydell
On 19 February 2016 at 20:04, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Switch to using isyn.swstep.ex to hold the is_ldex state for > SWStep syndrome generation. > > No functional change. > > Signed-off-by: Edgar E. Iglesias What's the rationale for renaming the field? If this i

Re: [Qemu-devel] [PATCH v2 7/8] target-arm: A64: Create Instruction Syndromes for Data Aborts

2016-02-25 Thread Peter Maydell
On 19 February 2016 at 20:04, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for generating the instruction syndrome for Data Aborts. > These syndromes are used by hypervisors for example to trap and emulate > memory accesses. > > We save the decoded data out-of-band with th

Re: [Qemu-devel] [PULL 0/9] qemu-ga patch queue for 2.6

2016-02-25 Thread Peter Maydell
On 25 February 2016 at 17:11, Michael Roth wrote: > The following changes since commit 774ae4254d3910f1c94ad6ed44d14cbea0e6a2f2: > > Merge remote-tracking branch > 'remotes/bkoppelmann/tags/pull-tricore-20160225' into staging (2016-02-25 > 12:57:22 +) >

[Qemu-devel] [PATCH 3/3] xics: report errors with the QEMU Error API

2016-02-25 Thread Greg Kurz
Using the return value to report errors is error prone: - xics_alloc() returns -1 on error but spapr_vio_busdev_realize() errors on 0 - xics_alloc_block() returns the unclear value of ics->offset - 1 on error but both rtas_ibm_change_msi() and spapr_phb_realize() error on 0 This patch turns xi

[Qemu-devel] [PATCH 0/3] spapr_pci and xics fixes

2016-02-25 Thread Greg Kurz
Hi, This series fixes some issues when sPAPR allocates interrupts. Especially a potential IRQ leak (patch 2) and bogus interrupt numbers stored in the MSI table because of poor error reporting from the XICS layer (patch 3). Please review. I'd like to have this fixes in 2.6. --- Greg Kurz (3):

[Qemu-devel] [PATCH 2/3] spapr_pci: fix irq leak in RTAS ibm, change-msi

2016-02-25 Thread Greg Kurz
This RTAS call is used to request new interrupts or to free all interrupts. If the driver has already allocated interrupts and asks again for a non-null number of irqs, then the rtas_ibm_change_msi() function will silently leak the previous interrupts. It happens because xics_free() is only calle

[Qemu-devel] [PATCH 1/3] spapr_pci: kill useless variable in rtas_ibm_change_msi()

2016-02-25 Thread Greg Kurz
The num local variable is initialized to zero and has no writer. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index cca9257fecc5..19dd6dbeb943 100644 --- a/hw/ppc/spapr_pci.c +

Re: [Qemu-devel] [Qemu-arm] [PATCH] virt: Lift the maximum RAM limit from 30GB to 255GB

2016-02-25 Thread Wei Huang
On 02/25/2016 06:09 AM, Peter Maydell wrote: > The virt board restricts guests to only 30GB of RAM. This is a > hangover from the vexpress-a15 board, and there's inherent reason > for it. 30GB is smaller than you might reasonably want to provision > a VM for on a beefy server machine. Raise the l

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-25 Thread Eduardo Habkost
On Wed, Feb 24, 2016 at 03:42:18PM +0100, Igor Mammedov wrote: > On Tue, 23 Feb 2016 18:26:20 -0300 > Eduardo Habkost wrote: > > > On Tue, Feb 23, 2016 at 10:46:45AM +0100, Igor Mammedov wrote: > > > On Mon, 22 Feb 2016 13:54:32 +1100 > > > David Gibson wrote: > > [...] > > > > This is why Edu

Re: [Qemu-devel] [PATCH v2 4/8] target-arm: Add more fields to the data abort syndrome generator

2016-02-25 Thread Peter Maydell
On 19 February 2016 at 20:04, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add the following flags to the data abort syndrome generator: > * isv - Instruction syndrome valid > * sas - Syndrome access size > * sse - Syndrome sign extend > * srt - Syndrome register transfer > * sf - Si

Re: [Qemu-devel] how Windows treats BARs of driver-less devices when other devices are hotplugged

2016-02-25 Thread Laszlo Ersek
On 02/25/16 15:18, Michael S. Tsirkin wrote: > On Thu, Feb 25, 2016 at 03:05:08PM +0100, Laszlo Ersek wrote: >> On 02/25/16 14:30, Michael S. Tsirkin wrote: >>> virtio? >> >> ... was my first thought as well, but OVMF at the moment supports only >> legacy (0.9.5) virtio-pci devices > > Oh. We'll

[Qemu-devel] [PATCH v3 4/4] block/vpc: add tests for image creation force_size parameter

2016-02-25 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/146 | 51 ++ tests/qemu-iotests/146.out | 32 + 2 files changed, 83 insertions(+) diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146 index 4cbe1f4..043711b 100755

[Qemu-devel] [PATCH v3 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-25 Thread Jeff Cody
This tests auto-detection, and overrides, of VHD image sizes created by Virtual PC, Hyper-V, and Disk2vhd. This adds three sample images: hyperv2012r2-dynamic.vhd.bz2 - dynamic VHD image created with Hyper-V virtualpc-dynamic.vhd.bz2- dynamic VHD image created with Virtual PC d2v-zerofilled.v

[Qemu-devel] [PATCH v3 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-25 Thread Jeff Cody
When QEMU creates a VHD image, it goes by the original spec, calculating the current_size based on the nearest CHS geometry (with an exception for disks > 127GB). Apparently, Azure will only allow images that are sized to the nearest MB, and the current_size as calculated from CHS cannot guarantee

  1   2   3   4   >