From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: kvm: qemu: stop/start cpus before/after devices Date: Wed, 25 Mar 2009 11:39:32 -0300 Message-ID: <20090325143932.GB28345@amt.cnet> References: <20090324171652.GA3655@amt.cnet> <49CA1970.1090509@redhat.com> <20090325142619.GA28345@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-devel , Dor Laor , Yaniv Kamay To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55528 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665AbZCYOjr (ORCPT ); Wed, 25 Mar 2009 10:39:47 -0400 Content-Disposition: inline In-Reply-To: <20090325142619.GA28345@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Mar 25, 2009 at 11:26:19AM -0300, Marcelo Tosatti wrote: > On Wed, Mar 25, 2009 at 01:45:52PM +0200, Avi Kivity wrote: > > Marcelo Tosatti wrote: > >> From: Yaniv Kamay > >> > >> Stop cpus before devices when stopping the VM, start cpus after devices > >> when starting VM. > >> > >> > > > > Why is this needed? > > A vcpu could access a stopped device otherwise. Actually on vm_stop its safe because the order happens to be correct, but on vm_start its the other way around (vcpus start first, and they should be started last).