[Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel

2013-12-01 Thread Lin Ma
Signed-off-by: Lin Ma --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 98c7696..0ac4608 100644 --- a/migration.c +++ b/migration.c @@ -751,7 +751,7 @@ static void *buffered_file_thread(void *opaque) } out: -if (ret &l

[Qemu-devel] [PATCH] Fix incorect state information for migrate_cancel

2013-12-02 Thread Lin Ma
Signed-off-by: Lin Ma --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 98c7696..0ac4608 100644 --- a/migration.c +++ b/migration.c @@ -751,7 +751,7 @@ static void *buffered_file_thread(void *opaque) } out: -if (ret &l

[Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel

2013-12-05 Thread Lin Ma
Signed-off-by: Lin Ma --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 98c7696..0ac4608 100644 --- a/migration.c +++ b/migration.c @@ -751,7 +751,7 @@ static void *buffered_file_thread(void *opaque) } out: -if (ret &l

[Qemu-devel] [PATCH] object_del: Prevent removing an in-use memory backend object

2015-03-19 Thread Lin Ma
:\ assertion failed: (obj->parent != NULL) Aborted The patch prevents removing an in-use mem backend and outputs an error msg. Signed-off-by: Lin Ma --- qmp.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qmp.c b/qmp.c index c479e77..0086e2d 100644 --- a/qmp.c ++

[Qemu-devel] 答复: Re: [PATCH] object_del: Prevent removing an in-use memory backend object

2015-03-23 Thread Lin Ma
back, The other for adding the callback impl in hostmem-ram.c and hostmem-file.c thanks, Lin >>> Igor Mammedov 2015-3-20 下午 18:18 >>> On Fri, 20 Mar 2015 12:14:58 +0800 Lin Ma wrote: > showing a memory device whose memdev is removed leads an assert: > > (qemu) objec

[Qemu-devel] [PATCH 2/2] memory-backend: Add can_be_deleted impl for ram-backend and file-backend

2015-03-23 Thread Lin Ma
The can_be_deleted callback returns false if the backend is in used, Otherwise returns true. Signed-off-by: Lin Ma --- backends/hostmem-file.c | 12 backends/hostmem-ram.c | 12 2 files changed, 24 insertions(+) diff --git a/backends/hostmem-file.c b/backends/hostmem

[Qemu-devel] [PATCH 1/2] object: Add can_be_deleted callback to TypeInfo and TypeImpl

2015-03-23 Thread Lin Ma
Add can_be_deleted callback, If it is not null and returns false, The qmp_object_del won't delete the given object. Signed-off-by: Lin Ma --- include/qom/object.h | 12 qmp.c| 7 +++ qom/object.c | 12 3 files changed, 31 inser

Re: [Qemu-devel] [PATCH] object_del: Prevent removing an in-use memory backend object

2015-03-23 Thread Lin Ma
在 2015年03月20日 18:17, Igor Mammedov 写道: On Fri, 20 Mar 2015 12:14:58 +0800 Lin Ma wrote: showing a memory device whose memdev is removed leads an assert: (qemu) object_add memory-backend-ram,id=ram0,size=128M (qemu) device_add pc-dimm,id=d0,memdev=ram0 (qemu) object_del ram0 (qemu) info

Re: [Qemu-devel] [PATCH 1/2] object: Add can_be_deleted callback to TypeInfo and TypeImpl

2015-03-23 Thread Lin Ma
在 2015年03月23日 20:52, Andreas Färber 写道: Hi Lin, Am 23.03.2015 um 11:10 schrieb Lin Ma: Add can_be_deleted callback, If it is not null and returns false, The qmp_object_del won't delete the given object. Signed-off-by: Lin Ma --- include/qom/object.h | 12

Re: [Qemu-devel] [PATCH 1/2] object: Add can_be_deleted callback to TypeInfo and TypeImpl

2015-03-23 Thread Lin Ma
在 2015年03月23日 20:06, Paolo Bonzini 写道: On 23/03/2015 11:36, Peter Crosthwaite wrote: I don't think TypeInfo is the right place for this. You can however define function hooks for Object in ObjectClass. See the unparent field of ObjectClass for a precedent. In this case, the right place could

Re: [Qemu-devel] [PATCH 1/2] object: Add can_be_deleted callback to TypeInfo and TypeImpl

2015-03-25 Thread Lin Ma
在 2015年03月23日 21:30, Igor Mammedov 写道: On Mon, 23 Mar 2015 14:13:07 +0100 Andreas Färber wrote: Hi, For consistency in git-log, please use "qom:" rather than "object:". Am 23.03.2015 um 13:06 schrieb Paolo Bonzini: On 23/03/2015 11:36, Peter Crosthwaite wrote: I don't think TypeInfo is th

[Qemu-devel] [PATCH v3 0/2] Add generic can_be_deleted to UserCreatableClass.

2015-03-26 Thread Lin Ma
tmem-ram.c. V1: Initial version, hard coded in object_del to prevent removing an in-use host memory backend. Lin Ma (2): qom: Add can_be_deleted callback to UserCreatableClass hostmem: Prevent removing an in-use memory backend object backends/hostmem.c | 14 ++ i

[Qemu-devel] [PATCH v3 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-26 Thread Lin Ma
If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 3 +++ qmp.c | 13 + 2 files changed, 16 insertions(+) diff --git a/in

[Qemu-devel] [PATCH v3 2/2] hostmem: Prevent removing an in-use memory backend object

2015-03-26 Thread Lin Ma
:\ assertion failed: (obj->parent != NULL) Aborted The patch prevents removing an in-use mem backend and error out. Signed-off-by: Lin Ma --- backends/hostmem.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 99e8

[Qemu-devel] [PATCH v4 0/2] Add generic can_be_deleted to UserCreatableClass.

2015-03-26 Thread Lin Ma
neric, add the can_be_deleted callback to TypeInfo and TypeImpl. Implement the callback in hostmem-file.c and hostmem-ram.c. V1: Initial version, hard coded in object_del to prevent removing an in-use host memory backend. Lin Ma (2): qom: Add can_be_deleted callback to UserCreatableClass

[Qemu-devel] [PATCH v4 2/2] hostmem: Prevent removing an in-use memory backend object

2015-03-26 Thread Lin Ma
:\ assertion failed: (obj->parent != NULL) Aborted The patch prevents removing an in-use mem backend and error out. Signed-off-by: Lin Ma --- backends/hostmem.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 99e8

[Qemu-devel] [PATCH v4 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-26 Thread Lin Ma
If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 14 ++ qmp.c | 5 + qom/object_interfaces.c

Re: [Qemu-devel] [PATCH v4 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Lin Ma
在 2015年03月27日 22:35, Igor Mammedov 写道: On Fri, 27 Mar 2015 13:36:11 +0800 Lin Ma wrote: If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h

[Qemu-devel] [PATCH v5 0/2] Add generic can_be_deleted to UserCreatableClass.

2015-03-27 Thread Lin Ma
tableClass. Move the backend callback implementation to hostmem.c. V2: Make it generic, add the can_be_deleted callback to TypeInfo and TypeImpl. Implement the callback in hostmem-file.c and hostmem-ram.c. V1: Initial version, hard coded in object_del to prevent removing an in-use host memory back

[Qemu-devel] [PATCH v5 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Lin Ma
If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 14 ++ qmp.c | 5 + qom/object_interfaces.c

[Qemu-devel] [PATCH v5 2/2] hostmem: Prevent removing an in-use memory backend

2015-03-27 Thread Lin Ma
:\ assertion failed: (obj->parent != NULL) Aborted The patch prevents removing an in-use mem backend and error out. Signed-off-by: Lin Ma --- backends/hostmem.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 99e8

Re: [Qemu-devel] [PATCH v5 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Lin Ma
在 2015年03月28日 01:20, Igor Mammedov 写道: On Sat, 28 Mar 2015 00:55:29 +0800 Lin Ma wrote: If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h

[Qemu-devel] [PATCH v6 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-30 Thread Lin Ma
If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 13 + qmp.c | 5 + qom/object_interfaces.c | 12 ++

[Qemu-devel] [PATCH v6 0/2] Add generic can_be_deleted to UserCreatableClass.

2015-03-30 Thread Lin Ma
be_deleted callback to TypeInfo and TypeImpl. Implement the callback in hostmem-file.c and hostmem-ram.c. V1: Initial version, hard coded in object_del to prevent removing an in-use host memory backend. Lin Ma (2): qom: Add can_be_deleted callback to UserCreatableClass hostmem: Prevent remo

[Qemu-devel] [PATCH v6 2/2] hostmem: Prevent removing an in-use memory backend

2015-03-30 Thread Lin Ma
:\ assertion failed: (obj->parent != NULL) Aborted The patch prevents removing an in-use mem backend and error out. Signed-off-by: Lin Ma --- backends/hostmem.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 99e8

[Qemu-devel] [PATCH] qom: Change prototype of user_creatable_complete.

2015-03-31 Thread Lin Ma
>From void user_creatable_complete(Object *obj, Error **errp) to void user_creatable_complete(UserCreatable *uc, Error **errp) Signed-off-by: Lin Ma --- hw/block/dataplane/virtio-blk.c | 4 +++- hw/virtio/virtio-rng.c | 3 ++- include/qom/object_interfaces.h | 4 ++-- qm

[Qemu-devel] [PATCH v2] qom: Change prototype of user_creatable_complete.

2015-04-01 Thread Lin Ma
>From void user_creatable_complete(Object *obj, Error **errp) to void user_creatable_complete(UserCreatable *uc, Error **errp) Signed-off-by: Lin Ma --- hw/block/dataplane/virtio-blk.c | 3 ++- hw/virtio/virtio-rng.c | 2 +- include/qom/object_interfaces.h | 7 +++ qm

[Qemu-devel] [PATCH] qemu-options.hx: add missing chardev id in example of vhost-user

2016-02-22 Thread Lin Ma
Signed-off-by: Lin Ma --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 2f0465e..6afa612 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2063,7 +2063,7 @@ Example: @example qemu -m 512 -object memory-backend

[Qemu-devel] [PATCH] qemu-options.hx: add missing chardev id in example of vhost-user

2016-02-23 Thread Lin Ma
Signed-off-by: Lin Ma --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 2f0465e..6afa612 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2063,7 +2063,7 @@ Example: @example qemu -m 512 -object memory-backend

[Qemu-devel] [PATCH] add mac address collision checking for device_add & pci_add

2012-11-12 Thread Lin Ma
QEMU doesn't check if there are mac collisions when adding nics. It causes mac address collisions in guest if adding the nics which include existing physical address. This patch fixes the issue. Signed-off-by: Lin Ma --- hw/qdev-properties.c |9 + net.c|

Re: [Qemu-devel] [PATCH] add mac address collision checking for device_add & pci_add

2012-11-12 Thread Lin Ma
>>> Paolo Bonzini 11/12/12 7:27 PM >>> Il 12/11/2012 12:18, Daniel P. Berrange ha scritto: >> > QEMU doesn't check if there are mac collisions when adding nics. >> > It causes mac address collisions in guest if adding the nics which >> > include existing physical address. >> > This patch fixes the

[Qemu-devel] The issue about parameters(uint64) of a device are treated as signed long int.

2015-07-31 Thread Lin Ma
Hi all, Because qemu uses strtoll to parse string in parse_str function of qapi/string-input-visitor.c, I'd like to know why the parameters of scsi-hd device which are specified as uint64(says wwn) are getting interpreted as signed long int's instead e.g: # qemu-system-x86_64 -device scsi-h

Re: [Qemu-devel] The issue about parameters(uint64) of a device are treated as signed long int.

2015-08-06 Thread Lin Ma
nd must be zero? May I have your thoughts? Thanks, Lin 在 2015年07月31日 16:28, Lin Ma 写道: Hi all, Because qemu uses strtoll to parse string in parse_str function of qapi/string-input-visitor.c, I'd like to know why the parameters of scsi-hd device which are specified as uint64(says w

[Qemu-devel] [PATCH] usb: Use usb_bus_find(-1) instead of usb_enabled() in usb_device_add/usb_device_del

2015-06-04 Thread Lin Ma
Without usb=on machine option, usb_device_add/usb_device_del don't work, Even if there are virtual usb controllers presented. This patch fixes it. Signed-off-by: Lin Ma --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 1d4c089..26fab83 1

[Qemu-devel] About usb passthru and speed mismatch

2015-06-11 Thread Lin Ma
Hi Gerd, Based on the current implementation of 'usb_host_open' in hw/usb/host-libusb.c, When user performs usb_add, The usb device will be detached from kernel first, Then be checked for speed mismatch second. If it found speed mismatch, The usb device isn't attached to guest, But the usb d

[Qemu-devel] [PATCH] docs: update the usage example of "dtrace" backend in tracing.txt

2015-09-11 Thread Lin Ma
The usage example of dtrace is quite ancient, We have tracetool.py with different parameters instead of the original tracetool shell script for a long time, So update the old information. Signed-off-by: Lin Ma --- docs/tracing.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[Qemu-devel] [PATCH] virtio-input: fix segfault in virtio_input_hid_properties

2015-07-14 Thread Lin Ma
commit 5cce173 introduced virtio-input segfault, This patch fixes it. Signed-off-by: Lin Ma --- hw/input/virtio-input-hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 616a815..4d85dad 100644 --- a/hw/input/virtio-input

[Qemu-devel] [RFC PATCH] Fix hotplug/hotunplug issue about virtio 1.0 devices

2015-07-20 Thread Lin Ma
Hi Michael and Gerd, I found an hotplug/hotunplug issue about virtio 1.0 devices and trying to fix it. The bug description is: (qemu) device_add virtio-gpu-pci,id=gpu0 (qemu) device_del gpu0 (qemu) device_add virtio-gpu-pci,id=gpu0 Duplicate ID 'gpu0' for device Try "help device_add" for more i

Re: [Qemu-devel] [RFC PATCH] Fix hotplug/hotunplug issue about virtio 1.0 devices

2015-07-20 Thread Lin Ma
在 2015年07月20日 23:36, Michael S. Tsirkin 写道: On Mon, Jul 20, 2015 at 11:14:58PM +0800, Lin Ma wrote: Hi Michael and Gerd, I found an hotplug/hotunplug issue about virtio 1.0 devices and trying to fix it. The bug description is: (qemu) device_add virtio-gpu-pci,id=gpu0 (qemu) device_del gpu0

[Qemu-devel] [PATCH] configure: show --disable-vte and --enable-vte in help message

2015-06-17 Thread Lin Ma
Signed-off-by: Lin Ma --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 222694f..4f895e3 100755 --- a/configure +++ b/configure @@ -1420,6 +1420,8 @@ Advanced options (experts only): --enable-numaenable libnuma support --disable

[Qemu-devel] [PATCH] Re-attach usb device to kernel while usb_host_open fails

2015-06-22 Thread Lin Ma
Signed-off-by: Lin Ma --- hw/usb/host-libusb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 10f4735..7258c4d 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -888,6 +888,11 @@ static int usb_host_open(USBHostDevice *s

Re: [Qemu-devel] [PATCH] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
在 2015年06月23日 16:29, Gonglei 写道: On 2015/6/23 12:24, Lin Ma wrote: Signed-off-by: Lin Ma --- hw/usb/host-libusb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 10f4735..7258c4d 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host

[Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
Changes in V1: For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs. Signed-off-by: Lin Ma --- hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index bc2944c

Re: [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
在 2015年06月24日 11:53, Gonglei 写道: On 2015/6/24 11:39, Lin Ma wrote: Changes in V1: For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs. Signed-off-by: Lin Ma --- The changing remarks should be lay up here, and use v2 suffix

[Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
Signed-off-by: Lin Ma Reviewed-by: Gonglei --- Changes in V2: * For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs. * Add missing R-by information. hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw

[Qemu-devel] wiki: update missing info on "Enabling multi-queue" section of vhost-user

2016-03-21 Thread Lin Ma
Hi Marcel, I found that the information on "Enabling multi-queue" in http://wiki.qemu.org/Features/vhost-user-ovs-dpdk are inaccurate. In ovs 2.5 or older, The option 'other_config:n-dpdk-rxqs' is used and there is no options:n_rxq. The n_rxq is available since post 2.5.0. But when setup an

[Qemu-devel] 答复: Re: RFC: Make 'info snapshots' show all of snapshots with multiple devices info

2016-05-24 Thread Lin Ma
>>> Kevin Wolf 2016/5/23 星期一 下午 5:00 >>> >Am 22.05.2016 um 11:55 hat Lin Ma geschrieben: >> Currently, the output of 'info snapshots' show fully available snapshots. >> >> In my opinion there are 2 disadvantages: >> 1. It's opaque, h

[Qemu-devel] [] [PATCH] Show all of snapshot info on every block device in output of 'info snapshots'

2016-06-12 Thread Lin Ma
IZEDATE VM CLOCK 1 snap1 0 2016-05-22 16:57:31 00:01:30.567 Signed-off-by: Lin Ma --- migration/savevm.c | 77 +++--- 1 file changed, 74 insertions(+), 3 deletions(-) diff --git a/migration/savevm.c b/migration

[Qemu-devel] [PATCH] pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c

2016-06-15 Thread Lin Ma
error message, Users may be confused by it. Signed-off-by: Lin Ma --- hw/i386/kvm/pci-assign.c | 4 hw/i386/pci-assign-load-rom.c | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index db2cbd2..07d14f9 100644

[Qemu-devel] [PATCH] pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c

2016-06-15 Thread Lin Ma
error message, Users may be confused by it. Signed-off-by: Lin Ma --- hw/i386/kvm/pci-assign.c | 4 hw/i386/pci-assign-load-rom.c | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index db2cbd2..07d14f9 100644

[Qemu-devel] 答复: Re: [PATCH] Show all of snapshot info on every block device in output of 'info snapshots'

2016-06-17 Thread Lin Ma
>>> Max Reitz mre...@redhat.com> 2016/6/15 星期三 上午 1:43 >> ( mailto:mre...@redhat.com) .. >I have many comments, but don't worry, it's nothing that can't be fixed. >The overall design looks good to me. Thank you so much for reviewing the patch very carefully and gave me so many comments. I wo

[Qemu-devel] [PATCH 1/2 V2] hmp: use snapshot name to determine whether a snapshot is 'fully available'

2016-06-17 Thread Lin Ma
r instance: (qemu) info snapshots List of snapshots present on all disks: IDTAG VM SIZEDATE VM CLOCK --checkpoint-1 165M 2016-05-22 16:58:07 00:02:06.813 Signed-off-by: Lin Ma --- migration/savevm.c | 6 +- 1 file changed, 5

[Qemu-devel] [PATCH 2/2 V2] hmp: show all of snapshot info on every block dev in output of 'info snapshots'

2016-06-17 Thread Lin Ma
apshots on 'drive_image1': IDTAG VM SIZEDATE VM CLOCK 1 snap1 0 2016-05-22 16:57:31 00:01:30.567 Signed-off-by: Lin Ma --- migration/savevm.c | 90 +- 1 fil

[Qemu-devel] [PATCH 0/2 V2] Show all of snapshot info on every block device in output of 'info snapshots'

2016-06-17 Thread Lin Ma
V2: Split it to 2 patches. Lin Ma (2): hmp: use snapshot name to determine whether a snapshot is 'fully available' hmp: show all of snapshot info on every block dev in output of 'info snapshots' migration/savevm.c | 96 ++

[Qemu-devel] RFC: Make 'info snapshots' show all of snapshots with multiple devices info

2016-05-22 Thread Lin Ma
Currently, the output of 'info snapshots' show fully available snapshots. In my opinion there are 2 disadvantages: 1. It's opaque, hides some snapshot information to users. It's not convenient if users want to know more about all of snapshots on every block device via monitor. 2. It uses snaps

[Qemu-devel] 回复: 回复: 答复: migrate_set_speed has no effect if the guest is using hugepages.

2019-08-02 Thread Lin Ma
Hi Dave, May I ask that do you have any update about the fix? Thanks, Lin > -邮件原件- > 发件人: Qemu-devel 代 > 表 Lin Ma > 发送时间: 2019年7月15日 17:43 > 收件人: Dr. David Alan Gilbert > 抄送: qemu-devel@nongnu.org > 主题: [Qemu-devel] 回复: 答复: migrate_set_speed has no effect if

[PATCH] scsi-generic: replace logical block count of response of READ CAPACITY

2021-11-20 Thread Lin Ma
tion: 0.000 B Physical: 8.000 GiB 5. guest:~ # lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 4G 0 disk └─sda1 8:10 2G 0 part Signed-off-by: Lin Ma --- hw/scsi/scsi-generic.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) dif

Re: [RFC PATCH 4/6] Convert query-block/info_block to coroutine

2023-05-23 Thread Lin Ma
tz; Markus Armbruster; João Silva; Lin Ma; Claudio Fontana; Dario Faggioli; Eric Blake Subject: [RFC PATCH 4/6] Convert query-block/info_block to coroutine From: Lin Ma Sometimes the query-block performs time-consuming I/O(say waiting for the fstat of NFS complete), So let's make this QMP

Re: [RFC PATCH 4/6] Convert query-block/info_block to coroutine

2023-05-24 Thread Lin Ma
; João Silva; Lin Ma; Dario Faggioli; Eric Blake Subject: Re: [RFC PATCH 4/6] Convert query-block/info_block to coroutine On 5/23/23 23:39, Fabiano Rosas wrote: > From: Lin Ma > > Sometimes the query-block performs time-consuming I/O(say waiting for > the fstat of NFS complete), So let

[PATCH v2] scsi-generic: replace logical block count of response of READ CAPACITY

2022-01-09 Thread Lin Ma
tion: 0.000 B Physical: 8.000 GiB 5. guest:~ # lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 4G 0 disk └─sda1 8:10 2G 0 part Signed-off-by: Lin Ma Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-generic.c | 18 -- hw/s

Question about virtio-scsi max_segments setting

2021-10-13 Thread Lin Ma
Hi all, We know that the seg_max of virtio-scsi respects to virtqueue size: scsiconf->seg_max is set to virtqueue size - 2. Some of my scsi HBAs have max_segments as low as 64 in host(max_sectors_kb is 256). When I use scsi lun passthrough disk in guest, In case of default virtqueue size(256), T

[PATCH 0/3] Postcopy migration: Add userfaultfd- user-mode-only capability

2021-10-14 Thread Lin Ma
userfaultfd: add user-mode only option to unprivileged_userfaultfd sysctl knob This patch set adds a migration capability to pass UFFD_USER_MODE_ONLY for postcopy migration. Lin Ma (3): migration: introduce postcopy-uffd-usermode-only capability migration: postcopy-uffd-usermode-only

[PATCH 1/3] migration: introduce postcopy-uffd-usermode-only capability

2021-10-14 Thread Lin Ma
userfaultd or the API will fail with EPERM. So add a capability to pass UFFD_USER_MODE_ONLY to support it. Signed-off-by: Lin Ma --- migration/migration.c| 9 + migration/migration.h| 1 + migration/postcopy-ram.c | 22 +++--- qapi/migration.json | 8

[PATCH 2/3] migration: postcopy-uffd-usermode-only documentation

2021-10-14 Thread Lin Ma
Signed-off-by: Lin Ma --- docs/devel/migration.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index 2401253482..dfdd3f20b4 100644 --- a/docs/devel/migration.rst +++ b/docs/devel/migration.rst @@ -639,6 +639,15 @@ postcopy

[PATCH 3/3] tests: add postcopy-uffd-usermode-only capability into migration-test

2021-10-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tests/qtest/migration-test.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index cc5e83d98a..0cd4f49bed 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration

[Qemu-devel] 答复: [PATCH v4 0/5] object: Add 'help' option for all available backends and properties

2016-11-02 Thread Lin Ma
ping... >>> Lin Ma 2016/10/20 星期四 下午 7:28 >>> V3->V4: * drop the code about manually define interface 'user-creatable' as abstract. * add test case for the generated enum value str. * split the code about adding descriptions to class properties into a sepa

[Qemu-devel] 答复: [PATCH v4 1/5] qom: Add interface check in object_class_is_abstract

2016-11-02 Thread Lin Ma
ping... >>> Lin Ma 2016/10/20 星期四 下午 7:28 >>> Signed-off-by: Lin Ma --- qom/object.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 7a05e35..4096645 100644 --- a/qom/object.c +++ b/qom/object.c @@ -747,7 +747

[Qemu-devel] 答复: [PATCH v4 2/5] qapi: auto generate enum value strings

2016-11-02 Thread Lin Ma
ping... >>> Lin Ma 2016/10/20 星期四 下午 7:28 >>> Automatically generate enum value strings that containing the acceptable values. (Borrowed Daniel's code.) Signed-off-by: Lin Ma --- scripts/qapi-types.py | 2 ++ scripts/qapi.py| 9 + 2 files changed, 11 inse

[Qemu-devel] 答复: [PATCH v4 4/5] backends: add description for enum class properties

2016-11-02 Thread Lin Ma
ping... >>> Lin Ma 2016/10/20 星期四 下午 7:28 >>> Signed-off-by: Lin Ma --- backends/hostmem.c | 4 crypto/secret.c| 4 crypto/tlscreds.c | 4 net/filter.c | 4 4 files changed, 16 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c inde

[Qemu-devel] 答复: [PATCH v4 5/5] object: Add 'help' option for all available backends and properties

2016-11-02 Thread Lin Ma
ping... >>> Lin Ma 2016/10/20 星期四 下午 7:28 >>> '-object help' prints available user creatable backends. '-object $typename,help' prints relevant properties. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 2 ++ qemu-options.hx

[Qemu-devel] 答复: [PATCH v4 3/5] qapi: add test case for the generated enum value str

2016-11-02 Thread Lin Ma
ping... >>> Lin Ma 2016/10/20 星期四 下午 7:28 >>> Signed-off-by: Lin Ma --- tests/test-qmp-commands.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c index 81cbe54..9cd61b2 100644 --- a/tests/test-qm

[Qemu-devel] [PATCH] smbios: Add 1 terminator if there is any string field defined in given table.

2016-09-06 Thread Lin Ma
t have string field provided, qemu should add 2. This patch fixed the issue. Signed-off-by: Lin Ma --- hw/smbios/smbios.c | 90 ++ include/hw/smbios/smbios.h | 44 +++ 2 files changed, 134 insertions(+) diff --git a/hw/smbio

[Qemu-devel] [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-10 Thread Lin Ma
'-object help' prints available user creatable backends. '-object $typename,help' prints relevant properties. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 2 + qemu-options.hx | 7 ++- qom/object_interf

[Qemu-devel] [PATCH] tests: Ignore test-char binary

2016-12-05 Thread Lin Ma
Commit ea3af47d added test for chardev unit tests, but didn't add the name of generated binary in .gitignore. Signed-off-by: Lin Ma --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index c0d7857..99f2aac 100644 --- a/tests/.giti

[Qemu-devel] [PATCH] qemu-char: avoid segfault if user lacks of permisson of a given logfile

2016-09-13 Thread Lin Ma
Function qemu_chr_alloc returns NULL if it failed to open logfile by any reason, says no write permission. For backends tty, stdio and msmouse, They need to check this return value to avoid segfault in this case. Signed-off-by: Lin Ma --- backends/msmouse.c | 3 +++ qemu-char.c| 6

[Qemu-devel] [PATCH] msmouse: Fix segfault caused by free the chr before chardev cleanup.

2016-09-15 Thread Lin Ma
. Signed-off-by: Lin Ma --- backends/msmouse.c | 1 - 1 file changed, 1 deletion(-) diff --git a/backends/msmouse.c b/backends/msmouse.c index aeb9055..7690c42 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -139,7 +139,6 @@ static void msmouse_chr_close (struct CharDriverState *chr

[Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-17 Thread Lin Ma
>>> Markus Armbruster 2016/9/12 星期一 下午 11:42 >>> >Lin Ma writes: > >> '-object help' prints available user creatable backends. >> '-object $typename,help' prints relevant properties. >> >> Signed-off-by: Lin Ma &g

[Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-17 Thread Lin Ma
>>> "Daniel P. Berrange" 2016/9/12 星期一 下午 11:56 >>> >On Sun, Sep 11, 2016 at 01:53:01PM +0800, Lin Ma wrote: >> '-object help' prints available user creatable backends. >> '-object $typename,help' prints relevant p

Re: [Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-21 Thread Lin Ma
>>> Markus Armbruster 2016/9/20 星期二 上午 1:13 >>> >Andreas Färber writes: > >> Hi Lin and Markus, >> >> Am 19.09.2016 um 13:58 schrieb Markus Armbruster: >[...] >>> You're messing with struct EnumProperty because you want more help than >>> what ObjectPropertyInfo can provice. >>> >>>

[Qemu-devel] 答复: Re: [PATCH v4 1/5] qom: Add interface check in object_class_is_abstract

2016-11-07 Thread Lin Ma
>>> Markus Armbruster 2016/11/4 星期五 上午 2:18 >>> >Lin Ma writes: > >> Signed-off-by: Lin Ma >> --- >> qom/object.c | 6 +- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/qom/object.c b/qom/object.c >>

[Qemu-devel] 答复: Re: [PATCH v4 2/5] qapi: auto generate enum value strings

2016-11-07 Thread Lin Ma
>>> Markus Armbruster 2016/11/4 星期五 上午 3:17 >>> >Lin Ma writes: > >> Automatically generate enum value strings that containing the acceptable >> values. >> (Borrowed Daniel's code.) >> >> Signed-off-by: Lin Ma >> -

[Qemu-devel] 答复: Re: [PATCH v4 4/5] backends: add description for enum class properties

2016-11-07 Thread Lin Ma
>>> Markus Armbruster 2016/11/4 星期五 上午 3:58 >>> >Lin Ma writes: > >> Signed-off-by: Lin Ma >> --- >> backends/hostmem.c | 4 >> crypto/secret.c| 4 >> crypto/tlscreds.c | 4 >> net/filter.c | 4 >&

[Qemu-devel] 答复: Re: [PATCH v4 5/5] object: Add 'help' option for all available backends and properties

2016-11-07 Thread Lin Ma
>>> Markus Armbruster 2016/11/4 星期五 上午 3:50 >>> >Lin Ma writes: > >> '-object help' prints available user creatable backends. >> '-object $typename,help' prints relevant properties. >> >> Signed-off-by: Lin Ma &g

[Qemu-devel] 答复: [PATCH] smbios: Add 1 terminator if there is any string field defined in given table.

2016-11-07 Thread Lin Ma
Ping. >>> Lin Ma 2016/9/6 星期二 下午 4:28 >>> If user specifies binary file on command line to load smbios entries, then will get error messages while decoding them in guest. Reproducer: 1. dump a smbios table to a binary file from host or guest.(says table 1) 2. load the b

Re: [Qemu-devel] 答复: [PATCH] smbios: Add 1 terminator if there is any string field defined in given table.

2016-11-07 Thread Lin Ma
>>> "Daniel P. Berrange" berra...@redhat.com> 2016/11/8 星期二 上午 12:31 >> ( mailto:berra...@redhat.com) .. >> > >Code identation is this patch looks totally mangled. > How about this one: (From the code style's perspective, it should be no big problem) http://lists.nongnu.org/archive/html/qem

[Qemu-devel] About vNVDIMM question in TCG

2016-11-20 Thread Lin Ma
Hi Guangrong, I'm interested in vNVDIMM on qemu. I'd like to give it a try on my laptop. Because I dont have skylake server hardware, So I want to expose cpu flags clflushopt, clwb and pcommit to guest for NVDIMM drivers on TCG. I saw clflushopt and clwb feature flags in cpuinfo of guest, but n

[Qemu-devel] 答复: Re: About vNVDIMM question in TCG

2016-11-20 Thread Lin Ma
You've been very helpful, haozhong, Thanks for your comments, I appreciate. >>> Haozhong Zhang 2016/11/21 星期一 上午 10:55 >>> On 11/20/16 10:58 -0700, Lin Ma wrote: >Hi Guangrong, > >I'm interested in vNVDIMM on qemu. I'd like to give it a try on my l

Re: [Qemu-devel] 答复: Re: [RFC] virtio-fc: draft idea of virtual fibre channel HBA

2017-02-22 Thread Lin Ma
Hi Hannes, >>> Hannes Reinecke 2017/2/16 星期四 下午 5:56 >>> >On 02/16/2017 09:39 AM, Paolo Bonzini wrote: >> >> >> On 16/02/2017 08:16, Lin Ma wrote: >>>> What are the benefits of having FC access from the guest? >>> >>> Actual

[Qemu-devel] 答复: Re: [PATCH v3 1/3] qom: make base type user-creatable abstract

2016-10-10 Thread Lin Ma
>>> "Daniel P. Berrange" 2016/9/26 星期一 下午 6:37 >>> >On Mon, Sep 26, 2016 at 06:16:25PM +0800, Lin Ma wrote: >> Signed-off-by: Lin Ma >> --- >> qom/object_interfaces.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff

[Qemu-devel] 答复: Re: [PATCH v3 3/3] object: Add 'help' option for all available backends and properties

2016-10-10 Thread Lin Ma
>>> "Daniel P. Berrange" 2016/9/26 星期一 下午 6:41 >>> >On Mon, Sep 26, 2016 at 06:16:27PM +0800, Lin Ma wrote: >> '-object help' prints available user creatable backends. >> '-object $typename,help' prints relevant properti

[Qemu-devel] 答复: Re: [PATCH v3 2/3] qapi: auto generate enum value strings

2016-10-10 Thread Lin Ma
>>> Eric Blake 2016/9/27 星期二 上午 4:17 >>> >On 09/26/2016 05:38 AM, Daniel P. Berrange wrote: >> On Mon, Sep 26, 2016 at 06:16:26PM +0800, Lin Ma wrote: >>> Automatically generate enum value strings that containing the acceptable >>> values. >>&

Re: [Qemu-devel] 答复: Re: [PATCH v3 2/3] qapi: auto generate enum value strings

2016-10-13 Thread Lin Ma
>>> Markus Armbruster 2016/10/11 星期二 下午 2:56 >>> >Eric Blake writes: > >> On 10/10/2016 10:09 AM, Lin Ma wrote: >>> >>> >>>>>> Eric Blake 2016/9/27 星期二 上午 4:17 >>> >>>> On 09/26/2016 05:38 AM,

[Qemu-devel] [PATCH v4 3/5] qapi: add test case for the generated enum value str

2016-10-20 Thread Lin Ma
Signed-off-by: Lin Ma --- tests/test-qmp-commands.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c index 81cbe54..9cd61b2 100644 --- a/tests/test-qmp-commands.c +++ b/tests/test-qmp-commands.c @@ -262,6 +262,23

[Qemu-devel] [PATCH v4 2/5] qapi: auto generate enum value strings

2016-10-20 Thread Lin Ma
Automatically generate enum value strings that containing the acceptable values. (Borrowed Daniel's code.) Signed-off-by: Lin Ma --- scripts/qapi-types.py | 2 ++ scripts/qapi.py | 9 + 2 files changed, 11 insertions(+) diff --git a/scripts/qapi-types.py b/scripts/qapi-typ

[Qemu-devel] [PATCH v4 0/5] object: Add 'help' option for all available backends and properties

2016-10-20 Thread Lin Ma
o access an instance of type machine. V1->V2: * Output the acceptable values of enum types by "-object TYPE-NAME,help" Lin Ma (5): qom: Add interface check in object_class_is_abstract qapi: auto generate enum value strings qapi: add test case for the generated enum value str

[Qemu-devel] [PATCH v4 5/5] object: Add 'help' option for all available backends and properties

2016-10-20 Thread Lin Ma
'-object help' prints available user creatable backends. '-object $typename,help' prints relevant properties. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 2 ++ qemu-options.hx | 7 +- qom/object_inter

[Qemu-devel] [PATCH v4 1/5] qom: Add interface check in object_class_is_abstract

2016-10-20 Thread Lin Ma
Signed-off-by: Lin Ma --- qom/object.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 7a05e35..4096645 100644 --- a/qom/object.c +++ b/qom/object.c @@ -747,7 +747,11 @@ ObjectClass *object_get_class(Object *obj) bool

[Qemu-devel] [PATCH v4 4/5] backends: add description for enum class properties

2016-10-20 Thread Lin Ma
Signed-off-by: Lin Ma --- backends/hostmem.c | 4 crypto/secret.c| 4 crypto/tlscreds.c | 4 net/filter.c | 4 4 files changed, 16 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 4256d24..25f303d 100644 --- a/backends/hostmem.c +++ b

[Qemu-devel] [PATCH 0/2 V5] Show all of snapshot info on every block dev

2016-07-06 Thread Lin Ma
V5: Minor changes. V4: Use QTAILQ_FOREACH_SAFE instead of QTAILQ_FOREACH while freeing snapshot lists. V3: Fix leaking the entries in image_list and the entries in their ImageEntry.snapshots lists V2: Split it to 2 patches. Lin Ma (2): hmp: use snapshot name to determine whether a

[Qemu-devel] [PATCH 1/2 V5] hmp: use snapshot name to determine whether a snapshot is 'fully available'

2016-07-06 Thread Lin Ma
r instance: (qemu) info snapshots List of snapshots present on all disks: IDTAG VM SIZEDATE VM CLOCK --checkpoint-1 165M 2016-05-22 16:58:07 00:02:06.813 Signed-off-by: Lin Ma Reviewed-by: Max Reitz --- migration/savevm.c | 6

  1   2   >