seful when the backend
storage for the dump file is very slow.
Peter Xu (2):
dump-guest-memory: add "detach" flag for QMP/HMP interfaces
dump-guest-memory: add basic "detach" support.
dump.c| 62 ++
This will allow the user specify "-d" (just like command
"migrate") when using "dump-guest-memory" command. When
specified, one background thread is created to do the dump work.
One flag is added to show whether there is a background dump
work in progress.
Signed
seful when the backend
storage for the dump file is very slow.
Peter Xu (2):
dump-guest-memory: add "detach" flag for QMP/HMP interfaces
dump-guest-memory: add basic "detach" support.
dump.c| 62 ++
This patch only add the interfaces, but not implementing them.
Signed-off-by: Peter Xu
---
dump.c | 3 ++-
hmp-commands.hx | 5 +++--
hmp.c| 3 ++-
qapi-schema.json | 3 ++-
qmp-commands.hx | 4 ++--
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/dump.c
This will allow the user specify "-d" (just like command
"migrate") when using "dump-guest-memory" command. When
specified, one background thread is created to do the dump work.
One flag is added to show whether there is a background dump
work in progress.
Signed
This patch only add the interfaces, but not implementing them.
Signed-off-by: Peter Xu
---
dump.c | 3 ++-
hmp-commands.hx | 5 +++--
hmp.c| 3 ++-
qapi-schema.json | 3 ++-
qmp-commands.hx | 4 ++--
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/dump.c
, Nov 23, 2015 at 05:22:29PM +0100, Laszlo Ersek wrote:
>> On 11/23/15 11:07, Peter Xu wrote:
>>> Currently, dump-guest-memory supports synchronous operation only. This patch
>>> sets are adding "detach" support for it (just like "migrate -d" for
>>>
On 11/25/2015 10:46 AM, Fam Zheng wrote:
> On Tue, 11/24 06:49, Eric Blake wrote:
>> On 11/24/2015 04:37 AM, Fam Zheng wrote:
>>
I think the patch should be dropped, and periodic progress reports
should be emitted from within the dump loops that do the heavy lifting.
For the E
On 11/24/2015 08:05 PM, Paolo Bonzini wrote:
>
>
> On 24/11/2015 04:10, Fam Zheng wrote:
>> What about all the hot-plug commands that changes the memory layout?
>
> If the guest is stopped, they shouldn't. device_add does not enable new
> BARs for example, the guest does that after it receive
Signed-off-by: Peter Xu
---
qapi-schema.json | 11 +++
qmp-commands.hx | 25 +
qmp.c| 5 +
scripts/qapi.py | 1 +
4 files changed, 42 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index 81654bd..7e3b8cd 100644
--- a/qapi
A new enum type is added to define ARM GIC types.
Signed-off-by: Peter Xu
---
qapi-schema.json | 17 +
1 file changed, 17 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index 8d04897..81654bd 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4083,3
if defined
TARGET_ARM" to block out ARM specified commands, however how should
I do the similiar thing in qapi-schema.json?
Thanks!
Peter
Peter Xu (2):
arm: gic: add GICType
arm: gic: add "query-gic-capability" interface
qapi-schema.json | 28
qmp-commands.hx | 25 +
qmp.c| 5 +
scripts/qapi.py | 1 +
4 files changed, 59 insertions(+)
--
2.4.3
On Mon, Feb 15, 2016 at 12:54:57AM -0600, Wei Huang wrote:
> On 2/13/16 23:41, Peter Xu wrote:
> > Please help review whether the interface suits our need, also please
> > point out any error I have made.
>
> I tested QEMU with these patches and they were able to work on a n
On Mon, Feb 15, 2016 at 10:35:39AM +0100, Martin Kletzander wrote:
> On Sun, Feb 14, 2016 at 01:41:41PM +0800, Peter Xu wrote:
> >
> >["gicv2", "gicv2-kvm", "gicv3-kvm"]
> >
> >Please help review whether the interface suits our need, also
On Mon, Feb 15, 2016 at 10:52:01AM +0100, Markus Armbruster wrote:
> Peter Xu writes:
>
> > For ARM platform, we still do not have any interface to query
> > whether current QEMU/host support specific GIC version. This
> > patchset is trying to add one QMP interface for t
Still think this might help in some cases, so ping again...
Peter
On Wed, Dec 09, 2015 at 10:42:12AM +0800, Peter Xu wrote:
> v6 changes:
> - patch 10
> - English error fix [Fam]
> - patch 11
> - remove useless var: "not_used" [me]
> - all
> - move patch
On Tue, Feb 16, 2016 at 02:40:59PM +0800, Fam Zheng wrote:
> On Wed, 12/09 10:42, Peter Xu wrote:
> > -s->status = (local_err ? DUMP_STATUS_FAILED : DUMP_STATUS_COMPLETED);
> > -error_propagate(errp, local_err);
>
> This means the error is released by caller, ...
On Tue, Feb 16, 2016 at 02:46:15PM +0800, Fam Zheng wrote:
> On Wed, 12/09 10:42, Peter Xu wrote:
> > +
> > +void hmp_info_dump(Monitor *mon, const QDict *qdict)
> > +{
> > +DumpQueryResult *result = qmp_query_dump(NULL);
>
> If something goes wrong, it is pro
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
Changes from v6:
- patch 9: fix leak of local_err due to patch switch.. [Fam]
- patch 10: assert "result" before use [Fam]
- patch 11: add Fam's reviewed-by.
For older patch, please refers to v6 series:
https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01299.html
Peter
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
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
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-comman
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
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
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
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: Fa
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
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
Reviewed-by: Fam Zheng
---
dump.c| 32
include/sysemu/dump.h | 9
ump
>From completed and total, we could know how much work
finished by calculating:
100.0 * completed / total (%)
Signed-off-by: Peter Xu
---
dump.c | 23 +++
qapi-schema.json | 32 +++-
qmp-commands.hx | 27 +++
On Tue, Feb 16, 2016 at 01:32:00PM +0100, Andrew Jones wrote:
> On Tue, Feb 16, 2016 at 03:50:53PM +0800, Peter Xu wrote:
> > Instead of malloc/free each time for DumpState, make it
> > static. Added DumpStatus to show status for dump.
>
> I see that the motivation for makin
Peter Xu (2):
pci: renaming PCIIOMMUFunc to PCIIOMMUASLookupFunc
pci: add PCIIOMMUOps and PCIIOMMUIntRemapFunc
hw/pci/pci.c | 21 -
include/hw/pci/pci.h | 14 --
include/hw/pci/pci_bus.h | 2 +-
3 files changed, 29 insertions(+), 8 deletions
There could be more than one ops for IOMMU in the future. Renaming
PCIIOMMUFunc to a more specific name better describes what it does,
which is to do address space lookup.
Signed-off-by: Peter Xu
---
hw/pci/pci.c | 2 +-
include/hw/pci/pci.h | 4 ++--
include/hw/pci/pci_bus.h
pci_setup_iommu_ops() is introduced. We can use this
instead of the origin pci_setup_iommu() one to extend interrupt
remapping on specific platform.
Signed-off-by: Peter Xu
---
hw/pci/pci.c | 21 -
include/hw/pci/pci.h | 10 ++
include/hw/pci/pci_bus.h | 2
On Tue, Feb 16, 2016 at 01:39:36PM +0100, Andrew Jones wrote:
> On Tue, Feb 16, 2016 at 03:50:58PM +0800, 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
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 write
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
AX" for enum types...)
Changes from v6:
- patch 9: fix leak of local_err due to patch switch.. [Fam]
- patch 10: assert "result" before use [Fam]
- patch 11: add Fam's reviewed-by.
For older patch, please refers to v6 series:
https://lists.gnu.org/archive/html/qemu-devel/2015-1
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
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
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
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-comman
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
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
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
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
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: Fa
ump
>From completed and total, we could know how much work
finished by calculating:
100.0 * completed / total (%)
Reviewed-by: Fam Zheng
Signed-off-by: Peter Xu
---
dump.c | 23 +++
qapi-schema.json | 32 +++-
qmp-comm
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
mistake.
Peter
On Thu, Feb 18, 2016 at 01:16:45PM +0800, Peter Xu wrote:
> 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
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 er
- test detached dump, command return immediately. When dump
finished, will receive event DUMP_COMPLETED with a message.
- test dump-query before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- libvirt
- test "virsh dump --memory-only" with default
might happen when dump got errors within the process (e.g., when
write_dump_header() fails, it will skip calling dump_cleanup(),
which will leads to memory leak for list elements in DumpState).
Signed-off-by: Peter Xu
---
dump.c | 78
This patch is only adding the QMP/HMP interface for "dump-query"
command, but not implementing them. This command could be used to
query background dump status. Please refer to the next patch to see
how dump status are defined.
Currently, only fake results are returned.
Signed-off-by
t;IN_PROGRESS", "percentage": "{0..100}%" }
3. no dump is running, and the last dump has finished:
{ "status": "SUCCEEDED|FAILED", "percentage": "N/A" }
It's mostly done. Except that we might need m
This patch only adds the interfaces, but not implements 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
---
dump.c | 5 +++--
hmp-commands.hx | 5 +++--
hmp.c
To get aligned with QMP interface, one new QMP event DUMP_COMPLETED
is added. It is used when user specified "detach" in dump, and
triggered when the dump finishes. Error message will be appended to
this event if the dump has failed.
Signed-off-by: Peter Xu
---
docs/qmp-event
By calculating the total_size and written_size of memory, we could
get relatively accurate percentage of finished dump.
Signed-off-by: Peter Xu
---
dump.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dump.c b/dump.c
index 65bd5fb..0fcad28 100644
--- a/dump.c
+++ b
should make sure each MemoryRegion would
only be referenced for once.
One global struct "GlobalDumpState" is added to store some global
informations for dump procedures. One mutex is used to protect the
global dump info.
Signed-off-by: Peter Xu
---
dump.c
ned-off-by: Peter Xu
---
dump.c| 36 +---
include/sysemu/dump.h | 9 +
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/dump.c b/dump.c
index 25298b7..65bd5fb 100644
--- a/dump.c
+++ b/dump.c
@@ -334,6 +334,8 @@ static void
Hi, all,
Sorry that I forgot to CC reviewers and maintainers when posting the
patch set. :(
Please review!
Thanks.
Peter
On 11/27/2015 10:48 AM, Peter Xu wrote:
> Sorry that this v2 series cannot be aligned with the v1 series. One
> patch is added at the begining of the series to do som
On 11/27/2015 12:31 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> This patch only adds the interfaces, but not implements them.
>> "detach" parameter is made optional, to make sure that all the old
>> dump-guest-memory requests will still be ab
On 11/27/2015 01:14 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> This patch implements "detach" for "dump-guest-memory" command. When
>> specified, one background thread is created to do the dump work.
>>
>> When there is a
On 11/27/2015 01:19 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> @@ -1659,8 +1660,17 @@ static void dump_process(DumpState *s, Error **errp)
>> static void *dump_thread(void *data)
>> {
>> GlobalDumpState *global = (GlobalDumpState *)data;
On 11/27/2015 12:28 PM, Fam Zheng wrote:
> I think when write_dump_header() returns a failure, it does call
> dump_cleanup(), in create_header{32,64}.
>
> But the changes of code in this patch look sane to me, and the new error
> handling is definitely looking better.
Yes, you are right. I will
On 11/27/2015 01:28 PM, Fam Zheng wrote:
> Looks good overall! I've replied patches with a few questions. Thanks!
>
> Fam
Thanks! Will wait for more comments and post v3 later.
Peter
On 11/27/2015 01:25 PM, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
>> This patch is only adding the QMP/HMP interface for "dump-query"
>> command, but not implementing them. This command could be used to
>> query background dump status. Please refer
On Fri, Nov 27, 2015 at 11:14:17AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 07:27, Peter Xu wrote:
> > If embed the mr pointer into GuestPhyBlock, then we might need to
> > ref/unref one MemoryRegion for multiple times (and I am not sure how
> > many, maybe it
On Fri, Nov 27, 2015 at 11:31:00AM +0100, Paolo Bonzini wrote:
>
[snip]
> > +
> > +static GlobalDumpState *dump_state_get_global(void)
> > +{
> > +static bool init = false;
> > +static GlobalDumpState global_dump_state;
> > +if (unlikely(!init)) {
> > +qemu_mutex_init(&global
On Fri, Nov 27, 2015 at 11:15:35AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 03:48, Peter Xu wrote:
> > +##
> > +# @DUMP_COMPLETED
> > +#
> > +# Emitted when background dump has completed
> > +#
> > +# Since: 2.6
> > +##
> > +{
On Fri, Nov 27, 2015 at 11:17:52AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 08:03, Peter Xu wrote:
> > > > +{ 'struct': 'DumpStatus',
> > > > + 'data': { 'status': 'str', 'percentage': &
On Fri, Nov 27, 2015 at 11:22:48AM +0100, Paolo Bonzini wrote:
>
>
> On 27/11/2015 03:48, Peter Xu wrote:
> > This patch implements the status changes inside dump process. When
> > query dump status, three possible results could be:
> >
> > 1. never started d
On Fri, Nov 27, 2015 at 01:14:25PM +0800, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
[snip]
>
> This patch doesn't handle the incoming migration case, i.e. when QEMU is
> started with "-incoming", or "-incoming defer". Dump can go wrong when
Hi, all,
I met one problem when trying to add a new public function in dump.h
named "dump_state_get_global" and using it in hmp.c. What I got is
something like:
In file included from /root/git/qemu/hmp.c:35:0:
/root/git/qemu/include/sysemu/dump.h:26:34: error: attempt to use poisoned
"TARGET_PAG
On Mon, Nov 30, 2015 at 09:06:45AM +0100, Markus Armbruster wrote:
> Peter Xu writes:
>
> > Hi, all,
> >
> > I met one problem when trying to add a new public function in dump.h
> > named "dump_state_get_global" and using it in hmp.c. What I got is
>
On Mon, Nov 30, 2015 at 10:12:10AM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 04:47, Peter Xu wrote:
> >
> > I met one problem when trying to add a new public function in dump.h
> > named "dump_state_get_global" and using it in hmp.c.
>
> Don
On Mon, Nov 30, 2015 at 10:28:08AM +0100, Markus Armbruster wrote:
> Paolo Bonzini writes:
>
> > On 30/11/2015 04:47, Peter Xu wrote:
> >>
> >> I met one problem when trying to add a new public function in dump.h
> >> named "dump_state_get_global&q
On Mon, Nov 30, 2015 at 11:36:41AM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 10:47, Peter Xu wrote:
> > So from what I understand from your reply, I could include the
> > percentage value into "query-dump", right? :)
>
> If you have the written and
mp, command return immediately. When dump
finished, will receive event DUMP_COMPLETED with a message.
- test query-dump before/during/after dump
- test kdump with zlib compression, w/ and w/o detach
- libvirt
- test "virsh dump --memory-only" with default format and
kdump-zlib
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()
before dump finish, no matter whether dump has succeeded or not.
Signed-off-by: Peter Xu
---
dump.c | 78
Signed-off-by: Peter Xu
---
dump.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dump.c b/dump.c
index c8ae5c3..5b9def3 100644
--- a/dump.c
+++ b/dump.c
@@ -1628,13 +1628,17 @@ void qmp_dump_guest_memory(bool paging, const char
*file,
DumpState *s;
Error
This patch only adds the interfaces, but not implements 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
---
dump.c | 5 +++--
hmp-commands.hx | 5 +++--
hmp.c
Add more documents to mention about "query-dump" and DUMP_COMPLETED
events.
Signed-off-by: Peter Xu
---
qapi-schema.json | 7 +--
qmp-commands.hx | 4 +++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 577c381..ce4acb2 10
Instead of malloc/free each time for DumpState, make it
static. Added DumpStatus to show status for dump.
This is to be used for detach dump.
Signed-off-by: Peter Xu
---
dump.c| 30 +++---
include/sysemu/dump.h | 2 ++
qapi-schema.json | 18
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: P
For now, it has no effect. It will be used in dump detach support.
Signed-off-by: Peter Xu
---
dump.c| 13 +
include/qemu-common.h | 4
qmp.c | 14 ++
3 files changed, 31 insertions(+)
diff --git a/dump.c b/dump.c
index c9ea878
No functional change. Cleanup only.
Signed-off-by: Peter Xu
---
dump.c| 19 ++-
include/sysemu/dump.h | 3 +++
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/dump.c b/dump.c
index 110dbf9..c8ae5c3 100644
--- a/dump.c
+++ b/dump.c
@@ -1451,6
One new QMP event DUMP_COMPLETED is added. It is used when user
specified "detach" in dump, and triggered when the dump finishes
(either succeeded or failed). If failed, one "err" data will be
passed with specific error message.
Signed-off-by: Peter Xu
---
docs
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
atest dump
>From written_bytes and total_bytes, we could see how much work
finished by calculating:
100.0 * written_bytes / total_bytes (%)
Signed-off-by: Peter Xu
---
dump.c | 10 ++
qapi-schema.json | 29 +
qmp-comm
It will calculate percentage of finished work from written_bytes and
total_bytes.
Signed-off-by: Peter Xu
---
hmp-commands-info.hx | 14 ++
hmp.c| 18 ++
hmp.h| 1 +
3 files changed, 33 insertions(+)
diff --git a/hmp-commands-info.hx
On Mon, Nov 30, 2015 at 11:21:23AM -0700, Eric Blake wrote:
> On 11/26/2015 07:48 PM, Peter Xu wrote:
> > This patch only adds the interfaces, but not implements them.
>
> s/not implements/does not implement/
>
> > "detach" parameter is made optional, to make su
On Mon, Nov 30, 2015 at 11:18:48AM -0700, Eric Blake wrote:
> On 11/26/2015 07:48 PM, Peter Xu wrote:
> > To get aligned with QMP interface, one new QMP event DUMP_COMPLETED
> > is added. It is used when user specified "detach" in dump, and
> > triggered when the du
On Mon, Nov 30, 2015 at 11:27:35AM -0700, Eric Blake wrote:
> On 11/26/2015 07:48 PM, Peter Xu wrote:
> > This patch is only adding the QMP/HMP interface for "dump-query"
> > command, but not implementing them. This command could be used to
> > query background d
On Mon, Nov 30, 2015 at 03:05:10PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > This patch only adds the interfaces, but not implements them.
> > "detach" parameter is made optional, to make sure that all the old
> > dump-guest-memory requ
On Mon, Nov 30, 2015 at 02:00:28PM +0100, Paolo Bonzini wrote:
> > +/* init dump state with specific status */
> > +static void dump_state_prepare(DumpState *s, DumpStatus status)
> > +{
> > +bzero(s, sizeof(*s));
> > +s->status = status;
>
> Either use memcpy, or
>
> s = (DumpState)
On Mon, Nov 30, 2015 at 03:08:24PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, 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 detach d
On Mon, Nov 30, 2015 at 01:55:01PM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 12:32, Peter Xu wrote:
> > if (*errp) {
> > s->status = DUMP_STATUS_FAILED;
>
> Why not move this "if" to dump_process as well?
Yes. I did that in another pa
On Mon, Nov 30, 2015 at 03:12:31PM -0700, Eric Blake wrote:
> On 11/30/2015 04:32 AM, Peter Xu wrote:
> > +Example:
> > +
> > +{ "event": "DUMP_COMPLETED",
> > + "data": {} }
>
> Please keep this file sorted. The insertion should be
On Mon, Nov 30, 2015 at 01:56:42PM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 12:32, Peter Xu wrote:
> > +{
> > +DumpQueryResult *result = g_malloc0(sizeof(*result));
> > +DumpState *state = dump_state_get_global();
> > +result->sta
1 - 100 of 9522 matches
Mail list logo