Re: [Qemu-devel] [PATCH 0/7] add description field in ObjectProperty and PropertyInfo struct

2014-09-24 Thread Gonglei
15:08, arei.gong...@huawei.com ha scritto: > > > From: Gonglei > > > > > > PATCH 1 and PATCH 2 are bugfixes. PATCH 3~7 add a description > > > field in both ObjectProperty and PropertyInfo struct. > > > The descriptions can serve as documentation in the c

Re: [Qemu-devel] [PATCH 3/7] qdev: add description field in PropertyInfo struct

2014-09-24 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH 3/7] qdev: add description field in > PropertyInfo struct > > Il 23/09/2014 15:08, arei.gong...@huawei.com ha scritto: > > From: Gonglei > > > > The descriptions can serve as documentation in the code, > > and they can be use

Re: [Qemu-devel] [PATCH v2 6/7] qmp: print descriptions of object properties

2014-09-26 Thread Gonglei
; /* Not a qdev property, use the default type */ > > info = g_malloc0(sizeof(*info)); > > info->name = g_strdup(name); > > -info->type = g_strdup(default_type); > > +if (description) { > > +info->type = g_strdup_printf("%s (%s)", default_type, description); > > Please add a new "description" field to DevicePropertyInfo, and format > it in qdev_device_help. > > You can send v3 of just this patch. > OK, will do it. Thanks! :) Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v4 0/5] add description field in ObjectProperty and PropertyInfo struct

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 0/5] add description field in > ObjectProperty and PropertyInfo struct > > On Tue, Sep 30, 2014 at 11:02:34AM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > This patch series based on qom-next tree: > >

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Gonglei
name ?: prop->info->name); +info->type = g_strdup(prop->info->name); > > .legacy_name = "pci-devfn", > > +.description = "Slot and function number, example: 06.0", > > In fact, .0 can be omitted. So please make this: > Slot and optional function number, examples: 06.0 or 06. > OK. Thanks. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v4 3/3] pcie: remove confused comments

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 3/3] pcie: remove confused comments > > On Tue, Sep 30, 2014 at 06:11:26PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > The below functions is not allocation functions, but > > find helper function

Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of pcie devices

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of > pcie devices > > On Tue, Sep 30, 2014 at 06:11:25PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > In QEMU, ARI Forwarding is enabled default at emulation of PCIe &g

Re: [Qemu-devel] [PATCH v4 5/5] qdev: drop legacy_name from qdev properties

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 5/5] qdev: drop legacy_name from qdev > properties > > On Tue, Sep 30, 2014 at 11:02:39AM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > The legacy_name is useless now, the better help > > information prov

Re: [Qemu-devel] [PATCH v4 2/5] qom: add description field in ObjectProperty struct

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 2/5] qom: add description field in > ObjectProperty struct > > On Tue, Sep 30, 2014 at 11:02:36AM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > The descriptions can serve as documentation in the code, >

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Gonglei
> > > > > > I would say this one is more a string than an int. > > > > At the QOM level it is an int, even though it secondarily accepts a > > string in "DD.F" format. > > > > Paolo > > That's the only way to specify a function, isn't it? As far as I can tell, yes. Best regards, -Gonglei > Maybe it's not a good idea to expose the QOM type in this case. > > -- > MST

Re: [Qemu-devel] [PATCH v4 0/5] add description field in ObjectProperty and PropertyInfo struct

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 0/5] add description field in > ObjectProperty and PropertyInfo struct > > On Tue, Sep 30, 2014 at 11:02:34AM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > This patch series based on qom-next tree: > >

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Gonglei
elp text I suggested is wrong. > > At least for HMP I would say slot.function is the > > primary format. > > Let's just make it a string, it's a superset of > > an integer isn't it? > > Okay, will work on a patch. > > Paolo Good. Thanks ! Today I have a 7-day National Day holiday. :) See you next week! Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of pcie devices

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of > pcie devices > > On Tue, Sep 30, 2014 at 09:38:51PM +0800, Gonglei wrote: > > > Subject: Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari > > > capability of > > >

Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of pcie devices

2014-10-01 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of > pcie devices > > On Tue, 2014-09-30 at 21:38 +0800, Gonglei wrote: > > > Subject: Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari > > > capability of > > > pcie devi

Re: [Qemu-devel] [PATCH 2/4] os-posix: report error message when lock file failed

2014-10-01 Thread Gonglei
Hi, > Subject: Re: [Qemu-devel] [PATCH 2/4] os-posix: report error message when > lock file failed > > writes: > > > From: Gonglei > > > > It will cause that create vm failed When manager > > tool is killed forcibly (kill -9 libvirtd_pid), > > the

Re: [Qemu-devel] [PATCH 2/4] os-posix: report error message when lock file failed

