Skip to contentSkip to conversation

Xen: improve Qemu integration

PATCH In review Christopher Clark 3 participants 27 messages Apr 28, 2022 – May 9, 2022 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

v2 cover Xen: improve Qemu integration

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

 classes/qemuboot-testimage-network.bbclass   |  36 +++++-
 classes/qemuboot-xen-defaults.bbclass        |  26 +++-
 classes/qemuboot-xen-u-boot.bbclass          | 128 +++++++++++++++++++
 conf/distro/include/meta-virt-xen.inc        |   1 +
 recipes-extended/images/xen-image-minimal.bb |   8 +-
 recipes-extended/xen/xen-tools.inc           |   9 +-
 recipes-extended/xen/xen.inc                 |   6 +-
 7 files changed, 197 insertions(+), 17 deletions(-)
 create mode 100644 classes/qemuboot-xen-u-boot.bbclass
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/3 xen, xen-tools: add recommendation for Qemu for non-hvm x86

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

---
Unchanged since v1

 recipes-extended/xen/xen-tools.inc | 9 ++-------
 recipes-extended/xen/xen.inc       | 6 +++---
 2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +2 -7
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 
 RDEPENDS:${PN}-dev = ""
 
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-
 RRECOMMENDS:${PN} = " \
-    ${QEMU} \
-    ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+    qemu \
+    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
     ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
     ${PN}-flask \
     ${PN}-hvmloader \
recipes-extended/xen/xen.inc +3 -3
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
     sdl \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \
     "
 
 PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
 PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
 PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios,"
 PACKAGECONFIG[externalblktap] = ",,,"
 
 DEPENDS = " \
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
     --disable-rombios \
     --disable-ocamltools \
     --disable-qemu-traditional \
-    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+        '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+        '--disable-pvshim --disable-seabios', d)} \
     "
 
 EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin"
Signature · 1 line
2.25.1
Reviewed-by on v2 1/3
#2 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \

recipes-extended/xen/xen-tools.inc +2 -2
-    ${QEMU} \
-    ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+    qemu \
+    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
    ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
    ${PN}-flask \
    ${PN}-hvmloader \
recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
    sdl \
    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \
    "
 

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -1
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
    --disable-rombios \
    --disable-ocamltools \
    --disable-qemu-traditional \
-    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+        '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+        '--disable-pvshim --disable-seabios', d)} \
    "
 

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#3 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 9 lines · Bertrand Marquis

Hi Christopher,

Quoted 6 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

Quoted 9 lines
Quoted 5 lines

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Bruce

Quoted 75 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \

recipes-extended/xen/xen-tools.inc +2 -2
-    ${QEMU} \
-    ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+    qemu \
+    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
    ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
    ${PN}-flask \
    ${PN}-hvmloader \
recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
    sdl \
    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \
    "
 

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -1
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
    --disable-rombios \
    --disable-ocamltools \
    --disable-qemu-traditional \
-    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+    ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+        '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+        '--disable-pvshim --disable-seabios', d)} \
    "
 

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#4 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Hi Bruce,

Quoted 18 lines · Bruce Ashfield
Quoted 14 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

Quoted 8 lines
Quoted 4 lines

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

Chees
Bertrand

Quoted 81 lines

Bruce

Quoted 65 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 10 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#5 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Bruce

Quoted 91 lines

Chees
Bertrand

Quoted 81 lines

Bruce

Quoted 65 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 10 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#6 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

I was last time I tried but I will retry with the current status and confirm.

Cheers
Bertrand

Quoted 93 lines

Bruce

Quoted 90 lines

Chees
Bertrand

Quoted 85 lines

Bruce

Quoted 65 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 10 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#7 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

In reply to Bruce Ashfield

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Here is the linux logs for dom0 on my system:

[    7.854317] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.

Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting random number generator daemon.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ECDSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ED25519 host key...
sync: ignoring all arguments
sync: ignoring all arguments
done.
Starting syslogd/klogd: done
Starting domain watchdog daemon: xenwatchdogd startup

And it stays stuck there.

This is arm64 but I have the same on x86 with almost the same logs.

If you want me to test something in particular to check if it solves the issue, just tell me what.
I do not have much time to investigate right now but I will try to dig a bit from middle of next week so please keep me in touch.

Cheers
Bertrand

Quoted 93 lines

Bruce

Quoted 90 lines

Chees
Bertrand

Quoted 85 lines

Bruce

Quoted 65 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 10 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#8 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 82 lines · Bertrand Marquis

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Here is the linux logs for dom0 on my system:

[    7.854317] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.

Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting random number generator daemon.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ECDSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ED25519 host key...
sync: ignoring all arguments
sync: ignoring all arguments
done.
Starting syslogd/klogd: done
Starting domain watchdog daemon: xenwatchdogd startup

Quoted 7 lines

And it stays stuck there.

This is arm64 but I have the same on x86 with almost the same logs.

If you want me to test something in particular to check if it solves the issue, just tell me what.
I do not have much time to investigate right now but I will try to dig a bit from middle of next week so please keep me in touch.

Thanks for the data point .. it is very helpful!

Would it be possible to get a log of the image you built, and how you launched it ? I'm assuming it is standard, but i'm looking for anything that might show how I'm doing something differently!

Bruce

Quoted 107 lines

Cheers
Bertrand

Quoted 93 lines

Bruce

Quoted 90 lines

Chees
Bertrand

Quoted 85 lines

Bruce

Quoted 65 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 10 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#9 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 96 lines · Bruce Ashfield
Quoted 82 lines · Bertrand Marquis

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Here is the linux logs for dom0 on my system:

[ 7.854317] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.

Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.) Running postinst /etc/rpm-postinsts/100-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing) Removing any system startup links for run-postinsts ... /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting random number generator daemon.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ECDSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ED25519 host key...
sync: ignoring all arguments
sync: ignoring all arguments
done.
Starting syslogd/klogd: done
Starting domain watchdog daemon: xenwatchdogd startup

Quoted 7 lines

And it stays stuck there.

This is arm64 but I have the same on x86 with almost the same logs.

If you want me to test something in particular to check if it solves the issue, just tell me what.
I do not have much time to investigate right now but I will try to dig a bit from middle of next week so please keep me in touch.

Quoted 5 lines

Thanks for the data point .. it is very helpful!

Would it be possible to get a log of the image you built, and how you launched it ? I'm assuming it is standard, but i'm looking for anything that might show how I'm doing something differently!

For the easy parts:
- config: MACHINE=qemuarm64, DISTRO_FEATURES = " virtualization xen"
- build Xen-image-minimal
- launch: runqemu serialstdio nographic

I am using current xen staging with a modified xen recipe but I just tried with stable 4.16 and I have exactly the same.

Here is my build config:
Build Configuration:

BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "qemuarm64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa57"
TARGET_FPU           = ""

meta
meta-poky
meta-yocto-bsp = "stable:d53ac6e9561d782818d5491b7c4066f4a712d358"
meta-oe
meta-python
meta-filesystems
meta-networking = "stable:bb2b5b31a80eb164e47649036878773614e4dbdf"
meta-virtualization = "stable:ea91e97711e3ceda4f4eab9db0d393568ee8bb46" meta-arm-toolchain
meta-arm
meta-arm-bsp = "stable:50b34c5cc9496441152ad28bf1022e5fc5ab0a7e"

For the build log could you be a bit more specific as there are a lot of logs.

Meta-virtualization status is kirkstone + patch for qemu-arm32 support.

Cheers
Bertrand

Quoted 109 lines

Bruce

Quoted 106 lines

Cheers
Bertrand

Quoted 101 lines

Bruce

Quoted 85 lines

Chees
Bertrand

Quoted 81 lines

Bruce

Quoted 75 lines

Cheers
Bertrand

Quoted 61 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7226): https://lists.yoctoproject.org/g/meta-virtualization/message/7226
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 6 lines
Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#10 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 133 lines · Bertrand Marquis
Quoted 97 lines · Bruce Ashfield
Quoted 82 lines · Bertrand Marquis

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Here is the linux logs for dom0 on my system:

[ 7.854317] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.

Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.) Running postinst /etc/rpm-postinsts/100-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing) Removing any system startup links for run-postinsts ... /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting random number generator daemon.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ECDSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ED25519 host key...
sync: ignoring all arguments
sync: ignoring all arguments
done.
Starting syslogd/klogd: done
Starting domain watchdog daemon: xenwatchdogd startup

Quoted 7 lines

And it stays stuck there.

This is arm64 but I have the same on x86 with almost the same logs.

If you want me to test something in particular to check if it solves the issue, just tell me what.
I do not have much time to investigate right now but I will try to dig a bit from middle of next week so please keep me in touch.

