Re: [PATCH 2/2] make the injection of interrupts run atsleepable mode.

Izik Eidus
2007-10-17T06:54:58Z

Dong, Eddie wrote:
> Not quit understand the following code. If we just set
> a vcpu request bits w/o real irq injection, we can't resume
> to guest? Othrewise, the guest is in interruptable state and can
> see irq pending, but it doesn't get the interrupt.
>
> Something missing?
> thx,eddie
>
>
> --- a/drivers/kvm/vmx.c
> +++ b/drivers/kvm/vmx.c
> @@ -1678,10 +1678,11 @@ static void inject_rmode_irq(struct kvm_vcpu
> *vcpu, int irq)
> vmcs_writel(GUEST_RSP, (vmcs_readl(GUEST_RSP) & ~0xffff) | (sp -
> 6));
> }
>
> -static void vmx_inject_irq(struct kvm_vcpu *vcpu, int irq)
> +void vmx_inject_irq(struct kvm_vcpu *vcpu, int irq)
> {
> if (vcpu->rmode.active) {
> - inject_rmode_irq(vcpu, irq);
> + vcpu->inject_rmode_irq = irq;
> + set_bit(VMX_INJECT_RMODE_IRQ, &vcpu->requests);
> return;
> }
> vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
>
>
this come wont be applied anyway, avi wrote a better solution that was
applied.