adding Irix (and, to a lesser extent, Solaris) userland emulation to QEMU
Go to file
john cooper b5ec5ce0e3 Add cpu model configuration support..
This is a reimplementation of prior versions which adds
the ability to define cpu models for contemporary processors.
The added models are likewise selected via -cpu <name>,
and are intended to displace the existing convention
of "-cpu qemu64" augmented with a series of feature flags.

A primary motivation was determination of a least common
denominator within a given processor class to simplify guest
migration.  It is still possible to modify an arbitrary model
via additional feature flags however the goal here was to
make doing so unnecessary in typical usage.  The other
consideration was providing models names reflective of
current processors.  Both AMD and Intel have reviewed the
models in terms of balancing generality of migration vs.
excessive feature downgrade relative to released silicon.

This version of the patch replaces the prior hard wired
definitions with a configuration file approach for new
models.  Existing models are thus far left as-is but may
easily be transitioned to (or may be overridden by) the
configuration file representation.

Proposed new model definitions are provided here for current
AMD and Intel processors.  Each model consists of a name
used to select it on the command line (-cpu <name>), and a
model_id which corresponds to a least common denominator
commercial instance of the processor class.

A table of names/model_ids may be queried via "-cpu ?model":

        :
    x86       Opteron_G3  AMD Opteron 23xx (Gen 3 Class Opteron)
    x86       Opteron_G2  AMD Opteron 22xx (Gen 2 Class Opteron)
    x86       Opteron_G1  AMD Opteron 240 (Gen 1 Class Opteron)
    x86          Nehalem  Intel Core i7 9xx (Nehalem Class Core i7)
    x86           Penryn  Intel Core 2 Duo P9xxx (Penryn Class Core 2)
    x86           Conroe  Intel Celeron_4x0 (Conroe/Merom Class Core 2)
        :

Also added is "-cpu ?dump" which exhaustively outputs all config
data for all defined models, and "-cpu ?cpuid" which enumerates
all qemu recognized CPUID feature flags.

The pseudo cpuid flag 'check' when added to the feature flag list
will warn when feature flags (either implicit in a cpu model or
explicit on the command line) would have otherwise been quietly
unavailable to a guest:

    # qemu-system-x86_64 ... -cpu Nehalem,check
    warning: host cpuid 0000_0001 lacks requested flag 'sse4.2|sse4_2' [0x00100000]
    warning: host cpuid 0000_0001 lacks requested flag 'popcnt' [0x00800000]

A similar 'enforce' pseudo flag exists which in addition
to the above causes qemu to error exit if requested flags are
unavailable.

Configuration data for a cpu model resides in the target config
file which by default will be installed as:

    /usr/local/etc/qemu/target-<arch>.conf

The format of this file should be self explanatory given the
definitions for the above six models and essentially mimics
the structure of the static x86_def_t x86_defs.

Encoding of cpuid flags names now allows aliases for both the
configuration file and the command line which reconciles some
Intel/AMD/Linux/Qemu naming differences.

This patch was tested relative to qemu.git.

