qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immedia


From: Paolo Bonzini
Subject: Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start
Date: Wed, 6 Jun 2018 16:23:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 06/06/2018 16:18, xuyandong wrote:
>> We don't.  It's generally a guest bug if they do, but the problem here is 
>> that
>> QEMU is splitting a memory region in two parts and that is not atomic.
>>      
>> One fix could be to add a KVM_SET_USER_MEMORY_REGIONS ioctl that
>> replaces the entire memory map atomically.
>>
>> Paolo
> After we add a KVM_SET_USER_MEMORY_REGIONS ioctl that replaces the entire
> memory map atomically, how to use it in address_space_update_topology?
> Shall we checkout the spilt memory region before 
> " address_space_update_topology_pass(as, old_view, new_view, false); 
> address_space_update_topology_pass(as, old_view, new_view, true);

You would add the regions to an array in kvm_region_add, and send the
ioctl in the .commit callback of MemoryListener.

kvm_region_del would disappear.  The .commit callback would also look at
the array from the previous execution, and call memory_region_unref on
the regions in there.

Paolo



reply via email to

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