2014-10-01 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH 2/4] os-posix: report error message when > lock file failed > > Gonglei writes: > > > Hi, > > > >> Subject: Re: [Qemu-devel] [PATCH 2/4] os-posix: report error message when > >> lock file failed > >> >

Re: [Qemu-devel] [PATCH v5 0/5] add description field in ObjectProperty and PropertyInfo struct

2014-10-08 Thread Gonglei
On 2014/10/8 6:22, Paolo Bonzini wrote: > Il 07/10/2014 08:33, arei.gong...@huawei.com ha scritto: >> From: Gonglei >> >> v5 -> v4: >> 1. add some improvements by Michael's suggtion, Thanks. (Michael) >> 2. add 'Reviewed-by' tag (Paolo,

Re: [Qemu-devel] [PATCH] Fix OHCI ISO TD state never being written back.

2014-08-09 Thread Gonglei
_put_hcca(OHCIState *ohci, > -- > 2.0.4 > Good catch. You can post a patch attaching a good commit message. Follow the rule please: http://wiki.qemu.org/Contribute/SubmitAPatch Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v3 1/2] contrib: add ivshmem client and server

2014-08-09 Thread Gonglei
const struct ivshmem_client_peer > *peer) > +{ > +unsigned vector; > +int ret = 0; > + > +for (vector = 0; vector < peer->vectors_count; vector++) { > + if (ivshmem_client_notify(client, peer, vector) < 0) { > +ret = -1; The ret's value will be covered when multi clients failed. Do we need store the failed status for server?. > +} > +} > + > +return ret; > +} > + > +/* send a notification to all peers */ > +int > +ivshmem_client_notify_broadcast(const struct ivshmem_client *client) > +{ > +struct ivshmem_client_peer *peer; > +int ret = 0; > + > +TAILQ_FOREACH(peer, &client->peer_list, next) { > +if (ivshmem_client_notify_all_vects(client, peer) < 0) { > +ret = -1; > +} > +} > + > +return ret; > +} > + > +/* lookup peer from its id */ > +struct ivshmem_client_peer * > +ivshmem_client_search_peer(struct ivshmem_client *client, long peer_id) > +{ > +struct ivshmem_client_peer *peer; > + > +if (peer_id == client->local.id) { > +return &client->local; > +} > + > +TAILQ_FOREACH(peer, &client->peer_list, next) { > +if (peer->id == peer_id) { > +return peer; > +} > +} > +return NULL; > +} > + > +/* dump our info, the list of peers their vectors on stdout */ > +void > +ivshmem_client_dump(const struct ivshmem_client *client) > +{ > +const struct ivshmem_client_peer *peer; > +unsigned vector; > + > +/* dump local infos */ > +peer = &client->local; > +printf("our_id = %ld\n", peer->id); > +for (vector = 0; vector < peer->vectors_count; vector++) { > +printf(" vector %d is enabled (fd=%d)\n", vector, > + peer->vectors[vector]); > +} > + > +/* dump peers */ > +TAILQ_FOREACH(peer, &client->peer_list, next) { > +printf("peer_id = %ld\n", peer->id); > + > +for (vector = 0; vector < peer->vectors_count; vector++) { > +printf(" vector %d is enabled (fd=%d)\n", vector, > + peer->vectors[vector]); > +} > +} > +} To be continued... Best regards, -Gonglei

Re: [Qemu-devel] q35 : virtio-serial on pci bridge : bus not found

2014-08-12 Thread Gonglei
fig /usr/share/qemu-server/pve-q35.cfg",which can assure the bus pci.0 has been created. Best regards, -Gonglei > > error message: > --- > kvm: -device virtio-serial,id=spice,bus=pci.0,addr=0x9: Bus 'pci.0' not found > > > architecture is: &g

Re: [Qemu-devel] [Bug] QEMU crashed with latest qemu master tree code

2014-08-20 Thread Gonglei
Hi, Anyone encounter the same issue with me? Thanks. Best regards, -Gonglei > -Original Message- > Subject: [Qemu-devel] [Bug] QEMU crashed with latest qemu master tree code > > Hi, > > Command line: > > #./qemu-system-x86_64 -enable-kvm -m 2048 -machine q35

Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error

2014-08-21 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling > error > > Il 21/08/2014 14:19, arei.gong...@huawei.com ha scritto: > > From: Gonglei > > > > variables lun and tag had been eliminated, broke compiling > > when enable debug sw

Re: [Qemu-devel] [PATCH trivial] Fix debug print warning

2014-08-22 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH trivial] Fix debug print warning > > On Fri, Aug 22, 2014 at 1:38 PM, wrote: > > From: Gonglei > > > > Steps: > > > > 1.enable qemu debug print, using simply scprit as below: > > grep "//#define DEBUG&

Re: [Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and take effect after rebooting

2014-10-08 Thread Gonglei
On 2014/10/7 16:00, Gonglei (Arei) wrote: > From: Gonglei > > Changes since v10: > 1. add handler for virtio-blk-pci/s390/ccw in PATCH 28. > 2. add especial bootidnex setter/getter functions for usb-storage > device in PATCH 29. > 3. add bootindex qom property

Re: [Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and take effect after rebooting

2014-10-09 Thread Gonglei
On 2014/10/9 17:47, Gerd Hoffmann wrote: > On Mi, 2014-10-08 at 19:00 +0800, Gonglei wrote: >> On 2014/10/7 16:00, Gonglei (Arei) wrote: >> >>> From: Gonglei >>> >>> Changes since v10: >>> 1. add handler for virtio-blk-pci/s390/ccw in PAT

Re: [Qemu-devel] [PATCH v5 0/5] add description field in ObjectProperty and PropertyInfo struct

2014-10-09 Thread Gonglei
Andreas, ping? Best regards, -Gonglei > -Original Message- > From: qemu-devel-bounces+arei.gonglei=hotmail@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=hotmail@nongnu.org] On > Behalf Of Gonglei > Sent: Wednesday, October 08, 2014 6:46 PM > To:

Re: [Qemu-devel] [PATCH v11 17/34] net: remove bootindex property from qdev to qom

2014-10-09 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v11 17/34] net: remove bootindex property > from qdev to qom > > Il 07/10/2014 10:00, arei.gong...@huawei.com ha scritto: > > From: Gonglei > > > > Remove bootindex form qdev property to qom, things will > > continue t

Re: [Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and take effect after rebooting

2014-10-09 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and > take effect after rebooting > > On Thu, 09 Oct 2014 11:47:12 +0200 > Gerd Hoffmann wrote: > > > On Mi, 2014-10-08 at 19:00 +0800, Gonglei wrote: > > > On 2014/10/7 16:00, Gonglei

Re: [Qemu-devel] [PULL 23/28] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct

2014-10-10 Thread Gonglei
b.o CCsh4eb-softmmu/cputlb.o /home/qemu/kvm-all.c:110: error: redefinition of typedef 'KVMState' /home/qemu/include/sysemu/kvm.h:161: error: previous declaration of 'KVMState' was here Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RESEND] Support vhd type VHD_DIFFERENCING

2014-10-10 Thread Gonglei
On 2014/10/11 0:17, Xiaodong Gong wrote: > Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, so qemu > can't read snapshot volume of vhd, and can't support other storage > features of vhd file. > > This patch add read parent information in function "vpc_open", read > bitmap in "vpc_read"

Re: [Qemu-devel] [PATCH] oslib-posix: change free to g_free

2014-10-10 Thread Gonglei
On 2014/10/11 11:10, Zhanghailiang wrote: > On 2014/10/11 10:54, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> The caller of qemu_vfree() maybe not check whether parameter >> ptr pointer is NULL or not, such as vpc_open(). >> Using g_free() is more safe

Re: [Qemu-devel] [PATCH] oslib-posix: change free to g_free

2014-10-10 Thread Gonglei
On 2014/10/11 11:26, Eric Blake wrote: > On 10/10/2014 09:21 PM, Gonglei wrote: > >> >> Actually, I had noted that C standard says it is a no-operation. >> But that doesn't mean that every C-library handles it like that. > > EVERY libc that is C89 compli

Re: [Qemu-devel] [PATCH] oslib-posix: change free to g_free

2014-10-10 Thread Gonglei
On 2014/10/11 11:44, Eric Blake wrote: > On 10/10/2014 09:32 PM, Gonglei wrote: > >>>> Actually, I had noted that C standard says it is a no-operation. >>>> But that doesn't mean that every C-library handles it like that. >>> >>> EVERY libc

Re: [Qemu-devel] [PATCH v5 0/5] add description field in ObjectProperty and PropertyInfo struct

2014-10-13 Thread Gonglei
On 2014/10/9 19:51, Gonglei wrote: > Andreas, ping? > Ping..., again. > Best regards, > -Gonglei > >> -Original Message- >> From: qemu-devel-bounces+arei.gonglei=hotmail@nongnu.org >> [mailto:qemu-devel-bounces+arei.gonglei=hotmail@nongnu.org

Re: [Qemu-devel] [PATCH 2/5] vmware-vga: add vmsvga_verify_rect

2014-10-14 Thread Gonglei
h); > + return false; > +} > + > +return true; > +} > + > static inline void vmsvga_update_rect(struct vmsvga_state_s *s, > -int x, int y, int w, int h) > + int x, int y, int w, int h) > { > DisplaySurface *surface = qemu_console_surface(s->vga.con); > int line; Best regards, -Gonglei

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread Gonglei
gs will update memslot. >>> >>> On 2014/10/14 19:20, Michael S. Tsirkin wrote: >>> >>>> On Tue, Oct 14, 2014 at 07:04:14PM +0800, arei.gong...@huawei.com wrote: >>>>> From: ChenLiang >>>>> >>>>> Power-up software can det

Re: [Qemu-devel] [PATCH] vga: drop unused dmask16 and dmask4 to avoid compiler warnings

2014-10-15 Thread Gonglei
: Remove unused arrays dmask4 and dmask16 Best regards, -Gonglei

Re: [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path function

2014-10-16 Thread Gonglei
On 2014/10/16 18:04, Peter Maydell wrote: > On 15 October 2014 11:05, Gerd Hoffmann wrote: >> From: Gonglei >> >> Introduce del_boot_device_path() to clean up fw_cfg content when >> hot-unplugging a device that refers to a bootindex or update a >> existen

Re: [Qemu-devel] [PATCH v5] numa: make 'info numa' take into account hotplugged memory

2014-10-16 Thread Gonglei
= NULL; > +MemoryDeviceInfoList **prev = &info_list; > +MemoryDeviceInfoList *info; > + > +qmp_pc_dimm_device_list(qdev_get_machine(), &prev); > +for (info = info_list; info; info = info->next) { > +MemoryDeviceInfo *value = info->value; > + > +if (value) { > +switch (value->kind) { > +case MEMORY_DEVICE_INFO_KIND_DIMM: { I think this '{}' symbol is superfluous. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v5] numa: make 'info numa' take into account hotplugged memory

2014-10-16 Thread Gonglei
On 2014/10/17 8:45, Zhanghailiang wrote: > On 2014/10/16 20:50, Gonglei wrote: >> On 2014/10/16 20:02, zhanghailiang wrote: >> >>> When do memory hotplug, if there is numa node, we should add >>> the memory size to the corresponding node memory size. >>>

Re: [Qemu-devel] [PATCH 6/6] vnc: track & limit connections

2014-10-16 Thread Gonglei
TIME: the time of reject any connection - MAX_TRY_TIMES: the times that user can connect vnc server in INTERVAL_TIME, if attach the MAX_TRY_TIMES, the server will lock, any user can not connect again before REJECT_TIME attached. The old connected client will not be influenced. Do you think it make sense if I post this approach in upstream ? Thanks. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 6/6] vnc: track & limit connections

2014-10-16 Thread Gonglei
On 2014/10/17 14:38, Daniel P. Berrange wrote: > On Fri, Oct 17, 2014 at 02:34:07PM +0800, Gonglei wrote: >> On 2014/10/16 18:46, Gerd Hoffmann wrote: >> >>> Hi, >>> >>>>> I try to prevent that by dropping the *oldest* connection, so you have

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Gonglei
xit, because the ref is not zero, the operate system will not free the FD automatically, and when vhost-user close the FD, because of the same reason, OS will not free FD resource. BTW, I don't think this patch is good. When Qemu exit exceptionally, sush as 'by kill -9', this problem of memory leak still exist. Best Regards, -Gonglei

Re: [Qemu-devel] [PATCH v6] numa: make 'info numa' take into account hotplugged memory

2014-10-17 Thread Gonglei
t; Signed-off-by: zhanghailiang > --- > v6: > - remove unnecessary 'di' variable (GongLei) > v5: > - reword the subject (Igor Mammedov) > - turn query_numa_node_mem to void (Igor Mammedov) > v4: > - s/pc_dimm_stat_node_mem/numa_stat_memory_devices/ (Igor Mamm

Re: [Qemu-devel] [PATCH] hw/i386/pc_q35.c: Avoid g_assert_cmpint() as it is not in glib 2.12

2014-10-17 Thread Gonglei
off-by: Peter Maydell > --- > hw/i386/pc_q35.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 6/6] vnc: track & limit connections

2014-10-20 Thread Gonglei
for security). However, For it is not effective for bad guys, whose operation time is greater than one second per login attempt usually. Best regards, -Gonglei

Re: [Qemu-devel] Close the BlockDriverState when guest eject the media

2014-10-20 Thread Gonglei
qemu returns an error if the medium cannot be removed with the >> 'eject' command and it only sends an eject request to the guest. >> >> With this error, libvirt can know that the DEVICE_TRAY_MOVED event >> doesn't mean that the medium has removed, b

Re: [Qemu-devel] [PATCH 6/6] vnc: track & limit connections

2014-10-21 Thread Gonglei
On 2014/10/21 16:57, Gerd Hoffmann wrote: > On Di, 2014-10-21 at 14:06 +0800, Gonglei wrote: >> On 2014/10/20 15:02, Gerd Hoffmann wrote: >> >>> >>> Hi, >>> >>>> If we set the max trying times, and then >>>> There are some concep

Re: [Qemu-devel] Close the BlockDriverState when guest eject the media

2014-10-21 Thread Gonglei
ot; commands that do just one thing: eject medium > (open tray), remove medium, insert medium, load mediun (close tray). > > I feel "eject medium (open tray)" should work like pressing the button > on a physical drive: if the tray is unlocked, it opens, else the drive > notifies the OS of the button press. The OS should then unlock and open > when possible. > > Likewise, "remove/insert medium" should work just like they do with a > physical drive: the tray needs to be open already. > Cool. Follow the physical behavior completely. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 6/6] vnc: track & limit connections

2014-10-21 Thread Gonglei
firewall doesn't have. With sasl enabled we can slow down login > attempts *per user* for example. > OK. Thanks for your opinion. :) Best regards, -Gonglei

Re: [Qemu-devel] [PATCH] MAINTAINERS: add myself as bootdevice.c maintainer

2014-10-22 Thread Gonglei
On 2014/10/22 17:32, Gerd Hoffmann wrote: > On Mi, 2014-10-22 at 11:07 +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> bootdevice.c was created by me, and I wrote most of >> the code in this file. And now I can maintain it, >> I'd hope nobody ob

Re: [Qemu-devel] [PATCH v4] snapshot: use local variable to bdrv_pwrite_sync L1 table

2014-10-22 Thread Gonglei
NULL; > -l1_table = NULL; > l1_size2 = l1_size * sizeof(uint64_t); > +l1_table = qemu_try_blockalign(bs->file, l1_size2); > +if (l1_size2 && l1_table == NULL) { I think this check has a logic problem. If l1_size2 != 0 and l1_table == NULL, What will ha

Re: [Qemu-devel] [PATCH v4] snapshot: use local variable to bdrv_pwrite_sync L1 table

2014-10-22 Thread Gonglei
On 2014/10/22 20:02, Max Reitz wrote: > On 2014-10-22 at 14:01, Max Reitz wrote: >> On 2014-10-22 at 13:59, Gonglei wrote: >>> On 2014/10/22 19:45, Zhang Haoyu wrote: >>> >>>> Use local variable to bdrv_pwrite_sync L1 table, >>>> needless to

Re: [Qemu-devel] [PATCH v4] snapshot: use local variable to bdrv_pwrite_sync L1 table

2014-10-22 Thread Gonglei
On 2014/10/22 20:24, Max Reitz wrote: > On 2014-10-22 at 14:21, Gonglei wrote: >> On 2014/10/22 20:02, Max Reitz wrote: >> >>> On 2014-10-22 at 14:01, Max Reitz wrote: >>>> On 2014-10-22 at 13:59, Gonglei wrote: >>>>> On 2014/10/22 19:45, Zh

Re: [Qemu-devel] [PATCH v4] snapshot: use local variable to bdrv_pwrite_sync L1 table

2014-10-22 Thread Gonglei
On 2014/10/22 20:32, Max Reitz wrote: > On 2014-10-22 at 14:30, Gonglei wrote: >> On 2014/10/22 20:24, Max Reitz wrote: >> >>> On 2014-10-22 at 14:21, Gonglei wrote: >>>> On 2014/10/22 20:02, Max Reitz wrote: >>>> >>>>> On 2014

Re: [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table

2014-10-22 Thread Gonglei
her ugly. > > Not after this recent patch: > > https://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02499.html > Good catch :) Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 1/3] vnc: remove superfluous vnc_display_close()

2014-10-23 Thread Gonglei
On 2014/10/23 15:09, Michael Tokarev wrote: > On 10/23/2014 09:39 AM, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> vnc_display_close() is called in vnc_display_open(). >> And in this moment, the ds variable is initilized >> at vnc_display_init().

Re: [Qemu-devel] [PATCH 3/3] vnc: remove superfluous DisplayState *ds parameter

2014-10-23 Thread Gonglei
t > the start of main() anyway, instead of this very place like > local_err is?) > Hmm. I notice Gerd's patch had done this clean work: http://lists.nongnu.org/archive/html/qemu-devel/2014-10/msg01618.html Maybe I should drop this patch. Thanks. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH] vnc: fix fd leak at vnc_display_open()

2014-10-23 Thread Gonglei
On 2014/10/23 15:57, Gerd Hoffmann wrote: > On Do, 2014-10-23 at 14:33 +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> When using qmp change vnc interface, will leak fd >> of vs->lsock and vs->lwebsock (if configed). Close >> them before: re-

Re: [Qemu-devel] [PATCH 0/3] vnc: trivial problem and memory leak fix

2014-10-23 Thread Gonglei
On 2014/10/23 16:08, Gerd Hoffmann wrote: > On Do, 2014-10-23 at 13:39 +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> Beside those problems, I also found another issue, see below pls. >> >> Qemu command line: >> $ ./qemu-system-x86_64 -en

Re: [Qemu-devel] [PATCH 0/3] vnc: trivial problem and memory leak fix

2014-10-23 Thread Gonglei
want try solving this nevertheless I'd suggest to do it on top of > https://www.kraxel.org/cgit/qemu/log/?h=rebase/ui-vnc-next to avoid > conflicts. > OK. > Oh, and the switch to QemuOpts for vnc parameter parsing in the branch > might already improve things. > Hmm. That's very useful, Thanks a lot :) Best regards, -Gonglei

Re: [Qemu-devel] [PATCH] MAINTAINERS: add myself as bootdevice.c maintainer

2014-10-23 Thread Gonglei
> Looking forward to see your first pull req ;) > +1, pls. Best regards, -Gonglei

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/4] os-posix: report error message when lock file failed

