Statistics
| Branch: | Revision:

root / target-i386 / helper.c @ 5b50e790

History | View | Annotate | Download (41.2 kB)

# Date Author Comment
00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

f17ec444 07/23/2013 03:41 am Andreas Färber

exec: Change cpu_memory_rw_debug() argument to CPUState

Propagate X86CPU in kvmvapic for simplicity.

Signed-off-by: Andreas Färber <>

182735ef 07/09/2013 10:32 pm Andreas Färber

cpu: Make first_cpu and next_cpu CPUState

Move next_cpu from CPU_COMMON to CPUState.
Move first_cpu variable to qom/cpu.h.

gdbstub needs to use CPUState::env_ptr for now.
cpu_copy() no longer needs to save and restore cpu_next.

Acked-by: Paolo Bonzini <>...

cb446eca 06/28/2013 02:25 pm Andreas Färber

kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

Signed-off-by: Andreas Färber <>

0514ef2f 05/02/2013 01:27 am Eduardo Habkost

target-i386: Replace cpuid_*features fields with a feature word array

This replaces the feature-bit fields on both X86CPU and x86_def_t
structs with an array.

With this, we will be able to simplify code that simply does the same
operation on all feature words (e.g. kvm_check_features_against_host(),...

4980ef9e 03/23/2013 04:30 pm Richard Henderson

target-i386: Don't modify env->eflags around cpu_dump_state

We can compute the value in cpu_dump_state anyway, and gratuitous
modifications to eflags creates heisenbugs.

Cc: Blue Swirl <>
Signed-off-by: Richard Henderson <>...

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

Signed-off-by: Andreas Färber <>

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

Signed-off-by: Andreas Färber <>

cd7f97ca 02/20/2013 09:05 am Richard Henderson

target-i386: Implement ADX extension

Signed-off-by: Richard Henderson <>

436ff2d2 02/20/2013 09:05 am Richard Henderson

target-i386: Add CC_OP_CLR

Special case xor with self. We need not even store the known
zero into cc_src.

Signed-off-by: Richard Henderson <>

bc4b43dc 02/19/2013 01:52 am Richard Henderson

target-i386: Implement BLSR, BLSMSK, BLSI

Do all of group 17 at one time for ease.

Signed-off-by: Richard Henderson <>

5c3c6a68 02/16/2013 03:51 pm Andreas Färber

target-i386: Move cpu_x86_init()

Consolidate CPU functions in cpu.c.
Allows to make cpu_x86_register() static.

No functional changes.

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

2b6f294c 02/16/2013 03:50 pm Andreas Färber

target-i386: Update X86CPU to QOM realizefn

Adapt the signature of x86_cpu_realize(), hook up to
DeviceClass::realize and set realized = true in cpu_x86_init().

The QOM realizefn cannot depend on errp being non-NULL as in
cpu_x86_init(), so use a local Error to preserve error handling behavior...

5c099537 02/01/2013 11:53 pm Paolo Bonzini

cpu: do not use object_delete

CPUs are never added to the composition tree, so delete is achieved
simply by removing the last references to them.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

cc36a7a2 02/01/2013 02:35 am Andreas Färber

target-i386: Pass X86CPU to cpu_x86_set_a20()

Prepares for cpu_interrupt() changing argument to CPUState.

While touching it, rename to x86_cpu_...() now that it takes an X86CPU.

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

e175bce5 01/15/2013 10:23 am liguang

target-i386: Use switch in check_hw_breakpoints()

Replace an if statement using magic numbers for breakpoint type with a
more explicit switch statement. This is to aid readability.

Change the return type and force_dr6_update argument type to bool.

While at it, fix Coding Style issues (missing braces)....

1cc21a18 01/15/2013 10:23 am liguang

target-i386: Avoid goto in hw_breakpoint_insert()

"Go To Statement Considered Harmful" -- E. Dijkstra

To avoid an unnecessary goto within the switch statement, move
watchpoint insertion out of the switch statement. Improves readability.

While at it, fix Coding Style issues (missing braces, indentation)....

5902564a 01/15/2013 10:14 am liguang

target-i386: Introduce hw_{local,global}_breakpoint_enabled()

hw_breakpoint_enabled() returned a bit field indicating whether a local
breakpoint and/or global breakpoint was enabled. Avoid this number magic
by using explicit boolean helper functions hw_local_breakpoint_enabled()...

428065ce 01/15/2013 10:14 am liguang

target-i386: Define DR7 bit field constants

Implicit use of dr7 bit field is a little hard to understand,
so define constants for them and use them consistently.

Signed-off-by: liguang <>
Signed-off-by: Andreas Färber <>

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

a8a826a3 12/16/2012 10:35 am Blue Swirl

exec: refactor cpu_restore_state

Refactor common code around calls to cpu_restore_state().

tb_find_pc() has now no external users, make it static.

Signed-off-by: Blue Swirl <>

8c5cf3b6 10/31/2012 05:12 am Andreas Färber

target-i386: Pass X86CPU to cpu_x86_inject_mce()

Needed for changing run_on_cpu() argument to CPUState.

Signed-off-by: Andreas Färber <>

f100f0b3 10/31/2012 05:12 am Andreas Färber

cpus: Pass CPUState to run_on_cpu()

CPUArchState is no longer needed.

Move the declaration to include/qemu/cpu.h and add documentation.

Signed-off-by: Andreas Färber <>

ff287bbd 10/30/2012 11:38 pm Igor Mammedov

target-i386: If x86_cpu_realize() failed, report error and do cleanup

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

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

6fd2a026 10/05/2012 05:04 pm Peter Maydell

cpu_dump_state: move DUMP_FPU and DUMP_CCOP flags from x86-only to generic

Move the DUMP_FPU and DUMP_CCOP flags for cpu_dump_state() from being
x86-specific flags to being generic ones. This allows us to drop some
TARGET_I386 ifdefs in various places, and means that we can (potentially)...

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.
...

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...
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...

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()...

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....

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 <>

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...

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

target-i386: Pass X86CPU to cpu_x86_register()

Avoids an x86_env_get_cpu() call there, to work with QOM properties.

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

5fd2087a 04/10/2012 06:10 pm Andreas Färber

target-i386: QOM'ify CPU

Embed CPUX86State as first member of X86CPU.
Distinguish between "x86_64-cpu" and "i386-cpu".
Drop cpu_x86_close() in favor of calling object_delete() directly.

For now let CPUClass::reset() call cpu_state_reset().

Signed-off-by: Andreas Färber <>

de024815 04/10/2012 06:10 pm Andreas Färber

target-i386: QOM'ify CPU init

Move code from cpu_x86_init() to new QOM x86_cpu_initfn().
Also move mce_init() to cpu.c since it's used nowhere else.

Signed-off-by: Andreas Färber <>

c1958aea 04/10/2012 06:10 pm Andreas Färber

target-i386: QOM'ify CPU reset

Move code from cpu_state_reset() into QOM x86_cpu_reset(),
fixing style issues for FPU init.

Signed-off-by: Andreas Färber <>

317ac620 03/14/2012 11:20 pm Andreas Färber

target-i386: Don't overuse CPUState

Scripted conversion:
sed -i "s/CPUState/CPUX86State/g" target-i386/*.[hc]
sed -i "s/#define CPUX86State/#define CPUState/" target-i386/cpu.h

Signed-off-by: Andreas Färber <>
Acked-by: Anthony Liguori <>

1bba0dc9 03/14/2012 11:20 pm Andreas Färber

Rename cpu_reset() to cpu_state_reset()

Frees the identifier cpu_reset for QOM CPUs (manual rename).

Don't hide the parameter type behind explicit casts, use static
functions with strongly typed argument to indirect.

Signed-off-by: Andreas Färber <>...

3f2cbf0d 03/11/2012 01:22 pm Jan Kiszka

target-i386: Mask NX bit from cpu_get_phys_page_debug result

This was a long pending bug, now revealed by the assert in
phys_page_find that stumbled over the large page index returned by
cpu_get_phys_page_debug for NX-marked pages: We need to mask out NX and...

5a30d3f1 03/03/2012 07:59 pm Blue Swirl

Merge branch 'upstream' of git://qemu.weilnetz.de/qemu

  • 'upstream' of git://qemu.weilnetz.de/qemu:
    Move definition of HOST_LONG_BITS to qemu-common.h
    target-xtensa: Clean includes
    target-unicore32: Clean includes
    target-sh4: Clean includes
    target-s390x: Clean includes...
727d6bff 02/28/2012 11:33 pm Stefan Weil

target-i386: Clean includes

Remove some include statements which are not needed.

Signed-off-by: Stefan Weil <>

d362e757 02/18/2012 12:15 pm Jan Kiszka

target-i386: Add infrastructure for reporting TPR MMIO accesses

This will allow the APIC core to file a TPR access report. Depending on
the accelerator and kernel irqchip mode, it will either be delivered
right away or queued for later reporting.

In TCG mode, we can restart the triggering instruction and can therefore...

f2209eb8 11/02/2011 02:55 pm Bharata B Rao

Fix X86 CPU topology in KVM mode

apic id returned to guest kernel in ebx for cpuid(function=1) depends on
CPUX86State->cpuid_apic_id which gets populated after the cpuid information
is cached in the host kernel. This results in broken CPU topology in guest....

21e87c46 10/25/2011 02:33 am Avi Kivity

i386: wire up MSR_IA32_MISC_ENABLE

It's needed for its default value - bit 0 specifies that "rep movs" is
good enough for memcpy, and Linux may use a slower memcpu if it is not set,
depending on cpu family/model.

Signed-off-by: Avi Kivity <>...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

97b348e7 08/07/2011 12:32 pm Blue Swirl

Remove unused is_softmmu parameter from cpu_handle_mmu_fault

Parameter is_softmmu (and its evil mutant twin brother is_softmuu)
is not used in cpu_*_handle_mmu_fault() functions, remove them
and adjust callers.

Acked-by: Richard Henderson <>...

d5ab9713 08/05/2011 06:57 pm Jan Kiszka

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when
running over KVM or XEN. Saves a "few" bytes in the qemu address space
and is also conceptually cleaner.

Signed-off-by: Jan Kiszka <>...

3e457172 07/30/2011 12:41 pm Blue Swirl

exec.h cleanup

Move softmmu_exec.h include directives from target-*/exec.h to
target-*/op_helper.c. Move also various other stuff only used in
op_helper.c there.

Define global env in dyngen-exec.h.

For i386, move wrappers for segment and FPU helpers from user-exec.c...

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

c31da136 06/03/2011 05:07 pm Aurelien Jarno

target-i386: remove old code handling float64

Now that target-i386 uses softfloat, floatx80 is always available and
there is no need anymore to have code handling both float64 and floax80.

Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

1ffd41ee 04/17/2011 09:32 pm Aurelien Jarno

target-i386: use CPU_LDoubleU instead of a private union

Use CPU_LDoubleU in cpu_dump_state() instead of redefining a union for
doing the conversion.

Based on a patch from Laurent Vivier <>.

Cc: Laurent Vivier <>
Reviewed-by: Peter Maydell <>...

ebda377f 03/16/2011 10:11 pm Jan Kiszka

x86: Properly reset PAT MSR

Conforming to the Intel spec, set the power-on value of PAT also on
reset, but save it across INIT.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

c34d440a 03/15/2011 06:19 am Jan Kiszka

kvm: x86: Consolidate TCG and KVM MCE injection code

This switches KVM's MCE injection path to cpu_x86_inject_mce, both for
SIGBUS and monitor initiated events. This means we prepare the MCA MSRs
in the VCPUState also for KVM.

We have to drop the MSRs writeback restrictions for this purpose which...

18559232 03/15/2011 06:19 am Jan Kiszka

x86: Perform implicit mcg_status reset

Reorder mcg_status in CPUState to achieve automatic clearing on reset.

Signed-off-by: Jan Kiszka <>
CC: Huang Ying <>
CC: Hidetoshi Seto <>
CC: Jin Dongming <>...

2fa11da0 03/15/2011 06:19 am Jan Kiszka

x86: Small cleanups of MCE helpers

Fix some code style issues, use proper headers, and align to cpu_x86
naming scheme. No functional changes.

Signed-off-by: Jan Kiszka <>
CC: Huang Ying <>
CC: Hidetoshi Seto <>...

316378e4 03/15/2011 06:19 am Jan Kiszka

x86: Refine error reporting of MCE injection services

As this service is used by the human monitor, make sure that errors get
reported to the right channel, and also raise the verbosity.

This requires to move Monitor typedef in qemu-common.h to resolve the...

747461c7 03/15/2011 06:19 am Jan Kiszka

x86: Optionally avoid injecting AO MCEs while others are pending

Allow to tell cpu_x86_inject_mce that it should ignore Action Optional
MCE events when the target VCPU is still processing another one. This
will be used by KVM soon.

Signed-off-by: Jan Kiszka <>...

d5bfda33 03/15/2011 06:19 am Jan Kiszka

x86: Run qemu_inject_x86_mce on target VCPU

We will use the current TCG-only MCE injection path for KVM as well, and
then this read-modify-write of the target VCPU state has to be performed
synchronously in the corresponding thread.

Signed-off-by: Jan Kiszka <>...

29057492 02/08/2011 01:36 pm Jan Kiszka

x86: Fix MCA broadcast parameters for TCG case

When broadcasting MCEs, we need to set MCIP and RIPV in mcg_status like
it is done for KVM. Use the symbolic constants at this chance.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>...

f5c848ee 01/23/2011 06:27 am Jan Kiszka

x86: Optionally dump code bytes on cpu_dump_state

Introduce the cpu_dump_state flag CPU_DUMP_CODE and implement it for
x86. This writes out the code bytes around the current instruction
pointer. Make use of this feature in KVM to help debugging fatal vm
exits....

b3cd24e0 01/21/2011 06:05 pm Jin Dongming

Clean up cpu_inject_x86_mce()

Clean up cpu_inject_x86_mce() for later patch.

Signed-off-by: Jin Dongming <>
Signed-off-by: Marcelo Tosatti <>

31ce5e0c 01/21/2011 06:05 pm Jin Dongming

Add "broadcast" option for mce command

When the following test case is injected with mce command, maybe user could not
get the expected result.
DATA
command cpu bank status mcg_status addr misc
(qemu) mce 1 1 0xbd00000000000000 0x05 0x1234 0x8c...

2bd3e04c 01/21/2011 06:05 pm Jin Dongming

Add function for checking mca broadcast of CPU

Add function for checking whether current CPU support mca broadcast.

Signed-off-by: Jin Dongming <>
Signed-off-by: Marcelo Tosatti <>

4058fd98 12/27/2010 11:02 pm Jan Kiszka

x86: Filter out garbage from segment flags dump

Only bits 8..23 of the segment flags contain valid data, so only dump
those when printing the CPU state.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Aurelien Jarno <>

9a78eead 10/30/2010 11:01 am Stefan Weil

target-xxx: Use fprintf_function (format checking)

fprintf_function uses format checking with GCC_FMT_ATTR.

Format errors were fixed in
  • target-i386/helper.c
  • target-mips/translate.c
  • target-ppc/translate.c

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>...

e7701825 10/21/2010 12:15 am Marcelo Tosatti

kvm: x86: add mce support

Port qemu-kvm's MCE support

commit c68b2374c9048812f488e00ffb95db66c0bc07a7
Author: Huang Ying <>
Date: Mon Jul 20 10:00:53 2009 +0800

Add MCE simulation support to qemu/kvm
KVM ioctls are used to initialize MCE simulation and inject MCE. The...
c0532a76 10/21/2010 12:15 am Marcelo Tosatti

MCE: Relay UCR MCE to guest

Port qemu-kvm's

commit 4b62fff1101a7ad77553147717a8bd3bf79df7ef
Author: Huang Ying <>
Date: Mon Sep 21 10:43:25 2009 +0800

MCE: Relay UCR MCE to guest
UCR (uncorrected recovery) MCE is supported in recent Intel CPUs,...
052be86b 06/27/2010 07:07 pm Jan Kiszka

x86: Fix INIT processing

This fixes a regression of 0e26b7b892: Reset halted also on INIT.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

4a942cea 06/19/2010 10:42 am Blue Swirl

apic: avoid passing CPUState from CPU code

Pass only APICState when accessing APIC from CPU code.

Signed-off-by: Blue Swirl <>

b5e5a934 04/26/2010 05:28 pm Marcelo Tosatti

target-i386: print EFER in cpu_dump_state

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

e5c15eff 04/08/2010 10:42 pm Stefan Weil

target-i386: Fix compiler warning

With argument checking for cpu_fprintf, gcc throws this warning:

CC    i386-softmmu/helper.o
cc1: warnings being treated as errors
/qemu/ar7/target-i386/helper.c: In function ‘cpu_x86_dump_seg_cache’:
/qemu/ar7/target-i386/helper.c:220: error: format not a string literal and no format arguments...
d4c430a8 03/17/2010 04:44 am Paul Brook

Large page TLB flush

QEMU uses a fixed page size for the CPU TLB. If the guest uses large
pages then we effectively split these into multiple smaller pages, and
populate the corresponding TLB entries on demand.

When the guest invalidates the TLB by virtual address we must invalidate...

c6dc6f63 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: move CPUID functions into separate file

about half of target-i386/helper.c consist of CPUID related functions.
Only one of them is a real TCG helper function. So move the whole
CPUID stuff out of this into a separate file to get better
maintainable parts....

4fcc562b 03/12/2010 08:34 pm Paul Brook

Remove cpu_get_phys_page_debug from userspace emulation

cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it.

Signed-off-by: Paul Brook <>

63a54736 02/28/2010 08:20 pm Jason Wessel

target-i386: fix crash on x86 32bit linux host with hw breakpoint exceptions

If you make use of hw breakpoints on a 32bit x86 linux host, qemu
will segmentation fault when processing the exception.

The problem is that the value of env is stored in $ebp in the op_helper...

d354899c 02/24/2010 12:01 am Blue Swirl

Fix OpenBSD linker warning

helper.o(.text+0x11e0): In function `listflags':
/src/qemu/target-i386/helper.c:661: warning: sprintf() is often misused, please use snprintf()

Signed-off-by: Blue Swirl <>

161717d2 02/23/2010 11:46 pm Blue Swirl

Fix i386-bsd-user build

Signed-off-by: Blue Swirl <>

b5ec5ce0 02/23/2010 12:16 am john cooper

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...

bb0300dc 01/14/2010 01:14 am Gleb Natapov

Add KVM paravirt cpuid leaf

Initialize KVM paravirt cpuid leaf and allow user to control guest
visible PV features through -cpu flag.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

af364b41 01/11/2010 05:56 pm Huang Ying

MCE: Fix bug of IA32_MCG_STATUS after system reset

Now, if we inject a fatal MCE into guest OS, for example Linux, Linux
will go panic and then reboot. But if we inject another MCE now,
system will reset directly instead of go panic firstly, because
MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does...

c84bd4f1 12/24/2009 08:39 pm Gleb Natapov

Intel CPUs starting from pentium have apic

Intel CPUs starting from pentium have apic. Lets advertise it.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Aurelien Jarno <>

f1e00a9c 12/13/2009 09:48 pm Andre Przywara

target-i386: Update CPUID feature set for TCG

The CPUID features QEMU presented to the guest were not up-to-date
with QEMU's emulated feature set.
Add the missing bits of recent (and not so recent) additions to
QEMU's emulation engine.
For stability reasons only the user mode usable bits are exposed for...

6d9fef1a 12/07/2009 07:13 pm Andre Przywara

cpuid: Fix multicore setup on Intel

The multicore CPUID code detects whether the guest is an Intel or an
AMD CPU, because the Linux kernel is picky about the CmpLegacy bit.
KVM by default passes through the host's vendor, which was not
catched by the code. So fork out the vendor determining bits into a...

b55a37c9 11/07/2009 12:37 pm Blue Swirl

user: move CPU reset call to main.c for x86/PPC/Sparc

Signed-off-by: Blue Swirl <>

c1699988 11/07/2009 10:06 am Glauber Costa

v3: don't call reset functions on cpu initialization

There is absolutely no need to call reset functions when initializing
devices. Since we are already registering them, calling qemu_system_reset()
should suffice. Actually, it is what happens when we reboot the machine,...

ac74d0f1 10/05/2009 05:32 pm Juan Quintela

x86: mce_banks always have the same size

mce_banks is always MCE_BANKS_DEF * 4 in size, value never change

CC: Huang Ying <>
Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

5ee0ffaa 10/05/2009 05:32 pm Juan Quintela

x86: make a20_mask int32_t

This makes the savevm code correct, and sign extensins gives us exactly
what we need (namely, sign extend to 64 bits when used with 64bit addresess.

Once there, change 0x100000 for 1 << 20, that maks all a20 use the same syntax....

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

23054111 09/12/2009 06:52 pm Jan Kiszka

i386: Drop redundant kvm_enabled test

cpu_synchronize_state already does this.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

2637c754 09/11/2009 07:10 pm Gleb Natapov

kvm_arch_get_registers() shouldn't be called directly

Direct call to kvm_arch_get_registers() bypass logic in
cpu_synchronize_state()

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>