Quoted 5 lines

Thanks for the data point .. it is very helpful!

Would it be possible to get a log of the image you built, and how you launched it ? I'm assuming it is standard, but i'm looking for anything that might show how I'm doing something differently!

For the easy parts:
- config: MACHINE=qemuarm64, DISTRO_FEATURES = " virtualization xen"
- build Xen-image-minimal
- launch: runqemu serialstdio nographic

I am using current xen staging with a modified xen recipe but I just tried with stable 4.16 and I have exactly the same.

Here is my build config:
Build Configuration:

BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "qemuarm64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa57"
TARGET_FPU           = ""

meta
meta-poky
meta-yocto-bsp = "stable:d53ac6e9561d782818d5491b7c4066f4a712d358"
meta-oe
meta-python
meta-filesystems
meta-networking = "stable:bb2b5b31a80eb164e47649036878773614e4dbdf"
meta-virtualization = "stable:ea91e97711e3ceda4f4eab9db0d393568ee8bb46" meta-arm-toolchain
meta-arm
meta-arm-bsp = "stable:50b34c5cc9496441152ad28bf1022e5fc5ab0a7e"

Quoted 2 lines

For the build log could you be a bit more specific as there are a lot of logs.

I'm ok without the build logs, what you have above lets me get close.

My main development box uses systemd as the init system for the distro, are you using poky + sysvinit ?

Poky (Yocto Project Reference Distro) 4.1+snapshot-5f85f75ecf1d5ea48975a04436bce947fd2bb41f qemux86-64 hvc0 qemux86-64 login: root

root@qemux86-64:~# uname -a
Linux qemux86-64 5.15.37-yocto-standard #1 SMP PREEMPT Tue May 3
23:43:14 UTC 2022 x86_64 GNU/Linux

I'll keep trying to reproduce the issues here.

Bruce

Quoted 127 lines

Meta-virtualization status is kirkstone + patch for qemu-arm32 support.

Cheers
Bertrand

Quoted 103 lines

Bruce

Quoted 100 lines

Cheers
Bertrand

Quoted 95 lines

Bruce

Quoted 79 lines

Chees
Bertrand

Quoted 75 lines

Bruce

Quoted 69 lines

Cheers
Bertrand

Quoted 56 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

Quoted 7 lines

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 6 lines
Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7251): https://lists.yoctoproject.org/g/meta-virtualization/message/7251
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 144 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 133 lines · Bertrand Marquis
Quoted 97 lines · Bruce Ashfield
Quoted 82 lines · Bertrand Marquis

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Here is the linux logs for dom0 on my system:

[ 7.854317] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.

Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.) Running postinst /etc/rpm-postinsts/100-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing) Removing any system startup links for run-postinsts ... /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting random number generator daemon.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ECDSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ED25519 host key...
sync: ignoring all arguments
sync: ignoring all arguments
done.
Starting syslogd/klogd: done
Starting domain watchdog daemon: xenwatchdogd startup

Quoted 7 lines

And it stays stuck there.

This is arm64 but I have the same on x86 with almost the same logs.

If you want me to test something in particular to check if it solves the issue, just tell me what.
I do not have much time to investigate right now but I will try to dig a bit from middle of next week so please keep me in touch.

Quoted 5 lines

Thanks for the data point .. it is very helpful!

Would it be possible to get a log of the image you built, and how you launched it ? I'm assuming it is standard, but i'm looking for anything that might show how I'm doing something differently!

For the easy parts:
- config: MACHINE=qemuarm64, DISTRO_FEATURES = " virtualization xen"
- build Xen-image-minimal
- launch: runqemu serialstdio nographic

I am using current xen staging with a modified xen recipe but I just tried with stable 4.16 and I have exactly the same.

Here is my build config:
Build Configuration:

BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "qemuarm64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa57"
TARGET_FPU           = ""

meta
meta-poky
meta-yocto-bsp = "stable:d53ac6e9561d782818d5491b7c4066f4a712d358"
meta-oe
meta-python
meta-filesystems
meta-networking = "stable:bb2b5b31a80eb164e47649036878773614e4dbdf"
meta-virtualization = "stable:ea91e97711e3ceda4f4eab9db0d393568ee8bb46" meta-arm-toolchain
meta-arm
meta-arm-bsp = "stable:50b34c5cc9496441152ad28bf1022e5fc5ab0a7e"

Quoted 2 lines

For the build log could you be a bit more specific as there are a lot of logs.

I'm ok without the build logs, what you have above lets me get close.

My main development box uses systemd as the init system for the distro, are you using poky + sysvinit ?

Quoted 8 lines

Poky (Yocto Project Reference Distro) 4.1+snapshot-5f85f75ecf1d5ea48975a04436bce947fd2bb41f qemux86-64 hvc0 qemux86-64 login: root

root@qemux86-64:~# uname -a
Linux qemux86-64 5.15.37-yocto-standard #1 SMP PREEMPT Tue May 3
23:43:14 UTC 2022 x86_64 GNU/Linux

I'll keep trying to reproduce the issues here.

A clean build with sysvinit has failed to bring up the console on a secondary builder (both qemux86-64 and quemarm64)

I'll do some debug and see how it has gone wrong (since xencommon should be firing for sysvinit).

Bruce

Bruce

Quoted 131 lines

Bruce

Quoted 112 lines

Meta-virtualization status is kirkstone + patch for qemu-arm32 support.

Cheers
Bertrand

Quoted 107 lines

Bruce

Quoted 101 lines

Cheers
Bertrand

Quoted 87 lines

Bruce

Quoted 84 lines

Chees
Bertrand

Quoted 79 lines

Bruce

Quoted 60 lines

Cheers
Bertrand

Quoted 56 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

Quoted 9 lines
Quoted 7 lines

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 9 lines
Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7252): https://lists.yoctoproject.org/g/meta-virtualization/message/7252
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw

Re: [meta-virtualization][PATCH v2 1/3] xen, xen-tools: add recommendation for Qemu for non-hvm x86

Quoted 155 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 151 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 133 lines · Bertrand Marquis
Quoted 97 lines · Bruce Ashfield
Quoted 82 lines · Bertrand Marquis

Hi Bruce,

Quoted 41 lines · Bruce Ashfield
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 23 lines · Bruce Ashfield
Quoted 18 lines · Bertrand Marquis

Hi Christopher,

Quoted 11 lines · Christopher Clark via lists.yoctoproject.org

The Spectre and Meltdown mitigations for Xen run PV guests within HVM virtual machines, so Qemu is no longer only needed for systems configured to run HVM guests.

With the split xen hypervisor and tools recipes, the bios dependencies belong in the tools recipe, so move them and replace the hvm PACKAGECONFIG option with the recommendation based on target arch.

I can build and run on x86 qemu and I get stuck during init in Dom0 (which is apparently already known).

Quoted 6 lines
Quoted 3 lines

It is likely the xencommond init.d still causing issues.

I'm doing a revert of all those changes locally, and will start some tests.

Please let me know if you need some testing.
On my side, I have the issue on arm64, arm32 and x86 at the moment.

I'm still able to build and boot here, so I haven't reproduced the issue .. so I'm still hesitating to revert all the xencommons changes, as I can't prove to myself they are the issue.

Quoted 6 lines

I created a kirkstone branch today, and I'll be adding the latest Xen patches to it, but I need to get a handle on what everyone is seeing for failures.

I assume you are still seeing problems with the boot on all the platforms you mentioned above ?

Here is the linux logs for dom0 on my system:

[ 7.854317] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.

Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.) Running postinst /etc/rpm-postinsts/100-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing) Removing any system startup links for run-postinsts ... /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting random number generator daemon.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ECDSA host key...
sync: ignoring all arguments
sync: ignoring all arguments
generating ssh ED25519 host key...
sync: ignoring all arguments
sync: ignoring all arguments
done.
Starting syslogd/klogd: done
Starting domain watchdog daemon: xenwatchdogd startup

Quoted 7 lines

And it stays stuck there.

This is arm64 but I have the same on x86 with almost the same logs.

If you want me to test something in particular to check if it solves the issue, just tell me what.
I do not have much time to investigate right now but I will try to dig a bit from middle of next week so please keep me in touch.

Quoted 5 lines

Thanks for the data point .. it is very helpful!

Would it be possible to get a log of the image you built, and how you launched it ? I'm assuming it is standard, but i'm looking for anything that might show how I'm doing something differently!

For the easy parts:
- config: MACHINE=qemuarm64, DISTRO_FEATURES = " virtualization xen"
- build Xen-image-minimal
- launch: runqemu serialstdio nographic

I am using current xen staging with a modified xen recipe but I just tried with stable 4.16 and I have exactly the same.