2014-10-24 Thread Gonglei
On 2014/10/24 15:32, Michael Tokarev wrote: > On 09/25/2014 01:46 PM, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> It will cause that create vm failed When manager >> tool is killed forcibly (kill -9 libvirtd_pid), >> the file not was unlink, and unloc

Re: [Qemu-devel] [PATCH] main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously

2014-10-25 Thread Gonglei
akpoint for debugging, then press 'ctrl + c', the Qemu will exit, because the SIGINT signal is captured by Qemu now. :( What's your opinion? Thanks. Best regards, -Gonglei > Cc: qemu-sta...@nongnu.org > --- > main-loop.c | 3 +++ > 1 file changed, 3 insertions(+) >

Re: [Qemu-devel] [PATCH] vhost-user-test: revert changes to make 'make check' happy

2014-10-26 Thread Gonglei
On 2014/10/26 15:55, Paolo Bonzini wrote: > > > On 10/26/2014 08:46 AM, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> After commit 89b516d8, some logics is turbid. >> First, vhost-usr-test.c rely on glib-compat.h because >> of usi

Re: [Qemu-devel] [PATCH v1 repost 2] block/curl: Improve type safety of s->timeout.

2014-10-26 Thread Gonglei
OPT_WRITEDATA, (void *)state); > @@ -546,6 +546,10 @@ static int curl_open(BlockDriverState *bs, QDict > *options, int flags, > > s->timeout = qemu_opt_get_number(opts, CURL_BLOCK_OPT_TIMEOUT, > CURL_TIMEOUT_DEFAULT); > +if (s->timeout > 10) { why 10? And it's a magic number. Best regards, -Gonglei > +error_setg(errp, "timeout parameter is too large or negative"); > +goto out_noclean; > +} > > s->sslverify = qemu_opt_get_bool(opts, CURL_BLOCK_OPT_SSLVERIFY, true); >

Re: [Qemu-devel] [PATCH] Make qemu_shutdown_requested signal-safe

2014-10-26 Thread Gonglei
get(void) > > static int qemu_shutdown_requested(void) > { > -int r = shutdown_requested; > -shutdown_requested = 0; > -return r; > +return atomic_xchg(&shutdown_requested, 0); > } > > static void qemu_kill_report(void) Looks good to me, so Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH] Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM, synchronously"

2014-10-26 Thread Gonglei
On 2014/10/26 17:32, Jan Kiszka wrote: > From: Jan Kiszka > > This reverts commit 15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks > debuggability of qemu. > > Signed-off-by: Jan Kiszka > --- > Thanks, please add my 'Reported-by' tag and Reviewed-by: G

Re: [Qemu-devel] [PATCH v1 repost 2] block/curl: Improve type safety of s->timeout.

2014-10-26 Thread Gonglei
nto the code making it > harder to read and more fragile when changed. That's the purpose using macro. If this value is used only one place in the curl.c (or other c files) now and future, you are fine with it. :) Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v1 repost 2] block/curl: Improve type safety of s->timeout.

2014-10-26 Thread Gonglei
On 2014/10/26 18:48, Richard W.M. Jones wrote: > On Sun, Oct 26, 2014 at 06:45:02PM +0800, Gonglei wrote: >> On 2014/10/26 18:22, Richard W.M. Jones wrote: >> >>> It's just there to stop unreasonable timeouts or negative numbers. >>> 10 s is 27 hours, a

Re: [Qemu-devel] [PATCH v2] block/curl: Improve type safety of s->timeout.

2014-10-26 Thread Gonglei
-by: Laszlo Ersek > --- You can add change logs in this place instead of a cover-letter for one patch :) > block/curl.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > Reviewed-by: Gonglei Best regards, -Gonglei > diff --git a/block/curl.c b/block/curl.c &g

