On 04/28/2013 04:32 PM, Jordan Justen wrote: > On a Linux 3.8.0 based kernel, I occasionally saw a situation > where the memory region would continue to trap on memory > read even though KVM_MEM_READONLY was set. > > I found that if I set the slot to a size of 0, and before > setting the slot, it would then behave as expected.
Yes, the KVM_MEM_READONLY flag can not be directly changed, see the commit 75d61fbcf563373696578570e914f555e12c8d97 on kvm tree. Do you think the way which deletes the memslot before changing the KVM_MEM_READONLY hurts the performance? If yes, i will make it be directly changed. Thanks for you implementing the READONLY memory in Qemu. Reviewed-by: Xiao Guangrong <xiaoguangr...@linux.vnet.ibm.com>