Here is my build config:
Build Configuration:

BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "qemuarm64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa57"
TARGET_FPU           = ""

meta
meta-poky
meta-yocto-bsp = "stable:d53ac6e9561d782818d5491b7c4066f4a712d358"
meta-oe
meta-python
meta-filesystems
meta-networking = "stable:bb2b5b31a80eb164e47649036878773614e4dbdf"
meta-virtualization = "stable:ea91e97711e3ceda4f4eab9db0d393568ee8bb46" meta-arm-toolchain
meta-arm
meta-arm-bsp = "stable:50b34c5cc9496441152ad28bf1022e5fc5ab0a7e"

Quoted 2 lines

For the build log could you be a bit more specific as there are a lot of logs.

I'm ok without the build logs, what you have above lets me get close.

My main development box uses systemd as the init system for the distro, are you using poky + sysvinit ?

Poky (Yocto Project Reference Distro) 4.1+snapshot-5f85f75ecf1d5ea48975a04436bce947fd2bb41f qemux86-64 hvc0 qemux86-64 login: root

root@qemux86-64:~# uname -a
Linux qemux86-64 5.15.37-yocto-standard #1 SMP PREEMPT Tue May 3
23:43:14 UTC 2022 x86_64 GNU/Linux
Quoted 7 lines
Quoted 1 line

I'll keep trying to reproduce the issues here.

A clean build with sysvinit has failed to bring up the console on a secondary builder (both qemux86-64 and quemarm64)

I'll do some debug and see how it has gone wrong (since xencommon should be firing for sysvinit).

I've fixed up the sysvinit boot, and will double check both systemd and sysvinit in my latest builds.

I expect to have a fix in the tree on Monday, and we can move on with the other changes :)

Bruce

Quoted 154 lines

Bruce

Bruce

Quoted 126 lines

Bruce

Quoted 112 lines

Meta-virtualization status is kirkstone + patch for qemu-arm32 support.

Cheers
Bertrand

Quoted 107 lines

Bruce

Quoted 101 lines

Cheers
Bertrand

Quoted 87 lines

Bruce

Quoted 84 lines

Chees
Bertrand

Quoted 79 lines

Bruce

Quoted 60 lines

Cheers
Bertrand

Quoted 56 lines

---
Unchanged since v1

recipes-extended/xen/xen-tools.inc | 9 ++-------
recipes-extended/xen/xen.inc | 6 +++---

2 files changed, 5 insertions(+), 10 deletions(-)
recipes-extended/xen/xen-tools.inc +0 -0
index 6bbc8cd..54bc477 100644
@@ -30,14 +30,9 @@ RDEPENDS:${PN} = "\
 

RDEPENDS:${PN}-dev = ""

recipes-extended/xen/xen-tools.inc +0 -5
-# Qemu is necessary on ARM platforms, and to support HVM guests on x86
-QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}"
-QEMU:arm = "qemu"
-QEMU:aarch64 = "qemu"
-

RRECOMMENDS:${PN} = " \
- ${QEMU} \
- ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \
+ qemu \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
${PN}-flask \
${PN}-hvmloader \

recipes-extended/xen/xen.inc +0 -1
index 8b86de5..4c38ccf 100644
@@ -9,13 +9,11 @@ require xen-arch.inc
 PACKAGECONFIG ??= " \
 sdl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \

"

PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native," PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios," PACKAGECONFIG[externalblktap] = ",,,"

DEPENDS = " \

recipes-extended/xen/xen.inc +3 -4
@@ -132,7 +130,9 @@ EXTRA_OECONF += " \
--disable-rombios \
--disable-ocamltools \
--disable-qemu-traditional \
- ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', '--enable-pvshim', '--disable-pvshim', d)} \
+ ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
+ '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
+ '--disable-pvshim --disable-seabios', d)} \

"

Quoted 9 lines
Quoted 7 lines

EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" --
2.25.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 9 lines
Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Quoted 7 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7253): https://lists.yoctoproject.org/g/meta-virtualization/message/7253
Mute This Topic: https://lists.yoctoproject.org/mt/90743682/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#15 lore raw

PATCH v2 2/3 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images

In reply to Christopher Clark

The Xen hypervisor built for Arm 32-bit targets can be launched with runqemu by providing a u-boot script and configuration for Qemu, which enables interactive testing of Xen images.

Add qemuboot-xen-u-boot.bbclass to add a new bitbake task for generating the u-boot script. Since this increases the number of qemuboot-specific classes that are inherited by the xen-image-minimal recipe, change the inherit of all of these to only apply to qemu machines with the qemuall override.

Update qemuboot-xen-defaults.bbclass to supply working default parameters for the qemuarm machine needed to boot successfully in testing. Also change all the arch-specific variable overrides into narrower qemu platform overrides instead to avoid unnecessary interactions with other Arm platform machines.

---
Changes since v1:
- replace all qemuboot arch overrides with qemu machine platform overrides
- only include the qemu classes in the image for qemu build targets

 classes/qemuboot-xen-defaults.bbclass        |  26 +++-
 classes/qemuboot-xen-u-boot.bbclass          | 128 +++++++++++++++++++
 conf/distro/include/meta-virt-xen.inc        |   1 +
 recipes-extended/images/xen-image-minimal.bb |   6 +-
 4 files changed, 155 insertions(+), 6 deletions(-)
 create mode 100644 classes/qemuboot-xen-u-boot.bbclass
classes/qemuboot-xen-defaults.bbclass +21 -5
index c7e74c3..62bbf8f 100644
@@ -10,21 +10,37 @@ DOM0_KERNEL ??= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
 DOM0_KERNEL_LOAD_ADDR ??= "0x45000000"
 QB_XEN_DOMAIN_MODULES ??= "${DOM0_KERNEL}:${DOM0_KERNEL_LOAD_ADDR}:multiboot,kernel"
 
+# Qemuboot for 32-bit Arm loads Xen via device loader parameter rather than
+# kernel and boots using u-boot as bios
+XEN_BINARY ??= "${DEPLOY_DIR_IMAGE}/xen-${MACHINE}"
+QB_XEN_LOAD_ADDR ??= "0x46000000"
+QB_OPT_APPEND:append:qemuarm = " \
+    -device loader,file=${XEN_BINARY},addr=${QB_XEN_LOAD_ADDR},force-raw=on \
+    -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
+    -bios ${DEPLOY_DIR_IMAGE}/u-boot.bin \
+    "
+QB_DEFAULT_KERNEL:qemuarm = "none"
+
 # Qemuboot for 64-bit Arm uses the QB_DEFAULT_KERNEL method to load Xen
 # and the device loader option for the dom0 kernel:
-QB_OPT_APPEND:append:aarch64 = " \
+QB_OPT_APPEND:append:qemuarm64 = " \
     -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
     "
-QB_DEFAULT_KERNEL:aarch64 = "xen-${MACHINE}"
+QB_DEFAULT_KERNEL:qemuarm64 = "xen-${MACHINE}"
 
+# 32-bit Arm: gic version 2
+QB_MACHINE:qemuarm = "-machine virt -machine virtualization=true"
 # 64-bit Arm: gic version 3
-QB_MACHINE:aarch64 = "-machine virt,gic-version=3 -machine virtualization=true"
+QB_MACHINE:qemuarm64 = "-machine virt,gic-version=3 -machine virtualization=true"
 
 # Increase the default qemu memory allocation to allow for the hypervisor.
 # Use a weak assignment to allow for change of default and override elsewhere.
 QB_MEM_VALUE ??= "512"
 QB_MEM = "-m ${QB_MEM_VALUE}"
 
+# 32-bit Arm: qemuboot with a u-boot script image
+QB_XEN_U_BOOT_SCR:qemuarm = "boot.scr.uimg"
+
 # 64-bit Arm: qemuboot with a device tree binary
-QB_DTB:aarch64 = "${IMAGE_NAME}.qemuboot.dtb"
-QB_DTB_LINK:aarch64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
+QB_DTB:qemuarm64 = "${IMAGE_NAME}.qemuboot.dtb"
+QB_DTB_LINK:qemuarm64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
classes/qemuboot-xen-u-boot.bbclass new file +128 -0

128 lines not on this page · raw message

conf/distro/include/meta-virt-xen.inc +1 -0
index 5fbb57f..89f98f2 100644
@@ -12,4 +12,5 @@ include ${@bb.utils.contains('MACHINE', 'raspberrypi4-64', \
     '${XEN_RPI4_64_CONFIG_PATH}', '', d)}
 
 # Set serial for working qemuboot console
+SERIAL_CONSOLES:qemuarm ?= "115200;ttyAMA0"
 SERIAL_CONSOLES:qemuarm64 ?= "115200;ttyAMA0"
