Statistics
| Branch: | Revision:

root / target-i386 @ 4d5b97da

# Date Author Comment
a9321a4d 10/01/2012 04:04 pm H. Peter Anvin

x86: Implement SMEP and SMAP

This patch implements Supervisor Mode Execution Prevention (SMEP) and
Supervisor Mode Access Prevention (SMAP) for x86. The purpose of the
patch, obviously, is to help kernel developers debug the support for
those features.
...

4a19e505 09/30/2012 02:11 pm Eduardo Habkost

i386: -cpu help: remove reference to specific CPUID leaves/registers

The -cpu configuration interface is based on a list of feature names or
properties, on a single namespace, so there's no need to mention on
which CPUID leaf/register each flag is located....

3b671a40 09/30/2012 02:11 pm Eduardo Habkost

i386: cpu: eliminate duplicate feature names

Instead of having duplicate feature names on the ext2_feature array for
the AMD feature bit aliases, we keep the feature names only on the
feature_name[] array, and copy the corresponding bits to
cpuid_ext2_features in case the CPU vendor is AMD....

60032ac0 09/30/2012 02:11 pm Eduardo Habkost

i386: cpu: replace EXT2_FEATURE_MASK with CPUID_EXT2_AMD_ALIASES

Both constants have the same value, but CPUID_EXT2_AMD_ALIASES is
defined without using magic numbers.

Signed-off-by: Eduardo Habkost <>
Reviewed-by: Don Slutz <>...

8fad4b44 09/30/2012 02:11 pm Eduardo Habkost

i386: kvm: use a #define for the set of alias feature bits

Instea of using a hardcoded hex constant, define CPUID_EXT2_AMD_ALIASES
as the set of CPUID[8000_0001].EDX bits that on AMD are the same as the
bits of CPUID1.EDX.

Signed-off-by: Eduardo Habkost <>...

b1f46793 09/30/2012 02:10 pm Eduardo Habkost

i386: kvm: bit 10 of CPUID[8000_0001].EDX is reserved

Bit 10 of CPUID[8000_0001].EDX is not defined as an alias of
CPUID1.EDX10, so do not duplicate it on
kvm_arch_get_supported_cpuid().

Signed-off-by: Eduardo Habkost <>
Reviewed-By: Igor Mammedov <>...

fdefe51c 09/27/2012 10:38 pm Richard Henderson

Emit debug_insn for CPU_LOG_TB_OP_OPT as well.

For all targets that currently call tcg_gen_debug_insn_start,
add CPU_LOG_TB_OP_OPT to the condition that gates it.

This is useful for comparing optimization dumps, when the
pre-optimization dump is merely noise....

3988475b 09/26/2012 12:06 am Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    w32: Always use standard instead of native format strings
    net/socket: Fix compiler warning (regression for MinGW)
    linux-user: Remove redundant null check and replace free by g_free...
2e84849a 09/23/2012 09:11 am Don Slutz

target-i386: Allow tsc-frequency to be larger then 2.147G

The check using INT_MAX (2147483647) is wrong in this case.

Signed-off-by: Fred Oliveira <>
Signed-off-by: Don Slutz <>
Signed-off-by: Stefan Hajnoczi <>

473955e5 09/21/2012 04:12 pm Andreas Färber

target-i386: Drop unused setscalar() macro

It was only used by now removed setfeatures() function.

Suggested-by: Igor Mammedov <>
Signed-off-by: Andreas Färber <>

6cdf8854 09/21/2012 04:12 pm Peter Maydell

target-i386: Fold -cpu ?cpuid, ?model output into -cpu help, drop ?dump

Commit c8057f95 (accidentally) disabled the ability to pass
option strings starting with '?' to the target-specific
cpu_list function, so the target-i386 specific "-cpu ?dump",
"-cpu ?cpuid" and "-cpu ?model" stopped working....

e916cbf8 09/21/2012 04:12 pm Peter Maydell

Drop cpu_list_id macro

Since the only user of the extended cpu_list_id() format
was the x86 ?model/?dump/?cpuid output, we can drop it
completely.

Signed-off-by: Peter Maydell <>
Reviewed-by: Eduardo Habkost <>...

a75b0818 09/21/2012 04:12 pm Eduardo Habkost

target-i386: Add missing CPUID_* constants

Those constants will be used by new CPU model definitions.

