From: Balaji Rao Subject: Re: [RFC] nmi watchdog in kvm Date: Wed, 30 Jan 2008 20:32:01 +0530 Message-ID: <200801302032.01603.balajirrao@gmail.com> References: <200801281348.41010.balajirrao@gmail.com> <200801301952.57604.balajirrao@gmail.com> <47A08C24.8040505@qumranet.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: Avi Kivity Return-path: In-Reply-To: <47A08C24.8040505-atKUWr5tajBWk0Htik3J/w@public.gmane.org> Content-Disposition: inline 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 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. thank you, balaji rao ------------------------------------------------------------------------- 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/