Statistics
| Branch: | Revision:

root / target-i386 / cpu.h @ 34b5d2c6

History | View | Annotate | Download (39.2 kB)

# Date Author Comment
b5d54bd4 08/30/2013 01:21 am Anthony Liguori

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

  • qemu-kvm/uq/master:
    kvm-stub: fix compilation
    kvm: shorten the parameter list for get_real_device()
    kvm: i386: fix LAPIC TSC deadline timer save/restore
    kvm-all.c: max_cpus should not exceed KVM vcpu limit...
92067bf4 08/16/2013 07:44 pm Igor Mammedov

target-i386: Move hyperv_* static globals to X86CPU

- since hyperv_* helper functions are used only in target-i386/kvm.c
move them there as static helpers

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

0d894367 08/09/2013 10:19 pm Paolo Bonzini

kvm: migrate vPMU state

Reviewed-by: Gleb Natapov <>
Signed-off-by: Paolo Bonzini <>

e4a09c96 08/09/2013 10:18 pm Paolo Bonzini

target-i386: remove tabs from target-i386/cpu.h

Signed-off-by: Paolo Bonzini <>

0779caeb 07/25/2013 01:09 pm Arthur Chunqi Li

Initialize IA32_FEATURE_CONTROL MSR in reset and migration

The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs
to clear this MSR when reset vCPU and keep the value of it when
migration. This patch add this feature.

Signed-off-by: Arthur Chunqi Li <>...

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

cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()

Where no extra implementation is needed, fall back to CPUClass::set_pc().

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

518e9d7d 07/09/2013 10:33 pm Andreas Färber

target-i386: Change do_smm_enter() argument to X86CPU

Prepares for log_cpu_state_mask() changing argument to CPUState.

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

6291ad77 07/09/2013 10:20 pm Peter Maydell

linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-user

The functions cpu_clone_regs() and cpu_set_tls() are not purely CPU
related -- they are specific to the TLS ABI for a a particular OS.
Move them into the linux-user/ tree where they belong....

80cf2c81 06/15/2013 08:50 pm liguang

target-i386/helper: remove DF macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

a78d0eab 06/15/2013 08:50 pm liguang

target-i386/helper: remove EIP macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

cf75c597 06/15/2013 08:50 pm liguang

target-i386/helper: remove EDI macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

78c3c6d3 06/15/2013 08:49 pm liguang

target-i386/helper: remove ESI macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

08b3ded6 06/15/2013 08:49 pm liguang

target-i386/helper: remove ESP macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

c12dddd7 06/15/2013 08:49 pm liguang

target-i386/helper: remove EBP macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

00f5e6f2 06/15/2013 08:49 pm liguang

target-i386/helper: remove EDX macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

a4165610 06/15/2013 08:48 pm liguang

target-i386/helper: remove ECX macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

70b51365 06/15/2013 08:48 pm liguang

target-i386/helper: remove EBX macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

4b34e3ad 06/15/2013 08:48 pm liguang

target-i386/helper: remove EAX macro

Signed-off-by: liguang <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

0668af54 05/06/2013 11:14 pm Eduardo Habkost

target-i386: Introduce generic CPUID feature compat function

Introduce x86_cpu_compat_set_features(), that can be used to set/unset
feature bits on specific CPU models for machine-type compatibility.

Signed-off-by: Eduardo Habkost <>
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(),...

90e4b0c3 05/02/2013 12:21 am Eduardo Habkost

target-i386: Group together level, xlevel, xlevel2 fields

Consolidate level, xlevel, xlevel2 fields in x86_def_t and CPUX86State.

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

62fc403f 05/01/2013 02:06 pm Igor Mammedov

target-i386: Attach ICC bus to CPU on its creation

X86CPU should have parent bus so it could provide bus for child APIC.

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

baaeda08 05/01/2013 02:04 pm Igor Mammedov

target-i386: Replace MSI_SPACE_SIZE with APIC_SPACE_SIZE

Put APIC_SPACE_SIZE in a public header so that it can be
reused elsewhere later.

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

917367aa 04/18/2013 05:27 am Marcelo Tosatti

target-i386: kvm: save/restore steal time MSR

Read and write steal time MSR, so that reporting is functional across
migration.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Gleb Natapov <>

7f833247 04/16/2013 02:19 am Igor Mammedov

target-i386: Split out CPU creation and features parsing

Move CPU creation and features parsing into a separate cpu_x86_create()
function, so that board would be able to set board-specific CPU
properties before CPU is realized.

Keep cpu_x86_init() for compatibility with the code that uses cpu_init()...

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

dab86234 04/05/2013 03:23 am Laszlo Ersek

extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESS

