All of lore.kernel.org
 help / color / mirror / Atom feed
* Configuring the host GIC for guest to guest IPI
@ 2021-12-13 11:40 Alex Bennée
  2021-12-13 12:10 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2021-12-13 11:40 UTC (permalink / raw)
  To: Christoffer Dall, Peter Maydell, shashi.mallela, Vincent Guittot,
	Marc Zyngier
  Cc: Arnd Bergmann, kvmarm, stratos-dev


Hi GIC experts,

This came up last week in the Stratos sync call when we were discussing
Vincent's SCMI setup:

  https://linaro.atlassian.net/wiki/spaces/STR/pages/28665741503/2021-12-09+Project+Stratos+Meeting+Notes

with the shared memory between the two guests the only reason we
currently exit to the guest userspace (QEMU) is to forward notifications
of virtqueue kicks from one guest to the other. I'm vaguely aware from
my time looking at GIC code that it can be configured for IPI IRQs
between two cores. Do we have that ability between two vCPUs from
different guests?

If not what would it take to enable such a feature?

-- 
Alex Bennée
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Configuring the host GIC for guest to guest IPI
  2021-12-13 11:40 Configuring the host GIC for guest to guest IPI Alex Bennée
@ 2021-12-13 12:10 ` Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2021-12-13 12:10 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Vincent Guittot, Christoffer Dall, shashi.mallela, Arnd Bergmann,
	kvmarm, stratos-dev

Hi Alex,

On Mon, 13 Dec 2021 11:40:41 +0000,
Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Hi GIC experts,
> 
> This came up last week in the Stratos sync call when we were discussing
> Vincent's SCMI setup:
> 
>   https://linaro.atlassian.net/wiki/spaces/STR/pages/28665741503/2021-12-09+Project+Stratos+Meeting+Notes
> 
> with the shared memory between the two guests the only reason we
> currently exit to the guest userspace (QEMU) is to forward notifications
> of virtqueue kicks from one guest to the other. I'm vaguely aware from
> my time looking at GIC code that it can be configured for IPI IRQs
> between two cores. Do we have that ability between two vCPUs from
> different guests?
> 
> If not what would it take to enable such a feature?

SGIs (the interrupt type used to implement IPIs) are by definition
local to a system (be it physical or virtual), and the idea of being
able to route these outside the system doesn't hold.

So as far as KVM is concerned, this is a strong *never*.

The per-CPU nature of these interrupts is also pretty bad. It means
that the guest cannot suspend some CPUs without also losing access to
the device/shared memory. Bad.

If you want to generate a signal that is used between VMs, why not use
a global interrupt (SPI), where each VM treats the other one as a
device rather than a peer? At least the semantics are manageable, and
all you need to implement is some irqfd plumbing in both direction,
much along the lines of what vfio (and probably vhost) already does
for the exact same purpose (signalling in-kernel events to a VM).

	M.

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-13 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-13 11:40 Configuring the host GIC for guest to guest IPI Alex Bennée
2021-12-13 12:10 ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.