[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table



Hi Leo,

On 25/08/2022 12:50, Leo Yan wrote:
On Thu, Aug 25, 2022 at 10:07:18AM +0100, Julien Grall wrote:

[...]

Xen directly passes ACPI MADT table from UEFI to Linux kernel to Dom0,
(see functions acpi_create_madt() and gic_make_hwdom_madt()), which
means the Linux kernel Dom0 uses the same ACPI table to initialize GICv3
driver, but since Linux kernel Dom0 accesses GIC memory region as IPA,
it still trap to Xen in EL2 for stage 2 translation, so finally Xen
can emulate the GICv3 device for Dom0.

In the default setup, dom0 is also the hardware domain. So it owns all of
the devices but the ones used by Xen (e.g. interrupt controller, SMMU).

Therefore, dom0 will use the same memory layout as the host. At which point,
it is a lot more convenient to re-use the host ACPI tables and rewrite only
what's necessary.

We cannot purely talk about interrupt handling without connecting with
device driver model.

Seems to me, to support para virtualization driver model (like virtio),
Dom0 needs to provide the device driver backend, and DomUs enables
the forend device drivers.  In this case, the most hardware interrupts
(SPIs) are routed to Dom0.

That's correct. Most of the shared interrupts will be routed to dom0.
To support passthrough driver model (VFIO), Xen needs to configure the
hardware GICv3 to directly route hardware interrupt to the virtual CPU
interface.

Do you mean GICv4 rather than GICv3? In the latter, all the interrupts will be received in Xen and then routed to the domain by updating the LRs.


But here I still cannot create the concept that how GIC RD tables play
roles to support the para virtualization or passthrough mode.

I am not sure what you are actually asking. The pending tables are just memory you give to the GICv3 to record the state of the interrupts.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.