Signed-off-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>
Signed-off-by: Andreas Färber <>

3eca4642 09/21/2012 04:12 pm Eduardo Habkost

target-i386: Move CPU models from cpus-x86_64.conf to C

Those models are maintained by QEMU and may require compatibility code
to be added when making some changes. Keeping the data in the C source
code should make it simpler to handle those details.

Signed-off-by: Eduardo Habkost <>...

bc3e1291 09/21/2012 04:12 pm Eduardo Habkost

target-i386: x86_cpudef_setup() coding style change

Make source code lines shorter.

Signed-off-by: Eduardo Habkost <>
Reviewed-by: Don Slutz <>
Signed-off-by: Andreas Färber <>

c04321b3 09/21/2012 04:12 pm Eduardo Habkost

target-i386: Kill cpudef config section support

It's nice to have a flexible system to maintain CPU models as data, but
this is holding us from making improvements in the CPU code because it's
not using the common infra-structure, and because the machine-type data...

b139bd30 09/10/2012 03:29 pm Jan Kiszka

kvm: i386: Add services required for PCI device assignment

These helpers abstract the interaction of upcoming pci-assign with the
KVM kernel services. Put them under i386 only as other archs will
implement device pass-through via VFIO and not this classic interface....

b834b508 08/31/2012 12:36 am Stefan Weil

w32: Fix broken build

Commit ef8621b1a3b199c348606c0a11a77d8e8bf135f1 added an include
file which is not available for MinGW compilations.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

bc9a839d 08/29/2012 06:51 pm Michael S. Tsirkin

kvm: get/set PV EOI MSR

Support get/set of new PV EOI MSR, for migration.
Add an optional section for MSR value - send it
out in case MSR was changed from the default value (0).

Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Anthony Liguori <>

ef8621b1 08/29/2012 06:51 pm Anthony Liguori

target-i386: disable pv eoi to fix migration across QEMU versions

We have a problem with how we handle migration with KVM paravirt features.
We unconditionally enable paravirt features regardless of whether we know how
to migrate them.

We also don't tie paravirt features to specific machine types so an old QEMU on...

5c73b757 08/24/2012 06:44 am Matthew Ogilvie

target-i386/translate.c: mov to/from crN/drN: ignore mod bits

This instruction is always treated as a register-to-register (MOD = 11)
instruction, regardless of the encoding of the MOD field in the MODR/M
byte.

Also, Microport UNIX System V/386 v 2.1 (ca 1987) runs fine on...

76b64a7a 08/15/2012 09:26 pm Anthony Liguori

win32: provide separate macros for weak decls and definitions

mingw32 seems to want the declaration to also carry the weak attribute.
Strangely, gcc on Linux absolutely does not want the declaration to be marked
as weak. This may not be the right fix, but it seems to do the trick....

4a7443be 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 for misc helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>

2999a0b2 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 in segmentation helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Rename remains of op_helper.c to seg_helper.c.

Signed-off-by: Blue Swirl <>

92fc4b58 08/14/2012 10:01 pm Blue Swirl

x86: switch to AREG0 free mode

Add an explicit CPUX86State parameter instead of relying on AREG0.

Remove temporary wrappers and switch to AREG0 free mode.

Signed-off-by: Blue Swirl <>

d3eb5eae 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 for FPU helpers

Make FPU helpers take a parameter for CPUState instead
of relying on global env.

Introduce temporary wrappers for FPU load and store ops. Remove
wrappers for non-AREG0 code. Don't call unconverted helpers
directly.

Signed-off-by: Blue Swirl <>

f0967a1a 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 for condition code helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>

7923057b 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 for integer helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>

052e80d5 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 for SVM helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>

608badfc 08/14/2012 10:01 pm Blue Swirl

x86: avoid AREG0 for SMM helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>

329e607d 08/14/2012 10:01 pm Blue Swirl

x86: use wrappers for memory access helpers

Switch to wrapped versions of memory access functions.

Signed-off-by: Blue Swirl <>

633decd7 08/14/2012 12:12 am Anthony Liguori

Merge remote-tracking branch 'qmp/queue/qmp' into staging

  • qmp/queue/qmp: (48 commits)
    target-ppc: add implementation of query-cpu-definitions (v2)
    target-i386: add implementation of query-cpu-definitions (v2)
    qapi: add query-cpu-definitions command (v2)...
