Re: [Android-virt] [PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

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

 



On 08/06/2012 08:20 PM, Peter Maydell wrote:
> On 3 July 2012 10:01, Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> From: Christoffer Dall <cdall@xxxxxxxxxxxxxxx>
>>
>> Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl.
>> This ioctl is used since the sematics are in fact two lines that can be
>> either raised or lowered on the VCPU - the IRQ and FIQ lines.
>>
>> KVM needs to know which VCPU it must operate on and whether the FIQ or
>> IRQ line is raised/lowered. Hence both pieces of information is packed
>> in the kvm_irq_level->irq field. The irq fild value will be:
>>   IRQ: vcpu_index << 1
>>   FIQ: (vcpu_index << 1) | 1
>>
>> This is documented in Documentation/kvm/api.txt.
> 
> It occurred to me that rather than encoding the CPU index in the IRQ
> field value, maybe we should just use the per-vcpu version of
> KVM_IRQ_LINE the same way we do for injecting the per-CPU lines
> of the in-kernel (V)GIC ?

What do you mean by "per-vcpu version of KVM_IRQ_LINE"?

> 
> (The subtext here is that it would be cool to have QEMU's
> generic interrupt handling code for KVM be able to say "if
> you do a cpu_interrupt()/cpu_reset_interrupt() and async
> interrupt delivery is enabled then just do the per-vcpu ioctl".
> Then there wouldn't need to be any kvm-specific code in
> hw/arm_pic.c at all...)

If you mean "vcpu ioctl", then no, vcpu ioctls must be called from the
vcpu thread.

-- 
error compiling committee.c: too many arguments to function
--
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