recipes-extended/images/xen-image-minimal.bb +5 -1
index f6fa5ed..c17c153 100644
@@ -34,7 +34,11 @@ XEN_ACPI_PROCESSOR_MODULE:x86-64 = "kernel-module-xen-acpi-processor"
 
 LICENSE = "MIT"
 
-inherit core-image qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-testimage-network
+inherit core-image
+# Only inherit the qemuboot classes when building for a qemu machine
+QB_QEMU_CLASSES = ""
+QB_QEMU_CLASSES:qemuall = "qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-xen-u-boot qemuboot-testimage-network"
+inherit ${QB_QEMU_CLASSES}
 
 do_check_xen_state() {
     if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' yes', 'no', d)}" = "no" ]; then
Signature · 1 line
2.25.1
#16 lore raw

Re: [meta-virtualization][PATCH v2 2/3] qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images

Hi Christopher,

Quoted 12 lines · Christopher Clark via lists.yoctoproject.org

The Xen hypervisor built for Arm 32-bit targets can be launched with runqemu by providing a u-boot script and configuration for Qemu, which enables interactive testing of Xen images.

Add qemuboot-xen-u-boot.bbclass to add a new bitbake task for generating the u-boot script. Since this increases the number of qemuboot-specific classes that are inherited by the xen-image-minimal recipe, change the inherit of all of these to only apply to qemu machines with the qemuall override.

Quoted 5 lines

Update qemuboot-xen-defaults.bbclass to supply working default parameters for the qemuarm machine needed to boot successfully in testing. Also change all the arch-specific variable overrides into narrower qemu platform overrides instead to avoid unnecessary interactions with other Arm platform machines.

First: this does not work on my side as u-boot is stuck waiting for a dhcp server to download something from the deploy directory but I do not quite understand how this should work.

But more than that I think there are 2 issues here:
- qemuboot-xen-dtb is already doing exactly what you do in your uboot script. Why not use it ?
- qemu arm32 can perfectly boot xen using -kernel and -dtb in the exact same way than what is done on arm64. Why do you want to use uboot ?

I will push a patch to the mailing to show how I did this.

All the changes to cleanup the existing code are quite nice and it would be good to push them in a separate patch.

Cheers
Bertrand

Quoted 227 lines

---
Changes since v1:
- replace all qemuboot arch overrides with qemu machine platform overrides
- only include the qemu classes in the image for qemu build targets

classes/qemuboot-xen-defaults.bbclass        |  26 +++-
classes/qemuboot-xen-u-boot.bbclass          | 128 +++++++++++++++++++
conf/distro/include/meta-virt-xen.inc        |   1 +
recipes-extended/images/xen-image-minimal.bb |   6 +-
4 files changed, 155 insertions(+), 6 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

classes/qemuboot-xen-defaults.bbclass +0 -0
index c7e74c3..62bbf8f 100644
@@ -10,21 +10,37 @@ DOM0_KERNEL ??= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"

DOM0_KERNEL_LOAD_ADDR ??= "0x45000000"
QB_XEN_DOMAIN_MODULES ??= "${DOM0_KERNEL}:${DOM0_KERNEL_LOAD_ADDR}:multiboot,kernel"

classes/qemuboot-xen-defaults.bbclass +11 -0
+# Qemuboot for 32-bit Arm loads Xen via device loader parameter rather than
+# kernel and boots using u-boot as bios
+XEN_BINARY ??= "${DEPLOY_DIR_IMAGE}/xen-${MACHINE}"
+QB_XEN_LOAD_ADDR ??= "0x46000000"
+QB_OPT_APPEND:append:qemuarm = " \
+    -device loader,file=${XEN_BINARY},addr=${QB_XEN_LOAD_ADDR},force-raw=on \
+    -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
+    -bios ${DEPLOY_DIR_IMAGE}/u-boot.bin \
+    "
+QB_DEFAULT_KERNEL:qemuarm = "none"
+

# Qemuboot for 64-bit Arm uses the QB_DEFAULT_KERNEL method to load Xen

# and the device loader option for the dom0 kernel:
classes/qemuboot-xen-defaults.bbclass +4 -2
-QB_OPT_APPEND:append:aarch64 = " \
+QB_OPT_APPEND:append:qemuarm64 = " \
    -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
    "
-QB_DEFAULT_KERNEL:aarch64 = "xen-${MACHINE}"
+QB_DEFAULT_KERNEL:qemuarm64 = "xen-${MACHINE}"
 
+# 32-bit Arm: gic version 2
+QB_MACHINE:qemuarm = "-machine virt -machine virtualization=true"

# 64-bit Arm: gic version 3

classes/qemuboot-xen-defaults.bbclass +1 -1
-QB_MACHINE:aarch64 = "-machine virt,gic-version=3 -machine virtualization=true"
+QB_MACHINE:qemuarm64 = "-machine virt,gic-version=3 -machine virtualization=true"

# Increase the default qemu memory allocation to allow for the hypervisor. # Use a weak assignment to allow for change of default and override elsewhere. QB_MEM_VALUE ??= "512"
QB_MEM = "-m ${QB_MEM_VALUE}"

classes/qemuboot-xen-defaults.bbclass +3 -0
+# 32-bit Arm: qemuboot with a u-boot script image
+QB_XEN_U_BOOT_SCR:qemuarm = "boot.scr.uimg"
+

# 64-bit Arm: qemuboot with a device tree binary

