Re: [PATCH v3 0/7] Configuration parser streamlining

2020-09-07 Thread Andrej Utz
Hi Jan, On 27/08/2020 11:33, Jan Kiszka wrote: On 25.08.20 16:50, Andrej Utz wrote: Theses patches mostly improve non-functional aspects of the Jailhouse configuration parser. Logic for unpacking binary data is consolidated into CStruct class, which all parser classes are inherited from. To imp

[PATCH v2 1/8] kbuild: Avoid deprecated 'always'

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka Switch to 'always-y' as suggested by 5.9. For older kernels, we need to set 'always' to 'always-y'. This has to happen conditionally in order to avoid warnings from 5.9 onward. Signed-off-by: Jan Kiszka --- Changes in v2: - 'include $(ALWAYS_COMPAT_MK)' was missing in tools/

[siemens/jailhouse] 0763b9: kbuild: Avoid deprecated 'always'

2020-09-07 Thread Jan Kiszka
Branch: refs/heads/next Home: https://github.com/siemens/jailhouse Commit: 0763b9728ddfe8faad80248b5bd16d9ca53cf86c https://github.com/siemens/jailhouse/commit/0763b9728ddfe8faad80248b5bd16d9ca53cf86c Author: Jan Kiszka Date: 2020-09-07 (Mon, 07 Sep 2020) Changed paths:

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan-Marc Stranz
In my rootfs "python V2.7.18" is included. This version has a package "python-json" that maybe installed explicitly. I've also tried to use Yocot "dunfell", however, I ran into a lot of other problems. jsmo...@linuxfoundation.org schrieb am Montag, 7. September 2020 um 13:06:24 UTC+2: > Hi! >

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan-Simon Moeller
Hi! We tested the layer with dunfell and master. Warrior and zeus are too old. Best, JS Jan Kiszka schrieb am Mo., 7. Sep. 2020, 13:02: > On 07.09.20 12:51, Jan-Marc Stranz wrote: > > Running > > > > # python > from mako.template import Template > > > > I get a lot of traceback messages.

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan Kiszka
On 07.09.20 12:51, Jan-Marc Stranz wrote: > Running > > # python from mako.template import Template > > I get a lot of traceback messages. > The last message is "ModuleNotFoundError: not module named 'json'". > This message comes from > "/usr/lib/python3.7/site-packages/mako/compat.py" (line

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan-Marc Stranz
Running # python >>> from mako.template import Template I get a lot of traceback messages. The last message is "ModuleNotFoundError: not module named 'json'". This message comes from "/usr/lib/python3.7/site-packages/mako/compat.py" (line 140: "import json # noqa"). j.kiszka...@gmail.com

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan Kiszka
On 07.09.20 12:28, Jan-Marc Stranz wrote: > The line > #!/usr/bin/env python3 >  is already included in script > "/usr/libexec/jailhouse/jailhouse-config-create" as first line! Was apparently patched by the installation procedure of Yocto. Then you should be covered by the python3-mako support of

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan-Marc Stranz
The line #!/usr/bin/env python3 is already included in script "/usr/libexec/jailhouse/jailhouse-config-create" as first line! I can not use a distro form SUSE or Debian. I have to build our own distro with Yocto (here: "warrior"). And Yocto always installs "python" ("python2") and - as a runti

[siemens/jailhouse] a8d033: Documentation: fix display resolution number

2020-09-07 Thread Jan Kiszka
Branch: refs/heads/coverity_scan Home: https://github.com/siemens/jailhouse Commit: a8d033c65dbb8667fc795e16aa4ce60dd45b18f0 https://github.com/siemens/jailhouse/commit/a8d033c65dbb8667fc795e16aa4ce60dd45b18f0 Author: Daniel Sangorrin Date: 2020-08-27 (Thu, 27 Aug 2020) Cha

[PATCH 4/8] pyjailhouse: sysfs_parser: Filter out AMD IOMMU memory regions

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka In case they are enabled while parsing the tree. Analogously to DMAR on Intel, except that we do not need to keep them. Signed-off-by: Jan Kiszka --- pyjailhouse/sysfs_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyjailhouse/sysfs_parser.py b/pyjailhouse/sy

[PATCH 5/8] pyjailhouse: sysfs_parser: Return true size from IORegion

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka Avoid having to override the size method in PortRegion and rather do the correct calculation in IORegion already. This does not affect the rounding in MemRegion.size. Signed-off-by: Jan Kiszka --- pyjailhouse/sysfs_parser.py | 5 + 1 file changed, 1 insertion(+), 4 deletio

