[Qemu-devel] [resend PATCH v2] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-09-18 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for freeze specified fs. The valid mountpoints list member are [1]: The path of a mounted folder, for example, Y:\MountX\ A drive letter, for example, D:\ A volume GUID path of the form \\?\Volume{GUID}\, where GUID identifies the volume

[Qemu-devel] [PATCH v2] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-08-30 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for freeze specified fs. The valid mountpoints list member are [1]: The path of a mounted folder, for example, Y:\MountX\ A drive letter, for example, D:\ A volume GUID path of the form \\?\Volume{GUID}\, where GUID identifies the volume

Re: [Qemu-devel] [resend][PATCH] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-08-30 Thread Chen Hanxiao
At 2018-08-24 04:22:08, "Michael Roth" wrote: >Quoting Chen Hanxiao (2018-08-09 20:13:48) >> From: Chen Hanxiao >> >> This patch add support for freeze specified fs. >> >> The valid mountpoints list member are [1]: >> >> The path of

[Qemu-devel] [resend][PATCH] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-08-09 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for freeze specified fs. The valid mountpoints list member are [1]: The path of a mounted folder, for example, Y:\MountX\ A drive letter, for example, D:\ A volume GUID path of the form \\?\Volume{GUID}\, where GUID identifies the volume

[Qemu-devel] [PATCH] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-07-20 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for freeze specified fs. The valid mountpoints list member are [1]: The path of a mounted folder, for example, Y:\MountX\ A drive letter, for example, D:\ A volume GUID path of the form \\?\Volume{GUID}\, where GUID identifies the volume

[Qemu-devel] [PATCH resend v2] qga: unset frozen state if no mount points are frozen

2018-06-14 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. So call ga_unset_frozen in this senario. Also, if we return 0 frozen fs, there is no need to call guest-fsfreeze-thaw. Cc: Michael Roth Signed-off-by

[Qemu-devel] [PATCH v5.2 0/2] qga: report the usage of fs in guests

2018-06-14 Thread Chen Hanxiao
This series report the usage of guest's fs by "used_bytes" and "total_bytes" in guest-get-fsinfo. Chen Hanxiao (2): qga: add mountpoint usage info to GuestFilesystemInfo qga-win: add driver path usage to GuestFilesystemInfo qga/commands-posix.c | 15

[Qemu-devel] [PATCH v5.2 2/2] qga-win: add driver path usage to GuestFilesystemInfo

2018-06-14 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of windows driver path. The usage of fs stored as used_bytes and total_bytes. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- v2: unpack usage as used-bytes and total-bytes qga/commands-win32.c | 12 1 file

[Qemu-devel] [PATCH v5.2 1/2] qga: add mountpoint usage info to GuestFilesystemInfo

2018-06-14 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. The usage of fs stored as used_bytes and total_bytes. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Daniel P. Berrangé Reviewed-by: Eric Blake Signed-of

Re: [Qemu-devel] [PATCH v5.1 2/2] qga-win: add driver path usage to GuestFilesystemInfo

