Re: [Qemu-devel] [PATCH v7 00/11] Add basic "detach" support for dump-guest-memory

2016-02-17 Thread Peter Xu
On Thu, Feb 18, 2016 at 08:26:44AM +0100, Markus Armbruster wrote: > Peter Xu writes: > > > Changes from v7: > > - patch 8: use s->dump_info.page_size not TARGET_PAGE_SIZE > > - patch 10: change DUMP_STATUS_MAX to DUMP_STATUS__MAX (this is to > > fix compile error for rebasing to latest master

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-17 Thread Zhang Chen
On 02/18/2016 10:41 AM, Jason Wang wrote: On 02/05/2016 02:50 PM, Zhang Chen wrote: From: ZhangChen Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect filter's net packet to outdev. and redirect indev's packet to filter.

Re: [Qemu-devel] [PATCH] net: check packet payload length

2016-02-17 Thread P J P
+-- On Thu, 18 Feb 2016, P J P wrote --+ | +-- On Wed, 17 Feb 2016, Markus Armbruster wrote --+ | | Is calling this function with a partial IPv4 TCP/UDP packet legitimate? | | If partial packet is okay, what about a partial header? | | Partial? That shouldn't harm I guess. For partial TCP/UD

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

2016-02-17 Thread Markus Armbruster
David Gibson writes: > On Tue, Feb 16, 2016 at 01:35:42PM +0100, Markus Armbruster wrote: >> Igor Mammedov writes: >> >> > On Mon, 15 Feb 2016 20:43:41 +0100 >> > Markus Armbruster wrote: >> > >> >> Igor Mammedov writes: >> >> >> >> > it will allow mgmt to query present and possible to hotpl

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-17 Thread Hailiang Zhang
Hi Jason, On 2016/2/18 11:46, Hailiang Zhang wrote: On 2016/2/18 11:31, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: Enable all buffer filters that added by COLO while go into COLO process, and disable them while exit COLO. Signed-off-by: zhanghailiang Cc: Jason Wang Cc:

Re: [Qemu-devel] [PATCH v7 00/11] Add basic "detach" support for dump-guest-memory

2016-02-17 Thread Markus Armbruster
Peter Xu writes: > Changes from v7: > - patch 8: use s->dump_info.page_size not TARGET_PAGE_SIZE > - patch 10: change DUMP_STATUS_MAX to DUMP_STATUS__MAX (this is to > fix compile error for rebasing to latest master branch, still do > not know why we need this change from generating "_MAX" to

[Qemu-devel] [PATCH v11 15/15] qapi: Change visit_start_implicit_struct to visit_start_alternate

2016-02-17 Thread Eric Blake
After recent changes, the only remaining use of visit_start_implicit_struct() is for allocating the space needed when visiting an alternate. Since the term 'implicit struct' is hard to explain, rename the function to its current usage. While at it, we can merge the functionality of visit_get_next

[Qemu-devel] [PATCH v11 09/15] qapi: Adjust layout of FooList types

2016-02-17 Thread Eric Blake
By sticking the next pointer first, we don't need a union with 64-bit padding for smaller types. On 32-bit platforms, this can reduce the size of uint8List from 16 bytes (or 12, depending on whether 64-bit ints can tolerate 4-byte alignment) down to 8. It has no effect on 64-bit platforms (where a

[Qemu-devel] [PATCH v11 12/15] qapi: Don't box struct branch of alternate

2016-02-17 Thread Eric Blake
There's no reason to do two malloc's for an alternate type visiting a QAPI struct; let's just inline the struct directly as the C union branch of the struct. Surprisingly, no clients were actually using the struct member prior to this patch outside of the testsuite; an earlier patch in the series

[Qemu-devel] [PATCH v11 10/15] qapi: Emit structs used as variants in topological order

2016-02-17 Thread Eric Blake
Right now, we emit the branches of union types as a boxed pointer, and it suffices to have a forward declaration of the type. However, a future patch will swap things to directly use the branch type, instead of hiding it behind a pointer. For this to work, the compiler needs the full definition o

[Qemu-devel] [PATCH v11 13/15] qapi: Don't box branches of flat unions

2016-02-17 Thread Eric Blake
There's no reason to do two malloc's for a flat union; let's just inline the branch struct directly into the C union branch of the flat union. Surprisingly, fewer clients were actually using explicit references to the branch types in comparison to the number of flat unions thus modified. This let

[Qemu-devel] [PATCH v11 08/15] qapi-visit: Less indirection in visit_type_Foo_fields()

2016-02-17 Thread Eric Blake
We were passing 'Foo **obj' to the internal helper function, but all uses within the helper were via reads of '*obj'. Refactor things to pass one less level of indirection, by having the callers dereference before calling. For an example of the generated code change: |-static void visit_type_Bal

[Qemu-devel] [PATCH v11 02/15] qapi: Forbid empty unions and useless alternates

2016-02-17 Thread Eric Blake
Empty unions serve no purpose, and while we compile with gcc which permits them, strict C99 forbids them. We happen to inject a dummy 'void *data' member into the C unions that represent QAPI unions and alternates, but we want to get rid of that member (it pollutes the namespace for no good reason

[Qemu-devel] [PATCH v11 11/15] qapi-visit: Use common idiom in gen_visit_fields_decl()

2016-02-17 Thread Eric Blake
We have several instances of methods that do an early exit if output is not needed, then log that output is being generated, and finally produce the output; see qapi-types.py:gen_object() and qapi-visit.py:gen_visit_implicit_struct(). The odd man out was gen_visit_fields_decl(); rearrange it to be

[Qemu-devel] [PATCH v11 06/15] qapi: Visit variants in visit_type_FOO_fields()

2016-02-17 Thread Eric Blake
We initially created the static visit_type_FOO_fields() helper function for reuse of code - we have cases where the initial setup for a visit has different allocation (depending on whether the fields represent a stand-alone type or are embedded as part of a larger type), but where the actual field

[Qemu-devel] [PATCH v11 03/15] qapi: Forbid 'any' inside an alternate

2016-02-17 Thread Eric Blake
The whole point of an alternate is to allow some type-safety while still accepting more than one JSON type. Meanwhile, the 'any' type exists to bypass type-safety altogether. The two are incompatible: you can't accept every type, and still tell which branch of the alternate to use for the parse;

[Qemu-devel] [PATCH v11 07/15] qapi-visit: Unify struct and union visit

2016-02-17 Thread Eric Blake
From: Markus Armbruster gen_visit_union() is now just like gen_visit_struct(). Rename it to gen_visit_object(), use it for structs, and drop gen_visit_struct(). Output is unchanged. Signed-off-by: Markus Armbruster Message-Id: <1453902888-20457-4-git-send-email-arm...@redhat.com> [split out v

[Qemu-devel] [PATCH v11 04/15] qapi: Add tests of complex objects within alternate

2016-02-17 Thread Eric Blake
Upcoming patches will adjust how we visit an object branch of an alternate; but we were completely lacking testsuite coverage. Rectify this, so that the future patches will be able to highlight the changes and still prove that we avoided regressions. In particular, the use of a flat union UserDefF

[Qemu-devel] [PATCH v11 14/15] qapi: Delete visit_start_union(), gen_visit_implicit_struct()

2016-02-17 Thread Eric Blake
Delete code rendered dead in the previous patch. As explained there, we no longer have any need to use visit_start_struct(), and we no longer have any more code trying to create or use visit_type_implicit_FOO(). Signed-off-by: Eric Blake --- v11: retitle, merge multiple cleanups, avoid bisectio

[Qemu-devel] [PATCH v11 05/15] qapi-visit: Simplify how we visit common union members

2016-02-17 Thread Eric Blake
From: Markus Armbruster For a simple union SU, gen_visit_union() generates a visit of its single tag member, like this: visit_type_SUKind(v, "type", &(*obj)->type, &err); For a flat union FU with base B, it generates a visit of its base fields: visit_type_B_fields(v, (B **)obj, &err);

[Qemu-devel] [PATCH v11 01/15] qapi: Simplify excess input reporting in input visitors

2016-02-17 Thread Eric Blake
When reporting that an unvisited member remains at the end of an input visit for a struct, we were using g_hash_table_find() coupled with a callback function that always returns true, to locate an arbitrary member of the hash table. But if all we need is an arbitrary entry, we can get that from a

[Qemu-devel] [PATCH v11 00/15] prune some QAPI visitor cruft (was qapi cleanups subset E)

2016-02-17 Thread Eric Blake
I'm still working on my documentation patches for QAPI visitors (https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03504.html), but am finding it easier to nuke bad code up front than to document that it is bad only to later nuke it. So this pulls bits and pieces of other patches that Markus

Re: [Qemu-devel] [RFC PATCH v4] fw/pci: Add support for mapping Intel IGD via QEMU

2016-02-17 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, February 17, 2016 9:50 PM > > On Wed, 17 Feb 2016 11:09:49 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson > > > Sent: Wednesday, February 17, 2016 5:39 AM > > > > > > QEMU provides two fw_cfg files to supp

Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission

2016-02-17 Thread Amit Shah
On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote: > On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote: > > Since the addition of the configuration section in QEMU 2.4, it is > > impossible > > to migrate a pseries-2.3 machine back to QEMU 2.3. > > > > This patch makes it possible thank

Re: [Qemu-devel] [PATCH v7 00/11] Add basic "detach" support for dump-guest-memory

2016-02-17 Thread Peter Xu
The subject of cover letter is incorrect. It should be: [PATCH v8 00/11] Add basic "detach" support for dump-guest-memory rather than: [PATCH v7 00/11] Add basic "detach" support for dump-guest-memory Subjects of patches are with correct number, which is v8. Sorry for the mistake. Peter On T

[Qemu-devel] [PATCH v8 10/11] Dump: add hmp command "info dump"

2016-02-17 Thread Peter Xu
It will calculate percentage of finished work from completed and total. Signed-off-by: Peter Xu --- hmp-commands-info.hx | 14 ++ hmp.c| 17 + hmp.h| 1 + 3 files changed, 32 insertions(+) diff --git a/hmp-commands-info.hx b/hmp-comma

[Qemu-devel] [PATCH v8 09/11] Dump: add qmp command "query-dump"

2016-02-17 Thread Peter Xu
When dump-guest-memory is requested with detach flag, after its return, user could query its status using "query-dump" command (with no argument). The result contains: - status: current dump status - completed: bytes written in the latest dump - total: bytes to write in the latest dump >From comp

[Qemu-devel] [PATCH v8 07/11] dump-guest-memory: add "detach" support

2016-02-17 Thread Peter Xu
If "detach" is provided, one thread is created to do the dump work, while main thread will return immediately. For each GuestPhysBlock, adding one more field "mr" to points to MemoryRegion that it belongs, also ref the mr before use. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c

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

2016-02-17 Thread Peter Xu
Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c | 5 + 1 file changed, 5 insertions(+) diff --git a/dump.c b/dump.c index fed84a6..923e3a5 100644 --- a/dump.c +++ b/dump.c @@ -1654,6 +1654,11 @@ void qmp_dump_guest_memory(bool paging, const char *file, DumpState *s; Erro

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

2016-02-17 Thread Peter Xu
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 Reviewed-by: Fam Zheng --- docs/qmp-events.txt | 18 ++ dump.c | 18 -- qapi/event.json | 16 ++

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

2016-02-17 Thread Peter Xu
No functional change. Cleanup only. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c| 31 +-- include/sysemu/dump.h | 3 +++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/dump.c b/dump.c index 158d6ea..fed84a6 100644 --- a

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

2016-02-17 Thread Peter Xu
This patch only adds the interfaces, but does not implement them. "detach" parameter is made optional, to make sure that all the old dump-guest-memory requests will still be able to work. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c | 5 +++-- hmp-commands.hx | 5 +++--

[Qemu-devel] [PATCH v8 08/11] DumpState: adding total_size and written_size fields

2016-02-17 Thread Peter Xu
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 include/sysemu/dump.h | 9 + 2 files changed, 41 i

[Qemu-devel] [PATCH v8 04/11] dump-guest-memory: add dump_in_progress() helper function

2016-02-17 Thread Peter Xu
For now, it has no effect. It will be used in dump detach support. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c| 13 + include/qemu-common.h | 4 qmp.c | 14 ++ 3 files changed, 31 insertions(+) diff --git a/dump.c b/du

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

2016-02-17 Thread Peter Xu
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 Reviewed-by: Fam Zheng --- dump.c| 21 - include/sysemu/dump.h | 2 ++ qapi-schema.json

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

2016-02-17 Thread Peter Xu
It might be a little bit confusing and error prone to do dump_cleanup() in these two functions. A better way is to do dump_cleanup() before dump finish, no matter whether dump has succeeded or not. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c | 78 +++---

Re: [Qemu-devel] [PATCH v2 0/2] move qcow2_invalidate_cache() out of coroutine context

2016-02-17 Thread Amit Shah
Can someone from the block team please give this a review? Thanks, On (Fri) 12 Feb 2016 [09:39:32], Denis V. Lunev wrote: > There is a possibility to hit an assert in qcow2_get_specific_info that > s->qcow_version is undefined. This happens when VM in starting from > suspended state, i.e. it proc

[Qemu-devel] [PATCH v7 00/11] Add basic "detach" support for dump-guest-memory

2016-02-17 Thread Peter Xu
Changes from v7: - patch 8: use s->dump_info.page_size not TARGET_PAGE_SIZE - patch 10: change DUMP_STATUS_MAX to DUMP_STATUS__MAX (this is to fix compile error for rebasing to latest master branch, still do not know why we need this change from generating "_MAX" to "__MAX" for enum types...)

Re: [Qemu-devel] [RFC PATCH 2/2] pci: add PCIIOMMUOps and PCIIOMMUIntRemapFunc

2016-02-17 Thread Peter Xu
On Wed, Feb 17, 2016 at 08:46:18PM +0100, Paolo Bonzini wrote: > > > On 17/02/2016 11:25, Peter Xu wrote: > > This patch extended the current PCI IOMMU functions into operation list, > > one new op is added to do interrupt remapping. > > > > Currently it is not working since int_remap is always

Re: [Qemu-devel] [RFC 1/1] nbd (specification): add NBD_CMD_WRITE_ZEROES command

2016-02-17 Thread Denis V. Lunev
On 02/17/2016 11:58 PM, Eric Blake wrote: On 02/17/2016 11:10 AM, Denis V. Lunev wrote: This patch proposes a new command to reduce the amount of data passed through the wire when it is known that the data is all zeroes. This functionality is generally useful for mirroring or backup operations.

Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-17 Thread Peter Xu
On Mon, Feb 15, 2016 at 03:22:05PM +, Daniel P. Berrange wrote: > On Mon, Feb 15, 2016 at 04:08:33PM +0100, Markus Armbruster wrote: > > Peter Xu writes: > > > > > On Mon, Feb 15, 2016 at 10:52:01AM +0100, Markus Armbruster wrote: > > >> Peter Xu writes: > > >> > > >> > For ARM platform, we

[Qemu-devel] [PULL 19/26] cuda: port FILE_SERVER_FLAG command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau This command tells if computer should automatically wake-up after a power loss. Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 17 - 1 file changed, 16 inse

[Qemu-devel] [PULL 15/26] cuda: port SET_AUTO_RATE command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Also implement the command, by removing the hardcoded period of 20 ms/50 Hz and replacing it by the one requested by user. Update VMState version to store this new parameter. Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 22/26] cuda: port SET_TIME command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/mac

[Qemu-devel] [PULL 20/26] cuda: port SET_POWER_MESSAGES command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cu

[Qemu-devel] [PULL 26/26] hw/ppc/spapr: Halt CPU when powering off via RTAS call

2016-02-17 Thread David Gibson
From: Thomas Huth The LoPAPR specification defines the following for the RTAS power-off call: "On successful operation, does not return". However, the implementation in QEMU currently returns and runs the guest CPU again for some more cycles. This caused some trouble with the new ppc implementati

[Qemu-devel] [PULL 06/26] pseries: Move hash page table allocation to reset time

2016-02-17 Thread David Gibson
At the moment the size of the hash page table (HPT) is fixed based on the maximum memory allowed to the guest. As such, we allocate the table during machine construction, and just clear it at reset. However, we're planning to implement a PAPR extension allowing the hash page table to be resized a

[Qemu-devel] [PULL 18/26] cuda: port RESET_SYSTEM command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda

[Qemu-devel] [PULL 21/26] cuda: port GET_TIME command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/mis

[Qemu-devel] [PULL 24/26] cuda: remove CUDA_GET_SET_IIC/CUDA_COMBINED_FORMAT_IIC commands

2016-02-17 Thread David Gibson
From: Hervé Poussineau We currently don't emulate the I2C bus provided by CUDA. Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/hw/misc/macio/cuda.c

[Qemu-devel] [PULL 16/26] cuda: port SET_DEVICE_LIST command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Also implement the command, by taking device list mask into account when polling ADB devices. Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/input/adb.c | 18 ++ hw/misc/macio/cuda.c | 18 +

[Qemu-devel] [PULL 10/26] hw/ppc/spapr: Implement h_set_dabr

2016-02-17 Thread David Gibson
From: Thomas Huth According to LoPAPR, h_set_dabr should simply set DABRX to 3 (if the register is available), and load the parameter into DABR. If DABRX is not available, the hypervisor has to check the "Breakpoint Translation" bit of the DABR register first. Signed-off-by: Thomas Huth Signed-

[Qemu-devel] [PULL 14/26] cuda: port AUTOPOLL command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/hw/misc/macio/cud

[Qemu-devel] [PULL 11/26] hw/ppc/spapr: Implement the h_set_xdabr hypercall

2016-02-17 Thread David Gibson
From: Thomas Huth The H_SET_XDABR hypercall is similar to H_SET_DABR, but also sets the extended DABR (DABRX) register. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/spapr_hcall.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/ppc/spapr_hcal

[Qemu-devel] [PULL 09/26] hw/ppc/spapr: Add h_set_sprg0 hypercall

2016-02-17 Thread David Gibson
From: Thomas Huth This is a very simple hypercall that only sets up the SPRG0 register for the guest (since writing to SPRG0 was only permitted to the hypervisor in older versions of the PowerISA). Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/spapr_hcall.c | 15 ++

[Qemu-devel] [PULL 25/26] pseries: Include missing pseries-2.5 compat properties in pseries-2.4

2016-02-17 Thread David Gibson
Commit 4b23699 "pseries: Add pseries-2.6 machine type" added a new SPAPR_COMPAT_2_5 macro in the usual way. However, it didn't add this macro to the existing SPAPR_COMPAT_2_4 macro so that pseries-2.4 inherits newer compatibility properties which are needed for 2.5 and earlier. This corrects the

[Qemu-devel] [PULL 23/26] cuda: remove GET_6805_ADDR command

2016-02-17 Thread David Gibson
From: Hervé Poussineau It doesn't seem to be used, and operating systems should accept a 'unknown command' answer. Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/misc

[Qemu-devel] [PULL 01/26] hw: fix some debug message format strings

2016-02-17 Thread David Gibson
From: Alyssa Milburn Signed-off-by: Alyssa Milburn Signed-off-by: David Gibson --- hw/nvram/mac_nvram.c | 6 -- hw/pci-host/uninorth.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/nvram/mac_nvram.c b/hw/nvram/mac_nvram.c index 564ef93..1671f46 100644 --- a/

[Qemu-devel] [PULL 12/26] cuda: add a framework to handle commands

2016-02-17 Thread David Gibson
From: Hervé Poussineau Next commits will port existing CUDA commands to this framework. Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/h

[Qemu-devel] [PULL 13/26] cuda: move unknown commands reject out of switch

2016-02-17 Thread David Gibson
From: Hervé Poussineau Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 8659

[Qemu-devel] [PULL 07/26] target-ppc: Remove hack for ppc_hash64_load_hpte*() with HV KVM

2016-02-17 Thread David Gibson
With HV KVM, the guest's hash page table (HPT) is managed by the kernel and not directly accessible to QEMU. This means that spapr->htab is NULL and normally env->external_htab would also be NULL for each cpu. However, that would cause ppc_hash64_load_hpte*() to do the wrong thing in the few case

[Qemu-devel] [PULL 04/26] pseries: Simplify handling of the hash page table fd

2016-02-17 Thread David Gibson
When migrating the 'pseries' machine type with KVM, we use a special fd to access the hash page table stored within KVM. Usually, this fd is opened at the beginning of migration, and kept open until the migration is complete. However, if there is a guest reset during the migration, the fd can bec

[Qemu-devel] [PULL 05/26] pseries: Add helper to calculate recommended hash page table size

2016-02-17 Thread David Gibson
At present we calculate the recommended hash page table (HPT) size for a pseries guest just once in ppc_spapr_init() before allocating the HPT. In future patches we're going to want this calculation in other places, so this splits it out into a helper function. While we're at it, change the calcul

[Qemu-devel] [PULL 08/26] migration: ensure htab_save_first completes after timeout

2016-02-17 Thread David Gibson
htab_save_first_pass could return without finishing its work due to timeout. The patch checks if another invocation of it is necessary and will call it in htab_save_complete if necessary. Signed-off-by: Jianjun Duan Reviewed-by: Michael Roth [removed overlong line] Signed-off-by: David Gibson -

[Qemu-devel] [PULL 03/26] target-ppc: Include missing MMU models for SDR1 in info registers

2016-02-17 Thread David Gibson
The HMP command "info registers" produces somewhat different information on different ppc cpu variants. For those with a hash MMU it's supposed to include the SDR1, DAR and DSISR registers related to the MMU. However, the switch is missing a couple of MMU model variants, meaning we will miss out

[Qemu-devel] [PULL 17/26] cuda: port POWERDOWN command to new framework

2016-02-17 Thread David Gibson
From: Hervé Poussineau Reviewed-by: David Gibson Signed-off-by: Hervé Poussineau Reviewed-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda

[Qemu-devel] [PULL 00/26] ppc-for-2.6 queue 20160218

2016-02-17 Thread David Gibson
The following changes since commit 3fc63c3f339a61f4e4526f88150927424744f687: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-02-16 17:31:56 +) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.6-20160218 for you

[Qemu-devel] [PULL 02/26] target-ppc: Remove unused kvmppc_update_sdr1() stub

2016-02-17 Thread David Gibson
This KVM stub implementation isn't used anywhere. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- target-ppc/kvm_ppc.h | 5 - 1 file changed, 5 deletions(-) diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 62406ce..aaa828c 100644 --- a/target-ppc/kvm_ppc.h +

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

2016-02-17 Thread David Gibson
On Tue, Feb 16, 2016 at 01:35:42PM +0100, Markus Armbruster wrote: > Igor Mammedov writes: > > > On Mon, 15 Feb 2016 20:43:41 +0100 > > Markus Armbruster wrote: > > > >> Igor Mammedov writes: > >> > >> > it will allow mgmt to query present and possible to hotplug CPUs > >> > it is required fro

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

2016-02-17 Thread David Gibson
On Tue, Feb 16, 2016 at 11:52:42AM +0100, Igor Mammedov wrote: > On Tue, 16 Feb 2016 16:48:34 +1100 > David Gibson wrote: > > > On Mon, Feb 15, 2016 at 08:43:41PM +0100, Markus Armbruster wrote: > > > Igor Mammedov writes: > > > > > > > it will allow mgmt to query present and possible to hotp

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

2016-02-17 Thread David Gibson
On Tue, Feb 16, 2016 at 11:36:55AM +0100, Igor Mammedov wrote: > On Mon, 15 Feb 2016 20:43:41 +0100 > Markus Armbruster wrote: > > > Igor Mammedov writes: > > > > > it will allow mgmt to query present and possible to hotplug CPUs > > > it is required from a target platform that wish to support

Re: [Qemu-devel] [PATCH v2 06/11] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-02-17 Thread Xiao Guangrong
On 02/18/2016 01:26 AM, Michael S. Tsirkin wrote: On Wed, Feb 17, 2016 at 10:04:18AM +0800, Xiao Guangrong wrote: As for the rest could that commands go via MMIO that we usually use for control path? So both input data and output data go through single MMIO, we need to introduce a protocol t

Re: [Qemu-devel] [PATCH COLO-Frame v14 35/40] COLO/filter: add each netdev a buffer filter

2016-02-17 Thread Hailiang Zhang
On 2016/2/18 11:23, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: For COLO periodic mode, it need to buffer packets that sent by VM, and we will not release these packets until finish a checkpoint. Here, we add each netdev a buffer-filter that will be controlled by COLO. It i

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-17 Thread Hailiang Zhang
On 2016/2/18 11:31, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: Enable all buffer filters that added by COLO while go into COLO process, and disable them while exit COLO. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v14: - New patch --- migration/c

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > Enable all buffer filters that added by COLO while > go into COLO process, and disable them while exit COLO. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > v14: > - New patch > --- > migration/colo.c | 32 ++

Re: [Qemu-devel] [PATCH COLO-Frame v14 32/40] net/filter: Introduce a helper to add a filter to the netdev

2016-02-17 Thread Hailiang Zhang
On 2016/2/18 11:19, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- include/net/filter.h | 7

Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status' property for filter object

2016-02-17 Thread Hailiang Zhang
Hi Jason, Happy spring festival! ;) On 2016/2/18 11:00, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: With this property, users can control if this filter is 'enable' or 'disable'. The default behavior for filter is enabled. We will skip the disabled filter when delivering

Re: [Qemu-devel] [PATCH COLO-Frame v14 35/40] COLO/filter: add each netdev a buffer filter

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > For COLO periodic mode, it need to buffer packets that > sent by VM, and we will not release these packets until > finish a checkpoint. > > Here, we add each netdev a buffer-filter that will be controlled > by COLO. It is disabled by default, and the

Re: [Qemu-devel] [PATCH COLO-Frame v14 32/40] net/filter: Introduce a helper to add a filter to the netdev

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > We add a new helper function netdev_add_filter(), > this function can help adding a filter object to a netdev. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > include/net/filter.h | 7 +++ > net/filter.c

Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status' property for filter object

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > With this property, users can control if this filter is 'enable' > or 'disable'. The default behavior for filter is enabled. > > We will skip the disabled filter when delivering packets in net layer. > > Signed-off-by: zhanghailiang > Cc: Jason Wang

Re: [Qemu-devel] [PATCH] net: netmap: probe netmap interface for virtio-net header

2016-02-17 Thread Jason Wang
On 02/05/2016 06:30 PM, Vincenzo Maffione wrote: > Previous implementation of has_ufo, has_vnet_hdr, has_vnet_hdr_len, etc. > did not really probe for virtio-net header support for the netmap > interface attached to the backend. These callbacks were correct for > VALE ports, but incorrect for har

Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission

2016-02-17 Thread David Gibson
On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote: > Since the addition of the configuration section in QEMU 2.4, it is impossible > to migrate a pseries-2.3 machine back to QEMU 2.3. > > This patch makes it possible thanks to a new machine property which allows to > disable configuration

Re: [Qemu-devel] [PATCH 1/4] machine: Use type_init() to register machine classes

2016-02-17 Thread David Gibson
On Tue, Feb 16, 2016 at 06:59:04PM -0200, Eduardo Habkost wrote: > Change all machine_init() users that simply call type_register*() > to use type_init(). > > Cc: Evgeny Voevodin > Cc: Maksim Kozlov > Cc: Igor Mitsyanko > Cc: Dmitry Solodkiy > Cc: Peter Maydell > Cc: Rob Herring > Cc: Andrze

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-17 Thread Jason Wang
On 02/05/2016 02:50 PM, Zhang Chen wrote: > From: ZhangChen > > Filter-redirector is a netfilter plugin. > It gives qemu the ability to redirect net packet. > redirector can redirect filter's net packet to outdev. > and redirect indev's packet to filter. > > filter >

Re: [Qemu-devel] [PATCH] add CephFS support in VirtFS

2016-02-17 Thread Jevon Qiao
On 17/2/16 17:37, Daniel P. Berrange wrote: On Wed, Feb 17, 2016 at 03:32:06PM +0800, Jevon Qiao wrote: Hi Daniel, Thank you for reviewing my code, please see my reply in-line. On 15/2/16 17:17, Daniel P. Berrange wrote: On Sun, Feb 14, 2016 at 01:06:40PM +0800, Jevon Qiao wrote: + +static i

Re: [Qemu-devel] [PATCH] add CephFS support in VirtFS

2016-02-17 Thread Jevon Qiao
On 17/2/16 17:04, Greg Kurz wrote: On Wed, 17 Feb 2016 16:49:33 +0800 Jevon Qiao wrote: On 17/2/16 16:01, Greg Kurz wrote: On Wed, 17 Feb 2016 15:32:06 +0800 Jevon Qiao wrote: Hi Daniel, Thank you for reviewing my code, please see my reply in-line. On 15/2/16 17:17, Daniel P. Berrange

Re: [Qemu-devel] [PATCH v2 0/6] external backup api

2016-02-17 Thread Fam Zheng
On Wed, 02/17 20:47, Vladimir Sementsov-Ogievskiy wrote: > What about exporting bitmap as separate nbd entity? Just implement > block driver, which will read from bitmap? If consider only read > access and disabled (or frozen) bitmaps it should be simple enough. Yes, I think this idea also makes s

Re: [Qemu-devel] [PATCH v3] hw/ppc/spapr: Implement the h_page_init hypercall

2016-02-17 Thread David Gibson
On Wed, Feb 17, 2016 at 05:45:42PM +0100, Thomas Huth wrote: > This hypercall either initializes a page with zeros, or copies > another page. > According to LoPAPR, the i-cache of the page should also be > flushed if using H_ICACHE_INVALIDATE or H_ICACHE_SYNCHRONIZE, > and the d-cache should be syn

Re: [Qemu-devel] [PATCH v1 2/2] generic-loader: Add a generic loader

2016-02-17 Thread Alistair Francis
On Wed, Feb 17, 2016 at 4:11 PM, Eric Blake wrote: > On 02/17/2016 05:03 PM, Alistair Francis wrote: > +++ b/hw/misc/generic-loader.c @@ -0,0 +1,127 @@ +/* + * Generic Loader + * + * Copyright (C) 2014 Li Guang + * Written by Li Guang >>> >>> Want to claim 2016?

Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Halt CPU when powering off via RTAS call

2016-02-17 Thread David Gibson
On Wed, Feb 17, 2016 at 07:23:19PM +0100, Thomas Huth wrote: > The LoPAPR specification defines the following for the RTAS > power-off call: "On successful operation, does not return". > However, the implementation in QEMU currently returns and runs > the guest CPU again for some more cycles. This

Re: [Qemu-devel] [PATCH v1 2/2] generic-loader: Add a generic loader

2016-02-17 Thread Eric Blake
On 02/17/2016 05:03 PM, Alistair Francis wrote: >>> +++ b/hw/misc/generic-loader.c >>> @@ -0,0 +1,127 @@ >>> +/* >>> + * Generic Loader >>> + * >>> + * Copyright (C) 2014 Li Guang >>> + * Written by Li Guang >> >> Want to claim 2016? > > Yep, I can do that. I'm never too sure when this can be ch

Re: [Qemu-devel] [PATCH v1 2/2] generic-loader: Add a generic loader

2016-02-17 Thread Alistair Francis
On Wed, Feb 17, 2016 at 1:41 PM, Eric Blake wrote: > On 02/17/2016 02:04 PM, Alistair Francis wrote: >> Add a generic loader to QEMU which can be used to load images or set >> memory values. >> >> This only supports ARM architectures at the moment. >> >> Signed-off-by: Alistair Francis >> --- >>

Re: [Qemu-devel] [PATCH v2 09/14] hw/timer: QOM'ify milkymist_sysctl

2016-02-17 Thread xiaoqiang zhao
I have sent the v3, which fix this problem. > 在 2016年2月16日,02:14,Peter Maydell 写道: > >> On 27 January 2016 at 02:54, xiaoqiang zhao wrote: >> * split milkymist_sysctl_init into milkymist_sysctl_info.instance_init and >> milkymist_sysctl_realize > > I think the "info" in this function name is

Re: [Qemu-devel] KVM call for agenda for 2016-02-16

2016-02-17 Thread Juan Quintela
Eduardo Habkost wrote: > On Tue, Feb 16, 2016 at 12:54:57PM +0100, Christian Borntraeger wrote: >> So my quick and dirty summary of CPU as _I_ understand it >> (and I only have some part time bandwidth at the moment for that) >> >> x86 has cpu hotplug. Some history >> qemu-kvm had cpu_set in the

Re: [Qemu-devel] [PATCH v1 2/2] generic-loader: Add a generic loader

2016-02-17 Thread Eric Blake
On 02/17/2016 02:04 PM, Alistair Francis wrote: > Add a generic loader to QEMU which can be used to load images or set > memory values. > > This only supports ARM architectures at the moment. > > Signed-off-by: Alistair Francis > --- > Changes since RFC: > - Add BE support > > hw/misc/generi

[Qemu-devel] [PATCH v7 3/4] tcg: Add type for vCPU pointers

2016-02-17 Thread Lluís Vilanova
Adds the 'TCGv_env' type for pointers to 'CPUArchState' objects. The tracing infrastructure later needs to differentiate between regular pointers and pointers to vCPUs. Also changes all targets to use the new 'TCGv_env' type instead of the generic 'TCGv_ptr'. As of now, the change is merely cosmet

[Qemu-devel] [PATCH v7 4/4] trace: Add 'vcpu' event property to trace guest vCPU

2016-02-17 Thread Lluís Vilanova
This property identifies events that trace vCPU-specific information. It adds a "CPUState*" argument to events with the property, identifying the vCPU raising the event. TCG translation events also have a "TCGv_env" implicit argument that is later used as the "CPUState*" argument at execution time

[Qemu-devel] [PATCH v7 0/4] trace: Show vCPU info in guest code events

2016-02-17 Thread Lluís Vilanova
NOTE: This series should complete the framework for guest code tracing. From here on, other series can concurrently add actual events and improve the guest code tracing features and performance (e.g., control tracing independently on each vCPU). This series introduces the "vcpu"

[Qemu-devel] [PATCH v7 2/4] trace: Remove unnecessary intermediate event copies

2016-02-17 Thread Lluís Vilanova
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py|5 ++--- scripts/tracetool/format/events_h.py |4 ++-- scripts/tracetool/format/tcg_h.py|4 ++-- 3 files changed, 6 ins

[Qemu-devel] [PATCH v7 1/4] trace: Extend API to manage event arguments

2016-02-17 Thread Lluís Vilanova
Lets the user to manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__ini

  1   2   3   4   >