On Mon, 17 Sep 2012, Stefano Stabellini wrote: > On Mon, 17 Sep 2012, Peter Maydell wrote: > > On 17 September 2012 17:00, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > > > --- > > > configure | 63 > > > +++++++++++++++++++++++++++++++++++++-------------------------- > > > 1 file modificato, 37 inserzioni(+), 26 rimozioni(-) > > > > > > diff --git a/configure b/configure > > > index 7e23309..cea8db0 100755 > > > --- a/configure > > > +++ b/configure > > > @@ -3664,6 +3664,31 @@ if test "$linux" = "yes" ; then > > > fi > > > fi > > > > > > +supported_kvm_target() { > > > + test "$kvm" = "yes" || return 1 > > > + test "$target_softmmu" = "yes" || return 1 > > > + case "$target_arch2:$cpu" in > > > + i386:i386 | i386:x86_64 | x86_64:i386 | x86_64:x86_64 | \ > > > + ppc:ppc | ppcemb:ppc | ppc64:ppc | \ > > > + ppc:ppc64 | ppcemb:ppc64 | ppc64:ppc64 | \ > > > + s390x:s390x) > > > + return 0 > > > + ;; > > > + esac > > > + return 1 > > > +} > > > + > > > +supported_xen_target() { > > > + test "$xen" = "yes" || return 1 > > > + test "$target_softmmu" = "yes" || return 1 > > > + case "$target_arch2:$cpu" in > > > + i386:i386 | i386:x86_64 | x86_64:i386 | x86_64:x86_64) > > > + return 0 > > > + ;; > > > + esac > > > + return 1 > > > +} > > > > This is a change in behaviour, isn't it? The old configure code > > enables CONFIG_XEN based only on $target_arch2, it doesn't try > > to ensure that the host and target CPU are the same architecture. > > Granted, that looks like a bug, but it should probably be fixed > > in a separate patch to this kind of refactoring patch. > > That's because the target cpu is irrelevant, QEMU never sees it (it is > only a device emulator on Xen). > I have no problems with the introduction of supported_xen_target(), but > I would prefer if you could avoid $cpu tests.
Reading again what you wrote and the relevant code, I think that you meant that both host and guest should be x86 machines (rather than one being ARM and the other x86). In that case I agree and I think it is OK to make the change in this patch. Paolo's test supports both i386:x86_64 and x86_64:i386, so I think should be OK.