enable QEMU for ARM builds
PATCH 1/1 enable QEMU for ARM builds
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.
tools/configure +2 -0
@@ -3869,6 +3869,8 @@ else case "$host_cpu" in i[3456]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esac
tools/configure.ac +2 -0
@@ -126,6 +126,8 @@ AC_ARG_WITH([system-qemu], case "$host_cpu" in i[[3456]]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esac ])
Quoted 9 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.
As I mentioned IRL we need to confirm that this doesn't end up exposing a protocol property in the xenstore backend dir of XEN_IO_PROTO_ABI_X86_* instead of XEN_IO_PROTO_ABI_ARM.
Likewise we need to be sure that the code actually implements the ARM protocol, not one of the x86 ones.
Ian.
Quoted 30 lines
Signed-off-by Stefano Stabellini <[email protected]>tools/configure +2
-0@@ -3869,6 +3869,8 @@ else case "$host_cpu" in i[3456]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esactools/configure.ac +2
-0@@ -126,6 +126,8 @@ AC_ARG_WITH([system-qemu], case "$host_cpu" in i[[3456]]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esac ])
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.
Quoted 3 lines
As I mentioned IRL we need to confirm that this doesn't end up exposing a protocol property in the xenstore backend dir of XEN_IO_PROTO_ABI_X86_* instead of
XEN_IO_PROTO_ABI_ARM.
QEMU doesn't write the protocol to xenstore. In fact the protocol is written to xenstore by the frontend so this shouldn't be a problem.
Quoted 2 lines
Likewise we need to be sure that the code actually implements the ARM protocol, not one of the x86 ones.
Sure. No matter the QEMU target architecture, qdisk and xenfb implement NATIVE as well as x86 protocols.
Quoted 33 lines
Ian.
Quoted 30 lines
Signed-off-by Stefano Stabellini <[email protected]>tools/configure +2
-0@@ -3869,6 +3869,8 @@ else case "$host_cpu" in i[3456]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esactools/configure.ac +2
-0@@ -126,6 +126,8 @@ AC_ARG_WITH([system-qemu], case "$host_cpu" in i[[3456]]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esac ])
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.
Quoted 6 lines
Quoted 3 lines
As I mentioned IRL we need to confirm that this doesn't end up exposing a protocol property in the xenstore backend dir of XEN_IO_PROTO_ABI_X86_* instead of
XEN_IO_PROTO_ABI_ARM.QEMU doesn't write the protocol to xenstore. In fact the protocol is written to xenstore by the frontend so this shouldn't be a problem.
Oh good, I was misremembering which way round it was.
Quoted 5 lines
Quoted 2 lines
Likewise we need to be sure that the code actually implements the ARM protocol, not one of the x86 ones.
Sure. No matter the QEMU target architecture, qdisk and xenfb implement NATIVE as well as x86 protocols.
When built as an ARM binary with x86 as the target architecture what does it consider to be the NATIVE protocol?
You didn't mention the ARM protocol, hopefully just an oversight?
Ian
Quoted 22 lines · Ian Campbell
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.Quoted 6 lines
Quoted 3 lines
As I mentioned IRL we need to confirm that this doesn't end up exposing a protocol property in the xenstore backend dir of XEN_IO_PROTO_ABI_X86_* instead of
XEN_IO_PROTO_ABI_ARM.QEMU doesn't write the protocol to xenstore. In fact the protocol is written to xenstore by the frontend so this shouldn't be a problem.
Oh good, I was misremembering which way round it was.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Likewise we need to be sure that the code actually implements the ARM protocol, not one of the x86 ones.
Sure. No matter the QEMU target architecture, qdisk and xenfb implement NATIVE as well as x86 protocols.
When built as an ARM binary with x86 as the target architecture what does it consider to be the NATIVE protocol?
ARM
Quoted 1 line
You didn't mention the ARM protocol, hopefully just an oversight?
NATIVE is defined as ARM when building on arm:
xen/include/public/io/protocols.h
and because aarch64 and arm use the same protocol qemu don't need to special case them.
Ian Campbell
Acked-byQuoted 35 lines · Stefano Stabellini
Quoted 22 lines · Ian Campbell
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.Quoted 6 lines
Quoted 3 lines
As I mentioned IRL we need to confirm that this doesn't end up exposing a protocol property in the xenstore backend dir of XEN_IO_PROTO_ABI_X86_* instead of
XEN_IO_PROTO_ABI_ARM.QEMU doesn't write the protocol to xenstore. In fact the protocol is written to xenstore by the frontend so this shouldn't be a problem.
Oh good, I was misremembering which way round it was.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Likewise we need to be sure that the code actually implements the ARM protocol, not one of the x86 ones.
Sure. No matter the QEMU target architecture, qdisk and xenfb implement NATIVE as well as x86 protocols.
When built as an ARM binary with x86 as the target architecture what does it consider to be the NATIVE protocol?
ARM
Quoted 8 lines
Quoted 1 line
You didn't mention the ARM protocol, hopefully just an oversight?
NATIVE is defined as ARM when building on arm:
xen/include/public/io/protocols.hand because aarch64 and arm use the same protocol qemu don't need to special case them.
Arguably that's a bug in Qemu when building for target!=arm, but I suppose it works in our favour right now, but bear it in mind for when you review the patch to "fix" this bug ;-)
I think application of this patch is dependent on the headers movement one, right?
Ian.
Quoted 45 lines · Ian Campbell
Quoted 35 lines · Stefano Stabellini
Quoted 22 lines · Ian Campbell
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.Quoted 6 lines
Quoted 3 lines
As I mentioned IRL we need to confirm that this doesn't end up exposing a protocol property in the xenstore backend dir of XEN_IO_PROTO_ABI_X86_* instead of
XEN_IO_PROTO_ABI_ARM.QEMU doesn't write the protocol to xenstore. In fact the protocol is written to xenstore by the frontend so this shouldn't be a problem.
Oh good, I was misremembering which way round it was.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Likewise we need to be sure that the code actually implements the ARM protocol, not one of the x86 ones.
Sure. No matter the QEMU target architecture, qdisk and xenfb implement NATIVE as well as x86 protocols.
When built as an ARM binary with x86 as the target architecture what does it consider to be the NATIVE protocol?
ARM
Quoted 8 lines
Quoted 1 line
You didn't mention the ARM protocol, hopefully just an oversight?
NATIVE is defined as ARM when building on arm:
xen/include/public/io/protocols.hand because aarch64 and arm use the same protocol qemu don't need to special case them.
Quoted 8 lines
Arguably that's a bug in Qemu when building for target!=arm, but I suppose it works in our favour right now, but bear it in mind for when you review the patch to "fix" this bug ;-)
Acked-by Ian Campbell <[email protected]>I think application of this patch is dependent on the headers movement one, right?
Yep. Once the following series is applied, it can go in:
Quoted 2 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
In the Ubuntu packaging I moved to not build qemu from Xen to just depend on the qemu package (which should be the same) at least for x86. Since I have no Arm hw on my own, all the arm builds are more of a theoretical exercise (no feedback from anyone actually trying). This sounds like I should (again) depend on a qemu-system-x86, even for the Arm packages. Is that right?
-Stefan
Quoted 43 lines
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.Signed-off-by Stefano Stabellini <[email protected]>tools/configure +2
-0@@ -3869,6 +3869,8 @@ else case "$host_cpu" in i[3456]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esactools/configure.ac +2
-0@@ -126,6 +126,8 @@ AC_ARG_WITH([system-qemu], case "$host_cpu" in i[[3456]]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esac ])_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · Stefan Bader
Quoted 2 lines · Stefano Stabellini
Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, disk and framebuffer in particular.
In the Ubuntu packaging I moved to not build qemu from Xen to just depend on the qemu package (which should be the same) at least for x86. Since I have no Arm hw on my own, all the arm builds are more of a theoretical exercise (no feedback from anyone actually trying).
This sounds like I should (again) depend on a qemu-system-x86, even for the Arm packages. Is that right?
Right.
If you have Xen installed on an ARM box and you build QEMU with --target-list=i386-softmmu, it should pick up Xen support automatically.
Quoted 45 lines
-Stefan
Quoted 43 lines
Ideally we would also modify the configure options to only build what is
necessary: a machine just for PV backends. However that is a work in progress and not yet available in QEMU (see
http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build the usual i386 target, even though no i386 emulation is going to be done by qemu-xen on ARM.Signed-off-by Stefano Stabellini <[email protected]>tools/configure +2
-0@@ -3869,6 +3869,8 @@ else case "$host_cpu" in i[3456]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esactools/configure.ac +2
-0@@ -126,6 +126,8 @@ AC_ARG_WITH([system-qemu], case "$host_cpu" in i[[3456]]86|x86_64) qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; *) qemu_xen=n;; esac ])_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel