qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] migrate: Introduce a 'dc->vmsd' check to avo


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3] migrate: Introduce a 'dc->vmsd' check to avoid segfault for --only-migratable
Date: Mon, 13 Feb 2017 16:42:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0


On 13/02/2017 16:14, Dr. David Alan Gilbert wrote:
> * Dr. David Alan Gilbert (address@hidden) wrote:
>> * Ashijeet Acharya (address@hidden) wrote:
>>> Commit a3a3d8c7 introduced a segfault bug while checking for
>>> 'dc->vmsd->unmigratable' which caused QEMU to crash when trying to add
>>> devices which do no set their 'dc->vmsd' yet while initialization.
>>> Place a 'dc->vmsd' check prior to it so that we do not segfault for
>>> such devices.
>>>
>>> NOTE: This doesn't compromise the functioning of --only-migratable
>>> option as all the unmigratable devices do set their 'dc->vmsd'.
>>>
>>> Also, move the only_migratable check inside device_set_realized() to avoid
>>> code duplication and fix the bug to display only_migratable error message
>>> only if the device constructuon is right.
>>>
>>> Signed-off-by: Ashijeet Acharya <address@hidden>
>>
>> Queued
> 
> I've had to remove this;  it fails to build user-mode qemu's.
> I think the problem is only_migratable is in vl.c and doesn't
> get linked in user mode qemu; I tried adding a #ifndef CONFIG_USER_ONLY
> around the block and it didn't help, so back to you.\

It doesn't help because the file is compiled just once.  You can add it
to stubs/ (for example stubs/vmstate.c).

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]