classes/qemuboot-xen-defaults.bbclass +2 -2
-QB_DTB:aarch64 = "${IMAGE_NAME}.qemuboot.dtb"
-QB_DTB_LINK:aarch64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
+QB_DTB:qemuarm64 = "${IMAGE_NAME}.qemuboot.dtb"
+QB_DTB_LINK:qemuarm64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
classes/qemuboot-xen-u-boot.bbclass new file +128 -0
new file mode 100644
index 0000000..4401eba
@@ -0,0 +1,128 @@
+# Enable booting Xen with qemuboot / runqemu: u-boot configuration
+#
+# Copyright (c) 2021-2022 Star Lab Corp. All rights reserved.
+#
+# Author: Christopher Clark <[email protected]>
+
+# Interface variables:
+#
+# QB_XEN_U_BOOT_SCR :
+# If this variable is set, this class will generate the u-boot script image file
+# It must be set to the name of the compiled command file that u-boot will tftp
+# from the image deploy directory during boot, currently: "boot.scr.uimg"
+#
+# QB_XEN_CMDLINE_EXTRA :
+# A string to be appended to the default Xen hypervisor boot command line,
+# for supplying Xen boot options.
+# The device tree that this bbclass generates will contain Xen command
+# line options to connect the Xen console to the Qemu serial port.
+#
+# QB_XEN_LOAD_ADDR :
+# The hypervisor load address
+#
+# QB_XEN_DOM0_BOOTARGS :
+# A string for specifying Dom0 boot options for the Xen section of the device
+# tree.
+#
+# QB_XEN_UBOOT_SCR_TASK_DEPENDS:
+# The task dependencies for the u-boot script generation. A default is provided.
+#
+# QB_XEN_DOMAIN_MODULES:
+# A space-separated list of colon-separated entries:
+#   "<file for the module>:<load memory address>:<module compatibility string>"
+
+# Set the default value for this variable to empty: no file generated.
+QB_XEN_U_BOOT_SCR ??= ""
+
+write_add_chosen_module() {
+    CMD_FILE="$1"
+    ADDR="$2"
+    SIZE="$3"
+    MODULE_TYPE="$4"
+    cat <<EOF >>"${CMD_FILE}"
+fdt mknod /chosen module@${ADDR}
+fdt set /chosen/module@${ADDR} compatible "multiboot,module" "${MODULE_TYPE}"
+fdt set /chosen/module@${ADDR} reg <${ADDR} ${SIZE}>
+EOF
+}
+
+generate_xen_u_boot_conf() {
+    CMD_FILE="${B}/qemuboot-xen.cmd"
+    cat <<EOF >"${CMD_FILE}"
+echo "Running u-boot launch script"
+fdt addr 0x40000000
+fdt resize
+echo "Device tree resized"
+
+fdt set /chosen \#address-cells <1>
+fdt set /chosen \#size-cells <1>
+
+fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/pl011@9000000 ${QB_XEN_CMDLINE_EXTRA}"
+fdt set /chosen xen,dom0-bootargs "${QB_XEN_DOM0_BOOTARGS}"
+EOF
+
+    if [ -z "${QB_XEN_DOMAIN_MODULES}" ]; then
+        bbwarn "No domain modules: please set QB_XEN_DOMAIN_MODULES"
+    fi
+
+    for DOMAIN_MODULE in ${QB_XEN_DOMAIN_MODULES}
+    do
+        MODULE_FILE="$(echo ${DOMAIN_MODULE} | cut -f1 -d:)"
+        ADDR="$(echo ${DOMAIN_MODULE} | cut -f2 -d:)"
+        MODULE_TYPE="$(echo ${DOMAIN_MODULE} | cut -f3 -d:)"
+        RESOLVED_FILE="$(readlink -f ${MODULE_FILE})"
+        SIZE=$(printf '0x%x\n' $(stat -c '%s' "${RESOLVED_FILE}"))
+        [ "x${SIZE}" != "x0x0" ] || bbfatal No module: "${MODULE_FILE}"
+        write_add_chosen_module "${CMD_FILE}" "${ADDR}" "${SIZE}" "${MODULE_TYPE}"
+    done
+
+    cat <<EOF >>"${CMD_FILE}"
+fdt print /chosen
+
+echo Boot Xen
+bootz ${QB_XEN_LOAD_ADDR} - 0x40000000
+EOF
+
+    uboot-mkimage -A "${UBOOT_ARCH}" -T script -C none \
+                  -a 0x20000 -e 0x20000 \
+                  -d "${CMD_FILE}" "${CMD_FILE}.uimg"
+
+    # u-boot tftps this filename from DEPLOY_DIR_IMAGE:
+    install -m 0644 "${CMD_FILE}.uimg" "${DEPLOY_DIR_IMAGE}/${QB_XEN_U_BOOT_SCR}"
+}
+
+do_write_qemuboot_xen_u_boot_conf() {
+    # Not all architectures qemuboot with u-boot, so check to see if this
+    # is needed. This allows this bbclass file to be used in the same image
+    # recipe for multiple architectures.
+
+    if [ -n "${QB_XEN_U_BOOT_SCR}" ] && [ -n "${QB_SYSTEM_NAME}" ] ; then
+        generate_xen_u_boot_conf
+    fi
+}
+
+addtask do_write_qemuboot_xen_u_boot_conf after do_write_qemuboot_conf before do_image
+# Task dependency:
+# An expected common case is that the kernel for at least one of the initial
+# domains (eg. dom0) is deployed from the virtual/kernel recipe, so
+# add that as a task dependency here since the kernel size needs to be known
+# for generating the device tree.
+# Dependencies are only introduced if a device tree will be generated.
+QB_XEN_UBOOT_SCR_TASK_DEPENDS ?= " \
+    ${@[ ' \
+        u-boot-tools-native:do_populate_sysroot \
+        u-boot:do_deploy \
+        virtual/kernel:do_deploy \
+    ', ''][d.getVar('QB_XEN_U_BOOT_SCR') == '']} \
+    "
+do_write_qemuboot_xen_u_boot_conf[depends] = "${QB_XEN_UBOOT_SCR_TASK_DEPENDS}"
+
+def qemuboot_xen_u_boot_vars(d):
+    build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
+                'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
+                'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE',
+                'STAGING_DIR_HOST', 'SERIAL_CONSOLES']
+    return build_vars + [k for k in d.keys() if k.startswith('QB_')]
+
+do_write_qemuboot_xen_u_boot[vardeps] += "${@' '.join(qemuboot_xen_u_boot_vars(d))}"
+do_write_qemuboot_xen_u_boot[vardepsexclude] += "TOPDIR"
conf/distro/include/meta-virt-xen.inc +1 -0
index 5fbb57f..89f98f2 100644
@@ -12,4 +12,5 @@ include ${@bb.utils.contains('MACHINE', 'raspberrypi4-64', \
    '${XEN_RPI4_64_CONFIG_PATH}', '', d)}
 
 # Set serial for working qemuboot console
+SERIAL_CONSOLES:qemuarm ?= "115200;ttyAMA0"

SERIAL_CONSOLES:qemuarm64 ?= "115200;ttyAMA0"

recipes-extended/images/xen-image-minimal.bb +0 -0
index f6fa5ed..c17c153 100644
@@ -34,7 +34,11 @@ XEN_ACPI_PROCESSOR_MODULE:x86-64 = "kernel-module-xen-acpi-processor"
 

LICENSE = "MIT"

recipes-extended/images/xen-image-minimal.bb +5 -1
-inherit core-image qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-testimage-network
+inherit core-image
+# Only inherit the qemuboot classes when building for a qemu machine
+QB_QEMU_CLASSES = ""
+QB_QEMU_CLASSES:qemuall = "qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-xen-u-boot qemuboot-testimage-network"
+inherit ${QB_QEMU_CLASSES}
do_check_xen_state() {
    if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' yes', 'no', d)}" = "no" ]; then

--
2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7227): https://lists.yoctoproject.org/g/meta-virtualization/message/7227
Mute This Topic: https://lists.yoctoproject.org/mt/90743683/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#17 lore raw

Re: [meta-virtualization][PATCH v2 2/3] qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images

Quoted 21 lines · Bertrand Marquis

Hi Christopher,

Quoted 12 lines · Christopher Clark via lists.yoctoproject.org

The Xen hypervisor built for Arm 32-bit targets can be launched with runqemu by providing a u-boot script and configuration for Qemu, which enables interactive testing of Xen images.

Add qemuboot-xen-u-boot.bbclass to add a new bitbake task for generating the u-boot script. Since this increases the number of qemuboot-specific classes that are inherited by the xen-image-minimal recipe, change the inherit of all of these to only apply to qemu machines with the qemuall override.

Quoted 5 lines

Update qemuboot-xen-defaults.bbclass to supply working default parameters for the qemuarm machine needed to boot successfully in testing. Also change all the arch-specific variable overrides into narrower qemu platform overrides instead to avoid unnecessary interactions with other Arm platform machines.

Quoted 3 lines

First: this does not work on my side as u-boot is stuck waiting for a dhcp server to download something from the deploy directory but I do not quite understand how this should work.

Hi Bertrand - thanks for testing this. It's supposed to be utilizing the existing u-boot integration but I am also not very familiar with all the moving pieces of that.

Quoted 3 lines

But more than that I think there are 2 issues here:
- qemuboot-xen-dtb is already doing exactly what you do in your uboot script. Why not use it ?

I just hadn't had success in being able to boot Xen on arm32 in qemu without u-boot, unfortunately, so when I had managed to get it to boot successfully with u-boot, this is the implementation that followed from that configuration.

Quoted 2 lines

- qemu arm32 can perfectly boot xen using -kernel and -dtb in the exact same way than what is done on arm64. Why do you want to use uboot ?

I actually don't if it's not necessary - I just hadn't had luck without it, but if we don't need the extra complexity in this layer then we shouldn't add it. I don't know if using a current Xen and qemu combination (ie. newer then when I started trying with it) has made a difference but I'm happy to hear that it is working.

Quoted 1 line

I will push a patch to the mailing to show how I did this.

Thanks - appreciated!

Quoted 2 lines

All the changes to cleanup the existing code are quite nice and it would be good to push them in a separate patch.

Ack

Christopher

Quoted 240 lines

Cheers
Bertrand

Quoted 227 lines

---
Changes since v1:
- replace all qemuboot arch overrides with qemu machine platform overrides
- only include the qemu classes in the image for qemu build targets

classes/qemuboot-xen-defaults.bbclass        |  26 +++-
classes/qemuboot-xen-u-boot.bbclass          | 128 +++++++++++++++++++
conf/distro/include/meta-virt-xen.inc        |   1 +
recipes-extended/images/xen-image-minimal.bb |   6 +-
4 files changed, 155 insertions(+), 6 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

classes/qemuboot-xen-defaults.bbclass +0 -0
index c7e74c3..62bbf8f 100644
@@ -10,21 +10,37 @@ DOM0_KERNEL ??= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"

DOM0_KERNEL_LOAD_ADDR ??= "0x45000000"
QB_XEN_DOMAIN_MODULES ??= "${DOM0_KERNEL}:${DOM0_KERNEL_LOAD_ADDR}:multiboot,kernel"

classes/qemuboot-xen-defaults.bbclass +11 -0
+# Qemuboot for 32-bit Arm loads Xen via device loader parameter rather than
+# kernel and boots using u-boot as bios
+XEN_BINARY ??= "${DEPLOY_DIR_IMAGE}/xen-${MACHINE}"
+QB_XEN_LOAD_ADDR ??= "0x46000000"
+QB_OPT_APPEND:append:qemuarm = " \
+    -device loader,file=${XEN_BINARY},addr=${QB_XEN_LOAD_ADDR},force-raw=on \
+    -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
+    -bios ${DEPLOY_DIR_IMAGE}/u-boot.bin \
+    "
+QB_DEFAULT_KERNEL:qemuarm = "none"
+