A common dependency of the constant's current users:
- hw/apic_common.c
- hw/i386/kvmvapic.c
- target-i386/cpu.c
is "target-i386/cpu.h".

Signed-off-by: Laszlo Ersek <>
Reviewed-by: Anthony Liguori <>...

4d8b3c63 04/05/2013 03:23 am Laszlo Ersek

strip some whitespace

Signed-off-by: Laszlo Ersek <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

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

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

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

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

target-i386: Update VMStateDescription to X86CPU

Expose vmstate_cpu as vmstate_x86_cpu and hook it up to CPUClass::vmsd.
Adapt opaques and VMState fields to X86CPU. Drop cpu_{save,load}().

Reviewed-by: Eduardo Habkost <>
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 <>

988c3eb0 02/19/2013 01:39 am Richard Henderson

target-i386: Use CC_SRC2 for ADC and SBB

Add another slot in ENV and store two of the three inputs. This lets us
do less work when carry-out is not needed, and avoids the unpredictable
CC_OP after translating these insns.

Signed-off-by: Richard Henderson <>

f5847c91 02/19/2013 01:03 am Paolo Bonzini

target-i386: compute eflags outside rcl/rcr helper

Always compute EFLAGS first since it is needed whenever
the shift is non-zero, i.e. most of the time. This makes it possible
to remove some writes of CC_OP_EFLAGS to cpu_cc_op and more importantly
removes cases where s->cc_op becomes CC_OP_DYNAMIC. Also, we can...

fee71888 02/19/2013 01:03 am Richard Henderson

target-i386: Name the cc_op enumeration

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

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

cb41bad3 01/27/2013 03:34 pm Eduardo Habkost

target-i386: Introduce x86_cpu_apic_id_from_index() function

This function will be used by both the CPU initialization code and the
fw_cfg table initialization code.

Later this function will be updated to generate APIC IDs according to
the CPU topology....

8932cfdf 01/27/2013 03:34 pm Eduardo Habkost

pc: Generate APIC IDs according to CPU topology

This keeps compatibility on machine-types pc-1.2 and older, and prints a
warning in case the requested configuration won't get the correct
topology.

I couldn't think of a better way to warn about broken topology when in...

99b88a17 01/27/2013 03:34 pm Igor Mammedov

target-i386: Replace uint32_t vendor fields by vendor string in x86_def_t

Vendor property setter takes string as vendor value but cpudefs
use uint32_t vendor123 fields to define vendor value. It makes it
difficult to unify and use property setter for values from cpudefs....

11acfdd5 01/27/2013 03:34 pm Igor Mammedov

target-i386: Remove vendor_override field from CPUX86State

Commit 8935499831312 makes cpuid return to guest host's vendor value
instead of built-in one by default if kvm_enabled() == true and allows
to override this behavior if 'vendor' is specified on -cpu command line....

29694758 01/27/2013 03:34 pm Eduardo Habkost

pc: Reverse pc_init_pci() compatibility logic

Currently, the pc-1.4 machine init function enables PV EOI and then
calls the pc-1.2 machine init function. The problem with this approach
is that now we can't enable any additional compatibility code inside the...

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

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

5ef57876 01/15/2013 05:09 am Eduardo Habkost

target-i386/cpu: Introduce FeatureWord typedefs

This introduces a FeatureWord enum, FeatureWordInfo struct (with
generation information about a feature word), and a FeatureWordArray
typedef, and changes add_flagname_to_bitmaps() code and
cpu_x86_parse_featurestr() to use the new typedefs instead of separate...

8b4beddc 01/08/2013 10:03 pm Eduardo Habkost

target-i386: check/enforce: Fix CPUID leaf numbers on error messages

The -cpu check/enforce warnings are printing incorrect information about the
missing flags. There are no feature flags on CPUID leaves 0 and 0x80000000, but
there were references to 0 and 0x80000000 in the table at...

34daffa0 01/02/2013 04:01 pm Anthony Liguori

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

  • qemu-kvm/uq/master:
    qemu-kvm/pci-assign: 64 bits bar emulation
    target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

Signed-off-by: Anthony Liguori <>

6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

f28558d3 12/14/2012 10:17 pm Will Auld

target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

CPUID.7.0.EBX1=1 indicates IA32_TSC_ADJUST MSR 0x3b is supported

Basic design is to emulate the MSR by allowing reads and writes to the
hypervisor vcpu specific locations to store the value of the emulated MSRs....

9df694ee 12/06/2012 10:17 am Igor Mammedov

target-i386: Use define for cpuid vendor string size

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

c8acc380 11/15/2012 04:47 am Andre Przywara

target-i386/cpu: Name new CPUID bits