Re: [Qemu-devel] [PATCH] MAINTAINERS: add myself as bootdevice.c maintainer

2014-10-27 Thread Gonglei
> Looking forward to see your first pull req ;) > > cheers, > Gerd > > Hi, Gerd & Markus Because the deadline of Qemu-2.2 soft freezing window is drawing near, Would you please send a pull request including this patch? Thanks. Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 00/10] pci: Partial conversion to realize

2014-10-28 Thread Gonglei
device by device instead of having to convert of all of PCI in > one Gargantuan go. > Good solution I think :) Best regards, -Gonglei > Since PCI's exit() cannot fail, I chose not to add an unrealize(). > Precedence: USBDeviceClass method handle_destroy(), called on USB > un

Re: [Qemu-devel] [PATCH RFC 01/10] pci: Convert core to realize

2014-10-28 Thread Gonglei
On 2014/10/28 15:35, Markus Armbruster wrote: > Implement DeviceClass methods realize() and unrealize() instead of > init() and exit(). The core's initialization errors now get > propagated properly, and QMP sends them instead of an unspecific > "Device initialization failed" error. Unrealize ca

Re: [Qemu-devel] [PATCH RFC 02/10] pci: Permit incremental conversion of device models to realize

2014-10-28 Thread Gonglei
mbruster > --- > hw/pci/pci.c | 24 +++- > include/hw/pci/pci.h | 3 ++- > 2 files changed, 21 insertions(+), 6 deletions(-) > Reviewed-by: Gonglei Best regards, -Gonglei > diff --git a/hw/pci/pci.c b/hw/pci/pci.c > index aef95c3..e21c0a8