# Qemuboot for 64-bit Arm uses the QB_DEFAULT_KERNEL method to load Xen

# and the device loader option for the dom0 kernel:
classes/qemuboot-xen-defaults.bbclass +4 -2
-QB_OPT_APPEND:append:aarch64 = " \
+QB_OPT_APPEND:append:qemuarm64 = " \
    -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
    "
-QB_DEFAULT_KERNEL:aarch64 = "xen-${MACHINE}"
+QB_DEFAULT_KERNEL:qemuarm64 = "xen-${MACHINE}"
 
+# 32-bit Arm: gic version 2
+QB_MACHINE:qemuarm = "-machine virt -machine virtualization=true"

# 64-bit Arm: gic version 3

classes/qemuboot-xen-defaults.bbclass +1 -1
-QB_MACHINE:aarch64 = "-machine virt,gic-version=3 -machine virtualization=true"
+QB_MACHINE:qemuarm64 = "-machine virt,gic-version=3 -machine virtualization=true"

# Increase the default qemu memory allocation to allow for the hypervisor. # Use a weak assignment to allow for change of default and override elsewhere. QB_MEM_VALUE ??= "512"
QB_MEM = "-m ${QB_MEM_VALUE}"

classes/qemuboot-xen-defaults.bbclass +3 -0
+# 32-bit Arm: qemuboot with a u-boot script image
+QB_XEN_U_BOOT_SCR:qemuarm = "boot.scr.uimg"
+

# 64-bit Arm: qemuboot with a device tree binary

classes/qemuboot-xen-defaults.bbclass +2 -2
-QB_DTB:aarch64 = "${IMAGE_NAME}.qemuboot.dtb"
-QB_DTB_LINK:aarch64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
+QB_DTB:qemuarm64 = "${IMAGE_NAME}.qemuboot.dtb"
+QB_DTB_LINK:qemuarm64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
classes/qemuboot-xen-u-boot.bbclass new file +128 -0
new file mode 100644
index 0000000..4401eba
@@ -0,0 +1,128 @@
+# Enable booting Xen with qemuboot / runqemu: u-boot configuration
+#
+# Copyright (c) 2021-2022 Star Lab Corp. All rights reserved.
+#
+# Author: Christopher Clark <[email protected]>
+
+# Interface variables:
+#
+# QB_XEN_U_BOOT_SCR :
+# If this variable is set, this class will generate the u-boot script image file
+# It must be set to the name of the compiled command file that u-boot will tftp
+# from the image deploy directory during boot, currently: "boot.scr.uimg"
+#
+# QB_XEN_CMDLINE_EXTRA :
+# A string to be appended to the default Xen hypervisor boot command line,
+# for supplying Xen boot options.
+# The device tree that this bbclass generates will contain Xen command
+# line options to connect the Xen console to the Qemu serial port.
+#
+# QB_XEN_LOAD_ADDR :
+# The hypervisor load address
+#
+# QB_XEN_DOM0_BOOTARGS :
+# A string for specifying Dom0 boot options for the Xen section of the device
+# tree.
+#
+# QB_XEN_UBOOT_SCR_TASK_DEPENDS:
+# The task dependencies for the u-boot script generation. A default is provided.
+#
+# QB_XEN_DOMAIN_MODULES:
+# A space-separated list of colon-separated entries:
+#   "<file for the module>:<load memory address>:<module compatibility string>"
+
+# Set the default value for this variable to empty: no file generated.
+QB_XEN_U_BOOT_SCR ??= ""
+
+write_add_chosen_module() {
+    CMD_FILE="$1"
+    ADDR="$2"
+    SIZE="$3"
+    MODULE_TYPE="$4"
+    cat <<EOF >>"${CMD_FILE}"
+fdt mknod /chosen module@${ADDR}
+fdt set /chosen/module@${ADDR} compatible "multiboot,module" "${MODULE_TYPE}"
+fdt set /chosen/module@${ADDR} reg <${ADDR} ${SIZE}>
+EOF
+}
+
+generate_xen_u_boot_conf() {
+    CMD_FILE="${B}/qemuboot-xen.cmd"
+    cat <<EOF >"${CMD_FILE}"
+echo "Running u-boot launch script"
+fdt addr 0x40000000
+fdt resize
+echo "Device tree resized"
+
+fdt set /chosen \#address-cells <1>
+fdt set /chosen \#size-cells <1>
+
+fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/pl011@9000000 ${QB_XEN_CMDLINE_EXTRA}"
+fdt set /chosen xen,dom0-bootargs "${QB_XEN_DOM0_BOOTARGS}"
+EOF
+
+    if [ -z "${QB_XEN_DOMAIN_MODULES}" ]; then
+        bbwarn "No domain modules: please set QB_XEN_DOMAIN_MODULES"
+    fi
+
+    for DOMAIN_MODULE in ${QB_XEN_DOMAIN_MODULES}
+    do
+        MODULE_FILE="$(echo ${DOMAIN_MODULE} | cut -f1 -d:)"
+        ADDR="$(echo ${DOMAIN_MODULE} | cut -f2 -d:)"
+        MODULE_TYPE="$(echo ${DOMAIN_MODULE} | cut -f3 -d:)"
+        RESOLVED_FILE="$(readlink -f ${MODULE_FILE})"
+        SIZE=$(printf '0x%x\n' $(stat -c '%s' "${RESOLVED_FILE}"))
+        [ "x${SIZE}" != "x0x0" ] || bbfatal No module: "${MODULE_FILE}"
+        write_add_chosen_module "${CMD_FILE}" "${ADDR}" "${SIZE}" "${MODULE_TYPE}"
+    done
+
+    cat <<EOF >>"${CMD_FILE}"
+fdt print /chosen
+
+echo Boot Xen
+bootz ${QB_XEN_LOAD_ADDR} - 0x40000000
+EOF
+
+    uboot-mkimage -A "${UBOOT_ARCH}" -T script -C none \
+                  -a 0x20000 -e 0x20000 \
+                  -d "${CMD_FILE}" "${CMD_FILE}.uimg"
+
+    # u-boot tftps this filename from DEPLOY_DIR_IMAGE:
+    install -m 0644 "${CMD_FILE}.uimg" "${DEPLOY_DIR_IMAGE}/${QB_XEN_U_BOOT_SCR}"
+}
+
+do_write_qemuboot_xen_u_boot_conf() {
+    # Not all architectures qemuboot with u-boot, so check to see if this
+    # is needed. This allows this bbclass file to be used in the same image
+    # recipe for multiple architectures.
+
+    if [ -n "${QB_XEN_U_BOOT_SCR}" ] && [ -n "${QB_SYSTEM_NAME}" ] ; then
+        generate_xen_u_boot_conf
+    fi
+}
+
+addtask do_write_qemuboot_xen_u_boot_conf after do_write_qemuboot_conf before do_image
+# Task dependency:
+# An expected common case is that the kernel for at least one of the initial
+# domains (eg. dom0) is deployed from the virtual/kernel recipe, so
+# add that as a task dependency here since the kernel size needs to be known
+# for generating the device tree.
+# Dependencies are only introduced if a device tree will be generated.
+QB_XEN_UBOOT_SCR_TASK_DEPENDS ?= " \
+    ${@[ ' \
+        u-boot-tools-native:do_populate_sysroot \
+        u-boot:do_deploy \
+        virtual/kernel:do_deploy \
+    ', ''][d.getVar('QB_XEN_U_BOOT_SCR') == '']} \
+    "
+do_write_qemuboot_xen_u_boot_conf[depends] = "${QB_XEN_UBOOT_SCR_TASK_DEPENDS}"
+
+def qemuboot_xen_u_boot_vars(d):
+    build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
+                'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
+                'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE',
+                'STAGING_DIR_HOST', 'SERIAL_CONSOLES']
+    return build_vars + [k for k in d.keys() if k.startswith('QB_')]
+
+do_write_qemuboot_xen_u_boot[vardeps] += "${@' '.join(qemuboot_xen_u_boot_vars(d))}"
+do_write_qemuboot_xen_u_boot[vardepsexclude] += "TOPDIR"
conf/distro/include/meta-virt-xen.inc +1 -0
index 5fbb57f..89f98f2 100644
@@ -12,4 +12,5 @@ include ${@bb.utils.contains('MACHINE', 'raspberrypi4-64', \
    '${XEN_RPI4_64_CONFIG_PATH}', '', d)}
 
 # Set serial for working qemuboot console
+SERIAL_CONSOLES:qemuarm ?= "115200;ttyAMA0"

SERIAL_CONSOLES:qemuarm64 ?= "115200;ttyAMA0"