e3966126 08/13/2012 10:10 pm Anthony Liguori

target-i386: add implementation of query-cpu-definitions (v2)

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

d517872e 08/13/2012 05:25 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

  • qemu-kvm/uq/master:
    kvm: Add documentation comment for kvm_irqchip_in_kernel()
    kvm: Decouple 'GSI routing' from 'kernel irqchip'
    kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'...
d3da41e3 08/09/2012 09:44 pm Blue Swirl

Merge branch 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu

  • 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu:
    target-i386: move tcg initialization into x86_cpu_initfn()
    cleanup cpu_set_debug_excp_handler
    target-xtensa: drop usage of prev_debug_excp_handler...
f3e1bed8 08/09/2012 04:16 pm Peter Maydell

kvm: Decouple 'GSI routing' from 'kernel irqchip'

Don't assume having an in-kernel irqchip means that GSI
routing is enabled.

Signed-off-by: Peter Maydell <>
Signed-off-by: Avi Kivity <>

cc7e0ddf 08/09/2012 04:16 pm Peter Maydell

kvm: Decouple 'irqfds usable' from 'kernel irqchip'

Instead of assuming that we can use irqfds if and only if
kvm_irqchip_in_kernel(), add a bool to the KVMState which
indicates this, and is set only on x86 and only if the
irqchip is in the kernel.

The kernel documentation implies that the only thing...

614e41bc 08/09/2012 04:16 pm Peter Maydell

kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'

Decouple another x86-specific assumption about what irqchips imply.

Signed-off-by: Peter Maydell <>
Signed-off-by: Avi Kivity <>

1d31f66b 08/09/2012 04:16 pm Peter Maydell

kvm: Move kvm_allows_irq0_override() to target-i386, fix return type

kvm_allows_irq0_override() is a totally x86 specific concept:
move it to the target-specific source file where it belongs.
This means we need a new header file for the prototype:
kvm_i386.h, in line with the existing kvm_ppc.h....

dd673288 08/01/2012 04:45 pm Igor Mammedov

target-i386: move cpu halted decision into x86_cpu_reset

MP initialization protocol differs between cpu families, and for P6 and
onward models it is up to CPU to decide if it will be BSP using this
protocol, so try to model this. However there is no point in implementing...

65dee380 08/01/2012 04:45 pm Igor Mammedov

target-i386: move cpu_reset and reset callback to cpu.c

Moving reset callback into cpu object from board level and
resetting cpu at the end of x86_cpu_realize() will allow properly
create cpu object during run-time (hotplug) without calling reset externaly....

7162ab21 07/29/2012 11:45 am Vitaly Chipounov

x86: Fixed incorrect segment base address addition in 64-bits mode

According to the Intel manual
"Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volume 3", "3.4.4 Segment Loading Instructions in IA-32e Mode":

"When in compatibility mode, FS and GS overrides operate as defined by...

434acb81 07/21/2012 12:54 pm Mao, Junjie

Recognize PCID feature

This patch makes Qemu recognize the PCID feature specified from configuration or command line options.

Signed-off-by: Junjie Mao <>
Signed-off-by: Stefan Hajnoczi <>

09f06a6c 07/18/2012 10:44 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

  • qemu-kvm/uq/master:
    virtio: move common irqfd handling out of virtio-pci
    virtio: move common ioeventfd handling out of virtio-pci
    event_notifier: add event_notifier_set_handler
    memory: pass EventNotifier, not eventfd...
5d62c43a 07/10/2012 11:31 am Jan Kiszka

apic: Defer interrupt updates to VCPU thread

KVM performs TPR raising asynchronously to QEMU, specifically outside
QEMU's global lock. When an interrupt is injected into the APIC and TPR
is checked to decide if this can be delivered, a stale TPR value may be...

bedc2ac1 07/07/2012 12:06 pm Peter Maydell

target-i386: make it clearer that op table accesses don't overrun

Rephrase some of the expressions used to select an entry
in the SSE op table arrays so that it's clearer that they
don't overrun the op table array size.

Signed-off-by: Peter Maydell <>...

96d7073f 07/07/2012 12:05 pm Peter Maydell

target-i386: Remove confusing X86_64_DEF macro