Update QEMU's knowledge of CPUID bit names. This allows to
enable/disable those new features on QEMU's command line when
using KVM and prepares future feature enablement in QEMU.

This adds F16C, RDRAND, LWP, TBM, TopoExt, PerfCtr_Core, PerfCtr_NB,...

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

3993c6bd 10/31/2012 05:11 am Andreas Färber

cpus: Pass CPUState to [qemu_]cpu_has_work()

For target-mips also change the return type to bool.

Make include paths for cpu-qom.h consistent for alpha and unicore32.

Signed-off-by: Andreas Färber <>
[AF: Updated new target-openrisc function accordingly]...

e9f9d6b1 10/30/2012 11:38 pm Andreas Färber

target-i386: Pass X86CPU to cpu_x86_load_seg_cache_sipi()

Simplifies the call in apic_sipi() again and needed for moving halted
field to CPUState.

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

dc59944b 10/29/2012 05:59 pm Michael S. Tsirkin

qemu: enable PV EOI for qemu 1.3

Enable KVM PV EOI by default. You can still disable it with
-kvm_pv_eoi cpu flag. To avoid breaking cross-version migration,
enable only for qemu 1.3 (or in the future, newer) machine type.

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

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

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

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

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

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

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

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

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

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

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

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

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

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

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

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

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

fabacc0f 12/22/2011 06:53 pm Jan Kiszka

kvm: x86: Avoid runtime allocation of xsave buffer

Keep a per-VCPU xsave buffer for kvm_put/get_xsave instead of
continuously allocating and freeing it on state sync.

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

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

aa82ba54 10/25/2011 02:29 am Liu, Jinsong

kvm: support TSC deadline MSR with subsection

KVM add emulation of lapic tsc deadline timer for guest.
This patch is co-operation work at qemu side.

Use subsections to save/restore the field (mtosatti).

Signed-off-by: Liu, Jinsong <>...

38d2c27e 10/25/2011 02:27 am Marcelo Tosatti

Revert "kvm: support TSC deadline MSR"

This reverts commit bfc2455ddbb41148494a084d15777e6bed7533c3.
New patch with subsections will follow.

Signed-off-by: Marcelo Tosatti <>

bfc2455d 10/03/2011 07:53 pm Liu, Jinsong

kvm: support TSC deadline MSR

KVM add emulation of lapic tsc deadline timer for guest.
This patch is co-operation work at qemu side.

Signed-off-by: Liu, Jinsong <>
Signed-off-by: Marcelo Tosatti <>

782ea2c7 09/21/2011 12:49 pm Stefan Weil

target-i386: Remove data type CCTable

Remove also two assert statements which were the last remaining users.

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

986563b1 08/08/2011 10:38 pm Anthony Liguori

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

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

b862d1fe 08/05/2011 06:04 pm Joerg Roedel

qemu-x86: Add tsc_freq option to -cpu

To let the user configure the desired tsc frequency for the
guest if running in KVM.

Signed-off-by: Joerg Roedel <>
Signed-off-by: Marcelo Tosatti <>

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

f081c76c 06/26/2011 09:25 pm Blue Swirl

Move cpu_has_work and cpu_pc_from_tb to cpu.h

Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This is
needed by later patches.

Signed-off-by: Blue Swirl <>

e694d4e2 06/26/2011 09:25 pm Blue Swirl

x86: use caller supplied CPUState for interrupt related stuff

Several x86 specific functions are called from cpu-exec.c with the
assumption that global env register is valid. This will be changed
later, so make the functions use caller supplied CPUState parameter....

42cc8fa6 06/19/2011 03:57 pm Jan Kiszka

kvm: x86: Save/restore FPU OP, IP and DP

These FPU states are properly maintained by KVM but not yet by TCG. So
far we unconditionally set them to 0 in the guest which may cause
state corruptions, though not with modern guests.

To avoid breaking backward migration, use a conditional subsection that...

b3baa152 06/14/2011 05:34 pm brillywu@viatech.com.cn

kvm: Add CPUID support for VIA CPU

When KVM is running on VIA CPU with host cpu's model, the
feautures of VIA CPU will be passed into kvm guest by calling
the CPUID instruction for Centaur.

Signed-off-by: BrillyWu<>
Signed-off-by: KaryJin<>...

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

85097db6 05/08/2011 07:55 pm Richard Henderson

irq: Privatize CPU_INTERRUPT_NMI.

This interrupt name is used by i386, CRIS, and MicroBlaze.
Copy the name into each target.

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

00a152b4 05/08/2011 07:55 pm Richard Henderson

target-i386: Privatize some i386-specific interrupt names.

SMI, VIRQ, INIT, SIPI, and MCE are all only used by the i386 port.

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

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