Gentoo Archives: gentoo-user

From: Wang Xuerui <idontknw.wang@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Question about qemu QEMU_SOFTMMU_TARGETS and QEMU_USER_TARGETS
Date: Mon, 22 Jul 2013 06:54:13
Message-Id: CABK5mSatO6=rynCyjV+4beqNq2D4CcrvZOgcdKYrdh46PY9eaw@mail.gmail.com
In Reply to: [gentoo-user] Question about qemu QEMU_SOFTMMU_TARGETS and QEMU_USER_TARGETS by Walter Dnes
1 2013/7/22 Walter Dnes <waltdnes@××××××××.org>:
2 > I'm usually pretty good a Google, but I've run into a brick wall with
3 > qemu's QEMU_SOFTMMU_TARGETS and QEMU_USER_TARGETS settings. I find that
4 > wine on a 64-bit-only machine does not support 32-bit Windows programs.
5 > Years ago, I was able to build a 32-bit qemu Gentoo guest, and run wine
6 > 32-bit mode on that. I need to try it again, but I have no clue what
7 > QEMU_SOFTMMU_TARGETS and QEMU_USER_TARGETS settings to use. I repeat,
8 > I'm on a 64-bit Intel machine, and I want to emulate Intel 32-bit. Do
9 > these variables refer to the guest architecture or the host
10 > architecture?
11 >
12 > In plain English, given "host" and "guest" architectures which of the
13 > following combinations do I use...
14 >
15 > QEMU_SOFTMMU_TARGETS=host QEMU_USER_TARGETS=host
16 > QEMU_SOFTMMU_TARGETS=host QEMU_USER_TARGETS=guest
17 > QEMU_SOFTMMU_TARGETS=guest QEMU_USER_TARGETS=host
18 > QEMU_SOFTMMU_TARGETS=guest QEMU_USER_TARGETS=guest
19
20 Well, if all you want to do is run a 32-bit Wine on an amd64 box, full
21 hardware virtualization is not needed. According to this answer:
22
23 http://askubuntu.com/a/231605
24
25 All you need to do is ensure the proper WINEARCH and WINEPREFIX is
26 used when invoking the 32-bit program. Wine must be built with
27 ABI_X86="64 32", though.
28
29 As for the QEMU_{SOFTMMU,USER}_TARGETS variables, those USER targets
30 are for user-space emulation only, i.e. used to execute Linux binaries
31 from a different architecture, thus not what you need. Something like
32 this in make.conf may suffice:
33
34 QEMU_SOFTMMU_TARGETS="i386 x86_64" # only enable x86 and x86_64
35 QEMU_USER_TARGETS="" # prevent user-space emulation from being built
36
37 Note the variables are not expanded, so an empty value is used to
38 clear QEMU_USER_TARGETS instead of "-*", as you might do otherwise.