The X86_64_DEF macro is a confusing way of making some terms
in a conditional only appear if TARGET_X86_64 is defined. We
only use it in two places, and in both cases this is for making
the same test, so abstract that check out into a function...

a87dacc8 07/07/2012 12:05 pm Peter Maydell

target-i386: Remove unused macros

Commit 11f8cdb removed all the uses of the X86_64_ONLY
macro. The BUGGY_64() macro has been unused for a long time:
it originally marked some ops which couldn't be enabled
because of issues with the pre-TCG code generation scheme....

11f8cdbc 07/05/2012 09:55 pm Stefan Weil

target-i386: Fix compilation with --enable-debug

commit c4baa0503d9623f1ce891f525ccd140c598bc29a improved SSE table
type safety which now raises compiler errors when latest QEMU was
configured with --enable-debug.

Fix this by splitting the SSE tables even further to separate...

a75b3e0f 07/03/2012 11:36 pm Liu, Jinsong

kvm: expose tsc deadline timer feature to guest

This patch exposes tsc deadline timer feature to guest if
1). in-kernel irqchip is used, and
2). kvm has emulated tsc deadline timer, and
3). user authorize the feature exposing via cpu or +/ tsc-deadline...

bfee7546 07/03/2012 10:57 pm Michael S. Tsirkin

kvm_pv_eoi: add flag support

Support the new PV EOI flag in kvm - it recently got merged
into kvm.git. Set by default with -cpu kvm.
Set for -cpu qemu by adding +kvm_pv_eoi.
Clear by adding -kvm_pv_eoi to -cpu option.

Signed-off-by: Michael S. Tsirkin <>...

6bada5e8 06/28/2012 11:28 pm Blue Swirl

x86: split off SVM helpers

Move SVM helpers to svm_helper.c.

Signed-off-by: Blue Swirl <>

ab109e59 06/28/2012 11:28 pm Blue Swirl

x86: split off SMM helpers

Move SMM helpers to smm_helper.c.

Signed-off-by: Blue Swirl <>

f7b2429f 06/28/2012 11:28 pm Blue Swirl

x86: split off misc helpers

Move various functions to misc_helper.c.

Signed-off-by: Blue Swirl <>

10774999 06/28/2012 11:28 pm Blue Swirl

x86: split off memory access helpers

Move memory access helpers to mem_helper.c.

Signed-off-by: Blue Swirl <>

9cc85c28 06/28/2012 11:28 pm Blue Swirl

x86: rename op_helper.c to seg_helper.c

Rename what is remaining of op_helper.c to seg_helper.c.

Signed-off-by: Blue Swirl <>

20054ef0 06/28/2012 11:28 pm Blue Swirl

x86: prepare op_helper.c for splitting

Fix coding style and a few typos.

Signed-off-by: Blue Swirl <>

77b2bc2c 06/28/2012 11:28 pm Blue Swirl

x86: avoid AREG0 for exceptions

Add an explicit CPUX86State parameter instead of relying on AREG0.

Merge raise_exception_env() to raise_exception(), likewise with
raise_exception_err_env() and raise_exception_err().

Introduce cpu_svm_check_intercept_param() and cpu_vmexit()...

599b9a5a 06/28/2012 11:28 pm Blue Swirl

x86: split off exception handlers

Move exception handlers from op_helper.c to excp_helper.c.

Signed-off-by: Blue Swirl <>

9dd69d65 06/28/2012 11:28 pm Blue Swirl

x86: avoid an extern declaration

After the previous patch, we can use the proper
declaration in a common header file.

Signed-off-by: Blue Swirl <>

e01d9d31 06/28/2012 11:28 pm Blue Swirl

x86: fix coding style in ops_sse.h

Fix coding style in ops_sse.h before next commit.

Signed-off-by: Blue Swirl <>

f299f437 06/28/2012 11:28 pm Blue Swirl

x86: split off FPU helpers

Move FPU and MMX/SSE helpers to fpu_helpers.c.

Signed-off-by: Blue Swirl <>

c4baa050 06/28/2012 11:28 pm Blue Swirl

x86: improve SSE table type safety

SSE function tables could easily be corrupted because of use
of void pointers.

Introduce function pointer types and helper variables in order
to improve type safety.

Split sse_op_table3 according to types used.

Signed-off-by: Blue Swirl <>

a04759f6 06/28/2012 11:28 pm Blue Swirl

