[Qemu-devel] scripts/gdb: Fix a python exception in mtree.py

2015-12-01 Thread Yang Wei
The following exception is threw: Python Exception name 'long' is not defined: Error occurred in Python command: name 'long' is not defined In python3, long is rename to int Signed-off-by: Yang Wei --- scripts/qemugdb/mtree.py | 17 - 1 file changed, 12 insertions(+), 5 deletio

Re: [Qemu-devel] Highlighting changes in QEMU 2.5

2015-12-01 Thread Stefan Hajnoczi
On Tue, Dec 01, 2015 at 11:45:15AM -0500, John Snow wrote: > On 12/01/2015 07:16 AM, Amit Shah wrote: > > Ping. > > > > I haven't received any responses so far, please let me know if you're > > planning on doing this. > > > > Thanks, > > > > I did amend the changelog on the wiki for my part, bu

[Qemu-devel] [PATCH v9 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-12-01 Thread Xiao Guangrong
NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device under \_SB and specified NVDIMM devices are under the root device. Each NVDIMM device has _ADR which returns its handle used to associate MEMDEV structure in NFIT Currently, we do not support any function on _DSM, th

[Qemu-devel] [PATCH v9 5/5] nvdimm: add maintain info

2015-12-01 Thread Xiao Guangrong
Add NVDIMM maintainer Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bb1f3e4..7e82340 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -940,6 +940,13 @@ M: Jiri Pirko S: Maintai

[Qemu-devel] [PATCH v9 0/5] implement vNVDIMM

2015-12-01 Thread Xiao Guangrong
This patchset can be found at: https://github.com/xiaogr/qemu.git nvdimm-v9 It is based on pci branch on Michael's tree and the top commit is: commit 0c73277af7 (vhost-user-test: fix crash with glib < 2.36). Changelog in v9: - the changes address Michael's comments: 1) move the control pa

[Qemu-devel] [PATCH v9 3/5] nvdimm acpi: build ACPI NFIT table

2015-12-01 Thread Xiao Guangrong
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM region info - MEM DEV structure, it has the @handle which is used to associate specified ACPI NVDIMM device we will i

[Qemu-devel] [PATCH v9 1/5] nvdimm: implement NVDIMM device abstract

2015-12-01 Thread Xiao Guangrong
Introduce "nvdimm" device which is based on pc-dimm device type Currently, nothing is specific for nvdimm but hotplug is disabled Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- default-configs/i386-softmmu.mak | 1 + default-configs/x86_64-softmmu.mak | 1 + hw/acpi/memory_

[Qemu-devel] [PATCH v9 2/5] acpi: support specified oem table id for build_header

2015-12-01 Thread Xiao Guangrong
Let build_header() support specified OEM table id so that we can build multiple SSDT later If the oem table id is not specified (aka, NULL), we use the default id instead as the previous behavior Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 15 ++

Re: [Qemu-devel] [PATCH] vhost-user: verify that number of queues is non-zero

2015-12-01 Thread Jason Wang
On 12/01/2015 09:32 PM, Victor Kaplansky wrote: > Fix QEMU crash when -netdev type=vhost-user,queues=n is passed > with zero number of queues. > > Signed-off-by: Victor Kaplansky > --- > net/vhost-user.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/net/vhost-user.c b/net/vhost-

Re: [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
On 12/02/2015 09:00 AM, Wen Congyang wrote: > On 12/01/2015 06:40 PM, Dr. David Alan Gilbert wrote: >> * Wen Congyang (we...@cn.fujitsu.com) wrote: >>> Block replication is a very important feature which is used for >>> continuous checkpoints(for example: COLO). >>> >>> You can get the detailed inf

Re: [Qemu-devel] [PATCH v4 06/11] dump-guest-memory: disable dump when in INMIGRATE state

2015-12-01 Thread Peter Xu
On Wed, Dec 02, 2015 at 08:50:48AM +0800, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: > > /* if there is a dump in background, we should wait until the dump > > * finished */ > > if (dump_in_progress()) { > > error_setg(errp, "There is a dump in process, please

Re: [Qemu-devel] [PATCH RFC] allow to delete sheepdog snapshot

2015-12-01 Thread Vasiliy Tolstov
2015-12-02 8:23 GMT+03:00 Hitoshi Mitake : > Seems that your patch violates the coding style of qemu. You can check the > style with scripts/checkpatch.pl. > > > Comment outed code isn't good. You should remove it (in addition, it > wouldn't be required). Thanks! -- Vasiliy Tolstov, e-mail: v.t

Re: [Qemu-devel] [2.5 issue] virtio-1 in virtio-net and old vhost

2015-12-01 Thread Jason Wang
On 12/01/2015 10:21 PM, Cornelia Huck wrote: > On Tue, 1 Dec 2015 13:10:40 +0100 > Cornelia Huck wrote: > >> On Tue, 1 Dec 2015 11:11:08 +0100 >> Cornelia Huck wrote: >> >>> Some of our test folks tried to run a recent-ish qemu (nearly 2.5) >>> combined with an old host kernel (and a virtio-1 c

Re: [Qemu-devel] [PATCH v5 07/10] spapr: Enable CPU hotplug for pseries-2.5 and add CPU DRC DT entries

2015-12-01 Thread Bharata B Rao
On Tue, Dec 01, 2015 at 12:06:43PM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:36PM +0530, Bharata B Rao wrote: > > Start supporting CPU hotplug from pseries-2.5 onwards. Add CPU > > DRC (Dynamic Resource Connector) device tree entries. > > > > Signed-off-by: Bharata B Rao > > ---

Re: [Qemu-devel] [PATCH v5 09/10] spapr: CPU hot unplug support

2015-12-01 Thread Bharata B Rao
On Tue, Dec 01, 2015 at 12:34:06PM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:38PM +0530, Bharata B Rao wrote: > > Support hot removal of CPU for sPAPR guests by sending the hot unplug > > notification to the guest via EPOW interrupt. Release the vCPU object > > after CPU hot unplug

Re: [Qemu-devel] [PATCH v5 06/10] xics_kvm: Add cpu_destroy method to XICS

2015-12-01 Thread Bharata B Rao
On Tue, Dec 01, 2015 at 12:01:36PM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:35PM +0530, Bharata B Rao wrote: > > XICS is setup for each CPU during initialization. Provide a routine > > to undo the same when CPU is unplugged. > > > > This allows reboot of a VM that has undergone C

[Qemu-devel] [Patch v12 resend 10/10] Add a new API to start/stop replication, do checkpoint to all BDSes

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 83 +++ include/block/block.h | 4 +++ 2 files changed, 87 insertions(+) diff --git a/block.c b/block.c index 213bee8..09ee7f1 100644 ---

[Qemu-devel] [Patch v12 resend 09/10] support replication driver in blockdev-add

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Eric Blake --- qapi/block-core.json | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 2c6bd3f..acc9f8d 100644

[Qemu-devel] [Patch v12 resend 08/10] Implement new driver for block replication

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/Makefile.objs | 1 + block/replication.c | 549 2 files changed, 550 insertions(+) create mode 100644 block/replication.c diff --git a/block/Makefil

[Qemu-devel] [Patch v12 resend 06/10] Add new block driver interfaces to control block replication

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino Cc: Michael Roth Reviewed-by: Paolo Bonzini --- block.c | 43 +++ include/block/block.h | 5 + include/block/block_int.h | 14

[Qemu-devel] [Patch v12 resend 05/10] docs: block replication's description

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- docs/block-replication.txt | 227 + 1 file changed, 227 insertions(+) create mode 100644 docs/block-replication.txt diff --git a/docs/block-replication.txt b/docs/bl

[Qemu-devel] [Patch v12 resend 07/10] quorum: implement block driver interfaces for block replication

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Alberto Garcia --- block/quorum.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index b7df14b..6fa54f3

[Qemu-devel] [Patch v12 resend 04/10] Allow creating backup jobs when opening BDS

2015-12-01 Thread Wen Congyang
When opening BDS, we need to create backup jobs for image-fleecing. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-devel] [Patch v12 resend 02/10] Store parent BDS in BdrvChild

2015-12-01 Thread Wen Congyang
We need to access the parent BDS to get the root BDS. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 1 + include/block/block_int.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block.c b/block.c index eaf479a..0a0468f 10

[Qemu-devel] [Patch v12 resend 03/10] Backup: clear all bitmap when doing block checkpoint

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Jeff Cody --- block/backup.c | 14 ++ blockjob.c | 11 +++ include/block/blockjob.h | 12 3 files changed, 37 insertions(+) diff --git a/block/

[Qemu-devel] [Patch v12 resend 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt This patch series is

[Qemu-devel] [Patch v12 resend 01/10] unblock backup operations in backing file

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block.c b/block.c index bfc2be8..eaf479a 100644 --- a/block.c +++ b/block.c @@ -1275,6 +1275,24 @@ void bdrv_set_backing_hd(BlockDr

Re: [Qemu-devel] [PATCH v5 04/10] cpu: Reclaim vCPU objects

2015-12-01 Thread Bharata B Rao
On Tue, Dec 01, 2015 at 11:55:58AM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:33PM +0530, Bharata B Rao wrote: > > From: Gu Zheng > > > > In order to deal well with the kvm vcpus (which can not be removed without > > any > > protection), we do not close KVM vcpu fd, just record a

Re: [Qemu-devel] [Qemu-ppc] [PATCH 41/77] ppc/pnv: Add LPC controller and hook it up with a UART and RTC

2015-12-01 Thread Benjamin Herrenschmidt
On Wed, 2015-12-02 at 13:24 +1100, Alexey Kardashevskiy wrote: > > But on the whole I agree with you, since the LPC is part of the P8 > > chip, I think it makes sense to include it even with -nodefaults. > > POWER8 chips all have 8 threads per core but we do not always assume -smtĀ  > ...,threads=8

[Qemu-devel] [PATCH v14 15/15] qapi: Detect base class loops

2015-12-01 Thread Eric Blake
It should be fairly obvious that qapi base classes need to form an acyclic graph, since QMP cannot specify the same key more than once, while base classes are included as flat members alongside other members added by the child. But the old check_member_clash() parser function was not prepared to c

[Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-01 Thread Eric Blake
We document that members of enums and objects should be 'lower-case', although we were not enforcing it. We have to whitelist a few pre-existing entities that violate the norms. Add three new tests to expose the new error message, each of which first uses the whitelisted name 'UuidInfo' to prove t

[Qemu-devel] [PATCH v14 00/15] qapi member collision (post-introspection cleanups, subset D)

2015-12-01 Thread Eric Blake
Pending prerequisites: + Markus' "typedefs: Put them back into alphabetical order" https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04417.html which is now queued in qemu-trivial: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg06297.html + Markus' qapi-next branch http://repo.or.c

Re: [Qemu-devel] [PATCH RFC] allow to delete sheepdog snapshot

2015-12-01 Thread Hitoshi Mitake
On Wed, Dec 2, 2015 at 1:12 AM, Vasiliy Tolstov wrote: > Signed-off-by: Vasiliy Tolstov > --- > block/sheepdog.c | 59 > ++-- > 1 file changed, 57 insertions(+), 2 deletions(-) > Seems that your patch violates the coding style of qemu. You ca

[Qemu-devel] [PATCH v14 07/15] qapi: Fix alternates that accept 'number' but not 'int'

2015-12-01 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' and some other type, but not 'int', would reject integral values. With this patch, we now

[Qemu-devel] [PATCH v14 14/15] qapi: Move duplicate collision checks to schema check()

2015-12-01 Thread Eric Blake
With the recent commit 'qapi: Detect collisions in C member names', we have two different locations for detecting clashes - one at parse time, and another at QAPISchema*.check() time. Remove all of the ad hoc parser checks, and delete associated code (for example, the global check_member_clash() me

[Qemu-devel] [PATCH v14 11/15] qapi: Track enum values by QAPISchemaMember, not string

2015-12-01 Thread Eric Blake
Rather than using just an array of strings, make enum.values be an array of the new QAPISchemaMember type, and add a helper member_names() method to get back at the original list of names. Likewise, creating an enum requires wrapping strings, via a new QAPISchema._make_enum_members() method. The b

[Qemu-devel] [PATCH v14 04/15] qapi: Simplify visiting of alternate types

2015-12-01 Thread Eric Blake
Previously, working with alternates required two lookup arrays and some indirection: for type Foo, we created Foo_qtypes[] which maps each qtype to a value of the generated FooKind enum, then look up that value in FooKind_lookup[] like we do for other union types. This has a couple of subtle bugs.

[Qemu-devel] [PATCH v14 01/15] qobject: Simplify QObject

2015-12-01 Thread Eric Blake
The QObject hierarchy is small enough, and unlikely to grow further (since we only use it to map to JSON and already cover all JSON types), that we can simplify things by not tracking a separate vtable, but just inline the code element of the vtable QType directly into QObject (renamed to type), an

[Qemu-devel] [PATCH v14 10/15] qapi: Prepare new QAPISchemaMember base class

2015-12-01 Thread Eric Blake
We want to share some clash detection code between enum values and object type members. To assist with that, split off part of QAPISchemaObjectTypeMember into a new base class QAPISchemaMember that tracks name, owner, and common clash detection code; while the former keeps the additional fields fo

[Qemu-devel] [PATCH v14 12/15] qapi: Populate info['name'] for each entity

2015-12-01 Thread Eric Blake
Every non-implicit entity is associated with an 'info' dictionary, but it is not easy to reverse-engineer the name of the top-most entity associated with that 'info'. For example, inside QAPISchemaMember.check_clash(), the value of self.owner may be the implicit ':obj-block_passwd-arg', while we w

[Qemu-devel] [PATCH v14 08/15] qapi: Simplify visits of optional fields

2015-12-01 Thread Eric Blake
None of the visitor callbacks would set an error when testing if an optional field was present; make this part of the interface contract by eliminating the errp argument. The resulting generated code has a nice diff: |-visit_optional(v, &has_fdset_id, "fdset-id", &err); |-if (err) { |-

[Qemu-devel] [PATCH v14 05/15] qapi-types: Drop unnedeed ._fwdefn

2015-12-01 Thread Eric Blake
Previously, the generated code in qapi-types.c initialized all enum lookup tables first, prior to any other definitions. But there are no topological sorting requirements that mandate this layout, so we can drop the QAPISchemaGenTypeVisitor._fwdefn field and just generate all definitions in visita

[Qemu-devel] [PATCH v14 03/15] qapi: Convert QType into QAPI built-in enum type

2015-12-01 Thread Eric Blake
What's more meta than using qapi to define qapi? :) Convert QType into a full-fledged[*] builtin qapi enum type, so that a subsequent patch can then use it as the discriminator type of qapi alternate types. Fortunately, the judicious use of 'prefix' in the qapi definition avoids churn to the spel

[Qemu-devel] [PATCH v14 09/15] qapi: Shorter visits of optional fields

2015-12-01 Thread Eric Blake
For less code, reflect the determined boolean value of an optional visit back to the caller instead of making the caller read the boolean after the fact. The resulting generated code has the following diff: |-visit_optional(v, &has_fdset_id, "fdset-id"); |-if (has_fdset_id) { |+if (vi

[Qemu-devel] [PATCH v14 06/15] qapi: Inline _make_implicit_tag()

2015-12-01 Thread Eric Blake
Now that alternates no longer use an implicit tag, we can inline _make_implicit_tag() into its one caller, _def_union_type(). No change to generated code. Suggested-by: Markus Armbruster Signed-off-by: Eric Blake --- v14: no change v13: commit message touchup v12: new patch --- scripts/qapi.p

[Qemu-devel] [PATCH v14 02/15] qobject: Rename qtype_code to QType

2015-12-01 Thread Eric Blake
The name QType matches our CODING_STYLE conventions for type names in CamelCase. It also matches the fact that we are already naming all the enum members with a prefix of QTYPE, not QTYPE_CODE. And doing the rename will also make it easier for the next patch to use QAPI for providing the enum, wh

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-12-01 Thread Ming Lin
On Tue, 2015-12-01 at 11:59 -0500, Paolo Bonzini wrote: > > What do you think about virtio-nvme+vhost-nvme? > > What would be the advantage over virtio-blk? Multiqueue is not supported > by QEMU but it's already supported by Linux (commit 6a27b656fc). I expect performance would be better. Seems

Re: [Qemu-devel] [PATCH for 2.5 1/1] e1000: fix hang of win2k12 shutdown with flood ping

2015-12-01 Thread Jason Wang
On 12/01/2015 05:38 PM, Denis V. Lunev wrote: > On 12/01/2015 06:31 AM, Jason Wang wrote: >> >> On 11/30/2015 02:22 PM, Denis V. Lunev wrote: >>> On 11/30/2015 08:58 AM, Jason Wang wrote: On 11/27/2015 07:42 PM, Denis V. Lunev wrote: > On 11/27/2015 09:50 AM, Denis V. Lunev wrote: >>

Re: [Qemu-devel] [PATCH v5 04/10] cpu: Reclaim vCPU objects

2015-12-01 Thread Bharata B Rao
On Mon, Nov 30, 2015 at 06:30:52PM +1100, Alexey Kardashevskiy wrote: > On 11/20/2015 11:54 PM, Bharata B Rao wrote: > >From: Gu Zheng > > > >In order to deal well with the kvm vcpus (which can not be removed without > >any > >protection), we do not close KVM vcpu fd, just record and mark it as s

Re: [Qemu-devel] [PATCH v5 02/10] exec: Remove cpu from cpus list during cpu_exec_exit()

2015-12-01 Thread Bharata B Rao
On Tue, Dec 01, 2015 at 11:44:03AM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:31PM +0530, Bharata B Rao wrote: > > CPUState *cpu gets added to the cpus list during cpu_exec_init(). It > > should be removed from cpu_exec_exit(). > > > > cpu_exec_init() is called from generic CPU::in

Re: [Qemu-devel] [PATCH v5 01/10] vl: Don't allow CPU toplogies with partially filled cores

2015-12-01 Thread Bharata B Rao
On Tue, Dec 01, 2015 at 11:37:03AM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:30PM +0530, Bharata B Rao wrote: > > Prevent guests from booting with CPU topologies that have partially > > filled CPU cores or can result in partially filled CPU cores after > > CPU hotplug like > > > >

Re: [Qemu-devel] [PATCH v4 03/11] dump-guest-memory: using static DumpState, add DumpStatus

2015-12-01 Thread Peter Xu
On Wed, Dec 02, 2015 at 08:46:49AM +0800, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: > > +if (*errp) { > > +s->status = DUMP_STATUS_FAILED; > > +} else { > > +s->status = DUMP_STATUS_COMPLETED; > > +} > > + > > To detect error, it's better to use local_err

Re: [Qemu-devel] [PATCH v4 01/11] dump-guest-memory: cleanup: removing dump_{error|cleanup}().

2015-12-01 Thread Peter Xu
On Wed, Dec 02, 2015 at 08:37:36AM +0800, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: > > It might be a little bit confusing to do dump_cleanup() in these two > > functions and error prone. A better way is to do dump_cleanup() > > I would say "It might be a little bit confusing and err

Re: [Qemu-devel] [PATCH v3 2/2] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-12-01 Thread David Gibson
On Tue, Dec 01, 2015 at 11:49:31AM -0800, Sukadev Bhattiprolu wrote: > David Gibson [da...@gibson.dropbear.id.au] wrote: > | > @@ -240,6 +241,36 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU > *cpu, > | > target_ulong ret = RTAS_OUT_SUCCESS; > | > > | > switch (parameter) { >

[Qemu-devel] [PATCH] tests/vhost-user-test: Fix potential use-after-free

2015-12-01 Thread David Gibson
ae31fb5 "vhost-user-test: wrap server in TestServer struct" cleaned up the handling of the test server in vhost-user-test. Unfortunately it introduced a subtle use-after-free if a race goes the wrong way. When the server structure is freed inside test_server_free() the GThread started earlier is

Re: [Qemu-devel] [PATCH v3 02/12] dump-guest-memory: add "detach" flag for QMP/HMP interfaces.

2015-12-01 Thread Peter Xu
On Tue, Dec 01, 2015 at 04:09:48PM +0100, Paolo Bonzini wrote: > > > On 01/12/2015 03:18, Peter Xu wrote: > > I think (2) is better in term of lines of codes (and also > > clear). However I may need to keep the QMP interface (to keep the > > has_detach parameter in qmp_dump_guest_memory), so I'd

Re: [Qemu-devel] [Qemu-ppc] [PATCH 41/77] ppc/pnv: Add LPC controller and hook it up with a UART and RTC

2015-12-01 Thread Alexey Kardashevskiy
On 12/01/2015 05:43 PM, David Gibson wrote: On Tue, Nov 17, 2015 at 11:40:04AM +1100, Benjamin Herrenschmidt wrote: On Tue, 2015-11-17 at 11:32 +1100, Alexey Kardashevskiy wrote: On 11/11/2015 11:27 AM, Benjamin Herrenschmidt wrote: This adds a model of the POWER8 LPC controller. It is then us

[Qemu-devel] [PATCH 13/16] q35: Remove MCHPCIState.guest_info field

2015-12-01 Thread Eduardo Habkost
The field is not used for anything. Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 1 - include/hw/pci-host/q35.h | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index f124e59..ad7a51e 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @

[Qemu-devel] [PATCH 10/16] pc: Move PcGuestInfo.fw_cfg field to PCMachineState

2015-12-01 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 6 +++--- hw/i386/pc.c | 8 include/hw/i386/pc.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9f2129d..efc4151 100644 --- a/hw/i386/acpi-build.c +

[Qemu-devel] [PATCH 16/16] pc: Move APIC and NUMA data from PcGuestInfo to PCMachineState

2015-12-01 Thread Eduardo Habkost
With this, we can eliminate struct PcGuestInfo completely. Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 25 +++-- hw/i386/pc.c | 23 ++- include/hw/i386/pc.h | 15 +-- 3 files changed, 26 insertions(+), 37 deletions(-) dif

[Qemu-devel] [PATCH 14/16] acpi: Use PCMachineClass fields directly

2015-12-01 Thread Eduardo Habkost
Remove the fields: legacy_acpi_table_size, has_acpi_build, has_reserved_memory, and rsdp_in_ram from PcGuestInfo, and let the ACPI code use the PCMachineClass fields directly. Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 11 ++- hw/i386/pc.c | 6 +++--- hw/i386/pc_p

[Qemu-devel] [PATCH 08/16] acpi: Make build_srat() get PCMachineState as argument

2015-12-01 Thread Eduardo Habkost
Some PCMachineState and PCMachineClass fields will be used by build_srat(). Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index b1548e7..8841798 100644 --- a/hw/i386/ac

[Qemu-devel] [PATCH 12/16] pc: Remove PcGuestInfo.isapc_ram_fw field

2015-12-01 Thread Eduardo Habkost
The code can use the PCMachineClass.pci_enabled field directly. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 2 +- hw/i386/pc_piix.c| 1 - hw/i386/pc_q35.c | 1 - include/hw/i386/pc.h | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386

[Qemu-devel] [PATCH 06/16] acpi: Save PCMachineState on AcpiBuildState

2015-12-01 Thread Eduardo Habkost
PCMachineState will be used in some of the steps of ACPI table building. Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 85a5c53..ca11c88 100644 --- a/hw/i386/acp

[Qemu-devel] [PATCH 11/16] pc: Simplify signature of xen_load_linux()

2015-12-01 Thread Eduardo Habkost
We don't need the FWCfgState return value and the PcGuestInfo parameter. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 5 + hw/i386/pc_piix.c| 2 +- include/hw/i386/pc.h | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index

[Qemu-devel] [PATCH 15/16] pc: Move PcGuestInfo.apic_xrupt_override field to PCMachineState

2015-12-01 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 7 --- hw/i386/pc.c | 2 +- include/hw/i386/pc.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7771be7..cdbe5b9 100644 --- a/hw/i386/acpi-build.c +++ b/

[Qemu-devel] [PATCH 02/16] pc: Eliminate struct PcGuestInfoState

2015-12-01 Thread Eduardo Habkost
Instead of allocating a new struct just for PcGuestInfo and the mchine_done Notifier, place them inside PCMachineState. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 27 ++- include/hw/i386/pc.h | 2 ++ 2 files changed, 12 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PATCH 03/16] pc: Remove guest_info parameter from pc_memory_init()

2015-12-01 Thread Eduardo Habkost
We can get the PcGuestInfo struct directly from PCMachineState. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 4 ++-- hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc.c b/

[Qemu-devel] [PATCH 07/16] acpi: Make acpi_build() get PCMachineState as argument

2015-12-01 Thread Eduardo Habkost
Some PCMachineState and PCMachineClass fields will be used by acpi_build(). Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ca11c88..b1548e7 100644 --- a/hw/i386/a

[Qemu-devel] [PATCH 09/16] acpi: Remove ram size fields fron PcGuestInfo

2015-12-01 Thread Eduardo Habkost
The ACPI code can use the PCMachineState fields directly. Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 10 +- hw/i386/pc.c | 2 -- include/hw/i386/pc.h | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c

[Qemu-devel] [PATCH 05/16] acpi: Remove unused build_facs() PcGuestInfo paramter

2015-12-01 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 74f0922..85a5c53 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -295,7 +295,7 @@ static void acpi_alig

[Qemu-devel] [PATCH 00/16] pc: Eliminate struct PcGuestInfo

2015-12-01 Thread Eduardo Habkost
This moves all data from PcGuestInfo to either PCMachineState or PCMachineClass. This series depends on other two series: * [PATCH v3 0/6] pc: Initialization and compat function cleanup * [PATCH V3 0/3] hw/pcie: Multi-root support for Q35 For reference, there's a git tree containing this series

[Qemu-devel] [PATCH 04/16] acpi: Make acpi_setup() get PCMachineState as argument

2015-12-01 Thread Eduardo Habkost
Lots of PcGuestInfo fields are duplicates of PCMachineClass or PCMachineState fields. Pass PCMachineState as argument to acpi_setup(), so we can simply let the ACPI code use those fields directly. Signed-off-by: Eduardo Habkost --- hw/i386/acpi-build.c | 3 ++- hw/i386/acpi-build.h | 2 +- hw/i3

[Qemu-devel] [PATCH 01/16] pc: Move PcGuestInfo declaration to top of file

2015-12-01 Thread Eduardo Habkost
The struct will be used inside PCMachineState. Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 9811229..a74bded 100644 --- a/include/hw/

Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields

2015-12-01 Thread Fam Zheng
On Tue, 12/01 21:28, Peter Xu wrote: > Here, total_size is the size in bytes to be dumped (raw data, which > means before compression), while written_size are bytes handled (raw > size too). > > Signed-off-by: Peter Xu > --- > dump.c| 32 > includ

Re: [Qemu-devel] [PATCH v4 08/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2015-12-01 Thread Fam Zheng
On Tue, 12/01 21:28, Peter Xu wrote: > One new QMP event DUMP_COMPLETED is added. When a dump finishes, one > DUMP_COMPLETED event will occur to notify the user. > > Signed-off-by: Peter Xu > --- > docs/qmp-events.txt | 16 > dump.c | 11 +-- > qapi-schema.j

Re: [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
On 12/01/2015 07:58 PM, Hailiang Zhang wrote: > On 2015/12/1 18:40, Dr. David Alan Gilbert wrote: >> * Wen Congyang (we...@cn.fujitsu.com) wrote: >>> Block replication is a very important feature which is used for >>> continuous checkpoints(for example: COLO). >>> >>> You can get the detailed infor

Re: [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
On 12/01/2015 06:40 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> Block replication is a very important feature which is used for >> continuous checkpoints(for example: COLO). >> >> You can get the detailed information about block replication from here: >> http

Re: [Qemu-devel] [PATCH v4 06/11] dump-guest-memory: disable dump when in INMIGRATE state

2015-12-01 Thread Fam Zheng
On Tue, 12/01 21:28, Peter Xu wrote: > Signed-off-by: Peter Xu > --- > dump.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/dump.c b/dump.c > index e46749d..65d1f7e 100644 > --- a/dump.c > +++ b/dump.c > @@ -1626,13 +1626,17 @@ void qmp_dump_guest_memory(bool pagi

Re: [Qemu-devel] [PATCH v4 05/11] dump-guest-memory: introduce dump_process() helper function.

2015-12-01 Thread Fam Zheng
On Tue, 12/01 21:28, Peter Xu wrote: > No functional change. Cleanup only. > > Signed-off-by: Peter Xu > --- > dump.c| 35 ++- > include/sysemu/dump.h | 3 +++ > 2 files changed, 25 insertions(+), 13 deletions(-) > > diff --git a/dump.c b/dump.c

Re: [Qemu-devel] [PATCH v4 03/11] dump-guest-memory: using static DumpState, add DumpStatus

2015-12-01 Thread Fam Zheng
On Tue, 12/01 21:28, Peter Xu wrote: > Instead of malloc/free each time for DumpState, make it > static. Added DumpStatus to show status for dump. > > This is to be used for detached dump. > > Signed-off-by: Peter Xu > --- > dump.c| 20 +--- > include/sysemu/dump

Re: [Qemu-devel] [PATCH v4 01/11] dump-guest-memory: cleanup: removing dump_{error|cleanup}().

2015-12-01 Thread Fam Zheng
On Tue, 12/01 21:28, Peter Xu wrote: > It might be a little bit confusing to do dump_cleanup() in these two > functions and error prone. A better way is to do dump_cleanup() I would say "It might be a little bit confusing and error prone to do dump_cleanup() in ..." Other than that, Reviewed-by:

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Peter Maydell
On 1 December 2015 at 23:06, Richard Henderson wrote: > On 12/01/2015 08:40 AM, Aurelien Jarno wrote: >> That said the problem reported is likely fixed by this commit that went >> just after it has been reported: > > > It does seem likely, but I don't see how we can know that the out size is > 110

[Qemu-devel] [PATCH for-2.6 1/3] iotests: 124: Split into two test classes

2015-12-01 Thread John Snow
Split it into an abstract test class and an implementation class. The split is primarily to facilitate more flexible setUp variations for other kinds of tests without having to rewrite or shuffle around all of these helpers. See the following two patches for more of the "why." Signed-off-by: Joh

[Qemu-devel] [PATCH for-2.6 2/3] iotests: 124: move incremental failure test

2015-12-01 Thread John Snow
Code motion only, in preparation for adjusting the setUp procedure for this test. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 117 + 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotes

[Qemu-devel] [PATCH for-2.6 3/3] iotests: 124: don't reopen qcow2

2015-12-01 Thread John Snow
Don't create two interfaces to the same drive in the recently moved failure test. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 2a0119d..7d

[Qemu-devel] [PATCH for-2.6 0/3] iotests: 124: Don't reopen qcow2 file

2015-12-01 Thread John Snow
Kevin caught me being Naughty, and because I don't want Santa to be mad at me, I have corrected my ways. Split iotest 124 into two classes so that the iotest that requires a blkdebug filter from the get-go can forego the standard setUp routine and just do it correct the first time. Does this warr

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Richard Henderson
On 12/01/2015 08:40 AM, Aurelien Jarno wrote: On 2015-12-01 17:34, Aurelien Jarno wrote: On 2015-12-01 16:28, Peter Maydell wrote: On 1 December 2015 at 16:19, Richard Henderson wrote: If there are a lot of guest memory ops in the TB, the amount of code generated by tcg_out_tb_finalize could

[Qemu-devel] [PATCH v3 1/6] pc: Move compat boolean globals to PCMachineClass

2015-12-01 Thread Eduardo Habkost
This way the compat flags can be initialized in the machine_options() function. This will help us to eventually eliminate the pc_compat_*() functions. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 8 + hw/i386/pc_piix.c| 84 +--

[Qemu-devel] [PATCH v3 6/6] pc: Move option_rom_has_mr/rom_file_has_mr globals to MachineClass

2015-12-01 Thread Eduardo Habkost
This way, these settings can be simply set on the corresponding machine_options() function, instead of requiring code in pc_compat_*() functions. Signed-off-by: Eduardo Habkost --- hw/core/loader.c| 10 +- hw/core/machine.c | 1 + hw/i386/pc_piix.c | 8 hw/i386/pc_q35.

[Qemu-devel] [PATCH v3 5/6] pc: Remove enforce-aligned-dimm QOM property

2015-12-01 Thread Eduardo Habkost
The property is read-only and not used for anything. Cc: Igor Mammedov Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 11 --- include/hw/i386/pc.h | 1 - 2 files changed, 12 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 72c25ec..1b22ad2 100644 --- a/hw/i386/pc

[Qemu-devel] [PATCH v3 4/6] pc: Move enforce_aligned_dimm to PCMachineClass

2015-12-01 Thread Eduardo Habkost
enforce_aligned_dimm never changes after the machine is initialized, so it can be simply set in PCMachineClass like all the other compat fields. Cc: Igor Mammedov Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 12 +++- hw/i386/pc_piix.c| 4 +--- hw/i386/pc_q35.c | 4

[Qemu-devel] [PATCH v3 0/6] pc: Initialization and compat function cleanup

2015-12-01 Thread Eduardo Habkost
This moves most compat data that are globals or PCMachineState fields to PCMachineClass. It looks like v2 (sent in August) has slipped through the cracks. Rebased to latest qemu.git, and added 2 additional patches. Eduardo Habkost (6): pc: Move compat boolean globals to PCMachineClass pc: Mov

[Qemu-devel] [PATCH v3 3/6] pc: Move acpi_data_size global to PCMachineClass

2015-12-01 Thread Eduardo Habkost
This way we don't need code in pc_compat_*() functions to set the legacy acpi_data_size value. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 17 ++--- hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 6 -- 4 files changed, 12 inserti

[Qemu-devel] [PATCH v3 2/6] pc: Move legacy_acpi_table_size global to PCMachineClass

2015-12-01 Thread Eduardo Habkost
This way we can set legacy_acpi_table_size on the machine_options() functions, instead of requirng code in pc_compat_*() functions. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 40 +++- include/hw/i386/pc.h | 1 + 2 files changed, 20 insertions(+

[Qemu-devel] [PULL] tcg: Increase the highwater reservation

2015-12-01 Thread Richard Henderson
If there are a lot of guest memory ops in the TB, the amount of code generated by tcg_out_tb_finalize could be well more than 1k. In the short term, increase the reservation larger than any TB seen in practice. Reported-by: Aurelien Jarno Reviewed-by: Aurelien Jarno Tested-by: Aurelien Jarno Si

Re: [Qemu-devel] [PATCHv4 00/18] slirp: Adding IPv6 support to Qemu -net user mode

2015-12-01 Thread Samuel Thibault
Thomas Huth, on Tue 01 Dec 2015 22:28:10 +0100, wrote: > Are you still planning to rebase the patches again to current master and > repost them, so we could maybe get this in for QEMU 2.6 ? If we can get this reviewed, yes, sure! > If you put me on CC:, I can try to review the series if you like

[Qemu-devel] [PULL for-2.5] TCG highwater fix

2015-12-01 Thread Richard Henderson
om/rth7680/qemu.git tags/pull-tcg-20151201 for you to fetch changes up to b17a6d3390f87620735f7efb03bb1c96682ff449: tcg: Increase the highwater reservation (2015-12-01 14:36:32 -0800) Last

Re: [Qemu-devel] [PATCH v13 12/14] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-01 Thread Eric Blake
On 11/27/2015 02:03 AM, Markus Armbruster wrote: > Eric Blake writes: > >> We document that members of enums and objects should be >> 'lower-case', although we were not enforcing it. We have to >> whitelist a few pre-existing entities that violate the norms. >> Add three new tests to expose the

Re: [Qemu-devel] [PATCH V3 3/3] hw/i386: extend pxb query for all PC machines

2015-12-01 Thread Eduardo Habkost
On Tue, Dec 01, 2015 at 10:53:07PM +0200, Marcel Apfelbaum wrote: > On 12/01/2015 08:20 PM, Eduardo Habkost wrote: > >On Thu, Nov 26, 2015 at 06:00:28PM +0200, Marcel Apfelbaum wrote: > >>Add bus property to PC machines and use it when looking > >>for primary PCI root bus (bus 0). > >> > >>Signed-o

  1   2   3   >