Re: [RFC] nmi watchdog in kvm

Balaji Rao
2008-01-30T15:02:01Z

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