x86: fix coding style in helper_template.h

Fix coding style in helper_template.h before next commit.

Signed-off-by: Blue Swirl <>

38de4c46 06/28/2012 11:28 pm Blue Swirl

x86: split condition code and shift templates

Move shift templates from helper_template.h to
shift_helper_template.h and the condition code helpers
to cc_helper_template.h.

Signed-off-by: Blue Swirl <>

997ff0d9 06/28/2012 11:28 pm Blue Swirl

x86: prepare eflags helpers for general use

Adjust function names and add an explicit CPUX86State
parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>

5918fffb 06/28/2012 11:28 pm Blue Swirl

x86: split off condition code helpers

Move condition code helpers to cc_helper.c.

Move the shared inline functions lshift(), cpu_load_eflags() and
cpu_cc_compute_all() to cpu.h.

Signed-off-by: Blue Swirl <>

d7582078 06/28/2012 11:28 pm Blue Swirl

x86: split off integer helpers

Move integer and bit field helpers to int_helper.c.

Signed-off-by: Blue Swirl <>

d65e9815 06/25/2012 04:40 pm Igor Mammedov

target-i386: move tcg initialization into x86_cpu_initfn()

In order to make cpu object not depended on external ad-hoc
initialization routines, move tcg initialization from cpu_x86_init
inside cpu object "x86_cpu_initfn()".

Signed-off-by: Igor Mammedov <>...

130a0385 06/25/2012 04:34 pm Igor Mammedov

target-i386: drop usage of prev_debug_excp_handler

Chains of exception handlers are currently unused feature, drop it
for now so as not to expose prev_debug_excp_handler at global
scope when moving tcg initialization into target-i386/cpu.c

Later we probably could re-invent better interface for this....

09faecf2 06/22/2012 12:34 pm Stefan Weil

target-i386: Use QEMU instead of Qemu

This new 'QEmu' was recently added.
Replace it by the official all upper case 'QEMU'.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

71547a3b 06/21/2012 09:45 pm Blue Swirl

qemu-log: use LOG_UNIMP for some target CPU cases

Use LOG_UNIMP for some target CPU cases.

Signed-off-by: Blue Swirl <>
Acked-by: Alexander Graf <>

93bfef4c 06/19/2012 09:36 pm Crístian Viana

Allow machines to configure the QEMU_VERSION that's exposed via hardware

QEMU exposes its version to the guest's hardware and in some cases that is wrong
(e.g. Windows prints messages about driver updates when you switch
the QEMU version).
There is a new field now on the struct QEmuMachine, hw_version, which may...

fc0608ac 06/11/2012 11:20 pm Stefan Weil

Fix some more license versions (GPL2+ instead of GPL2)

Signed-off-by: Stefan Weil <>
Signed-off-by: Wen Congyang <>

fa029887 06/08/2012 05:11 pm Andreas Färber

target-i386: Use uint32 visitor for [x]level properties

This simplifies the code and resolves TODOs.

Signed-off-by: Andreas Färber <>
Reviewed-by: Michael Roth <>

fbe37ef3 06/07/2012 10:21 am Paolo Bonzini

build: move other target-*/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

5f86146f 06/07/2012 10:20 am Paolo Bonzini

dump: remove dumping stuff from cpu-all.h

This simplifies things, because they will only be included for softmmu
targets and because the stubs are taken out-of-line in separate files,
which in the future could even be compiled only once.

Signed-off-by: Paolo Bonzini <>

4720bd05 06/07/2012 10:19 am Paolo Bonzini

dump: change cpu_get_note_size to return ssize_t

So that it can use the same prototype in both cases.

Signed-off-by: Paolo Bonzini <>

9cdc8df3 06/07/2012 08:19 am Paolo Bonzini

build: move libobj-y variable to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

5e8861a0 06/07/2012 08:17 am Paolo Bonzini

build: move obj-TARGET-y variables to nested Makefile.objs

Also drop duplicate occurrence of device-hotplug.o.

Signed-off-by: Paolo Bonzini <>

34941700 06/06/2012 03:57 pm Anthony Liguori

Merge remote-tracking branch 'qmp/queue/qmp' into staging

  • qmp/queue/qmp: (29 commits)
    Add 'query-events' command to QMP to query async events
    qapi: convert netdev_del
    qapi: convert netdev_add
    net: net_client_init(): use error_set()
    net: purge the monitor object from all init functions...