Re: [Qemu-devel] [PATCH RFC 03/10] pci: Trivial device model conversions to realize

2014-10-28 Thread Gonglei
| 20 > hw/pci-host/versatile.c| 5 ++--- > hw/usb/hcd-ehci-pci.c | 6 ++ > hw/usb/hcd-xhci.c | 6 ++ > hw/watchdog/wdt_i6300esb.c | 6 ++ > 33 files changed, 85 insertions(+), 149 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 04/10] pcnet: pcnet_common_init() always returns 0, change to void

2014-10-28 Thread Gonglei
f --git a/hw/net/pcnet.c b/hw/net/pcnet.c > index d344c15..5a081c4 100644 > --- a/hw/net/pcnet.c > +++ b/hw/net/pcnet.c > @@ -1724,7 +1724,7 @@ void pcnet_common_cleanup(PCNetState *d) > d->nic = NULL; > } > > -int pcnet_common_init(DeviceState *dev, PCNetState *s, NetClientI

Re: [Qemu-devel] [PATCH RFC 06/10] serial-pci: Convert to realize

2014-10-28 Thread Gonglei
On 2014/10/28 15:35, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/char/serial-pci.c | 22 +- > 1 file changed, 9 insertions(+), 13 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 07/10] ide/ich: Convert to realize