2018-06-02 Thread Chen Hanxiao
At 2018-06-02 01:15:14, "Eric Blake" wrote: >On 06/01/2018 11:57 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao ... >> fs->mountpoint = g_strdup("System Reserved"); >> } else { >> fs->mountpoint = g_strndup(m

Re: [Qemu-devel] [PATCH v5 1/2] qga: add mountpoint usage to GuestFilesystemInfo

2018-06-01 Thread Chen Hanxiao
在 2018-06-01 23:47:04,"Eric Blake" 写道: >On 06/01/2018 10:27 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> This patch adds support for getting the usage of mounted >> filesystem. >> The usage of fs stored as used_bytes and total_bytes. >>

[Qemu-devel] [PATCH v5.1 0/2] qga: report the usage of fs in guests

2018-06-01 Thread Chen Hanxiao
This series report the usage of guest's fs by "used_bytes" and "total_bytes" in guest-get-fsinfo. Chen Hanxiao (2): qga: add mountpoint usage info to GuestFilesystemInfo qga-win: add driver path usage to GuestFilesystemInfo qga/commands-posix.c | 18 +++

[Qemu-devel] [PATCH v5.1 2/2] qga-win: add driver path usage to GuestFilesystemInfo

2018-06-01 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of windows driver path. The usage of fs stored as used_bytes and total_bytes. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- v2: unpack usage as used-bytes and total-bytes qga/commands-win32.c | 12 1 file

[Qemu-devel] [PATCH v5.1 1/2] qga: add mountpoint usage info to GuestFilesystemInfo

2018-06-01 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. The usage of fs stored as used_bytes and total_bytes. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Eric Blake Cc: Daniel P. Berrangé Signed-off-by: Chen Hanxi

Re: [Qemu-devel] [PATCH v4] qga: add mountpoint usage to GuestFilesystemInfo

2018-06-01 Thread Chen Hanxiao
At 2018-06-01 20:19:56, "Daniel P. Berrangé" wrote: >On Fri, Jun 01, 2018 at 02:11:21PM +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> This patch adds support for getting the usage of mounted >> filesystem. >> It's very useful when

[Qemu-devel] [PATCH v5 1/2] qga: add mountpoint usage to GuestFilesystemInfo

2018-06-01 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. The usage of fs stored as used_bytes and total_bytes. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Eric Blake Cc: Daniel P. Berrangé Signed-off-by: Ch

[Qemu-devel] [PATCH v5 0/2] qga: report the usage of fs in

2018-06-01 Thread Chen Hanxiao
This series report the usage of guest's fs by "used_bytes" and "total_bytes" by guest-get-fsinfo. Chen Hanxiao (2): qga: add mountpoint usage to GuestFilesystemInfo qga-win: add driver path usage to GuestFilesystemInfo qga/commands-posix.c | 19

[Qemu-devel] [PATCH v5 2/2] qga-win: add driver path usage to GuestFilesystemInfo

2018-06-01 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of windows driver path. The usage of fs stored as used_bytes and total_bytes. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- qga/commands-win32.c | 13 + 1 file changed, 13 insertions(+) diff --git a/qga/commands

[Qemu-devel] [PATCH v4] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-31 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Eric Blake Signed-off-by: Chen Hanxiao --- v2: add description in qapi-schema and version numbers v3: use

[Qemu-devel] [PATCH v3] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-30 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Eric Blake Signed-off-by: Chen Hanxiao --- v2: add description in qapi-schema and version numbers v3: use

[Qemu-devel] [PATCH v2] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-30 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- v2: add description in qapi-schema and version numbers qga/commands-po

Re: [Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-30 Thread Chen Hanxiao
At 2018-05-30 11:19:27, "Eric Blake" wrote: >On 05/29/2018 10:01 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> This patch adds support for getting the usage of mounted >> filesystem. >> It's very useful when we try to monitor guest&#x

[Qemu-devel] [PATCH] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-29 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Use df of coreutils for reference. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- qga/commands-posix.c | 17 +

[Qemu-devel] [PATCH resend v2] qga: unset frozen state if no mount points are frozen

2018-05-29 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. So call ga_unset_frozen in this senario. Also, if we return 0 frozen fs, there is no need to call guest-fsfreeze-thaw. Cc: Michael Roth Signed-off-by

Re: [Qemu-devel] [PATCH resend v2] qga: unset frozen state if no mount points are frozen

2018-04-21 Thread Chen Hanxiao
At 2018-04-02 14:15:48, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >If we set mountpoints to qmp_guest_fsfreeze_freeze_list, >we may got nothing to freeze as all mountpoints are >not valid. >So call ga_unset_frozen in this senario. > >Also, if we return 0 f

[Qemu-devel] [PATCH resend v2] qga: unset frozen state if no mount points are frozen

2018-04-01 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. So call ga_unset_frozen in this senario. Also, if we return 0 frozen fs, there is no need to call guest-fsfreeze-thaw. Cc: Michael Roth Signed-off-by

[Qemu-devel] [PATCH resend v2] qga: unset frozen state if no mount point is frozen

2018-03-14 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. So call ga_unset_frozen in this senario. Also, if we return 0 frozen fs, there is no need to call guest-fsfreeze-thaw. Cc: Michael Roth Signed-off-by

[Qemu-devel] [PATCH v2] qga: unset frozen state if no mount point is frozen

2018-02-22 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. So call ga_unset_frozen in this senario. Also, if we return 0 frozen fs, there is no need to call guest-fsfreeze-thaw. Cc: Michael Roth Signed-off-by

Re: [Qemu-devel] [Resend][PATCH] qga: unset frozen state if no mount points are frozen

2018-02-21 Thread Chen Hanxiao
At 2018-02-16 02:41:25, "Michael Roth" wrote: >Quoting Chen Hanxiao (2018-02-08 19:35:42) >> From: Chen Hanxiao >> >> If we set mountpoints to qmp_guest_fsfreeze_freeze_list, >> we may got nothing to freeze as all mountpoints are >> not valid. >>

[Qemu-devel] [Resend][PATCH] qga: unset frozen state if no mount points are frozen

2018-02-08 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. Call ga_unset_frozen in this senario. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- Rebase on master qga/commands-posix.c | 6 ++ 1 file changed

[Qemu-devel] [resend][PATCH] qga: unset frozen state if no mount points are frozen

2018-01-11 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. Call ga_unset_frozen in this senario. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- Rebase on master qga/commands-posix.c | 6 ++ 1 file changed

Re: [Qemu-devel] [PATCH] qga: unset frozen state if no mount points are frozen

2018-01-04 Thread Chen Hanxiao
At 2017-12-16 15:34:17, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >If we set mountpoints to qmp_guest_fsfreeze_freeze_list, >we may got nothing to freeze as all mountpoints are >not valid. >Call ga_unset_frozen in this senario. > >Cc: Michael Roth >Si

[Qemu-devel] [PATCH] qga: unset frozen state if no mount points are frozen

2017-12-15 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. Call ga_unset_frozen in this senario. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- qga/commands-posix.c | 6 ++ 1 file changed, 6 insertions

Re: [Qemu-devel] [Resend][PATCH] qapi-docs: fix a comment typo

2017-11-07 Thread Chen Hanxiao
在 2017-11-08 03:43:20,"Michael Roth" 写道: >Quoting Michael Roth (2017-11-07 11:06:55) >> Quoting Chen Hanxiao (2017-11-07 05:37:16) >> > From: Chen Hanxiao >> > >> > s/Subection/Subsection >> > >> > Reviewed-by: Marc-André Lur

[Qemu-devel] [Resend][PATCH] qapi-docs: fix a comment typo

2017-11-07 Thread Chen Hanxiao
From: Chen Hanxiao s/Subection/Subsection Reviewed-by: Marc-André Lureau Signed-off-by: Chen Hanxiao --- docs/devel/qapi-code-gen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt index f04c63fe82..06ab699066

Re: [Qemu-devel] [PATCH] qga-win: fall back to hardcoded user and group names if LookupAccountSidW failed

2017-11-02 Thread Chen Hanxiao
At 2017-10-27 09:05:25, "Michael Roth" wrote: >Quoting Tomáš Golembiovský (2017-10-26 08:54:37) >> On Wed, 25 Oct 2017 16:58:07 -0500 >> Michael Roth wrote: >> >> > Quoting Tomáš Golembiovský (2017-09-29 16:31:02) >> > > On Fri, 2

Re: [Qemu-devel] [PATCH] qga-win: fall back to hardcoded user and group names if LookupAccountSidW failed

2017-10-26 Thread Chen Hanxiao
At 2017-10-26 17:59:34, "Michael Roth" wrote: >Quoting Chen Hanxiao (2017-10-26 04:27:40) >> >> >> At 2017-10-26 05:58:07, "Michael Roth" wrote: >> >Quoting Tomáš Golembiovský (2017-09-29 16:31:02) >> >> On Fri, 29 Sep 2017 17:11

Re: [Qemu-devel] [PATCH] qga-win: fall back to hardcoded user and group names if LookupAccountSidW failed

2017-10-26 Thread Chen Hanxiao
At 2017-10-26 05:58:07, "Michael Roth" wrote: >Quoting Tomáš Golembiovský (2017-09-29 16:31:02) >> On Fri, 29 Sep 2017 17:11:22 +0800 >> Chen Hanxiao wrote: >> >> > From: Chen Hanxiao >> > >> > On some of windows (win08 sp2), >&g

[Qemu-devel] [Resend][PATCH] qga-win: don't hang if vss hold writes timeout

2017-10-17 Thread Chen Hanxiao
From: Chen Hanxiao When VM is in a heavy IO, if the command "guest-fsfreeze-freeze" is executed, VSS may timeout when trying to hold writes. Inside guest, Event ID 12298(VSS_ERROR_HOLD_WRITES_TIMEOUT) is logged in the Event Viewer. At that time, if we call AbortBackup, qga may ha

[Qemu-devel] [PATCH] qapi-docs: fix a comment typo

2017-10-11 Thread Chen Hanxiao
From: Chen Hanxiao s/Subection/Subsection Signed-off-by: Chen Hanxiao --- docs/devel/qapi-code-gen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt index f04c63fe82..06ab699066 100644 --- a/docs/devel/qapi

Re: [Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout

2017-09-25 Thread Chen Hanxiao
At 2017-09-22 10:46:06, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >When VM is in a heavy IO, if the command "guest-fsfreeze-freeze" >is executed, VSS may timeout when trying to hold writes. > >Inside guest, Event ID 12298(VSS_ERROR_HOLD_WRITES_TIMEOUT)

Re: [Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout

2017-09-22 Thread Chen Hanxiao
(from d: to c:), then do fsfreeze when IO is in progress. At this time, we had a very chance to see that qga hang for a long time. Libvirt will not recieve a reply. qemu-ga service even don't answer `net stop` command. Regards, - Chen > Regards, > Tomoki >  > 

[Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout

2017-09-21 Thread Chen Hanxiao
From: Chen Hanxiao When VM is in a heavy IO, if the command "guest-fsfreeze-freeze" is executed, VSS may timeout when trying to hold writes. Inside guest, Event ID 12298(VSS_ERROR_HOLD_WRITES_TIMEOUT) is logged in the Event Viewer. At that time, if we call AbortBackup, qga may ha

[Qemu-devel] [PATCH v2] vhost_net: don't enable vring if backend lack this feature

2016-09-23 Thread Chen Hanxiao
From: Chen Hanxiao If backend(such as dpdk) lack the feather, don't assume it in vring_enable. Or we may fail in vhost_net_start, then we can't use vhost. This will bring compat issue with old version backend. Signed-off-by: Chen Hanxiao --- v2: return 0 there if protocol featu

[Qemu-devel] [PATCH resend] vhost_net: don't enable vring if backend lack this feature

2016-09-13 Thread Chen Hanxiao
From: Chen Hanxiao If backend(such as dpdk) lack this feature, don't assume it and mark it in vring_enable. Or we may fail in vhost_net_start, then we can't use vhost net. This will bring compat issue with old version backend. Signed-off-by: Chen Hanxiao --- hw/net/vhost_

Re: [Qemu-devel] [PATCH] vhost_net: don't enable vring if backend lack this feature

2016-09-08 Thread Chen Hanxiao
At 2016-09-03 16:44:47, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >If backend(such as dpdk) lack this feature, >don't assume it and mark it in vring_enable. >Or we may fail in vhost_net_start, >then we can't use vhost net. >This will bring compat issu

[Qemu-devel] [PATCH] vhost_net: don't enable vring if backend lack this feature

2016-09-03 Thread Chen Hanxiao
From: Chen Hanxiao If backend(such as dpdk) lack this feature, don't assume it and mark it in vring_enable. Or we may fail in vhost_net_start, then we can't use vhost net. This will bring compat issue with old version backend. Signed-off-by: Chen Hanxiao --- hw/net/vhost_

Re: [Qemu-devel] [PATCH] vhost-user: return if no net clients found

2016-09-01 Thread Chen Hanxiao
At 2016-09-01 20:52:44, "Marc-André Lureau" wrote: >Hi > >On Thu, Sep 1, 2016 at 4:00 PM Chen Hanxiao wrote: > >> >> Hi, here is the backtrace: >> >> #0 net_vhost_user_event (opaque=0x7fc2f6893be0, event=5) at >> net/vhost-user.c:196

Re: [Qemu-devel] [PATCH] vhost-user: return if no net clients found

2016-09-01 Thread Chen Hanxiao
在 2016-09-01 19:43:31,"Marc-André Lureau" 写道: Hi On Thu, Sep 1, 2016 at 2:15 PM Chen Hanxiao wrote: From: Chen Hanxiao If we can't find a suitable net client, return directly. Or we will got a segmentation fault. Signed-off-by: Chen Hanxiao --- net/vhost-user.c | 3 +++

[Qemu-devel] [PATCH] vhost-user: return if no net clients found

2016-09-01 Thread Chen Hanxiao
From: Chen Hanxiao If we can't find a suitable net client, return directly. Or we will got a segmentation fault. Signed-off-by: Chen Hanxiao --- net/vhost-user.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index b0595f8..fb96db7 100644 ---

Re: [Qemu-devel] [PATCH v2 1/2] qmp: add support for system_suspend

2015-12-01 Thread Chen Hanxiao
On 12/01/2015 02:10 AM, Eric Blake wrote: On 11/27/2015 08:01 PM, Chen Hanxiao wrote: From: Chen Hanxiao This patch add support for system_suspend qmp command. Signed-off-by: Chen Hanxiao --- qapi-schema.json | 9 + qmp-commands.hx | 21 + qmp.c

[Qemu-devel] [PATCH v2 2/2] hmp: add support for system_suspend

2015-11-27 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for system_suspend hmp command. Signed-off-by: Chen Hanxiao --- hmp-commands.hx | 14 ++ hmp.c | 5 + hmp.h | 1 + 3 files changed, 20 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index bb52e4d

[Qemu-devel] [PATCH v2 1/2] qmp: add support for system_suspend

2015-11-27 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for system_suspend qmp command. Signed-off-by: Chen Hanxiao --- qapi-schema.json | 9 + qmp-commands.hx | 21 + qmp.c| 5 + 3 files changed, 35 insertions(+) diff --git a/qapi-schema.json b/qapi

[Qemu-devel] [PATCH v2 0/2] qmp/hmp: add support for system_suspend

2015-11-27 Thread Chen Hanxiao
From: Chen Hanxiao Chen Hanxiao (2): qmp: add support for system_suspend hmp: add support for system_suspend hmp-commands.hx | 14 ++ hmp.c| 5 + hmp.h| 1 + qapi-schema.json | 9 + qmp-commands.hx | 21 + qmp.c

Re: [Qemu-devel] [PATCH] qmp/hmp: add support for system_suspend

2015-11-27 Thread Chen Hanxiao
On 11/28/2015 01:53 AM, Eric Blake wrote: On 11/27/2015 08:15 AM, Chen Hanxiao wrote: From: Chen Hanxiao This patch add support for system_suspend command. Signed-off-by: Chen Hanxiao --- hmp-commands.hx | 14 ++ hmp.c | 5 + hmp.h | 1 + qmp.c

[Qemu-devel] [PATCH] qmp/hmp: add support for system_suspend

2015-11-27 Thread Chen Hanxiao
From: Chen Hanxiao This patch add support for system_suspend command. Signed-off-by: Chen Hanxiao --- hmp-commands.hx | 14 ++ hmp.c | 5 + hmp.h | 1 + qmp.c | 5 + 4 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp

Re: [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment

2015-07-28 Thread Chen, Hanxiao
> -Original Message- > From: qemu-devel-bounces+chenhanxiao=cn.fujitsu@nongnu.org > [mailto:qemu-devel-bounces+chenhanxiao=cn.fujitsu@nongnu.org] On Behalf Of > Chen Hanxiao > Sent: Friday, July 24, 2015 11:12 AM > To: Paolo Bonzini > Cc: qemu-devel@nongnu

Re: [Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer error to guest

2015-07-28 Thread Chen, Hanxiao
Hi, Alex > -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > To: Chen, Hanxiao > Cc: qemu-devel@nongnu.org; Chen, Fan > Subject: Re: [Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer error to > guest > > On Thu, 2015-07-16 at 1

[Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment

2015-07-23 Thread Chen Hanxiao
Use ROUND_UP instead. Signed-off-by: Chen Hanxiao --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 7d60e15..bb16c50 100644 --- a/exec.c +++ b/exec.c @@ -1207,7 +1207,7 @@ static void *file_ram_alloc(RAMBlock *block, unlink(filename

[Qemu-devel] [PATCH] exec: use macro for alignment

2015-07-23 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 7d60e15..f84b485 100644 --- a/exec.c +++ b/exec.c @@ -1153,6 +1153,8 @@ static long gethugepagesize(const char *path, Error **errp) return fs.f_bsize

Re: [Qemu-devel] [PATCH v2] pci_add_capability: remove duplicate comments

2015-07-20 Thread Chen, Hanxiao
> -Original Message- > From: qemu-devel-bounces+chenhanxiao=cn.fujitsu@nongnu.org > [mailto:qemu-devel-bounces+chenhanxiao=cn.fujitsu@nongnu.org] On Behalf Of > Chen Hanxiao > Sent: Tuesday, July 14, 2015 4:16 PM > To: Michael S. Tsirkin; qemu-devel@nongnu.or

[Qemu-devel] [PATCH v12 15/15] vfio: add 'aer' property to expose aercap

2015-07-15 Thread Chen Hanxiao
From: Chen Fan add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 2 ++ 1 file changed, 2

[Qemu-devel] [PATCH v12 09/15] pci: add bus reset_notifiers callbacks for host bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan Particularly, For vfio devices, Once need to recovery devices by bus reset such as AER, we always need to reset the host bus to recovery the devices under the bus, so we need to add pci bus callbacks to specify to do host bus reset. Signed-off-by: Chen Fan Signed-off-by: Chen

[Qemu-devel] [PATCH v12 01/15] vfio: extract vfio_get_hot_reset_info as a single function

2015-07-15 Thread Chen Hanxiao
From: Chen Fan the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 65 ++- 1 file changed, 47 insertions

[Qemu-devel] [PATCH v12 07/15] vfio: add aer support for vfio device

2015-07-15 Thread Chen Hanxiao
From: Chen Fan Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 89

[Qemu-devel] [PATCH v12 08/15] vfio: add check host bus reset is support or not

2015-07-15 Thread Chen Hanxiao
non-AER supporting vfio-pci devices on or below the target bus to verify they have a reset mechanism. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 162 +++--- 1 file changed, 155 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PATCH v12 14/15] vfio-pci: pass the aer error to guest

2015-07-15 Thread Chen Hanxiao
error. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 45 +++-- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index bd67608..1e04c1e 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c

[Qemu-devel] [PATCH v12 12/15] vfio: do hot bus reset when do virtual secondary bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan when do virtual secondary bus reset, the vfio device under this bus need to do host bus reset to reset the device. so add this case. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 31 +++ 1 file changed, 31 insertions

[Qemu-devel] [PATCH v12 10/15] vfio: add sec_bus_reset notifier to notify physical bus reset is needed

2015-07-15 Thread Chen Hanxiao
From: Chen Fan Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index ed4d87e..bab72a4 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio

[Qemu-devel] [PATCH v12 06/15] aer: impove pcie_aer_init to support vfio device

2015-07-15 Thread Chen Hanxiao
: Chen Fan Signed-off-by: Chen Hanxiao --- hw/pci-bridge/ioh3420.c| 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-bridge/xio3130_upstream.c | 2 +- hw/pci/pcie_aer.c | 4 ++-- include/hw/pci/pcie_aer.h | 2 +- 5 files changed, 6 insertions(+), 6

[Qemu-devel] [PATCH v12 11/15] vfio: modify vfio_pci_hot_reset to support bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan the vfio_pci_hot_reset differentiate the single and multi in-used devices for reset. but in multi case, when some dependent devices are not assigned to VM, the devices can not be recovered by driver. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 13

[Qemu-devel] [PATCH v12 13/15] pcie_aer: expose pcie_aer_msg() interface

2015-07-15 Thread Chen Hanxiao
From: Chen Fan For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan Reviewed-by: Marcel Apfelbaum Signed-off-by: Chen Hanxiao --- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_aer.h | 1 + 2

[Qemu-devel] [PATCH v12 03/15] pcie: modify the capability size assert

2015-07-15 Thread Chen Hanxiao
From: Chen Fan Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE, fix the corresponding assert. Signed-off-by: Chen Fan Reviewed-by: Marcel Apfelbaum Signed-off-by: Chen Hanxiao --- hw/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci

[Qemu-devel] [PATCH v12 05/15] vfio: add pcie extanded capability support

2015-07-15 Thread Chen Hanxiao
From: Chen Fan For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio

[Qemu-devel] [PATCH v12 04/15] vfio: make the 4 bytes aligned for capability size

2015-07-15 Thread Chen Hanxiao
From: Chen Fan this function search the capability from the end, the last size should 0x100 - pos, not 0xff - pos. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v12 02/15] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan Signed-off-by: Chen Hanxiao --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer error to guest

2015-07-15 Thread Chen Hanxiao
From: Chen Fan For now, when qemu receives an error from host aer report by vfio pci passthough devices, qemu just terminate the guest. Usually user want to know what error occurred rather than stop the guest. This patches add aer capability support for vfio device, then pass the error to guest,

[Qemu-devel] [PATCH v2] pci_add_capability: remove duplicate comments

2015-07-14 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- hw/pci/pci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 442f822..a017614 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2101,12 +2101,10 @@ static void pci_del_option_rom(PCIDevice *pdev

[Qemu-devel] [PATCH] pci_add_capability: remove duplicate comments

2015-07-13 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- hw/pci/pci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 442f822..dfd2abc 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2101,12 +2101,10 @@ static void pci_del_option_rom(PCIDevice *pdev

[Qemu-devel] [PATCH] docs/writing-qmp-commands: fix a typo

2015-05-29 Thread Chen Hanxiao
s/interation/iteration Signed-off-by: Chen Hanxiao --- docs/writing-qmp-commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.txt index f3df206..ab1fdd3 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs

Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG device

2012-10-10 Thread Chen HanXiao
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Wednesday, October 10, 2012 2:34 PM > To: Chen HanXiao > Cc: 'Christoph Hellwig'; qemu-devel@nongnu.org > Subject: Re: [PATCH] Use SCSI command t

Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG device

2012-10-09 Thread Chen HanXiao
Hi > -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Wednesday, October 10, 2012 1:21 AM > To: Chen HanXiao > Cc: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH] Use SCSI command to get size of SG device > > On Tue, Oct 09,

[Qemu-devel] [PATCH] Use SCSI command to get size of SG device

2012-10-09 Thread Chen HanXiao
When we use SCSI generic device as disk image, function lseek could not get the size of this kind of device. So try to use SCSI command Read Capacity(10) when lseek failed to get the size of SCSI generic device. Signed-off-by: Chen Hanxiao --- block/raw-posix.c | 46