Signed-off-by: john cooper <john.cooper@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-22 16:16:17 -06:00
QMP QMP: spec: Capability negotiation updates 2010-02-10 12:46:05 -06:00
audio
block qcow2: Fix access after end of array 2010-02-19 15:53:54 -06:00
bsd-user bsd/darwin-user: mmap_frag() users only check for -1 error 2010-01-31 13:41:07 +00:00
darwin-user bsd/darwin-user: mmap_frag() users only check for -1 error 2010-01-31 13:41:07 +00:00
default-configs
docs
fpu arm host: fix compiler warning 2010-02-06 23:16:05 +01:00
gdb-xml
hw Fix lost serial TX interrupts. Report receive overruns. 2010-02-22 16:16:16 -06:00
linux-user Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
net net: Fix bogus "Warning: vlan 0 with no nics" with -device 2010-02-19 12:12:46 -06:00
pc-bios Update OpenBIOS images to r683 2010-02-22 20:42:56 +00:00
roms seabios: use correct submodule hash 2010-02-03 12:36:25 -06:00
slirp don't dereference NULL after failed strdup 2010-02-10 14:00:53 -06:00
sysconfigs/target Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
target-alpha Fix incorrect exception_index use 2010-02-14 07:23:50 +00:00
target-arm target-arm: support thumb exception handlers 2010-02-19 15:20:21 +00:00
target-cris cris: Mask interrupts on dslots for CRISv10. 2010-02-20 19:17:29 +01:00
target-i386 Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
target-m68k remove dead m68k definitions 2010-02-18 20:37:25 +00:00
target-microblaze microblaze: Improve brk emulation. 2010-02-20 14:04:01 +01:00
target-mips target-mips: don't call cpu_loop_exit() from helper.c 2010-02-06 17:23:33 +01:00
target-ppc PPC: Add timer when running KVM 2010-02-14 16:10:54 +02:00
target-s390x Fix incorrect exception_index use 2010-02-14 07:23:50 +00:00
target-sh4 Fix incorrect exception_index use 2010-02-14 07:23:50 +00:00
target-sparc target-sparc: fix --enable-debug build 2010-02-20 13:09:57 +02:00
tcg tcg/ppc: Fix typo 2010-02-23 00:50:03 +03:00
tests
.gitignore Documentation: Add build support for documentation in pdf format 2010-02-10 11:56:56 -06:00
.gitmodules
CODING_STYLE
COPYING
COPYING.LIB
Changelog
LICENSE
MAINTAINERS Update MAINTAINERS 2010-02-06 19:24:42 +01:00
Makefile Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
Makefile.hw
Makefile.objs virtio-console: Rename virtio-serial.c back to virtio-console.c 2010-01-26 15:42:02 -06:00
Makefile.target Don't compile rwhandler.c for user targets 2010-02-20 09:27:38 +00:00
Makefile.user
README
TODO
VERSION
a.out.h
acl.c
acl.h
aes.c
aes.h
aio.c
alpha-dis.c
alpha.ld
arm-dis.c
arm-semi.c
arm.ld
async.c
balloon.h virtio: Add memory statistics reporting to the balloon driver 2010-01-26 17:08:03 -06:00
block-migration.c Try not to exceed max downtime on stage3 2010-02-09 16:56:14 -06:00
block-migration.h
block.c block: more read-only changes, related to backing files 2010-02-19 15:32:15 -06:00
block.h block: BLOCK_IO_ERROR QMP event 2010-02-10 11:57:03 -06:00
block_int.h block: more read-only changes, related to backing files 2010-02-19 15:32:15 -06:00
bswap.h bwap: add qemu_bswap helper 2010-02-14 16:10:53 +02:00
bt-host.c
bt-host.h
bt-vhci.c
buffered_file.c Do not use dprintf 2010-02-07 02:03:50 +03:00
buffered_file.h
cache-utils.c Add FreeBSD/ppc host ppc_init_cacheline_sizes() implementation. 2010-02-20 01:37:33 +03:00
cache-utils.h
check-qdict.c
check-qfloat.c
check-qint.c
check-qjson.c
check-qlist.c
check-qstring.c
cmd.c
cmd.h
cocoa.m
config.h
configure mingw32: Enable C99/POSIX format strings 2010-02-19 15:32:15 -06:00
console.c move default allocator to console.c 2010-02-19 15:18:16 -06:00
console.h move default allocator to console.c 2010-02-19 15:18:16 -06:00
cpu-all.h kvm: Flush coalesced MMIO buffer periodly 2010-02-03 19:47:33 -02:00
cpu-common.h qemu: memory notifiers 2010-02-09 16:56:13 -06:00
cpu-defs.h KVM: Move and rename regs_modified 2010-02-03 19:47:34 -02:00
cpu-exec.c Add FreeBSD/ppc host ucontext definitions. 2010-02-20 01:37:33 +03:00
create_config
cris-dis.c
curses.c
curses_keys.h
cutils.c
d3des.c
d3des.h
def-helper.h
device_tree.c
device_tree.h
dis-asm.h
disas.c
disas.h
dma-helpers.c
dma.h
dyngen-exec.h
elf.h tcg-i386: Implement small forward branches. 2010-02-06 22:23:39 +01:00
envlist.c
envlist.h
exec-all.h
exec.c kvm: move kvm to use memory notifiers 2010-02-09 16:56:13 -06:00
feature_to_c.sh
gdbstub.c cris: Add CRISv10 gdbstub support. 2010-02-20 19:51:56 +01:00
gdbstub.h
gen-icount.h
host-utils.c
host-utils.h
hpet.h
hppa-dis.c
hppa.ld
hxtool
i386-dis.c
i386.ld Fix missing symbols in .rel/.rela.plt sections 2010-02-06 22:22:27 +01:00
ia64.ld
input.c
ioport-user.c
ioport.c
ioport.h
json-lexer.c json: fix PRId64 on Win32 2010-02-10 12:47:58 -06:00
json-lexer.h
json-parser.c json: fix PRId64 on Win32 2010-02-10 12:47:58 -06:00
json-parser.h
json-streamer.c
json-streamer.h
keymaps.c
keymaps.h
kvm-all.c kvm: reduce code duplication in config_iothread 2010-02-10 12:45:04 -06:00
kvm.h kvm: move kvm to use memory notifiers 2010-02-09 16:56:13 -06:00
libfdt_env.h
linux-aio.c
m68k-dis.c
m68k-semi.c
m68k.ld
microblaze-dis.c
migration-exec.c Do not use dprintf 2010-02-07 02:03:50 +03:00
migration-fd.c Do not use dprintf 2010-02-07 02:03:50 +03:00
migration-tcp.c Do not use dprintf 2010-02-07 02:03:50 +03:00
migration-unix.c Do not use dprintf 2010-02-07 02:03:50 +03:00
migration.c Monitor: Convert do_migrate() to cmd_new_ret() 2010-02-19 15:18:17 -06:00
migration.h Monitor: Convert do_migrate() to cmd_new_ret() 2010-02-19 15:18:17 -06:00
mips-dis.c
mips.ld
module.c
module.h
monitor.c Fix hanging user monitor when using balloon command 2010-02-19 15:32:15 -06:00
monitor.h Monitor: Convert do_change() to cmd_new_ret() 2010-02-19 15:18:17 -06:00
nbd.c
nbd.h
net-checksum.c
net.c Allow const QemuOptDesc 2010-02-21 16:01:30 +00:00
net.h net: Fix bogus "Warning: vlan 0 with no nics" with -device 2010-02-19 12:12:46 -06:00
osdep.c fix placement of config-host.h inclusion 2010-02-10 11:56:56 -06:00
osdep.h
path.c
pci-ids.txt
posix-aio-compat.c posix-aio-compat.c: fix warning with _FORTIFY_SOURCE 2010-01-26 14:59:19 -06:00
ppc-dis.c
ppc.ld
ppc64.ld
qbool.c
qbool.h
qdict-test-data.txt
qdict.c QDict: New qdict_get_double() 2010-02-03 12:36:25 -06:00
qdict.h QDict: New qdict_get_double() 2010-02-03 12:36:25 -06:00
qemu-aio.h
qemu-binfmt-conf.sh
qemu-char.c add close callback for tty-based char device 2010-02-22 16:16:17 -06:00
qemu-char.h
qemu-common.h Merge remote branch 'mst/for_anthony' into staging 2010-02-19 13:02:10 -06:00
qemu-config.c Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
qemu-config.h Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
qemu-doc.texi Documentation: Enhance documentation (index, keywords) 2010-02-10 12:44:15 -06:00
qemu-img-cmds.hx
qemu-img.c qemu-img: Fix error message 2010-02-19 15:53:54 -06:00
qemu-img.texi
qemu-io.c block: kill BDRV_O_CREAT 2010-01-26 15:42:02 -06:00
qemu-lock.h
qemu-log.h
qemu-malloc.c
qemu-monitor.hx Monitor: Rename cmd_new_ret() 2010-02-19 15:18:17 -06:00
qemu-nbd.c win32: pair qemu_memalign() with qemu_vfree() 2010-01-26 16:41:06 -06:00
qemu-nbd.texi
qemu-objects.h
qemu-option.c Allow const QemuOptDesc 2010-02-21 16:01:30 +00:00
qemu-option.h Allow const QemuOptDesc 2010-02-21 16:01:30 +00:00
qemu-options.hx Documentation: Add command line options to function index 2010-02-10 12:44:25 -06:00
qemu-queue.h
qemu-sockets.c fix inet_parse typo 2010-02-10 12:46:06 -06:00
qemu-tech.texi Documentation: Use UTF-8 encoding and fix one wrong encoding 2010-02-10 12:43:04 -06:00
qemu-thread.c
qemu-thread.h
qemu-timer.h add qemu_get_clock_ns 2010-02-09 16:56:13 -06:00
qemu-tool.c
qemu.sasl
qemu_socket.h
qerror.c Revert "QError: New QERR_INVALID_CPU_INDEX" 2010-02-03 12:39:01 -06:00
qerror.h Revert "QError: New QERR_INVALID_CPU_INDEX" 2010-02-03 12:39:01 -06:00
qfloat.c
qfloat.h
qint.c
qint.h
qjson.c qjson: Improve debugging 2010-02-10 13:46:17 -06:00
qjson.h
qlist.c
qlist.h QList: Introduce QLIST_FOREACH_ENTRY() 2010-01-26 15:42:01 -06:00
qobject.h
qstring.c
qstring.h
readline.c cope with printf macro definition in readline.c 2010-02-08 12:12:40 +03:00
readline.h
rules.mak
rwhandler.c Don't compile rwhandler.c for user targets 2010-02-20 09:27:38 +00:00
rwhandler.h rwhandler: simplified way to register for mem/io 2010-02-14 16:10:53 +02:00
s390-dis.c
s390.ld
savevm.c fix savevm command without id or tag 2010-01-26 15:45:06 -06:00
sdl.c remove knowledge of defaultallocator_free_displaysurface from sdl.c 2010-02-19 15:18:16 -06:00
sdl_keysym.h
sdl_zoom.c
sdl_zoom.h
sdl_zoom_template.h
sh4-dis.c
softmmu-semi.h
softmmu_defs.h
softmmu_exec.h
softmmu_header.h
softmmu_template.h softmmu: Dont clobber retaddr in slow_ldx(). 2010-01-28 22:46:13 +01:00
sparc-dis.c
sparc.ld
sparc64.ld
sysemu.h Monitor: Convert pci_device_hot_remove() to cmd_new_ret() 2010-02-19 15:18:17 -06:00
targphys.h
tcg-runtime.c
texi2pod.pl
thunk.c
thunk.h
translate-all.c
uboot_image.h
usb-bsd.c
usb-linux.c Do not use dprintf 2010-02-07 02:03:50 +03:00
usb-stub.c
vgafont.h
vl.c Add cpu model configuration support.. 2010-02-22 16:16:17 -06:00
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-tls.c
vnc-tls.h
vnc.c vnc: Migrate to using QTAILQ instead of custom implementation 2010-02-10 12:45:05 -06:00
vnc.h Increase VNC_MAX_WIDTH 2010-02-10 14:00:53 -06:00
vnc_keysym.h
vnchextile.h
x86_64.ld Fix missing symbols in .rel/.rela.plt sections 2010-02-06 22:22:27 +01:00
x_keymap.c
x_keymap.h

README

Read the documentation in qemu-doc.html.

Fabrice Bellard.