2014-10-28 Thread Gonglei
On 2014/10/28 15:35, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/ide/ich.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 08/10] cirrus-vga: Convert to realize

2014-10-28 Thread Gonglei
On 2014/10/28 15:35, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/display/cirrus_vga.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 09/10] qxl: Convert to realize

2014-10-28 Thread Gonglei
On 2014/10/28 15:35, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/display/qxl.c | 36 +--- > 1 file changed, 17 insertions(+), 19 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 10/10] pci-assign: Convert to realize

2014-10-28 Thread Gonglei
On 2014/10/28 15:35, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/i386/kvm/pci-assign.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC 04/10] pcnet: pcnet_common_init() always returns 0, change to void

2014-10-28 Thread Gonglei
On 2014/10/28 17:41, Markus Armbruster wrote: > Gonglei writes: > >> On 2014/10/28 15:35, Markus Armbruster wrote: >> >>> The next commit will exploit the fact it never fails. This one makes >>> it obvious. >>> >>> Signed-off-by:

Re: [Qemu-devel] [PATCH] vhost-user-test: revert changes to make 'make check' happy

2014-10-28 Thread Gonglei
On 2014/10/26 15:46, Gonglei (Arei) wrote: > From: Gonglei > > After commit 89b516d8, some logics is turbid. > First, vhost-usr-test.c rely on glib-compat.h because > of using G_TIME_SPAN_SECOND [glib < 2.26] and g_get_monotonic_time(), > but vhost-usr-test.c defined QEMU