recipes-extended/images/xen-image-minimal.bb +0 -0
index f6fa5ed..c17c153 100644
@@ -34,7 +34,11 @@ XEN_ACPI_PROCESSOR_MODULE:x86-64 = "kernel-module-xen-acpi-processor"
 

LICENSE = "MIT"

recipes-extended/images/xen-image-minimal.bb +5 -1
-inherit core-image qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-testimage-network
+inherit core-image
+# Only inherit the qemuboot classes when building for a qemu machine
+QB_QEMU_CLASSES = ""
+QB_QEMU_CLASSES:qemuall = "qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-xen-u-boot qemuboot-testimage-network"
+inherit ${QB_QEMU_CLASSES}
do_check_xen_state() {
    if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' yes', 'no', d)}" = "no" ]; then

--
2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7227): https://lists.yoctoproject.org/g/meta-virtualization/message/7227
Mute This Topic: https://lists.yoctoproject.org/mt/90743683/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#18 lore raw

PATCH v2 3/3 xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

In reply to Christopher Clark

Networking for Xen guest virtual machines is commonly configured via bridging in the host system between a physical interface and the guest virtual interfaces.

To make it easier to test networking and use testimage with Xen guest virtual machines, extend the bbclass that provides network configuration for qemu machines for the Xen images to configure a Xen bridge and put eth0 onto it when QB_XEN_HOST_BRIDGE is set.

---
- Changes since v1: revised Signed-off-by

 classes/qemuboot-testimage-network.bbclass   | 36 +++++++++++++++++++-
 recipes-extended/images/xen-image-minimal.bb |  2 ++
 2 files changed, 37 insertions(+), 1 deletion(-)
classes/qemuboot-testimage-network.bbclass +35 -1
index 18af1ee..57e0355 100644
@@ -1,17 +1,51 @@
 # The recipe for init-ifupdown in core has a special-case for all
 # the Qemu MACHINES: it removes all external network interfaces
 # by default. However, eth0 is needed for testimage, so enable it here.
+
+# If QB_NETWORK_XEN_BRIDGE is set, configure bridging for the network.
+QB_NETWORK_XEN_BRIDGE ??= ""
+
 enable_runqemu_network() {
     : # no-op for non-qemu MACHINES
 }
+
 enable_runqemu_network:qemuall() {
+    # Do not override a network configuration for eth0 if one is present
     if ! grep -q eth0 "${IMAGE_ROOTFS}${sysconfdir}/network/interfaces" ; then
-        cat <<EOF >>${IMAGE_ROOTFS}${sysconfdir}/network/interfaces
+
+        # Xen host networking: use bridging to support guest networks
+        if [ -n "${QB_NETWORK_XEN_BRIDGE}" ] ; then
+            # Configure a Xen host network bridge and put eth0 on it
+            cat <<EOF >>${IMAGE_ROOTFS}${sysconfdir}/network/interfaces
+
+# Bridged host network for Xen testimage
+iface eth0 inet manual
+
+auto xenbr0
+iface xenbr0 inet dhcp
+	bridge_ports eth0
+EOF
+
+# Add a script to create the bridge and add eth0 if necessary
+            cat <<EOF >>${IMAGE_ROOTFS}${sysconfdir}/network/if-pre-up.d/xenbr0
+#!/bin/sh
+
+if [ "\$IFACE" = xenbr0 ]; then
+    brctl addbr xenbr0 || /bin/true
+    brctl addif xenbr0 eth0 || /bin/true
+    ifconfig eth0 up
+fi
+EOF
+            chmod 755 ${IMAGE_ROOTFS}${sysconfdir}/network/if-pre-up.d/xenbr0
+        else
+            # Just configure eth0
+            cat <<EOF >>${IMAGE_ROOTFS}${sysconfdir}/network/interfaces
 
 # Network for testimage
 auto eth0
 iface eth0 inet dhcp
 EOF
+        fi
     fi
 }
 ROOTFS_POSTPROCESS_COMMAND += 'enable_runqemu_network;'
recipes-extended/images/xen-image-minimal.bb +2 -0
index c17c153..6609f81 100644
@@ -34,6 +34,8 @@ XEN_ACPI_PROCESSOR_MODULE:x86-64 = "kernel-module-xen-acpi-processor"
 
 LICENSE = "MIT"
 
+QB_NETWORK_XEN_BRIDGE = "1"
+
 inherit core-image
 # Only inherit the qemuboot classes when building for a qemu machine
 QB_QEMU_CLASSES = ""
Signature · 1 line
2.25.1
#19 lore raw
In reply to Christopher Clark

Hi Christopher,

Quoted 10 lines · Christopher Clark via lists.yoctoproject.org

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

Thanks a lot for that.
I will test and review those in the next days :-)

Cheers
Bertrand

Quoted 20 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass   |  36 +++++-
classes/qemuboot-xen-defaults.bbclass        |  26 +++-
classes/qemuboot-xen-u-boot.bbclass          | 128 +++++++++++++++++++
conf/distro/include/meta-virt-xen.inc        |   1 +
recipes-extended/images/xen-image-minimal.bb |   8 +-
recipes-extended/xen/xen-tools.inc           |   9 +-
recipes-extended/xen/xen.inc                 |   6 +-
7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7225): https://lists.yoctoproject.org/g/meta-virtualization/message/7225
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#20 lore raw
In reply to Christopher Clark
Quoted 9 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

Bruce

Quoted 16 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

 classes/qemuboot-testimage-network.bbclass   |  36 +++++-
 classes/qemuboot-xen-defaults.bbclass        |  26 +++-
 classes/qemuboot-xen-u-boot.bbclass          | 128 +++++++++++++++++++
 conf/distro/include/meta-virt-xen.inc        |   1 +
 recipes-extended/images/xen-image-minimal.bb |   8 +-
 recipes-extended/xen/xen-tools.inc           |   9 +-
 recipes-extended/xen/xen.inc                 |   6 +-
 7 files changed, 197 insertions(+), 17 deletions(-)
 create mode 100644 classes/qemuboot-xen-u-boot.bbclass
Quoted 3 lines

--
2.25.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#21 lore raw

Hi Bruce,

Quoted 12 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 8 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

Quoted 8 lines
Quoted 1 line

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 30 lines

Bruce

Quoted 13 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

Quoted 6 lines
7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7255): https://lists.yoctoproject.org/g/meta-virtualization/message/7255
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#22 lore raw
Quoted 17 lines · Bertrand Marquis

Hi Bruce,

Quoted 14 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 9 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

Quoted 9 lines
Quoted 6 lines

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

It worked here, and obviously it works for Christopher. So at that point, I wouldn't hold it out of the tree.

Bruce

Quoted 45 lines

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 30 lines

Bruce

Quoted 13 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

Quoted 6 lines
7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7255): https://lists.yoctoproject.org/g/meta-virtualization/message/7255
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#23 lore raw
Quoted 30 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 24 lines · Bertrand Marquis

Hi Bruce,

Quoted 20 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 9 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

Quoted 5 lines
Quoted 2 lines

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

It worked here, and obviously it works for Christopher. So at that point, I wouldn't hold it out of the tree.

Could you at least explain me what I did wrong.

As said qemu is blocked waiting for a dhcp/tftp to answer in uboot. Why do you guys have something starting a tftp server and I do not ? Is it something that might happen to somebody else ?

Cheers
Bertrand

Quoted 50 lines

Bruce

Quoted 31 lines

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 25 lines

Bruce

Quoted 19 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

Quoted 8 lines
Quoted 6 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7257): https://lists.yoctoproject.org/g/meta-virtualization/message/7257
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#24 lore raw
Quoted 34 lines · Bertrand Marquis
Quoted 34 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 12 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 8 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

Quoted 8 lines
Quoted 1 line

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

Quoted 8 lines
Quoted 2 lines

It worked here, and obviously it works for Christopher. So at that point, I wouldn't hold it out of the tree.

Could you at least explain me what I did wrong.

As said qemu is blocked waiting for a dhcp/tftp to answer in uboot. Why do you guys have something starting a tftp server and I do not ? Is it something that might happen to somebody else ?

I used a setup that I have for kubernetes testing that does have a bootp/dhcp server available, so that could be the difference. But it is best to get Christopher's setup, as that is the reference he's using in his maintainer cycles.

Note: I only merged this to master, not kirkstone. But without this patch only patch 1/3 from Christopher went to kirkstone, so there is possibly more work required there as well.

So we can debug the setup in master, and not worry about it hurting the release, but if we don't get an answer from Christopher, or otherwise get it working in the next few days, I'll revert in master as well.