[PATCH 3/8] pyjailhouse: sysfs_parser: Fix wording of parse_iomem_tree comment

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka Makes it easier readable. No functional changes. Signed-off-by: Jan Kiszka --- pyjailhouse/sysfs_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyjailhouse/sysfs_parser.py b/pyjailhouse/sysfs_parser.py index 8debf460..a2ce11a8 100644 --- a/

[PATCH 6/8] pyjailhouse: sysfs_parser: Always walk reserved regions with children

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka Newer kernels and/or certain platforms (seen on AMD R1505G) list a all PCI resources and some ACPI resources behind a top-level reserved region. Skipping it leaves the config fairly incomplete. Also fix up a trivial flake8 reporting at this chance. Signed-off-by: Jan Kiszka --

[PATCH 7/8] pyjailhouse: sysfs_parser: Factor out MemRegion.is_ram

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka To be reusing for merging RAM regions. Signed-off-by: Jan Kiszka --- pyjailhouse/sysfs_parser.py | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pyjailhouse/sysfs_parser.py b/pyjailhouse/sysfs_parser.py index b9e40f65..7067f779 100644 -

[PATCH 2/8] driver: Adjust to kernel 5.8 and 5.9

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka Several things changed and require tuning: - __get_vm_area is gone, switch to __get_vm_area_caller which now requires another kernel patch to export it (pointless to try RESOLVE_EXTERNAL_SYMBOL since 5.7) - cr4_init_shadow was hidden from modules; set/clear VMXE directl

[PATCH 8/8] pyjailhouse: sysfs_parser: Merge adjacent RAM regions

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka The kernel tends to report regions that are not page-aligned but directly adjacent. Adding them as-is into the config will make accesses fail because the regions will end up as incompletely configured sub-page regions. Detect such cases and merge the regions. Signed-off-by: Jan

[PATCH 1/8] kbuild: Avoid deprecated 'always'

2020-09-07 Thread Jan Kiszka
From: Jan Kiszka Switch to 'always-y' as suggested by 5.9. For older kernels, we need to set 'always' to 'always-y'. This has to happen conditionally in order to avoid warnings from 5.9 onward. Signed-off-by: Jan Kiszka --- Kbuild | 3 +++ configs/Makefile

[PATCH 0/8] Adjustments for 5.8/5.9, improvements of sysfs parser

2020-09-07 Thread Jan Kiszka
The sysfs parser changes were driven by generating a config on an AMD R1505G board. They still need validation on some Intel boards. See patches for further details. Jan Jan Kiszka (8): kbuild: Avoid deprecated 'always' driver: Adjust to kernel 5.8 and 5.9 pyjailhouse: sysfs_parser: Fix wo

[siemens/jailhouse] e2b94a: kbuild: Avoid deprecated 'always'

2020-09-07 Thread Jan Kiszka
Branch: refs/heads/next Home: https://github.com/siemens/jailhouse Commit: e2b94aed34874271a9ede06bf4521b4f16ea8b86 https://github.com/siemens/jailhouse/commit/e2b94aed34874271a9ede06bf4521b4f16ea8b86 Author: Jan Kiszka Date: 2020-09-05 (Sat, 05 Sep 2020) Changed paths:

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan Kiszka
On 07.09.20 11:23, Jan-Marc Stranz wrote: > I've build a Linux kernel with CONFIG_STRICT_DEVMEM and > CONFIG_IO_STRICT_DEVMEM deactivate, but the hardware check still not works. > From now I'll ignore the hardware check. > > I've tried to create the configuration for the root cell on the > targetw

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan-Marc Stranz
I've build a Linux kernel with CONFIG_STRICT_DEVMEM and CONFIG_IO_STRICT_DEVMEM deactivate, but the hardware check still not works. >From now I'll ignore the hardware check. I've tried to create the configuration for the root cell on the targetwith " jailhouse config create sysconfig.c" without

Re: Build jailhouse on embedded target

2020-09-07 Thread Jan-Marc Stranz
Hi Jan! Thanks for the kernel configuration! Now I try to build a Linux kernel with CONFIG_STRICT_DEVMEM and CONFIG_IO_STRICT_DEVMEM deactivated. Maybe the hardware check will work then. Regarding the configuration for the root cell: I do not build the hypervisor "jailhouse" on the target, but