Re: [Qemu-devel] [PATCH] MAINTAINERS: add myself as bootdevice.c maintainer

2014-10-28 Thread Gonglei
On 2014/10/28 15:52, Paolo Bonzini wrote: > > > On 10/28/2014 02:44 AM, Gonglei wrote: >> On 2014/10/23 20:27, Gerd Hoffmann wrote: >> >>> Hi, >>> >>>> I expect some of the patches to be in the Kevin's, Paolos and Gerd's >>

Re: [Qemu-devel] [PATCH] virtio: link the rng backend through an alias property

2014-10-28 Thread Gonglei
-pci/virtio-rng-ccw use an alias, similar > to what is already being done for the iothread link. > I think s390_virtio_rng should also use an alias for rng backend. Best regards, -Gonglei > Signed-off-by: Paolo Bonzini > --- > hw/s390x/virtio-ccw.c | 6 ++ > hw/virtio/vi

Re: [Qemu-devel] [PATCH] block/curl: Improve type safety of s->timeout.

2014-10-28 Thread Gonglei
insertions(+), 2 deletions(-) > > Thanks, applied to my block tree: > https://github.com/stefanha/qemu/commits/block > > Stefan Please don't, the patch had been posted v2 which is better: [PATCH v2] block/curl: Improve type safety of s->timeout. http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg03112.html Best regards, -Gonglei

