Re: RFC/patch portability: split kvm_vm_ioctl v3

Dong, Eddie
2007-10-30T23:10:00Z

Carsten Otte wrote:
> Dong, Eddie wrote:
>> IA64/KVM will handle interrupt in kernel including IPI IMO, so what
>> user level need to tell kernel is which platform IRQ pin is
>> set/cleared.
>>
>> Can't S390 do in similar way? From platform point of view, each
>> irq can have a unique # and the device itself doesn;t need to know
>> which CPU will receive it. Are talking about having your interrupt
>> controller in user space? or I missed something.
> We don't have interrupt controllers in the first place, and therefore
> we don't need to emulate them. We want to handle IPI inside the kernel
> too, and we also need to be able to inject interrupts from userspace.
> Would you be able to encode your interrupt related information into an
> __u64 data type? Do all CPUs have the same interrupts pending, or is
> the information per-cpu? Does the data structure that Avi suggested
> fit your interrupt injection needs?
>
> struct kvm_interrupt {
> __u64 vector;
> __u32 size; /* bytes, must be multiple of 8 */
> __u32 pad; __u64 cpuset[0];
> };

Since IA64 & X86 doesn't carry CPU info in the KVM_IRQ_LINE,
only irq # is carried, so a u32 is enough, but definitely structure like
above can be too.

BTW, why we use vector here? shouldn't it be irq_line or irq_no?
Eddie