On 11/27/2024 4:13 PM, Christopher Clark wrote:
On Fri, Nov 22, 2024 at 9:55 PM Sandeep Gundlupet Raju via
lists.yoctoproject.org <http://lists.yoctoproject.org>
<[email protected]> wrote:
Hi Christopher,
On 11/22/2024 8:11 AM, Christopher Clark via
lists.yoctoproject.org <http://lists.yoctoproject.org> wrote:
Hi Sandeep,
This series is promoting some of the Xen hypervisor launch
configuration from the hardware-specific dynamic layers into the
common layer, and introducing a class that defines interfaces to
the hypervisor and its guest virtual machines that should be
applicable across all architectures, hence my comments from a
non-architecture-specific perspective.
There's a lot of opportunity for development in this layer to
extend and improve this area of configuration -- thanks for your
contribution.
[Sandeep]: Yes that's the main goal and I've already discussed
with Bruce on this topic.
On Thu, Nov 21, 2024 at 10:49 PM Sandeep Gundlupet Raju via
lists.yoctoproject.org <http://lists.yoctoproject.org>
<[email protected]> wrote:
Add a new bbclass for xen boot script variables. This bbclass
provides
common xen u-boot boot script variables which can be
inherited by any
vendor specific u-boot boot script recipes. Also these
variable are
configurable from recipes, global and machine configuration
files.
Variable nomenclature is aligned with xen documentation.
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
Currently it supports Xen Dom0 boot and can be extended for DomU
or Dom0less boot.
I think that none of the variables in the file are specific to
the u-boot bootloader, so: could this class be given a
non-u-boot-specific name, with a view to this configuration being
plumbed into all Xen system configurations?
[Sandeep]: Good catch these variables are not specific to u-boot,
I will rename and send a v3 patch. Does xen-configuration.bbclass
name works?
Sorry, I think not because it would cause confusion: it doesn't
configure the build (Kconfig), and doesn't set runtime configuration,
like the toolstack, storage system, any stubdomains, etc.
It could be xen-launch-config.bbclass though, since it sets the
hypervisor boot parameters and also those for the initial domain
(dom0), and would be appropriate if it is planned to be extended for
more domains later.
[Sandeep]: Sounds good will send a v3 patch. Yes we will extend for more
domains later.
Some of the values defined are specific to Arm64 platforms: could
those default values be moved into an Arm64-specific class? If
the variables themselves are also arch-specific, they could be
moved too.
[Sandeep]: Can you specify which variables are arm65 specific?
Having looked at it since, there's two categories of variables:
hypervisor settings and dom0 - could that be clearer if all of the
variables for dom0 have a DOM0_ prefix?
[Sandeep]: Yes we will have DOM0_ prefix for all dom0 variables and
DOMU_ prefix for domU variables.
Christopher
Declaring the Dom0-specific variables as an interface is a bit
unfortunate, given dom0less (and hyperlaunch) systems where there
needs to be a method for providing the same configuration memory
and vcpu values for multiple guest VMs, rather than just dom0. Do
you have a design in mind for the extension to DomU or
Dom0less that you mention?
[Sandeep]: I assume dom0 and dom0less variables are same, to
enable dom0less boot all we need is to enable CONFIG_DOM0LESS_BOOT
from xen configuration. As per Stefano, dom0less is supported for
ARM64 today and Stefano is working to implement dom0less for x86
and will be upstream soon(not sure on timeline.)
Christopher
Signed-off-by: Sandeep Gundlupet Raju
<[email protected]>
---
.../xen-u-boot-scr-configuration.bbclass | 43
+++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644
classes-recipe/xen-u-boot-scr-configuration.bbclass
diff --git
a/classes-recipe/xen-u-boot-scr-configuration.bbclass
b/classes-recipe/xen-u-boot-scr-configuration.bbclass
new file mode 100644
index 00000000..df8287e1
--- /dev/null
+++ b/classes-recipe/xen-u-boot-scr-configuration.bbclass
@@ -0,0 +1,43 @@
+# Copyright (C) 2024, Advanced Micro Devices, Inc. All
rights reserved.
+#
+# SPDX-License-Identifier: MIT
+#
+# This bbclass defines u-boot script variables required for
xen boot which can be
+# inherited u-boot boot scripts recipes and also allows to
configure these variables
+# from recipes, global and machine configurations files.
+
+# Variable nomenclature is aligned with
+#
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
+
+# Image Load Address for Xen Dom0 boot
+KERNEL_LOAD_ADDRESS ??= "0x00400000"
+XEN_LOAD_ADDRESS ??= "0x00200000"
+DEVICETREE_LOAD_ADDRESS ??= "0xC000000"
+RAMDISK_LOAD_ADDRESS ??= "0x2600000"
+
+# Xen boot image types.
+# KERNEL_IMAGETYPE: Specifies DomU kernel image file to be
loaded by u-boot.
+# XEN_IMAGETYPE: Specifies xen hypervisor binary to be
loaded by u-boot.
+# Example: xen or xen.efi or xen.gz
+# DOM0_RAMDISK_IMAGETYPE: Specifies DOM0 ramdisk to be used,
Example: cpio.gz
+XEN_IMAGETYPE ??= "xen"
+DOM0_RAMDISK_IMAGETYPE ??= "rootfs.cpio.gz"
+
+# Set the amount of memory for dom0 depending on total
available memory size(DDR).
+DOM0_MEM ??= "256M"
+
+# Specify which UART console Xen should use. You can
sepecify the devicetree
+# alias or full path to a node in the devicetree
+# XEN_SERIAL_CONSOLES = "/soc/serial@7e215040" or
+# XEN_SERIAL_CONSOLES = "serial0" or
+# XEN_SERIAL_CONSOLES = "/axi/serial@ff000000"
+XEN_SERIAL_CONSOLES ??= "/soc/serial@7e215040"
+
+# Specify additional command line arguments used for Xen and
this will be appended
+# to xen-bootargs cariable. This can also be used for
passing debug cmd line arguments.
+# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all
guest_loglvl=debug"
+XEN_CMDLINE_APPEND ??= "sync_console bootscrub=0"
+
+# Specify the max number of vcpus for dom0
+# Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4"
+DOM0_MAX_VCPUS ??= "1"
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9018):
https://lists.yoctoproject.org/g/meta-virtualization/message/9018
Mute This Topic: https://lists.yoctoproject.org/mt/109713423/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-