Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] qemu USE flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Wed Nov 20, 2013 8:44 am    Post subject: [SOLVED] qemu USE flags Reply with quote

I'd like to run qemu on my 64-bit Gentoo host computer in order to have Windows 7 (32-bit version) as the guest operating system. I'm not sure how to set the QEMU_SOFTMMU_TARGETS and the QEMU_USER_TARGETS variables in make.conf. What's the difference? equery tells me that the former is for the "system emulation target" while the latter is for "userspace emulation target". What does this mean exactly? For the moment I have emerged qemu with the following settings:
Code:
QEMU_SOFTMMU_TARGETS="i386 x86_64
QEMU_USER_TARGETS="i386 x86_64

P.S. I chose the 32-bit version of Windows 7 instead of the 64-bit version because here Microsoft says it requires less hardware resources (in particular 1 GiB of RAM instead of 2 GiB).


Last edited by fturco on Wed Nov 20, 2013 10:41 am; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Nov 20, 2013 9:41 am    Post subject: Reply with quote

This is not documented as I see. According to those files
Code:
/usr/portage/profiles/desc/qemu_softmmu_targets.desc
/usr/portage/profiles/desc/qemu_user_targets.desc

the first variable define the architectures that will be emulated and the second variable define the userspaces architectures that will be emulated. It's look to define which binaries will be generated, qemu-system-i386 and/or qemu-i386, qemu-system-x86_64 and/or qemu-x86_64 and so on.

With your variables setup, you can emulate 32 bits only IBM/PC compatibles processors and 64 bits processors that can execute 32 bits applications too. So, you can install Windows 7 32 bits with qemu-system-i386 and qemu-system-x86_64 executables.
_________________
Paul
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Wed Nov 20, 2013 9:48 am    Post subject: Reply with quote

But what's the difference between qemu-i386 and qemu-system-i386, for example?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Nov 20, 2013 9:54 am    Post subject: Reply with quote

After install Qemu, have a look to the output of
Code:
qemu-system-i386 -h

and
Code:
qemu-i386 -h

The first options are for the guest environment and the second one is for the host environment as I understand.
_________________
Paul
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Nov 20, 2013 10:02 am    Post subject: Reply with quote

From /usr/share/doc/qemu-1.5.3/html/qemu-doc.html
Code:
1.1 Features

QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed.

QEMU has two operating modes:

    Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including one or several processors and various peripherals. It can be used to launch different Operating Systems without rebooting the PC or to debug system code.
    User mode emulation. In this mode, QEMU can launch processes compiled for one CPU on another CPU. It can be used to launch the Wine Windows API emulator (http://www.winehq.org) or to ease cross-compilation and cross-debugging.

QEMU can run without a host kernel driver and yet gives acceptable performance.

For system emulation, the following hardware targets are supported:

    PC (x86 or x86_64 processor)
    ISA PC (old style PC without PCI bus)
    PREP (PowerPC processor)
    G3 Beige PowerMac (PowerPC processor)
    Mac99 PowerMac (PowerPC processor, in progress)
    Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
    Sun4u/Sun4v (64-bit Sparc processor, in progress)
    Malta board (32-bit and 64-bit MIPS processors)
    MIPS Magnum (64-bit MIPS processor)
    ARM Integrator/CP (ARM)
    ARM Versatile baseboard (ARM)
    ARM RealView Emulation/Platform baseboard (ARM)
    Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor)
    Luminary Micro LM3S811EVB (ARM Cortex-M3)
    Luminary Micro LM3S6965EVB (ARM Cortex-M3)
    Freescale MCF5208EVB (ColdFire V2).
    Arnewsh MCF5206 evaluation board (ColdFire V2).
    Palm Tungsten|E PDA (OMAP310 processor)
    N800 and N810 tablets (OMAP2420 processor)
    MusicPal (MV88W8618 ARM processor)
    Gumstix "Connex" and "Verdex" motherboards (PXA255/270).
    Siemens SX1 smartphone (OMAP310 processor)
    AXIS-Devboard88 (CRISv32 ETRAX-FS).
    Petalogix Spartan 3aDSP1800 MMU ref design (MicroBlaze).
    Avnet LX60/LX110/LX200 boards (Xtensa)

For user emulation, x86 (32 and 64 bit), PowerPC (32 and 64 bit), ARM, MIPS (32 bit only), Sparc (32 and 64 bit), Alpha, ColdFire(m68k), CRISv32 and MicroBlaze CPUs are supported.

_________________
Paul
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Wed Nov 20, 2013 10:41 am    Post subject: Reply with quote

So I need the "full system emulation" mode. I tried recompiling qemu with a minimal set of values:
Code:
QEMU_SOFTMMU_TARGETS="i386"
QEMU_USER_TARGETS="

And it still works (qemu-system-i386). But all things considered I think I'll just stick with a more complete set of features, because I could have other needs in the future:
Code:
QEMU_SOFTMMU_TARGETS="i386 x86_64
QEMU_USER_TARGETS="i386 x86_64

Thank you Logicien for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum