Re: RFC/patch portability: split kvm_vm_ioctl v3

Arnd Bergmann
2007-11-05T09:31:09Z

On Monday 05 November 2007, Carsten Otte wrote:
> Dong, Eddie wrote:
> >> BTW, why we use vector here? shouldn't it be irq_line or irq_no?
> >
> > Maybe you mean the Channel Subsystem (1st piece of knowledge and
> > surprise known from s390 doc)  are emulated in Qemu, correct?
> The vector field was introduced by Avi's comment. I just copied that
> over.
> On s390, we only have irq numbers, no vectors.

Actually, you have neither irq numbers nor vectors on s390 right now.
I/O subchannels are do not fit into the IRQ handling in Linux at
all, and external interrupts are sufficiently different that you
should not treat them as IRQ lines in Linux.

However, I would suggest that you use either one external interrupt or
the "thin" interrupt as an event source for an interrupt controller for
all the virtio devices, and use the generic IRQ subsystem for that,
including interrupt lines and vectors.

In case of the thin interrupt, your virtual interrupt controller would
more or less just consist of one lowcore address from which you can
read the pending interrupt vector after an interrupt has been caused,
as well as a single hcall that does a 'acknowledge interrupt, get
next pending irq vector into lowcore and tell me whether there was
one' operation.

You'll also need an operation to associate a virtio device with an
interrupt vector, but that belongs into virtio.