I didn't see any replies to your qemuarm patch, but I'm doing a rebase to master, and will test to see if it can co-exist or just be the default behaviour.

Bruce

Bruce

Quoted 62 lines

Cheers
Bertrand

Quoted 50 lines

Bruce

Quoted 31 lines

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 25 lines

Bruce

Quoted 19 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

Quoted 8 lines
Quoted 6 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7257): https://lists.yoctoproject.org/g/meta-virtualization/message/7257
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#25 lore raw

Hi Bruce

Quoted 43 lines · Bruce Ashfield
Quoted 39 lines · Bertrand Marquis
Quoted 31 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 24 lines · Bertrand Marquis

Hi Bruce,

Quoted 20 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 9 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

Quoted 5 lines
Quoted 2 lines

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

It worked here, and obviously it works for Christopher. So at that point, I wouldn't hold it out of the tree.

Could you at least explain me what I did wrong.

Quoted 8 lines
Quoted 3 lines

As said qemu is blocked waiting for a dhcp/tftp to answer in uboot. Why do you guys have something starting a tftp server and I do not ? Is it something that might happen to somebody else ?

I used a setup that I have for kubernetes testing that does have a bootp/dhcp server available, so that could be the difference. But it is best to get Christopher's setup, as that is the reference he's using in his maintainer cycles.

If there are some external dependencies, this would kind of odd to have this as default if we can have something working out of the box.

Quoted 4 lines

Note: I only merged this to master, not kirkstone. But without this patch only patch 1/3 from Christopher went to kirkstone, so there is possibly more work required there as well.

Ok

Quoted 5 lines

So we can debug the setup in master, and not worry about it hurting the release, but if we don't get an answer from Christopher, or otherwise get it working in the next few days, I'll revert in master as well.

I am debugging while kernel log and init log are not seen for dom0. Dom0 bootargs are wrong and I am digging to find out why.

Quoted 4 lines

I didn't see any replies to your qemuarm patch, but I'm doing a rebase to master, and will test to see if it can co-exist or just be the default behaviour.

Yep it needs a proper review.

Cheers
Bertrand

Quoted 69 lines

Bruce

Bruce

Quoted 62 lines

Cheers
Bertrand

Quoted 57 lines

Bruce

Quoted 31 lines

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 25 lines

Bruce

Quoted 19 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

Quoted 8 lines
Quoted 6 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7257): https://lists.yoctoproject.org/g/meta-virtualization/message/7257
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#26 lore raw
Quoted 75 lines · Bertrand Marquis

Hi Bruce

Quoted 43 lines · Bruce Ashfield
Quoted 39 lines · Bertrand Marquis
Quoted 31 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 24 lines · Bertrand Marquis

Hi Bruce,

Quoted 20 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 9 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

Quoted 5 lines
Quoted 2 lines

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

It worked here, and obviously it works for Christopher. So at that point, I wouldn't hold it out of the tree.

Could you at least explain me what I did wrong.

Quoted 8 lines
Quoted 3 lines

As said qemu is blocked waiting for a dhcp/tftp to answer in uboot. Why do you guys have something starting a tftp server and I do not ? Is it something that might happen to somebody else ?

I used a setup that I have for kubernetes testing that does have a bootp/dhcp server available, so that could be the difference. But it is best to get Christopher's setup, as that is the reference he's using in his maintainer cycles.

If there are some external dependencies, this would kind of odd to have this as default if we can have something working out of the box.

Quoted 4 lines

Note: I only merged this to master, not kirkstone. But without this patch only patch 1/3 from Christopher went to kirkstone, so there is possibly more work required there as well.

Ok

Quoted 5 lines

So we can debug the setup in master, and not worry about it hurting the release, but if we don't get an answer from Christopher, or otherwise get it working in the next few days, I'll revert in master as well.

I am debugging while kernel log and init log are not seen for dom0. Dom0 bootargs are wrong and I am digging to find out why.

Quoted 1 line
Quoted 5 lines
Quoted 3 lines

I didn't see any replies to your qemuarm patch, but I'm doing a rebase to master, and will test to see if it can co-exist or just be the default behaviour.

Yep it needs a proper review.

And of course, I just tried a boot on a different builder and it failed.

So I went ahead and reverted the change, and left it as the old status (which does boot for me).

We can revisit the two approaches from a clean slate.

Bruce

Quoted 83 lines

Cheers
Bertrand

Quoted 69 lines

Bruce

Bruce

Quoted 62 lines

Cheers
Bertrand

Quoted 57 lines

Bruce

Quoted 31 lines

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 25 lines

Bruce

Quoted 19 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

Quoted 8 lines
Quoted 6 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7257): https://lists.yoctoproject.org/g/meta-virtualization/message/7257
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Quoted 8 lines
Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#27 lore raw
In reply to Bruce Ashfield
Quoted 55 lines · Bruce Ashfield
Quoted 34 lines · Bertrand Marquis
Quoted 34 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 26 lines · Bertrand Marquis

Hi Bruce,

Quoted 12 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 8 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

Quoted 8 lines
Quoted 1 line

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

My review on the second patches was mentioning that it does not work on my side so why merging that one ?

Quoted 8 lines
Quoted 2 lines

It worked here, and obviously it works for Christopher. So at that point, I wouldn't hold it out of the tree.

Could you at least explain me what I did wrong.

As said qemu is blocked waiting for a dhcp/tftp to answer in uboot. Why do you guys have something starting a tftp server and I do not ? Is it something that might happen to somebody else ?

I used a setup that I have for kubernetes testing that does have a bootp/dhcp server available, so that could be the difference. But it is best to get Christopher's setup, as that is the reference he's using in his maintainer cycles.

Note: I only merged this to master, not kirkstone. But without this patch only patch 1/3 from Christopher went to kirkstone, so there is possibly more work required there as well.

Quoted 8 lines

So we can debug the setup in master, and not worry about it hurting the release, but if we don't get an answer from Christopher, or otherwise get it working in the next few days, I'll revert in master as well.

I didn't see any replies to your qemuarm patch, but I'm doing a rebase to master, and will test to see if it can co-exist or just be the default behaviour.

Hello

Just to let you know that I am following this and making my way through some testing. I am not sure what is causing the issues that Bertrand is encountering but I would like to ensure that they are resolved.

Christopher

Quoted 77 lines

Bruce

Bruce

Quoted 62 lines

Cheers
Bertrand

Quoted 50 lines

Bruce

Quoted 31 lines

I will try to test this to check if init issues are solved and come back to you

Cheers
Bertrand

Quoted 25 lines

Bruce

Quoted 19 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

Quoted 8 lines
Quoted 6 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7257): https://lists.yoctoproject.org/g/meta-virtualization/message/7257
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Quoted 1 line

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#28 lore raw
In reply to Bruce Ashfield

Hi Bruce,

Quoted 12 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 8 lines · Christopher Clark

A series of improvements to Qemu integration with the Xen recipes:

- update the Qemu package dependency for the x86 Xen tools
- add support for testing Arm 32-bit images with Qemu and testimage
- configure a standard Xen bridged network xenbr0 for Xen images in qemu to improve support for configuring guest virtual machine networking

Quoted 8 lines
Quoted 1 line

v2 coalesces these patches into a series and addresses feedback on v1

I've gone ahead and merged all three patches of the v2 series.

As for the qemuarm boot (with uboot or not), we can address that in follow up patches, since I see that Betrand did send what he's been using to the list. And I'm interested to hear if that also works for Christopher.

Using current master status I can confirm that I have now dom0 booting properly on arm64.

I now have issues with the generated DTB (command line of dom0 is wrong so I have no kernel logs, just the prompt). I am digging into this and will come back to you.

Cheers
Bertrand

Quoted 30 lines

Bruce

Quoted 13 lines

Christopher Clark (3):
xen, xen-tools: add recommendation for Qemu for non-hvm x86 qemuboot, xen-image-minimal: enable runqemu for qemuarm Xen images xen images, qemuboot: configure xenbr0 bridge for runqemu, testimage

classes/qemuboot-testimage-network.bbclass | 36 +++++- classes/qemuboot-xen-defaults.bbclass | 26 +++- classes/qemuboot-xen-u-boot.bbclass | 128 +++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 1 + recipes-extended/images/xen-image-minimal.bb | 8 +- recipes-extended/xen/xen-tools.inc | 9 +- recipes-extended/xen/xen.inc | 6 +-

Quoted 6 lines
7 files changed, 197 insertions(+), 17 deletions(-)

create mode 100644 classes/qemuboot-xen-u-boot.bbclass

--
2.25.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7255): https://lists.yoctoproject.org/g/meta-virtualization/message/7255
Mute This Topic: https://lists.yoctoproject.org/mt/90743681/3619089
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.