xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* xen/arm: Hiding SMMUs from Dom0 when using ACPI on Xen
@ 2017-02-22 14:10 Julien Grall
  2017-02-27 13:23 ` Vijay Kilari
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Grall @ 2017-02-22 14:10 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel
  Cc: Steve Capper, Andre Przywara, Jiandi An, Punit Agrawal,
	Vijaya Kumar K, sgoel, nd, manish.jaggi, Shanker Donthineni

Hello,

There was few discussions recently about hiding SMMUs from DOM0 when 
using ACPI. I thought it would be good to have a separate thread for this.

When using ACPI, the SMMUs will be described in the IO Remapping Table 
(IORT). The specification can be found on the ARM website [1].

For a brief summary, the IORT can be used to discover the SMMUs present 
on the platform and find for a given device the ID to configure 
components such as ITS (DeviceID) and SMMU (StreamID).

The appendix A in the specification gives an example how DeviceID and 
StreamID can be found. For instance, when a PCI device is both protected 
by an SMMU and MSI-capable the following translation will happen:
	RID -> StreamID -> DeviceID

Currently, SMMUs are hidden from DOM0 because they are been used by Xen 
and we don't support stage-1 SMMU. If we pass the IORT as it is, DOM0 
will try to initialize SMMU and crash.

I first thought about using a Xen specific way (STAO) or extending a 
flag in IORT. But that is not ideal.

So we would have to rewrite the IORT for DOM0. Given that a range of RID 
can mapped to multiple ranges of DeviceID, we would have to translate 
RID one by one to find the associated DeviceID. I think this may end up 
to complex code and have a big IORT table.

However, given that DeviceID will be used by DOM0 to only configure the 
ITS. We have no need to use to have the DOM0 DeviceID equal to the host 
DeviceID. So I think we could simplify our life by generating DeviceID 
for each RID range.

Any opinions?

Cheers,

[1] 
http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-06-08 12:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 14:10 xen/arm: Hiding SMMUs from Dom0 when using ACPI on Xen Julien Grall
2017-02-27 13:23 ` Vijay Kilari
2017-02-27 14:12   ` Julien Grall
2017-02-27 16:58     ` Shanker Donthineni
2017-02-27 18:12       ` Julien Grall
2017-05-18 11:59         ` Manish Jaggi
2017-05-18 14:57           ` Julien Grall
2017-05-18 20:02             ` Manish Jaggi
2017-05-18 20:09               ` Julien Grall
2017-06-08 12:38                 ` Manish Jaggi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).