Re: [Qemu-devel] [PATCH v2] virtio: link the rng backend through an alias property

2014-10-29 Thread Gonglei
he proxy device use an alias, similar to what is > already being done for the iothread link. > > Signed-off-by: Paolo Bonzini > > --- > v1->v2: also change s390-virtio-bus.c (Gonglei) > --- > hw/s390x/s390-virtio-bus.c | 6 ++ > hw/s390x/virtio-ccw.c

Re: [Qemu-devel] [PATCH] dump: fix use-after-free for s->fd

2014-10-29 Thread Gonglei
On 2014/10/29 23:00, Markus Armbruster wrote: > writes: > >> From: Gonglei >> >> After commit 4c7e251a (), when dump memory completed, >> the s->fd will be closed twice. We should return >> directly when dump completed. >> >> Signed-off-by:

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread Gonglei
On 2014/10/30 17:23, Markus Armbruster wrote: > Michael Tokarev writes: > >> 30.10.2014 10:10, Markus Armbruster wrote: >>> writes: >>> >>>> From: Gonglei >>>> >>>> After commit 4c7e251a (), when dump memory completed, >&g

Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio-9p-proxy: Fix sockfd leak and modify the check logic

2014-10-30 Thread Gonglei
On 2014/10/30 16:03, Michael Tokarev wrote: > 29.10.2014 13:52, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> If connect() return false, the sockfd will leak, >> meanwhile proxy_init() can't check the return value >> of connect_namedsocket()

Re: [Qemu-devel] [PATCH] virtio-9p-proxy: improve error messages in connect_namedsocket()

2014-10-30 Thread Gonglei
On 2014/10/30 16:06, Michael Tokarev wrote: > Signed-off-by: Michael Tokarev > --- > hw/9pfs/virtio-9p-proxy.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 4/4] os-posix: reorder parent notification for -daemonize

2014-10-31 Thread Gonglei
Michael Tokarev > --- > os-posix.c | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 3/4] pidfile: stop making pidfile error a special case

2014-10-31 Thread Gonglei
On 2014/10/31 15:16, Michael Tokarev wrote: > 31.10.2014 08:00, Gonglei wrote: >> On 2014/10/30 23:07, Michael Tokarev wrote: >> >>> In case of -daemonize, we write non-zero to the daemon >>> pipe only if pidfile creation failed, so the parent will >>> re

Re: [Qemu-devel] [PATCH 2/4] os-posix: replace goto again with a proper loop

2014-10-31 Thread Gonglei
ions(+), 10 deletions(-) Reviewed-by: Gonglei Best regards, -Gonglei

Re: [Qemu-devel] [PATCH 3/4] pidfile: stop making pidfile error a special case

2014-10-31 Thread Gonglei
On 2014/10/31 16:02, Michael Tokarev wrote: > 31.10.2014 10:58, Gonglei wrote: >> On 2014/10/31 15:41, Michael Tokarev wrote: > [] >>>>>>> +exit(len == 1 && status == 0 ? 0 : 1); >>>>> >>>>> ...it is checked here

Re: [Qemu-devel] [PATCH 3/4] pidfile: stop making pidfile error a special case

2014-10-31 Thread Gonglei
On 2014/10/31 15:41, Michael Tokarev wrote: > 31.10.2014 10:33, Gonglei wrote: > [] >>>>> While at it, fix wrong identation in os_daemonize(). >>>> >>>> s/identation/identification/ >>> >>> No, the original word was the right one. &g

Re: [Qemu-devel] [PATCH 3/4] pidfile: stop making pidfile error a special case

2014-10-31 Thread Gonglei
On 2014/10/30 23:07, Michael Tokarev wrote: > In case of -daemonize, we write non-zero to the daemon > pipe only if pidfile creation failed, so the parent will > report error about pidfile problem. There's no need to > make special case for this, since all other errors are > reported by the child

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-31 Thread Gonglei
On 2014/10/31 15:18, Michael Tokarev wrote: > 31.10.2014 04:43, Gonglei wrote: >> On 2014/10/30 21:54, Michael Tokarev wrote: >> >>> So I'm applying this -- which is your patch and your commit message, and >>> I really wonder why this is Reviewed-by and not S

Re: [Qemu-devel] [PATCH 1/4] os-posix: use global daemon_pipe instead of cryptic fds[1]

2014-10-31 Thread Gonglei
me is really too generic. Use > just one interger for the writing side of the pipe, and name it > daemon_pipe to be more understandable than cryptic fds[1]. > > Signed-off-by: Michael Tokarev > --- > os-posix.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletion

  1   2   3   4   5   6   7   8   9   10   >