Re: RFC/patch portability: split kvm_vm_ioctl v3

Avi Kivity
2007-10-30T12:36:38Z

Carsten Otte wrote:
>
>>> In addition, I would love to be able to specify which target CPUs
>>> may receive that interrupt because our IPI equivalent comes out just
>>> like a regular interrupt on just one target CPU.
>>>
>>> That boils down to something like this:
>>> struct kvm_interrupt_data {
>>> __u64 interrupt_number;
>>> cpuset_t possible_target_cpus;
>>> }
>>> and an KVM_INJECT_INTERRUPT common ioctl for the vm to provide this.
>>
>> Are cpusets exported to userspace?
>>
>> x86 has something similar (IPI to a set of cpus) but it's handled
>> 100% in the kernel these days.
>>
> No they are'nt. We'd need to come up with a different data structure
> for that.

A bitmap would do it, but what size? Expandable ones are messy.

> Does IPI have an interrupt number too?

No, it's a command (mmio) to the APIC, you tell it which vector you want
and to which cpus you want it delivered. So you can have many IPI
interrupt vectors.

--
Any sufficiently difficult bug is indistinguishable from a feature.