docs: fusa: Add Assumption of Use (AOU)
PATCH 1/1 docs: fusa: Add Assumption of Use (AOU)
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains) to fulfill its requirements. In our case, platform means a combination of hardware, firmware and bootloader.
We have defined AOU in the intro.rst and added AOU for the generic timer.
--- .../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++++++++ docs/fusa/reqs/intro.rst | 10 ++++++++++ 2 files changed, 29 insertions(+)
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +19 -0
@@ -116,6 +116,25 @@ Rationale: Comments: +Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ + +`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1` + +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register contains the system +timer frequency. + +Rationale: + +Comments: + Covers: - `XenProd~emulated_timer~1`
docs/fusa/reqs/intro.rst +10 -0
@@ -38,6 +38,16 @@ The requirements are linked using OpenFastTrace OpenFastTrace parses through the requirements and generates a traceability report. +Assumption of Use +================= + +To fulfill one or more design requirements, there may be underlying assumptions +on one or more components that Xen interacts with directly or indirectly. For +eg, there may be assumptions on the underlying platform (hardware + firmware + +bootloader) to set certain registers, etc. The important thing here is that +anyone who validates these requirements, need to consider the assumption on the +other components. + The following is the skeleton for a requirement. Title of the requirement
Signature · 1 line
2.25.1
Hi Ayan,
Quoted 3 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 24 lines
to fulfill its requirements. In our case, platform means a combination of hardware, firmware and bootloader.
We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>--- .../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++++++++ docs/fusa/reqs/intro.rst | 10 ++++++++++ 2 files changed, 29 insertions(+)docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +4
-0@@ -116,6 +116,25 @@ Rationale: Comments: +Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst Rationale: · line 132
Quoted 10 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +10
-0+================================= + +Expose system timer frequency via register +------------------------------------------ + +`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1` + +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register contains the system +timer frequency.
The wording in [1] (not yet merged) implies that CNTFRQ_EL0 may be invalid. This seems to contradict the Assumption of Use. Can you explain the difference?
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst Rationale: · line 134
Quoted 2 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +2
-0+ +Rationale:
This seems to be a bit odd to have an empty section. Can you explain why?
Quoted 17 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Comments: + Covers: - `XenProd~emulated_timer~1`docs/fusa/reqs/intro.rst +3
-0@@ -38,6 +38,16 @@ The requirements are linked using OpenFastTrace OpenFastTrace parses through the requirements and generates a traceability report. +Assumption of Use +================= +
docs/fusa/reqs/intro.rst The requirements are linked using OpenFastTrace · line 53
Quoted 10 lines
docs/fusa/reqs/intro.rst +7
-0+To fulfill one or more design requirements, there may be underlying assumptions +on one or more components that Xen interacts with directly or indirectly. For +eg, there may be assumptions on the underlying platform (hardware + firmware + +bootloader) to set certain registers, etc. The important thing here is that +anyone who validates these requirements, need to consider the assumption on the +other components. + The following is the skeleton for a requirement. Title of the requirement
Cheers,
[1] https://lore.kernel.org/all/[email protected]/
Signature · 1 line
Julien Grall
Hi Julien,
Quoted 34 lines · Julien Grall
Hi Ayan,
Quoted 3 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 20 lines
to fulfill its requirements. In our case, platform means a combination of hardware, firmware and bootloader.
We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>--- .../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++++++++ docs/fusa/reqs/intro.rst | 10 ++++++++++ 2 files changed, 29 insertions(+)docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale: Comments:
Quoted 16 lines
Quoted 4 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +4
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platformdocs/fusa/reqs/design-reqs/arm64/generic-timer.rst Rationale: · line 132
Quoted 10 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +10
-0+================================= + +Expose system timer frequency via register +------------------------------------------ + +`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1` + +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register contains the system +timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may be
It is merged:
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3c
Quoted 2 lines
invalid. This seems to contradict the Assumption of Use. Can you explain the difference?
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.
However, even if the frequency in the register is correct, the host dtb might still contain the "clock-frequency" property. Even though it is stated in the bindings that this property is about overriding broken firmware (which in our case is not), in real life scenarios, the property can still be there and can match the register. This is because the host dtb is created by the user, not platform. Even in Linux dts base, you will find lots of examples of device trees with this property. How can Linux know if the firmware has been fixed already or not? This is why we want to give possibility for a user *not* platform to provide a dt property.
Quoted 5 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst Rationale: · line 134
Quoted 3 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +2
-0+ +Rationale:This seems to be a bit odd to have an empty section. Can you explain why?
That's the format we decided to go with. It's been documented in docs/fusa/reqs/intro.rst. While AFAICT it is not strictly required for OFT, in the future we can decide to write our own parser to present the requirements in a nicer form that OFT exporter. Then, it will be easier for use if each requirement defines the same fields (I agree it's a matter of opinion but that's what we decided to use).
Quoted 31 lines
Quoted 18 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Comments: + Covers: - `XenProd~emulated_timer~1`docs/fusa/reqs/intro.rst +3
-0@@ -38,6 +38,16 @@ The requirements are linked using OpenFastTrace OpenFastTrace parses through the requirements and generates a traceability report. +Assumption of Use +================= +docs/fusa/reqs/intro.rst The requirements are linked using OpenFastTrace · line 53
Quoted 10 lines
docs/fusa/reqs/intro.rst +7
-0+To fulfill one or more design requirements, there may be underlying assumptions +on one or more components that Xen interacts with directly or indirectly. For +eg, there may be assumptions on the underlying platform (hardware + firmware + +bootloader) to set certain registers, etc. The important thing here is that +anyone who validates these requirements, need to consider the assumption on the +other components. + The following is the skeleton for a requirement. Title of the requirementCheers,
Quoted 5 lines
[1]
https://lore.kernel.org/all/[email protected]/--
Julien Grall
~Michal
Quoted 53 lines · Michal Orzel
Hi Julien,
Quoted 34 lines · Julien Grall
Hi Ayan,
Quoted 3 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 20 lines
to fulfill its requirements. In our case, platform means a combination of hardware, firmware and bootloader.
We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>--- .../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++++++++ docs/fusa/reqs/intro.rst | 10 ++++++++++ 2 files changed, 29 insertions(+)docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale: Comments:Quoted 16 lines
Quoted 4 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +4
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platformdocs/fusa/reqs/design-reqs/arm64/generic-timer.rst Rationale: · line 132
Quoted 10 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +10
-0+================================= + +Expose system timer frequency via register +------------------------------------------ + +`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1` + +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register contains the system +timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may be
Quoted 8 lines
It is merged:
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 2 lines
invalid. This seems to contradict the Assumption of Use. Can you explain the difference?
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.
AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 4 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.
Xen is able to deal with broken CNTFRQ_EL0. So I don't understand why we we would want to make an assumption that it shall not be broken. What do you gain?
Quoted 4 lines
Quoted 4 lines
Quoted 8 lines
Quoted 4 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst Rationale: · line 134
Quoted 2 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +2
-0+ +Rationale:This seems to be a bit odd to have an empty section. Can you explain why?
That's the format we decided to go with. It's been documented in
docs/fusa/reqs/intro.rst. While AFAICT it is not strictly required for OFT, in the future we can decide to write our own parser to present the requirements in a nicer form that OFT exporter. Then, it will be easier for use if each requirement defines the same fields (I agree it's a matter of opinion but that's what we decided to use).
So this is explaining why you decided to add a section "Rationale", but this doesn't explain why you left it empty. Surely, if you write an assumption, you want to explain why.
Cheers,
Signature · 1 line
Julien Grall
Hi Julien,
Quoted 68 lines · Julien Grall
Quoted 59 lines · Michal Orzel
Hi Julien,
Quoted 44 lines · Julien Grall
Hi Ayan,
Quoted 3 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 30 lines
to fulfill its requirements. In our case, platform means a combination of hardware, firmware and bootloader.
We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>---
.../reqs/design-reqs/arm64/generic-timer.rst | 19
+++++++++++++++++++
docs/fusa/reqs/intro.rst | 10 ++++++++++2 files changed, 29 insertions(+)docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale:Comments:
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +9
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ +Quoted 8 lines
Quoted 6 lines
+
XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register containsthe system
+timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may beIt is merged:
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 5 lines
Quoted 2 lines
invalid. This seems to contradict the Assumption of Use. Can you explain the difference?
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.
Quoted 8 lines
AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 4 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.
Xen is able to deal with broken
CNTFRQ_EL0.
Yes, this is correct if the user provides "clock-frequency" dt property.
Quoted 1 line
So I don't understand why we we would want to make an assumption that it shall not be broken. What do you gain?
``` Use of this property is strongly discouraged; fix your firmware unless absolutely impossible. ```
We wish to put the onus on the platform/firmware provider to program the register correctly. Otherwise, we will have to document it somewhere (may be safety manual) that User needs to provide the "clock-frequency" dt property.
We wish to put as little responsibility on the user as possible(especially when the dt documentation discourages it as well).
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst
Quoted 8 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +2
-0+ +Rationale:This seems to be a bit odd to have an empty section. Can you explain why?
Quoted 6 lines
Quoted 4 lines
That's the format we decided to go with. It's been documented in
docs/fusa/reqs/intro.rst. While AFAICT it is not strictly required for OFT, in the future we can decide to write our own parser to present the requirements in a nicer form that OFT exporter. Then, it will be easier for use if each requirement defines the same fields (I agree it's a matter of opinion but that's what we decided to use).So this is explaining why you decided to add a section "Rationale", but this doesn't explain why you left it empty. Surely, if you write an assumption, you want to explain why.
Agreed.
If you are fine with my rationale (explained before), I can put the exact same words.
- Ayan
Quoted 81 lines · Ayan Kumar Halder
Quoted 67 lines · Julien Grall
Quoted 55 lines · Michal Orzel
Hi Julien,
Quoted 44 lines · Julien Grall
Hi Ayan,
Quoted 3 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 30 lines
to fulfill its requirements. In our case, platform means a combination of hardware, firmware and bootloader.
We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>---
.../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++
++++++
docs/fusa/reqs/intro.rst | 10 ++++++++++2 files changed, 29 insertions(+)docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale:Comments:
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +9
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ +Quoted 8 lines
Quoted 6 lines
+
XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register containsthe system
+timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may beQuoted 8 lines
It is merged:
https://xenbits.xen.org/gitweb/? p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 2 lines
invalid. This seems to contradict the Assumption of Use. Can you explain the difference?
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.
Quoted 8 lines
AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 4 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.
Xen is able to deal with broken
CNTFRQ_EL0.Yes, this is correct if the user provides "clock-frequency" dt property.
Quoted 1 line
So I don't understand why we we would want to make an assumption that it shall not be broken. What do you gain?
Refer https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml
Quoted 7 lines
``` Use of this property is strongly discouraged; fix your firmware unless absolutely impossible. ```We wish to put the onus on the platform/firmware provider to program the register correctly. Otherwise, we will have to document it somewhere (may be safety manual) that User needs to provide the "clock-frequency" dt property.
I think you will have to. The integrator may not have the possibility to modify the firmware.
Quoted 1 line
We wish to put as little responsibility on the user as possible(especially when the dt documentation discourages it as well).
I think there are some contradiction with the requirements. I understand they are for the guest interface only but, if I am not mistaken, the only way the "clock-frequency" can be visible to the guest is because it is part of the host DT.
Furthermore, as soon as the property is specified, then Xen will ignore the value from CNTFRQ_EL0. So if we want to push the firmware vendor to expose a valid CNTFREQ_EL0, then I don't understand why we would want to mention the property in the requirements.
Cheers,
Signature · 1 line
Julien Grall
Quoted 100 lines · Julien Grall
Quoted 99 lines · Ayan Kumar Halder
Quoted 79 lines · Julien Grall
Quoted 66 lines · Michal Orzel
Hi Julien,
Quoted 48 lines · Julien Grall
Hi Ayan,
Quoted 4 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 33 lines
to fulfill its requirements. In our case, platform means a combination of
hardware, firmware and bootloader.We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>---
.../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++
++++++
docs/fusa/reqs/intro.rst | 10 ++++++++++2 files changed, 29 insertions(+)(quoted diff) renamed from docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0
docs/fusa/reqs/design-reqs/arm64/generic-timer.rstindexf2a0cd7fb8..9df87cf4e0100644docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale:Comments:
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +9
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ +Quoted 8 lines
Quoted 6 lines
+
XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register containsthe system
+timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may beIt is merged:
https://xenbits.xen.org/gitweb/?
p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 3 lines
invalid. This seems to contradict the Assumption of Use. Can you explain
the difference?Quoted 6 lines
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency
to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide
to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform
exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.Xen is able to deal with broken
CNTFRQ_EL0.Yes, this is correct if the user provides "clock-frequency" dt property.
Quoted 2 lines
So I don't understand why we we would want to make an assumption that it shall not be broken. What do you gain?
Refer https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml```
Use of this property is strongly discouraged; fix your firmware unless absolutely impossible.
Quoted 8 lines
Quoted 5 lines
```
We wish to put the onus on the platform/firmware provider to program the register correctly. Otherwise, we will have to document it somewhere (may be safety manual) that User needs to provide the "clock-frequency" dt property.
I think you will have to. The integrator may not have the possibility to modify the firmware.
Without getting into the specifics of CNTFRQ_EL0 and clock-frequency, given that this is one of the first AoUs, let me clarify the spirit of the AoUs.
When we say that Xen is "safe" we mean that it went through thousands of tests so we are sure that in this specific configuration it is as bug-free as we can reasonably make it.
"in this specific configuration" is important. Changing the configuration might expand the scope or invalidate some of the tests. Think of moving from a board with GICv2 to GICv3 as an example (we are actually targeting GICv3 for safety, so this is not a great example, but just to explain the point.)
So the AoUs are the set of assumptions Xen has toward the rest of the system to make sure Xen operates "safely", with the word "safely" defined as above.
Of course, Xen could totally work on systems with different AoUs (see the GICv2 vs GICv3 example) but it would be outside the safety parameters. In a way, it is similar to "security supported": there are a bunch of Xen features that should work fine but are outside of "security support" for one reason or the other.
If a user wants to use Xen on a system that breaks one of the AoUs, they can, but we wouldn't promise it is "safe". For instance, imagine a user running Xen on a GICv3 system if the safe version of Xen only validated the GICv2 driver. Similarly to "security support", sometimes it is a bit of a judgement call and it could be argued either way.
In the specific case of CNTFRQ_EL0, if we think Xen can be "safe" on a system with a broken CNTFRQ_EL0 (thanks to the clock-frequency DT property or other mechanisms), then we can remove this from the AoU. We would probably have to have a different AoU about the presence of clock-frequency. Otherwise, if we think we cannot really promise that Xen is "safe" if CNTFRQ_EL0 is broken, then it is better to leave as is.
Keep in mind that users interested in safety, they are very likely to be interested in the safety-certification of the entire system, which includes the hardware as well. It is very likely that users will choose a safety-certified board, which I am guessing would have a working CNTFRQ_EL0. This is just a guess, I don't know the relationship between CNTFRQ_EL0 and achieving hardware safety certifications.
Hi Stefano,
Quoted 147 lines · Stefano Stabellini
Quoted 100 lines · Julien Grall
Quoted 99 lines · Ayan Kumar Halder
Quoted 79 lines · Julien Grall
Quoted 66 lines · Michal Orzel
Hi Julien,
Quoted 48 lines · Julien Grall
Hi Ayan,
Quoted 4 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 33 lines
to fulfill its requirements. In our case, platform means a combination of
hardware, firmware and bootloader.We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>--- .../reqs/design-reqs/arm64/generic-timer.rst | 19 +++++++++++++ ++++++ docs/fusa/reqs/intro.rst | 10 ++++++++++ 2 files changed, 29 insertions(+)(quoted diff) renamed from docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0
docs/fusa/reqs/design-reqs/arm64/generic-timer.rstindexf2a0cd7fb8..9df87cf4e0100644docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +9
-0@@ -116,6 +116,25 @@ Rationale: Comments: +Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ +Quoted 8 lines
Quoted 6 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +4
-0+`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1` + +Description: +Underlying platform shall ensure that CNTFRQ_EL0 register containsthe system
+timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may beIt is merged:
https://xenbits.xen.org/gitweb/?
p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 3 lines
invalid. This seems to contradict the Assumption of Use. Can you explain
the difference?Quoted 6 lines
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency
to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide
to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform
exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.Xen is able to deal with broken
CNTFRQ_EL0.Yes, this is correct if the user provides "clock-frequency" dt property.
Quoted 2 lines
So I don't understand why we we would want to make an assumption that it shall not be broken. What do you gain?
Refer https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml```
Use of this property is strongly discouraged; fix your firmware unless absolutely impossible.
Quoted 8 lines
Quoted 5 lines
```
We wish to put the onus on the platform/firmware provider to program the register correctly. Otherwise, we will have to document it somewhere (may be safety manual) that User needs to provide the "clock-frequency" dt property.
I think you will have to. The integrator may not have the possibility to modify the firmware.
Without getting into the specifics of
CNTFRQ_EL0and clock-frequency, given that this is one of the first AoUs, let me clarify the spirit of the AoUs.When we say that Xen is "safe" we mean that it went through thousands of tests so we are sure that in this specific configuration it is as bug-free as we can reasonably make it.
"in this specific configuration" is important. Changing the configuration might expand the scope or invalidate some of the tests. Think of moving from a board with GICv2 to GICv3 as an example (we are actually targeting GICv3 for safety, so this is not a great example, but just to explain the point.)
So the AoUs are the set of assumptions Xen has toward the rest of the system to make sure Xen operates "safely", with the word "safely" defined as above.
Of course, Xen could totally work on systems with different AoUs (see the GICv2 vs GICv3 example) but it would be outside the safety parameters. In a way, it is similar to "security supported": there are a bunch of Xen features that should work fine but are outside of "security support" for one reason or the other.
If a user wants to use Xen on a system that breaks one of the AoUs, they can, but we wouldn't promise it is "safe". For instance, imagine a user running Xen on a GICv3 system if the safe version of Xen only validated the GICv2 driver. Similarly to "security support", sometimes it is a bit of a judgement call and it could be argued either way.
In the specific case of
CNTFRQ_EL0, if we think Xen can be "safe" on a system with a brokenCNTFRQ_EL0(thanks to the clock-frequency DT property or other mechanisms), then we can remove this from the AoU. We would probably have to have a different AoU about the presence of clock-frequency. Otherwise, if we think we cannot really promise that Xen is "safe" ifCNTFRQ_EL0is broken, then it is better to leave as is.
Quoted 6 lines
Keep in mind that users interested in safety, they are very likely to be interested in the safety-certification of the entire system, which includes the hardware as well. It is very likely that users will choose a safety-certified board, which I am guessing would have a working
CNTFRQ_EL0. This is just a guess, I don't know the relationship betweenCNTFRQ_EL0and achieving hardware safety certifications.
Thanks for your input. I am open with the idea to require CNTFRQ_EL0 to be valid. But I think we need some consistency across the safety docs.
In this case, I think it would be inconsistent to mention "clock-frequency" in the requirement.
Cheers,
Signature · 1 line
Julien Grall
Hi Julien,
Quoted 153 lines · Julien Grall
Hi Stefano,
Quoted 150 lines · Stefano Stabellini
Quoted 103 lines · Julien Grall
Quoted 102 lines · Ayan Kumar Halder
Quoted 81 lines · Julien Grall
Quoted 68 lines · Michal Orzel
Hi Julien,
Quoted 50 lines · Julien Grall
Hi Ayan,
Quoted 4 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform, domains)
Searching online, I think the abbrevition is AoU rather than AOU. This would also match how we abbreviate in Xen (IOW if we use a lower case letter from the expanded name, then the letter in the acronym is also lower case).
Quoted 35 lines
to fulfill its requirements. In our case, platform means a combination of
hardware, firmware and bootloader.We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>---
.../reqs/design-reqs/arm64/generic-timer.rst | 19
+++++++++++++
++++++
docs/fusa/reqs/intro.rst | 10 ++++++++++2 files changed, 29 insertions(+)(quoted diff) renamed from docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0
docs/fusa/reqs/design-reqs/arm64/generic-timer.rstindexf2a0cd7fb8..9df87cf4e0100644docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale:Comments:
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +10
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ + +`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1`Quoted 8 lines
Quoted 6 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Description: +Underlying platform shall ensure that CNTFRQ_EL0 registercontains
the system
+timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may beIt is merged:
https://xenbits.xen.org/gitweb/?
p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 3 lines
invalid. This seems to contradict the Assumption of Use. Can you explain
the difference?Quoted 6 lines
The requirement you refer to is written from a domain perspective and is about Xen exposing the frequency
to domains via CNTFRQ and/or dt property. In case of a presence of dt property in the host dtb, Xen could for instance decide
to emulate CNTFRQ instead of relying on the domain to parse the dt at runtime.AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform
exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.Xen is able to deal with broken
CNTFRQ_EL0.Yes, this is correct if the user provides "clock-frequency" dt property.
Quoted 2 lines
So I don't understand why we we would want to make an assumption that it shall not be broken. What do you gain?
Refer https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml```
Use of this property is strongly discouraged; fix your firmware unless absolutely impossible.
Quoted 8 lines
Quoted 5 lines
```
We wish to put the onus on the platform/firmware provider to program the register correctly. Otherwise, we will have to document it somewhere (may be safety manual) that User needs to provide the "clock-frequency" dt property.
I think you will have to. The integrator may not have the possibility to modify the firmware.
Without getting into the specifics of
CNTFRQ_EL0and clock-frequency, given that this is one of the first AoUs, let me clarify the spirit of the AoUs.When we say that Xen is "safe" we mean that it went through thousands of tests so we are sure that in this specific configuration it is as bug-free as we can reasonably make it.
"in this specific configuration" is important. Changing the configuration might expand the scope or invalidate some of the tests. Think of moving from a board with GICv2 to GICv3 as an example (we are actually targeting GICv3 for safety, so this is not a great example, but just to explain the point.)
So the AoUs are the set of assumptions Xen has toward the rest of the system to make sure Xen operates "safely", with the word "safely" defined as above.
Of course, Xen could totally work on systems with different AoUs (see the GICv2 vs GICv3 example) but it would be outside the safety parameters. In a way, it is similar to "security supported": there are a bunch of Xen features that should work fine but are outside of "security support" for one reason or the other.
If a user wants to use Xen on a system that breaks one of the AoUs, they can, but we wouldn't promise it is "safe". For instance, imagine a user running Xen on a GICv3 system if the safe version of Xen only validated the GICv2 driver. Similarly to "security support", sometimes it is a bit of a judgement call and it could be argued either way.
In the specific case of
CNTFRQ_EL0, if we think Xen can be "safe" on a system with a brokenCNTFRQ_EL0(thanks to the clock-frequency DT property or other mechanisms), then we can remove this from the AoU. We would probably have to have a different AoU about the presence of clock-frequency. Otherwise, if we think we cannot really promise that Xen is "safe" ifCNTFRQ_EL0is broken, then it is better to leave as is.
Quoted 8 lines
Quoted 6 lines
Keep in mind that users interested in safety, they are very likely to be interested in the safety-certification of the entire system, which includes the hardware as well. It is very likely that users will choose a safety-certified board, which I am guessing would have a working
CNTFRQ_EL0. This is just a guess, I don't know the relationship betweenCNTFRQ_EL0and achieving hardware safety certifications.Thanks for your input. I am open with the idea to require
CNTFRQ_EL0to be valid. But I think we need some consistency across the safety docs.
Agreed.
Quoted 2 lines
In this case, I think it would be inconsistent to mention "clock-frequency" in the requirement.
Yes, I see your point now. So the requirement should just state.
"Xen shall expose the frequency of the system counter to the domains in CNTFRQ_EL0".
The AoU will complement this requirement
"Underlying platform shall ensure that CNTFRQ_EL0 register contains the system timer frequency.".
It makes sense to me.
@Michal , any inputs.
- Ayan
Quoted 189 lines · Ayan Kumar Halder
Hi Julien,
Quoted 174 lines · Julien Grall
Hi Stefano,
Quoted 164 lines · Stefano Stabellini
Quoted 122 lines · Julien Grall
Quoted 114 lines · Ayan Kumar Halder
Quoted 89 lines · Julien Grall
Quoted 72 lines · Michal Orzel
Hi Julien,
Quoted 54 lines · Julien Grall
Hi Ayan,
Quoted 5 lines · Ayan Kumar Halder
From: Michal Orzel <[email protected]>
AOU are the assumptions Xen relies on other components (eg platform,
domains)Searching online, I think the abbrevition is AoU rather than AOU. This
would also match how we abbreviate in Xen (IOW if we use a lower case
letter from the expanded name, then the letter in the acronym is also
lower case).Quoted 35 lines
to fulfill its requirements. In our case, platform means a combination of
hardware, firmware and bootloader.We have defined AOU in the
intro.rstand added AOU for the generic timer.Signed-off-by Michal Orzel <[email protected]>Signed-off-by Ayan Kumar Halder <[email protected]>---
.../reqs/design-reqs/arm64/generic-timer.rst | 19
+++++++++++++
++++++
docs/fusa/reqs/intro.rst | 10 ++++++++++2 files changed, 29 insertions(+)(quoted diff) renamed from docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0
docs/fusa/reqs/design-reqs/arm64/generic-timer.rstindexf2a0cd7fb8..9df87cf4e0100644docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +0
-0@@ -116,6 +116,25 @@ Rationale:Comments:
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +10
-0+Covers: + - `XenProd~emulated_timer~1` + +Assumption of Use on the Platform +================================= + +Expose system timer frequency via register +------------------------------------------ + +`XenSwdgn~arm64_generic_timer_pf_program_cntfrq_el0~1`Quoted 8 lines
Quoted 6 lines
docs/fusa/reqs/design-reqs/arm64/generic-timer.rst +3
-0+ +Description: +Underlying platform shall ensure that CNTFRQ_EL0 registercontains
the system
+timer frequency.The wording in [1] (not yet merged) implies that
CNTFRQ_EL0may beIt is merged:
https://xenbits.xen.org/gitweb/?
p=xen.git;a=commit;h=51ad2c57a2d21b583a5944a0dc21c709af022f3cQuoted 3 lines
invalid. This seems to contradict the Assumption of Use. Can you explain
the difference?Quoted 9 lines
The requirement you refer to is written from a domain perspective and is
about Xen exposing the frequency
to domains via CNTFRQ and/or dt property. In case of a presence of dt
property in the host dtb, Xen could for instance decide to emulate CNTFRQ instead of relying on the domain to parse the dt at
runtime.AFAICT, you can't trap CNTFRQ access. So what you suggest would not work.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
The AoU on the platform (hw/firmware/bootloader) is written from Xen perspective and is about the platform
exposing the correct frequency via register. This is Xen expected behavior on the platform. In other words, the platform should expose the correct frequency via register.Xen is able to deal with broken
CNTFRQ_EL0.Yes, this is correct if the user provides "clock-frequency" dt property.
Quoted 3 lines
So I don't understand why we we would want to make an assumption that it
shall not be broken. What do you gain?Refer https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml``` Use of this property is strongly discouraged; fix your firmware unless absolutely impossible. ```Quoted 6 lines
We wish to put the onus on the platform/firmware provider to program the
register correctly. Otherwise, we will have to document it somewhere (may be
safety manual) that User needs to provide the "clock-frequency" dt property.Quoted 3 lines
I think you will have to. The integrator may not have the possibility to
modify the firmware.Without getting into the specifics of
CNTFRQ_EL0and clock-frequency, given that this is one of the first AoUs, let me clarify the spirit of the AoUs.When we say that Xen is "safe" we mean that it went through thousands of tests so we are sure that in this specific configuration it is as bug-free as we can reasonably make it.
"in this specific configuration" is important. Changing the configuration might expand the scope or invalidate some of the tests. Think of moving from a board with GICv2 to GICv3 as an example (we are actually targeting GICv3 for safety, so this is not a great example, but just to explain the point.)
So the AoUs are the set of assumptions Xen has toward the rest of the system to make sure Xen operates "safely", with the word "safely" defined as above.
Of course, Xen could totally work on systems with different AoUs (see the GICv2 vs GICv3 example) but it would be outside the safety parameters. In a way, it is similar to "security supported": there are a bunch of Xen features that should work fine but are outside of "security support" for one reason or the other.
If a user wants to use Xen on a system that breaks one of the AoUs, they can, but we wouldn't promise it is "safe". For instance, imagine a user running Xen on a GICv3 system if the safe version of Xen only validated the GICv2 driver. Similarly to "security support", sometimes it is a bit of a judgement call and it could be argued either way.
In the specific case of
CNTFRQ_EL0, if we think Xen can be "safe" on a system with a brokenCNTFRQ_EL0(thanks to the clock-frequency DT property or other mechanisms), then we can remove this from the AoU. We would probably have to have a different AoU about the presence of clock-frequency. Otherwise, if we think we cannot really promise that Xen is "safe" ifCNTFRQ_EL0is broken, then it is better to leave as is.Quoted 6 lines
Keep in mind that users interested in safety, they are very likely to be interested in the safety-certification of the entire system, which includes the hardware as well. It is very likely that users will choose a safety-certified board, which I am guessing would have a working
CNTFRQ_EL0. This is just a guess, I don't know the relationship betweenCNTFRQ_EL0and achieving hardware safety certifications.Quoted 2 lines
Thanks for your input. I am open with the idea to require
CNTFRQ_EL0to be valid. But I think we need some consistency across the safety docs.Agreed.
Quoted 3 lines
In this case, I think it would be inconsistent to mention "clock-frequency" in the requirement.
Yes, I see your point now. So the requirement should just state.
"Xen shall expose the frequency of the system counter to the domains in
CNTFRQ_EL0".
Quoted 8 lines
The AoU will complement this requirement
"Underlying platform shall ensure that
CNTFRQ_EL0register contains the system timer frequency.".It makes sense to me.
@Michal , any inputs.
In other words, keep this AoU as is and remove the following:
"and/or domain device tree's "clock-frequency" property." from the SSR. I'm ok with that.
~Michal