Re: RFC/patch portability: split kvm_vm_ioctl v3

Carsten Otte
2007-10-30T15:57:04Z

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];
};