Skip to contentSkip to conversation

arm-autonomy: Moved dynamic-layers/meta-gem5 to meta-gem5

PATCH In review Nathan Dunne 2 participants 3 messages Mar 11, 2021 – Mar 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm-autonomy: Moved dynamic-layers/meta-gem5 to meta-gem5

From: Nathan Dunne <[email protected]>

Gem5 xen support in meta-arm-autonomy moved to meta-gem5 under dynamic-layers/meta-virtualization. Any dependencies on 'arm-autonomy-host' or 'arm-autonomy-guest' in DISTRO_FEATURES replaced with 'xen'.

Issue-Id: SCM-2091

Change-Id Ia2db68e2cd88c4277e8edc213aebb88d90c0cd23
---
 meta-arm-autonomy/conf/layer.conf             |  1 -
 .../xenguest/xenguest-network.bbappend        |  1 -
 .../recipes-kernel/linux/linux-%.bbappend     | 15 --------
 meta-gem5/conf/layer.conf                     |  5 +++
 .../boot-wrapper-aarch64_%.bbappend           |  0
 .../gem5/gem5-aarch64-native_20.bbappend      |  2 +-
 .../xen/files/gem5-arm64/early-printk.cfg     |  0
 .../recipes-extended/xen/xen_%.bbappend       |  0
 .../recipes-kernel/linux/linux-%.bbappend     | 14 +++++++
 .../features}/disable-arm64-sve.cfg           |  0
 .../features}/disable-arm64-sve.scc           |  0
 ...Fix-atomics-permission-checks-in-TLB.patch | 38 +++++++++++++++++++
 .../gem5/gem5-aarch64-native_20.bb            |  3 +-
 13 files changed, 60 insertions(+), 19 deletions(-)
 delete mode 100644 meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xenguest/xenguest-network.bbappend
 delete mode 100644 meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/linux-%.bbappend
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend (100%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend (80%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-extended/xen/files/gem5-arm64/early-printk.cfg (100%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-extended/xen/xen_%.bbappend (100%)
 create mode 100644 meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/linux-%.bbappend
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy => meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features}/disable-arm64-sve.cfg (100%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy => meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features}/disable-arm64-sve.scc (100%)
 create mode 100644 meta-gem5/recipes-devtools/gem5/gem5-aarch64-native/0002-arch-arm-Fix-atomics-permission-checks-in-TLB.patch
meta-arm-autonomy/conf/layer.conf +0 -1
index 4bcf0cd..d577a55 100644
@@ -34,7 +34,6 @@ USER_CLASSES_append = " arm-autonomy-features"
 BBFILES_DYNAMIC += " \
     meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
     meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bb \
-    meta-gem5:${LAYERDIR}/dynamic-layers/meta-gem5/*/*/*.bbappend \
 "
 # Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
 ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xenguest/xenguest-network.bbappend deleted +0 -1
deleted file mode 100644
index 0283702..0000000
@@ -1 +0,0 @@
-XENGUEST_NETWORK_BRIDGE_MEMBERS_gem5-arm64 ?= "eth0"
meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/linux-%.bbappend deleted +0 -15
deleted file mode 100644
index 0d0047a..0000000
@@ -1,15 +0,0 @@
-FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
-
-#
-# arm-autonomy kmeta extra
-#
-SRC_URI_append_gem5-arm64 = " file://arm-autonomy-kmeta-extra-gem5;type=kmeta;name=arm-autonomy-kmeta-extra-gem5;destsuffix=arm-autonomy-kmeta-extra-gem5"
-
-# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
-# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
-# register.
-LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains_any('DISTRO_FEATURES', \
-                                         'arm-autonomy-host arm-autonomy-guest', \
-                                         ' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
-
-KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
meta-gem5/conf/layer.conf +5 -0
index bf42f74..e29c940 100644
@@ -12,3 +12,8 @@ BBFILE_PRIORITY_meta-gem5 = "5"
 LAYERDEPENDS_meta-gem5 = "core openembedded-layer meta-arm"
 LAYERSERIES_COMPAT_meta-gem5 = "gatesgarth"
 
+BBFILES_DYNAMIC += " \
+    virtualization-layer:${LAYERDIR}/dynamic-layers/meta-virtualization/*/*/*.bbappend \
+"
+
+DISTRO_FEATURES_NATIVE_append = " ${@bb.utils.filter('DISTRO_FEATURES', 'xen', d)}"
meta-gem5/dynamic-layers/meta-virtualization/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend
meta-gem5/dynamic-layers/meta-virtualization/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend +1 -1
similarity index 80%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend
index 71b308a..8239a40 100644
@@ -1,7 +1,7 @@
 # When booting gem5-arm64 with Xen we need to set the cpu as Cortex A53 and
 # remove support for pointer authentification
 GEM5_RUN_EXTRA_append = " \
-${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'arm-autonomy-host', \
+${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'xen', \
 '--param=system.cpu_cluster[0].cpus[0].isa[0].midr=0x410fd030 \
 --param=system.cpu_cluster[0].cpus[0].isa[0].id_aa64isar1_el1=0x0', \
 '', d)}"
meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/files/gem5-arm64/early-printk.cfg renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/files/gem5-arm64/early-printk.cfg +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/files/gem5-arm64/early-printk.cfg
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/files/gem5-arm64/early-printk.cfg
meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/xen_%.bbappend renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/xen_%.bbappend +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/xen_%.bbappend
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/xen_%.bbappend
meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/linux-%.bbappend new file +14 -0
new file mode 100644
index 0000000..5d3b52c
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
+
+#
+# virtualization kmeta extra
+#
+SRC_URI_append_gem5-arm64 = " file://virtualization-kmeta-extra-gem5;type=kmeta;name=virtualization-kmeta-extra-gem5;destsuffix=virtualization-kmeta-extra-gem5"
+
+# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
+# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
+# register.
+LINUX_VIRTUALIZATION_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains('DISTRO_FEATURES', \
+                                         'xen', ' features/disable-arm64-sve.scc','',d)}"
+
+KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_VIRTUALIZATION_DISABLE_ARM64_SVE}"
meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.cfg renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.cfg +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.cfg
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.cfg
meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.scc renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.scc +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.scc
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.scc
meta-gem5/recipes-devtools/gem5/gem5-aarch64-native/0002-arch-arm-Fix-atomics-permission-checks-in-TLB.patch new file +38 -0
new file mode 100644
index 0000000..36cb167
@@ -0,0 +1,38 @@
+From c47920d81c4c29e8c868c005ff4330c46becbad5 Mon Sep 17 00:00:00 2001
+From: Giacomo Travaglini <[email protected]>
+Date: Wed, 03 Mar 2021 11:38:06 +0000
+Subject: [PATCH] arch-arm: Fix atomics permission checks in TLB
+
+For stage 2 translations, atomic accesses were not checking the
+access permission bits in the page table descriptors, and were
+instead wrongly using the nature of the request itself
+(r/w booleans).
+
+Change-Id: I27fbc95f04ea659e77ad5a3afb551873c9c971f0
+Signed-off-by: Giacomo Travaglini <[email protected]>
+Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42073
+Reviewed-by: Jason Lowe-Power <[email protected]>
+Reviewed-by: Richard Cooper <[email protected]>
+Reviewed-by: Bobby R. Bruce <[email protected]>
+Maintainer: Jason Lowe-Power <[email protected]>
+Maintainer: Bobby R. Bruce <[email protected]>
+Tested-by: kokoro <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-By: Nathan Dunne <[email protected]>
+---
+
+diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
+index fd72d25..8e5b3ca 100644
+--- a/src/arch/arm/tlb.cc
++++ b/src/arch/arm/tlb.cc
+@@ -872,8 +872,7 @@
+             // sctlr.wxn overrides the xn bit
+             grant = !wxn && !xn;
+         } else if (is_atomic) {
+-            grant = r && w;
+-            grant_read = r;
++            grant = hap;
+         } else if (is_write) {
+             grant = hap & 0x2;
+         } else { // is_read
meta-gem5/recipes-devtools/gem5/gem5-aarch64-native_20.bb +2 -1
index 79cf910..711ab95 100644
@@ -1,6 +1,7 @@
 require gem5-source_20.inc
 
-SRC_URI += "file://0001-dev-arm-SMMUv3-enable-interrupt-interface.patch"
+SRC_URI += "file://0001-dev-arm-SMMUv3-enable-interrupt-interface.patch \
+            file://0002-arch-arm-Fix-atomics-permission-checks-in-TLB.patch"
 
 BPN = "gem5-aarch64-native"
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 kas: Added yaml to test xen support in meta-gem5

From: Nathan Dunne <[email protected]>

Created yaml file "gem5-arm64-xen.yml" to build the target xen-image-minimal for gem5, with required DISTRO_FEATURES 'xen' and 'virtualization'.

Issue-Id: SCM-2091

Change-Id If21d446ca36ba01657d6b48e4b3370e9d905fd1b
---
 .gitlab-ci.yml         |  3 +++
 kas/gem5-arm64-xen.yml | 28 ++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 kas/gem5-arm64-xen.yml
.gitlab-ci.yml +3 -0
index ca484c1..a9b0619 100644
@@ -73,6 +73,9 @@ fvp-base-arm32/external-gcc-arm32:
 gem5-arm64:
   extends: .build
 
+gem5-arm64-xen:
+  extends: .build
+
 juno:
   extends: .build
 
kas/gem5-arm64-xen.yml new file +28 -0
new file mode 100644
index 0000000..85763b8
@@ -0,0 +1,28 @@
+
+header:
+  version: 9
+  includes:
+    - base.yml
+    - meta-python.yml
+
+repos:
+  meta-arm:
+    layers:
+      meta-gem5:
+  meta-openembedded:
+    url: https://git.openembedded.org/meta-openembedded
+    layers:
+      meta-oe:
+      meta-filesystems:
+      meta-networking:
+  meta-virtualization:
+    url: git://git.yoctoproject.org/meta-virtualization
+
+machine: gem5-arm64
+
+local_conf_header:
+  meta-virt:
+    DISTRO_FEATURES_append = " virtualization xen"
+
+target:
+  - xen-image-minimal
Signature · 1 line
2.17.1
#2 lore raw
In reply to Nathan Dunne
Quoted 10 lines · Nathan Dunne

From: Nathan Dunne <[email protected]>

Gem5 xen support in meta-arm-autonomy moved to meta-gem5 under dynamic-layers/meta-virtualization. Any dependencies on 'arm-autonomy-host' or 'arm-autonomy-guest' in DISTRO_FEATURES replaced with 'xen'.

Issue-Id: SCM-2091

Change-Id Ia2db68e2cd88c4277e8edc213aebb88d90c0cd23

---

Series applied to master.

Thanks,
Jon

Quoted 198 lines
 meta-arm-autonomy/conf/layer.conf             |  1 -
 .../xenguest/xenguest-network.bbappend        |  1 -
 .../recipes-kernel/linux/linux-%.bbappend     | 15 --------
 meta-gem5/conf/layer.conf                     |  5 +++
 .../boot-wrapper-aarch64_%.bbappend           |  0
 .../gem5/gem5-aarch64-native_20.bbappend      |  2 +-
 .../xen/files/gem5-arm64/early-printk.cfg     |  0
 .../recipes-extended/xen/xen_%.bbappend       |  0
 .../recipes-kernel/linux/linux-%.bbappend     | 14 +++++++
 .../features}/disable-arm64-sve.cfg           |  0
 .../features}/disable-arm64-sve.scc           |  0
 ...Fix-atomics-permission-checks-in-TLB.patch | 38 +++++++++++++++++++
 .../gem5/gem5-aarch64-native_20.bb            |  3 +-
 13 files changed, 60 insertions(+), 19 deletions(-)
 delete mode 100644 meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xenguest/xenguest-network.bbappend
 delete mode 100644 meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/linux-%.bbappend
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend (100%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend (80%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-extended/xen/files/gem5-arm64/early-printk.cfg (100%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5 => meta-gem5/dynamic-layers/meta-virtualization}/recipes-extended/xen/xen_%.bbappend (100%)
 create mode 100644 meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/linux-%.bbappend
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy => meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features}/disable-arm64-sve.cfg (100%)
 rename {meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy => meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features}/disable-arm64-sve.scc (100%)
 create mode 100644 meta-gem5/recipes-devtools/gem5/gem5-aarch64-native/0002-arch-arm-Fix-atomics-permission-checks-in-TLB.patch
meta-arm-autonomy/conf/layer.conf +0 -1
index 4bcf0cd..d577a55 100644
@@ -34,7 +34,6 @@ USER_CLASSES_append = " arm-autonomy-features"
 BBFILES_DYNAMIC += " \
     meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
     meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bb \
-    meta-gem5:${LAYERDIR}/dynamic-layers/meta-gem5/*/*/*.bbappend \
 "
 # Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
 ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xenguest/xenguest-network.bbappend deleted +0 -1
deleted file mode 100644
index 0283702..0000000
@@ -1 +0,0 @@
-XENGUEST_NETWORK_BRIDGE_MEMBERS_gem5-arm64 ?= "eth0"
meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/linux-%.bbappend deleted +0 -15
deleted file mode 100644
index 0d0047a..0000000
@@ -1,15 +0,0 @@
-FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
-
-#
-# arm-autonomy kmeta extra
-#
-SRC_URI_append_gem5-arm64 = " file://arm-autonomy-kmeta-extra-gem5;type=kmeta;name=arm-autonomy-kmeta-extra-gem5;destsuffix=arm-autonomy-kmeta-extra-gem5"
-
-# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
-# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
-# register.
-LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains_any('DISTRO_FEATURES', \
-                                         'arm-autonomy-host arm-autonomy-guest', \
-                                         ' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
-
-KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
meta-gem5/conf/layer.conf +5 -0
index bf42f74..e29c940 100644
@@ -12,3 +12,8 @@ BBFILE_PRIORITY_meta-gem5 = "5"
 LAYERDEPENDS_meta-gem5 = "core openembedded-layer meta-arm"
 LAYERSERIES_COMPAT_meta-gem5 = "gatesgarth"
 
+BBFILES_DYNAMIC += " \
+    virtualization-layer:${LAYERDIR}/dynamic-layers/meta-virtualization/*/*/*.bbappend \
+"
+
+DISTRO_FEATURES_NATIVE_append = " ${@bb.utils.filter('DISTRO_FEATURES', 'xen', d)}"
meta-gem5/dynamic-layers/meta-virtualization/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend
meta-gem5/dynamic-layers/meta-virtualization/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend +1 -1
similarity index 80%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend
index 71b308a..8239a40 100644
@@ -1,7 +1,7 @@
 # When booting gem5-arm64 with Xen we need to set the cpu as Cortex A53 and
 # remove support for pointer authentification
 GEM5_RUN_EXTRA_append = " \
-${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'arm-autonomy-host', \
+${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'xen', \
 '--param=system.cpu_cluster[0].cpus[0].isa[0].midr=0x410fd030 \
 --param=system.cpu_cluster[0].cpus[0].isa[0].id_aa64isar1_el1=0x0', \
 '', d)}"
meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/files/gem5-arm64/early-printk.cfg renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/files/gem5-arm64/early-printk.cfg +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/files/gem5-arm64/early-printk.cfg
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/files/gem5-arm64/early-printk.cfg
meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/xen_%.bbappend renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/xen_%.bbappend +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-extended/xen/xen_%.bbappend
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-extended/xen/xen_%.bbappend
meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/linux-%.bbappend new file +14 -0
new file mode 100644
index 0000000..5d3b52c
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
+
+#
+# virtualization kmeta extra
+#
+SRC_URI_append_gem5-arm64 = " file://virtualization-kmeta-extra-gem5;type=kmeta;name=virtualization-kmeta-extra-gem5;destsuffix=virtualization-kmeta-extra-gem5"
+
+# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
+# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
+# register.
+LINUX_VIRTUALIZATION_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains('DISTRO_FEATURES', \
+                                         'xen', ' features/disable-arm64-sve.scc','',d)}"
+
+KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_VIRTUALIZATION_DISABLE_ARM64_SVE}"
meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.cfg renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.cfg +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.cfg
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.cfg
meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.scc renamed from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.scc +0 -0
similarity index 100%
rename from meta-arm-autonomy/dynamic-layers/meta-gem5/recipes-kernel/linux/arm-autonomy-kmeta-extra-gem5/features/arm-autonomy/disable-arm64-sve.scc
rename to meta-gem5/dynamic-layers/meta-virtualization/recipes-kernel/linux/virtualization-kmeta-extra-gem5/features/disable-arm64-sve.scc
meta-gem5/recipes-devtools/gem5/gem5-aarch64-native/0002-arch-arm-Fix-atomics-permission-checks-in-TLB.patch new file +38 -0
new file mode 100644
index 0000000..36cb167
@@ -0,0 +1,38 @@
+From c47920d81c4c29e8c868c005ff4330c46becbad5 Mon Sep 17 00:00:00 2001
+From: Giacomo Travaglini <[email protected]>
+Date: Wed, 03 Mar 2021 11:38:06 +0000
+Subject: [PATCH] arch-arm: Fix atomics permission checks in TLB
+
+For stage 2 translations, atomic accesses were not checking the
+access permission bits in the page table descriptors, and were
+instead wrongly using the nature of the request itself
+(r/w booleans).
+
+Change-Id: I27fbc95f04ea659e77ad5a3afb551873c9c971f0
+Signed-off-by: Giacomo Travaglini <[email protected]>
+Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42073
+Reviewed-by: Jason Lowe-Power <[email protected]>
+Reviewed-by: Richard Cooper <[email protected]>
+Reviewed-by: Bobby R. Bruce <[email protected]>
+Maintainer: Jason Lowe-Power <[email protected]>
+Maintainer: Bobby R. Bruce <[email protected]>
+Tested-by: kokoro <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-By: Nathan Dunne <[email protected]>
+---
+
+diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
+index fd72d25..8e5b3ca 100644
+--- a/src/arch/arm/tlb.cc
++++ b/src/arch/arm/tlb.cc
+@@ -872,8 +872,7 @@
+             // sctlr.wxn overrides the xn bit
+             grant = !wxn && !xn;
+         } else if (is_atomic) {
+-            grant = r && w;
+-            grant_read = r;
++            grant = hap;
+         } else if (is_write) {
+             grant = hap & 0x2;
+         } else { // is_read
meta-gem5/recipes-devtools/gem5/gem5-aarch64-native_20.bb +2 -1
index 79cf910..711ab95 100644
@@ -1,6 +1,7 @@
 require gem5-source_20.inc
 
-SRC_URI += "file://0001-dev-arm-SMMUv3-enable-interrupt-interface.patch"
+SRC_URI += "file://0001-dev-arm-SMMUv3-enable-interrupt-interface.patch \
+            file://0002-arch-arm-Fix-atomics-permission-checks-in-TLB.patch"
 
 BPN = "gem5-aarch64-native"
 
Signature · 1 line
2.17.1