|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 6/9] kvm: First step to push iothread lock out of inner run loop |
Date: | Tue, 23 Jun 2015 11:49:33 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 23/06/2015 11:45, Fam Zheng wrote: >>> > > break; >>> > > case KVM_EXIT_SYSTEM_EVENT: >>> > > switch (run->system_event.type) { >>> > > case KVM_SYSTEM_EVENT_SHUTDOWN: >>> > > * qemu_system_shutdown_request(); >>> > > ret = EXCP_INTERRUPT; >>> > > break; >>> > > case KVM_SYSTEM_EVENT_RESET: >>> > > * qemu_system_reset_request(); >> > >> > These two are thread-safe. > But above you add lock/unlock around the qemu_system_reset_request() under > KVM_EXIT_SHUTDOWN. What's different? That's unnecessary. Also, just below this switch there's another call to kvm_arch_handle_exit that should be wrapped by lock/unlock (it works anyway because no one handles KVM_EXIT_SYSTEM_EVENT in kvm_arch_handle_exit, but it's not clean). Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |