Re: [RFC PATCH 3/3] VMX: Emulated real mode interrupt injection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 10, 2010 at 6:03 AM, Avi Kivity <avi@xxxxxxxxxx> wrote:
>  On 08/08/2010 03:24 PM, Mohammed Gamal wrote:
>>
>> Signed-off-by: Mohammed Gamal<m.gamal005@xxxxxxxxx>
>> ---
>>  arch/x86/kvm/vmx.c |   11 +----------
>>  1 files changed, 1 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>> index 652d317..d6cb7eb 100644
>> --- a/arch/x86/kvm/vmx.c
>> +++ b/arch/x86/kvm/vmx.c
>> @@ -2838,16 +2838,7 @@ static void vmx_inject_irq(struct kvm_vcpu *vcpu)
>>
>>        ++vcpu->stat.irq_injections;
>>        if (vmx->rmode.vm86_active) {
>> -               vmx->rmode.irq.pending = true;
>> -               vmx->rmode.irq.vector = irq;
>> -               vmx->rmode.irq.rip = kvm_rip_read(vcpu);
>> -               if (vcpu->arch.interrupt.soft)
>> -                       vmx->rmode.irq.rip +=
>> -                               vmx->vcpu.arch.event_exit_inst_len;
>
> This has to be covered somehow.  Not sure exactly - probably keep the same
> code.  Jan?
>
>> -               vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
>> -                            irq | INTR_TYPE_SOFT_INTR |
>> INTR_INFO_VALID_MASK);
>> -               vmcs_write32(VM_ENTRY_INSTRUCTION_LEN, 1);
>> -               kvm_rip_write(vcpu, vmx->rmode.irq.rip - 1);
>> +               inject_realmode_interrupt(vcpu, irq);
>>                return;
>>        }
>
> Error checks?
We return anyway. Is there somwhere in the vmcs where an error is
indicated (e.g. setting some flag or variable)? Or should we probably
let vmx_inject_irq() return an integer return value?

>
> Need to do same to vmx_inject_nmi().
>
> fixup_rmode_irq() just became dead code, you can remove it.  Also remove the
> entire vmx->rmode.irq thing.
>
> --
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
>
>
dic
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux