Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Ashijeet Acharya
On Thu, Aug 11, 2016 at 10:04 PM, Paolo Bonzini wrote: > >> I think we should do >> >> s->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus); >> instead of >> qemu_add_vm_change_state_handler(ide_restart_cb, bus); >> >> in ide_register_restart_cb() in hw/ide/core.c to store the return

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Paolo Bonzini
> I think we should do > > s->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus); > instead of > qemu_add_vm_change_state_handler(ide_restart_cb, bus); > > in ide_register_restart_cb() in hw/ide/core.c to store the returned > pointer to memory to avoid a possible memory leak I guess

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Ashijeet Acharya
On Thu, Aug 11, 2016 at 1:50 PM, Ashijeet Acharya wrote: > On Wed, Aug 10, 2016 at 11:12 AM, Ashijeet Acharya > wrote: >> On Tue, Aug 9, 2016 at 11:48 PM, John Snow wrote: >>> >>> >>> On 08/09/2016 01:16 PM, Ashijeet Acharya wrote: Hi again, I am still waiting for some guidance...

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Ashijeet Acharya
On Wed, Aug 10, 2016 at 11:12 AM, Ashijeet Acharya wrote: > On Tue, Aug 9, 2016 at 11:48 PM, John Snow wrote: >> >> >> On 08/09/2016 01:16 PM, Ashijeet Acharya wrote: >>> >>> Hi again, >>> I am still waiting for some guidance...Can I please get some help with >>> this? >>> >>> Also.. I tried hotp

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-09 Thread Ashijeet Acharya
On Tue, Aug 9, 2016 at 11:48 PM, John Snow wrote: > > > On 08/09/2016 01:16 PM, Ashijeet Acharya wrote: >> >> Hi again, >> I am still waiting for some guidance...Can I please get some help with >> this? >> >> Also.. I tried hotplugging an AHCI adapter but got the following error: >> Bus 'ahci.0' d

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-09 Thread John Snow
On 08/09/2016 01:16 PM, Ashijeet Acharya wrote: Hi again, I am still waiting for some guidance...Can I please get some help with this? Also.. I tried hotplugging an AHCI adapter but got the following error: Bus 'ahci.0' does not support hotplugging Steps I followed: 1. launch vm with ahci en

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-09 Thread Ashijeet Acharya
Hi again, I am still waiting for some guidance...Can I please get some help with this? Also.. I tried hotplugging an AHCI adapter but got the following error: Bus 'ahci.0' does not support hotplugging Steps I followed: 1. launch vm with ahci enabled 2. (qemu) drive_add 0 file=test.qcow2,cache=no

[Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-06 Thread Ashijeet Acharya
Hi, I was working on a patch regarding a device lifecycle bitesize task and I wanted to clear my queries about what the task is exactly. Do I need to create a new function ahci_unrealize() in the hw/ide/ahci.c file which calls for qemu_del_vm_change_state_handler() to free the handler at the time