From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: kernel device reset support Date: Tue, 09 Oct 2007 12:55:55 +0200 Message-ID: <470B5E3B.4060006@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A0231BB36@pdsmsx411.ccr.corp.intel.com> <470A0556.80903@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A0231BD83@pdsmsx411.ccr.corp.intel.com> <470B4B2E.1000500@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A0231C1AA@pdsmsx411.ccr.corp.intel.com> <470B5528.2010605@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A0231C1B2@pdsmsx411.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: "Dong, Eddie" Return-path: In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A0231C1B2-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dong, Eddie wrote: > Avi Kivity wrote: > >>> If BSP mp_state becomes VCPU_MP_STATE_UNINITIALIZED, current code >>> can't wakeup it. We need additional code that I am not aware of now. >>> >>> Current VCPU must be BSP, otherwise the code executing in Qemu will >>> have problem too. >>> >>> >> But, for an ungraceful reset, nothing prevents an AP from >> issuing a reset? >> > > Mmm, Yes, but I think current architecture can't handle this. > The thread where AP issues "RESET" will continue run, which > means it becomes BSP now and wake up other APs later on. > Or We can block that AP first and then inform BSP to do > RESET job. Here we need to block the AP in kernel > so that we can wake up. > It should call vcpu_halt() immediately after reset. > It can be a future task which is not that high priority IMO. > I will focus on SMP boot 1st. Your opnion? > Agree. But let's make it close to the complete solution. >>> >>> >> What I mean is to use mp_state within the vcpu code (while holding the >> vcpu mutex) and to use vcpu->requests as a means to tell the vcpu it >> needs to change state. >> >> > > Then we need to add code to enter waitqueque here. I think force_to_quit > is much simple and efficient since we don't need to test (atomic test) > at each VM Exit even light weight VM Exit. > The test for vcpu->requests already exists (and is needed for tlb flushes) so there is no additional performance hit. > But certainly it can. If you want to save the per VCPU force_to_quit, we > can share it with vcpu_request, but test in external IRQ is better IMO > since we take a kick now. > The vcpu may have exited due to some other reason, and the interrupt taken in host context? -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/