Re: In kernel PIC support: kernel patch

Avi Kivity
2007-06-25T22:00:47Z

Gregory Haskins wrote:
> On Sat, 2007-06-23 at 10:53 +0300, Avi Kivity wrote:
>
>> Gregory Haskins wrote:
>>
>>> In fact, my own implementation puts the ISA-userint model as hanging off
>>> the kvm structure as well (which would be replaced with a similar PIC
>>> model for layer-2 mode in the future).
>>>
>>>
>>>
>> The PIC is certainly a system resource, but at least in qemu it's
>> connected to cpu 0 only. We want to preserve that.
>>
>>
>
> I think there might be some confusion here ;) The *outputs* of the PIC
> in both QEMU and in-kernel-APIC are certainly wired to cpu0 (per the
> model that qemu/bochs support). But the *inputs* are system-wide. In
> qemu, you can call the global function "pic_set_irq" (which you could
> construe as per-vm, since there is a 1:1 with qemu-process/vm).
> Likewise, the inputs in both in-kernel implementation is also per vm by
> hanging off of the kvm struct, as opposed to the vcpu struct. I hope
> this helps to clarify.
>
>

This is my understanding too. I didn't suggest the PIC ioctls should be
per-vcpu, just that current semantics should be preserved.