b7e516ce 06/05/2012 12:00 am Andreas Färber

Kill off cpu_state_reset()

In commit 1bba0dc932e8826a7d030df3767daf0bc339f9a2 cpu_reset()
was renamed to cpu_state_reset(), to allow introducing a new cpu_reset()
that would operate on QOM objects.

All callers have been updated except for one in target-mips, so drop all...

232fc23b 06/05/2012 12:00 am Andreas Färber

target-i386: Pass X86CPU to do_cpu_{init,sipi}()

Allows to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>

b47ed996 06/05/2012 12:00 am Andreas Färber

target-i386: Let cpu_x86_init() return X86CPU

Turn cpu_init macro into a static inline function returning CPUX86State
for backwards compatibility.

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>

9fecbed0 06/04/2012 07:49 pm Wen Congyang

target-i386: Add API to write elf notes to core file

The core file contains register's value. These APIs write registers to
core file, and them will be called in the following patch.

Signed-off-by: Wen Congyang <>
Signed-off-by: Luiz Capitulino <>

90166b71 06/04/2012 07:49 pm Wen Congyang

target-i386: Add API to write cpu status to core file

The core file has register's value. But it does not include all registers value.
Store the cpu status into QEMU note, and the user can get more information
from vmcore. If you change QEMUCPUState, please count up QEMUCPUSTATE_VERSION....

25ae9c1d 06/04/2012 07:49 pm Wen Congyang

target-i386: add API to get dump info

Dump info contains: endian, class and architecture. The next
patch will use these information to create vmcore. Note: on
x86 box, the class is ELFCLASS64 if the memory is larger than 4G.

Signed-off-by: Wen Congyang <>...

0038ffb0 06/04/2012 07:49 pm Wen Congyang

target-i386: Add API to get note's size

We should know where the note and memory is stored before writing
them to vmcore. If we know this, we can avoid using lseek() when
creating vmcore.

Signed-off-by: Wen Congyang <>
Signed-off-by: Luiz Capitulino <>

fae001f5 06/04/2012 07:49 pm Wen Congyang

implement cpu_get_memory_mapping()

Walk cpu's page table and collect all virtual address and physical address mapping.
Then, add these mapping into memory mapping list. If the guest does not use paging,
it will do nothing. Note: the I/O memory will be skipped....

31a2207a 06/04/2012 07:49 pm Wen Congyang

Add API to check whether paging mode is enabled

This API will be used in the following patch.

Signed-off-by: Wen Congyang <>
Signed-off-by: Luiz Capitulino <>

13526728 05/30/2012 05:28 am Eduardo Habkost

Expose CPUID leaf 7 only for -cpu host

Changes v2 -> v3;
- Check for kvm_enabled() before setting cpuid_7_0_ebx_features

Changes v1 -> v2:
- Use kvm_arch_get_supported_cpuid() instead of host_cpuid() on
cpu_x86_fill_host().

We should use GET_SUPPORTED_CPUID for all bits on "-cpu host"...
7a059953 05/12/2012 03:17 pm Andreas Färber

target-i386: Defer MCE init

Commit de024815e3b523addf58f1f79846b7fe74643678 (target-i386: QOM'ify
CPU init) moved mce_init() call from helper.c:cpu_x86_init() into
X86CPU's cpu.c:x86_cpu_initfn().
mce_init() checks for a family >= 6 though, so we could end up with a...

16b93aa8 04/25/2012 11:51 am Andreas Färber

target-i386: Introduce "xlevel" property for X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

d480e1af 04/25/2012 11:51 am Andreas Färber

target-i386: Prepare "vendor" property for X86CPU

Using it now would incur converting the three x86_def_t vendor words
into a string for object_property_set_str(), then back to three words
in the "vendor" setter.
The built-in CPU definitions use numeric preprocessor defines to...

89e48965 04/25/2012 11:51 am Andreas Färber

target-i386: Introduce "tsc-frequency" property for X86CPU

Use Hz as unit.

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

95b8519d 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU family

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

67e30c83 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU model

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>
Reviewed-by: Michael Roth <>

35112e41 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU stepping

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

63e886eb 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU model-id

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

8e1898bf 04/25/2012 11:51 am Andreas Färber

target-i386: Introduce "level" property for X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>