Skip to contentSkip to conversation

xen: arm64: doc: Add the requirement that SCR_EL3.HCE is enabled

PATCH In review Dirk Behme 3 participants 8 messages Apr 19, 2016 – Apr 25, 2016

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/2 xen: arm64: doc: Add the requirement that SCR_EL3.HCE is enabled

On ARM64 Linux the HVC instruction is used to trap into Xen. As this can be set only at EL3, i.e. outside from Xen, document this boot requirement.

---
 docs/misc/arm/booting.txt | 4 ++++
 1 file changed, 4 insertions(+)
docs/misc/arm/booting.txt +4 -0
index 9802e5e..ffc9029 100644
@@ -23,6 +23,10 @@ The exceptions to this on 32-bit ARM are as follows:
 
 There are no exception on 64-bit ARM.
 
+On ARM64 Linux it has to be ensured that the Secure Configuration
+Register has the HVC instructions enabled at EL1 and above
+(SCR_EL3.HCE == 1).
+
 [1] linux/Documentation/arm/Booting
 Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/Booting
 
Signature · 7 lines
2.8.0


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
author
#1 lore raw

PATCH 2/2 xen: arm64: doc: Add some details about interrupt handling

In some mailing list discussion

http://lists.xen.org/archives/html/xen-devel/2016-04/msg00214.html

some details about the interrupt handling of Xen were given. Add that so it's not forgotten.

---
Note: I'd be happy to move this to an other documentation file if
any other file fits better.

 docs/misc/arm/booting.txt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
docs/misc/arm/booting.txt +15 -0
index ffc9029..69b7d81 100644
@@ -27,6 +27,21 @@ On ARM64 Linux it has to be ensured that the Secure Configuration
 Register has the HVC instructions enabled at EL1 and above
 (SCR_EL3.HCE == 1).
 
+
+Interrupt usage
+===============
+
+All interrupts are taken by Xen. The function do_IRQ in Xen will
+dispatch the IRQ either to a guest or call a Xen specific handler.
+
+Xen handles only a limited number of interrupt:
+* timers
+* UART
+* SMMU
+
+The rest is either routed to guests or blacklisted by Xen.
+
+
 [1] linux/Documentation/arm/Booting
 Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/Booting
 
Signature · 7 lines
2.8.0


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#2 lore raw

Re: [PATCH 2/2] xen: arm64: doc: Add some details about interrupt handling

Hello Dirk,

Quoted 6 lines · Dirk Behme

In some mailing list discussion

http://lists.xen.org/archives/html/xen-devel/2016-04/msg00214.html

some details about the interrupt handling of Xen were given. Add that so it's not forgotten.

For your information, this is described on the wiki [1]. Although, not in the most obvious place.

I would prefer to see this kind of documentation on the wiki page under "Porting Xen on a new SOC".

Quoted 26 lines

---
Note: I'd be happy to move this to an other documentation file if
any other file fits better.

  docs/misc/arm/booting.txt | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
docs/misc/arm/booting.txt +8 -0
index ffc9029..69b7d81 100644
@@ -27,6 +27,21 @@ On ARM64 Linux it has to be ensured that the Secure Configuration
  Register has the HVC instructions enabled at EL1 and above
  (SCR_EL3.HCE == 1).
 
+
+Interrupt usage
+===============
+
+All interrupts are taken by Xen. The function do_IRQ in Xen will
+dispatch the IRQ either to a guest or call a Xen specific handler.
+
+Xen handles only a limited number of interrupt:

docs/misc/arm/booting.txt On ARM64 Linux it has to be ensured that the Secure Configuration · line 47

Quoted 10 lines
docs/misc/arm/booting.txt +7 -0
+* timers
+* UART
+* SMMU
+
+The rest is either routed to guests or blacklisted by Xen.
+
+
  [1] linux/Documentation/arm/Booting
  Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/Booting
 

Regards,

[1] http://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions_whitepaper

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#3 lore raw

Re: [PATCH 2/2] xen: arm64: doc: Add some details about interrupt handling

Hi Julien,

Quoted 7 lines · Julien Grall

Hello Dirk,

Quoted 4 lines · Dirk Behme

In some mailing list discussion

http://lists.xen.org/archives/html/xen-devel/2016-04/msg00214.html

Quoted 8 lines
Quoted 2 lines

some details about the interrupt handling of Xen were given. Add that so it's not forgotten.

For your information, this is described on the wiki [1]. Although, not in the most obvious place.

I would prefer to see this kind of documentation on the wiki page under "Porting Xen on a new SOC".

Anything like

http://wiki.xenproject.org/wiki?title=Xen_ARM_with_Virtualization_Extensions_whitepaper&diff=16710&oldid=11342

?

Best regards

Dirk

Quoted 42 lines
Quoted 35 lines

---
Note: I'd be happy to move this to an other documentation file if
any other file fits better.

  docs/misc/arm/booting.txt | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
docs/misc/arm/booting.txt +0 -0
index ffc9029..69b7d81 100644
@@ -27,6 +27,21 @@ On ARM64 Linux it has to be ensured that the

Secure Configuration
Register has the HVC instructions enabled at EL1 and above (SCR_EL3.HCE == 1).

