On Thu, Oct 29, 2020 at 6:01 AM Alex Bennée <alex.ben...@linaro.org> wrote: > > > Stefano Stabellini <sstabell...@kernel.org> writes: > > > On Wed, 28 Oct 2020, Alex Bennée wrote: > >> Xen is supported on aarch64 although weirdly using the i386-softmmu > >> model. Checking based on the host CPU meant we never enabled Xen > >> support. It would be nice to enable CONFIG_XEN for aarch64-softmmu to > >> make it not seem weird but that will require further build surgery. > >> > >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > >> Cc: Masami Hiramatsu <masami.hirama...@linaro.org> > >> Cc: Stefano Stabellini <sstabell...@kernel.org> > >> Cc: Anthony Perard <anthony.per...@citrix.com> > >> Cc: Paul Durrant <p...@xen.org> > >> Fixes: 8a19980e3f ("configure: move accelerator logic to meson") > >> --- > >> meson.build | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/meson.build b/meson.build > >> index 835424999d..f1fcbfed4c 100644 > >> --- a/meson.build > >> +++ b/meson.build > >> @@ -81,6 +81,8 @@ if cpu in ['x86', 'x86_64'] > >> 'CONFIG_HVF': ['x86_64-softmmu'], > >> 'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'], > >> } > >> +elif cpu in [ 'arm', 'aarch64' ] > >> + accelerator_targets += { 'CONFIG_XEN': ['i386-softmmu'] } > >> endif > > > > This looks very reasonable -- the patch makes sense.
A comment would be useful to explain that Arm needs i386-softmmu for the xenpv machine. > > > > However I have two questions, mostly for my own understanding. I tried > > to repro the aarch64 build problem but it works at my end, even without > > this patch. > > Building on a x86 host or with cross compiler? > > > I wonder why. I suspect it works thanks to these lines in > > meson.build: I think it's a runtime and not a build problem. In osstest, Xen support was detected and configured, but CONFIG_XEN wasn't set for Arm. So at runtime xen_available() returns 0, and QEMU doesn't start with "qemu-system-i386: -xen-domid 1: Option not supported for this target" I posted my investigation here: https://lore.kernel.org/xen-devel/cakf6xpss8kpgovzrkitpz63bhbvbjxrtywdhekzuo2q1kem...@mail.gmail.com/ Regards, Jason