From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC] nmi watchdog in kvm Date: Wed, 30 Jan 2008 17:13:17 +0200 Message-ID: <47A0940D.8090600@qumranet.com> References: <200801281348.41010.balajirrao@gmail.com> <200801301952.57604.balajirrao@gmail.com> <47A08C24.8040505@qumranet.com> <200801302032.01603.balajirrao@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Balaji Rao Return-path: In-Reply-To: <200801302032.01603.balajirrao-Re5JQEeQqe8AvxtiuMwx3w@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 Balaji Rao wrote: > On Wednesday 30 January 2008 08:09:32 pm Avi Kivity wrote: > >>> I intended to do this here. Looks like its not the right way to check for >>> presence in vcpu context. How do i do it ? please explain. >>> >>> +static void vmx_inject_nmi(struct kvm_vcpu *vcpu) { >>> + >>> + struct vcpu_vmx * vmx = to_vmx(vcpu); >>> + if (vmx->launched) >>> + vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, >>> + 2 | INTR_TYPE_NMI | INTR_INFO_VALID_MASK); >>> +} >>> >> No, this is the wrong place. If you have a vcpu, you'd better be in >> vcpu context. >> > Oh.. ok. Looks like I have not understood the vcpu concept correctly. Will put > more thought into it and understand it before I attempt to fix this. > > To be clear, vcpu context is the time between vcpu_load() and vcpu_put(), holding vcpu->mutex. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/