[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation



On Tue, 18 Feb 2025, Andrew Cooper wrote:
> On 18/02/2025 11:20 am, Philippe Mathieu-Daudé wrote:
> > Hi,
> >
> > Adding Xen community.
> >
> > On 8/2/25 21:57, Richard Henderson wrote:
> >> Require a 64-bit host binary to spawn a 64-bit guest.
> >>
> >> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
> >> Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
> >> Signed-off-by: Richard Henderson <richard.henderson@xxxxxxxxxx>
> >> ---
> >>   meson.build | 9 +++++++--
> >>   1 file changed, 7 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meson.build b/meson.build
> >> index 1af8aeb194..911955cfa8 100644
> >> --- a/meson.build
> >> +++ b/meson.build
> >> @@ -304,9 +304,14 @@ else
> >>   endif
> >>   accelerator_targets = { 'CONFIG_KVM': kvm_targets }
> >>   -if cpu in ['x86', 'x86_64']
> >> +if cpu == 'x86'
> >> +  xen_targets = ['i386-softmmu']
> >> +elif cpu == 'x86_64'
> >>     xen_targets = ['i386-softmmu', 'x86_64-softmmu']
> >> -elif cpu in ['arm', 'aarch64']
> >> +elif cpu == 'arm'
> >> +  # i386 emulator provides xenpv machine type for multiple
> >> architectures
> >> +  xen_targets = ['i386-softmmu']
> >
> > Is actually someone *testing* this config? I'm having hard time building
> > it, so am very suspicious about how it runs, and start to wonder if I'm
> > not just wasting my time (as could be our CI).
> 
> It was intentional.  I believe it was Stefano (CC'd) who introduced it.
> 
> Xen uses qemu-system-i386 everywhere because qemu-system-x86_64 doesn't
> make compatible VMs.  I'm not sure why; I suspect it's bugs in the Xen
> machine types, but I don't know QEMU well enough to be sure.
> 
> Another thing that (at least, was) tied to qemu-system-i386 was using
> Qemu as a XenBlk <-> QCOW adapter, at which point it wasn't even really
> a system emulator, just a paravirtual disk implementation.
> 
> This is, AIUI, what ARM wants with the xenpv machine.  If there's a
> better way to do this, please do say.
> 
> 
> Looking through Xen's CI, I can't see any of the ARM builds building
> QEMU at all.  I think it's quite possible it's not tested any more.

Hi all,

I answered on a similar question recently:
https://marc.info/?l=qemu-devel&m=173862237031104&w=2

In short, while QEMU for x86 HVM guest is required, QEMU is not required
for x86 PVH guests, and ARM guests. The model is different and QEMU is
only providing PV backends or virtio backends if the VM is configured
that way. You can have a fully functional VM without QEMU (or other
virtio backends provider).

In this context, the original integration of QEMU for Xen on ARM was
done reusing the qemu-system-i386 target. But Edgar recently upstreamed
a much better newer machine that is cleaner, simpler and faster: XenPVH
(see hw/arm/xen-pvh.c and hw/i386/xen/xen-pvh.c). So we don't need
qemu-system-i386 on either ARM32 or ARM64 anymore.

Moreover, for ARM32 specifically, I think it would be OK to remove QEMU
support for ARM32 Xen machines in general because of the reasons I wrote
in the other email and above here.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.