docs/misc/arm/booting.txt +15 -0
+
+Interrupt usage
+===============
+
+All interrupts are taken by Xen. The function do_IRQ in Xen will
+dispatch the IRQ either to a guest or call a Xen specific handler.
+
+Xen handles only a limited number of interrupt:
+* timers
+* UART
+* SMMU
+
+The rest is either routed to guests or blacklisted by Xen.
+
+
  [1] linux/Documentation/arm/Booting
  Latest version:
Quoted 4 lines

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/Booting

Regards,

Quoted 4 lines

[1]
http://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions_whitepaper

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw

Re: [PATCH 2/2] xen: arm64: doc: Add some details about interrupt handling

Quoted 1 line · Dirk Behme

Hi Julien,

Hello Dirk,

Quoted 12 lines · Julien Grall
Quoted 11 lines · Dirk Behme
Quoted 6 lines

In some mailing list discussion

http://lists.xen.org/archives/html/xen-devel/2016-04/msg00214.html

some details about the interrupt handling of Xen were given. Add that so it's not forgotten.

For your information, this is described on the wiki [1]. Although, not in the most obvious place.

Quoted 7 lines
Quoted 2 lines

I would prefer to see this kind of documentation on the wiki page under "Porting Xen on a new SOC".

Anything like

http://wiki.xenproject.org/wiki?title=Xen_ARM_with_Virtualization_Extensions_whitepaper&diff=16710&oldid=11342

It sounds good for me.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#5 lore raw
In reply to Dirk Behme

(CC REST maintainers)

Hello Dirk,

Please CC the relevant maintainers for this patch. You can use scripts/get_maintainers.pl for this purpose.

Quoted 14 lines · Dirk Behme

On ARM64 Linux the HVC instruction is used to trap into Xen. As this can be set only at EL3, i.e. outside from Xen, document this boot requirement.

---
  docs/misc/arm/booting.txt | 4 ++++
  1 file changed, 4 insertions(+)
docs/misc/arm/booting.txt +0 -0
index 9802e5e..ffc9029 100644

docs/misc/arm/booting.txt The exceptions to this on 32-bit ARM are as follows: · line 28

Quoted 6 lines
docs/misc/arm/booting.txt +3 -0
@@ -23,6 +23,10 @@ The exceptions to this on 32-bit ARM are as follows:
 
  There are no exception on 64-bit ARM.
 
+On ARM64 Linux it has to be ensured that the Secure Configuration
+Register has the HVC instructions enabled at EL1 and above
+(SCR_EL3.HCE == 1).

The requirement is the same for ARM32 (SCR.HCE == 1).

I would create a specific section in this documentation to list what the firmware should do in EL3 before starting Xen.

In addition to this patch, I would add a check in Xen to make sure the Hyp calls have been enabled by the firmware.

Regards,

Quoted 5 lines
docs/misc/arm/booting.txt +1 -0
+
  [1] linux/Documentation/arm/Booting
  Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/Booting
 
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
author
#6 lore raw
Quoted 25 lines · Julien Grall

(CC REST maintainers)

Hello Dirk,

Please CC the relevant maintainers for this patch. You can use scripts/get_maintainers.pl for this purpose.

Quoted 17 lines · Dirk Behme

On ARM64 Linux the HVC instruction is used to trap into Xen. As this can be set only at EL3, i.e. outside from Xen, document this boot requirement.

---
  docs/misc/arm/booting.txt | 4 ++++
  1 file changed, 4 insertions(+)
docs/misc/arm/booting.txt +0 -0
index 9802e5e..ffc9029 100644
@@ -23,6 +23,10 @@ The exceptions to this on 32-bit ARM are as follows:
 
  There are no exception on 64-bit ARM.
 
Quoted 8 lines

docs/misc/arm/booting.txt The exceptions to this on 32-bit ARM are as follows: · line 28

Quoted 3 lines
docs/misc/arm/booting.txt +3 -0
+On ARM64 Linux it has to be ensured that the Secure Configuration
+Register has the HVC instructions enabled at EL1 and above
+(SCR_EL3.HCE == 1).

The requirement is the same for ARM32 (SCR.HCE == 1).

I would create a specific section in this documentation to list what the firmware should do in EL3 before starting Xen.

Done:

http://lists.xen.org/archives/html/xen-devel/2016-04/msg02687.html

Quoted 2 lines

In addition to this patch, I would add a check in Xen to make sure the Hyp calls have been enabled by the firmware.

Hmm, I have to re-read the documentation how to do this in EL2. We can't read SCR_EL3 in EL2?

Best regards

Dirk

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw

Hi Dirk,

Quoted 8 lines · Dirk Behme
Quoted 2 lines · Julien Grall

I would create a specific section in this documentation to list what the firmware should do in EL3 before starting Xen.

Done:

http://lists.xen.org/archives/html/xen-devel/2016-04/msg02687.html

Thank you, I will look at it soon.

Quoted 7 lines
Quoted 3 lines

In addition to this patch, I would add a check in Xen to make sure the Hyp calls have been enabled by the firmware.

Hmm, I have to re-read the documentation how to do this in EL2. We can't read SCR_EL3 in EL2?

Oh yes. sorry I would have thought the register would be exposed RO to EL2.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel