Statistics
| Branch: | Revision:

root / target-i386 @ 3523e4bd

# Date Author Comment
3523e4bd 01/07/2014 09:05 pm Richard Henderson

target-i386: Use new tcg_gen_qemu_st_* helpers

In preference to the older helpers. Stores only in this patch.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

3c5f4116 01/07/2014 09:05 pm Richard Henderson

target-i386: Use new tcg_gen_qemu_ld_* helpers

In preference to the older helpers. Loads only in this patch.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

5c42a7cd 01/07/2014 09:05 pm Richard Henderson

target-i386: Stop encoding DisasContext.mem_index

Now that we don't combine mem_index with operand size info,
we don't need to encode it. Which tidies many places that
access it.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

323d1876 01/07/2014 09:05 pm Richard Henderson

target-i386: Push DisasContext into load/store helpers

Rather than add s->mem_index into a combined size+mem_index
argument, pass the context down. This will allow cleaning
up s->mem_index later.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

0c0cb6a2 12/07/2013 05:35 pm Anthony Liguori

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

  1. By Alex Williamson (1) and others
  2. Via Paolo Bonzini
    • qemu-kvm/uq/master:
      target-i386: fix cpuid leaf 0x0d
      qemu: mempath: prefault pages manually (v4)
      kvm: Query KVM for available memory slots...
33f373d7 12/05/2013 07:51 pm Liu Jinsong

target-i386: fix cpuid leaf 0x0d

Fix cpuid leaf 0x0d which incorrectly parsed eax and ebx.

However, before this patch the CPUID worked fine -- the .offset
field contained the size and was stored in the register that
is supposed to hold the size (eax), and likewise the .size field...

d916adaa 11/25/2013 07:41 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/tags/for-anthony' into staging

Here are a bunch of 1.7-tagged patches that I was afraid
were getting forgotten or that did not have a clear maintainer responsible
for making a pull request.

  1. gpg: Signature made Thu 21 Nov 2013 08:40:59 AM PST using RSA key ID 9B4D86F2...
b5fc314b 11/21/2013 06:39 pm Paolo Bonzini

target-i386: yield to another VCPU on PAUSE

After commit b1bbfe7 (aio / timers: On timer modification, qemu_notify
or aio_notify, 2013-08-21) FreeBSD guests report a huge slowdown.

The problem shows up as soon as FreeBSD turns out its periodic (~1 ms)
tick, but the timers are only the trigger for a pre-existing problem....

2140cfa5 11/21/2013 06:39 pm Peter Maydell

target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

Fix build failures with clang when KVM is not enabled by
providing a stub version of kvm_arch_get_supported_cpuid().
We retain the compile time check that this function isn't
called when CONFIG_KVM is not set by guarding the stub with...

7865eec4 11/21/2013 06:01 pm Richard Henderson

target-i386: Fix addr32 prefix in gen_lea_modrm

Fix the following run-test-x86_64 testsuite failures:

-lea (%eax) = 0000000000000001
-lea (
%ebx) = 0000000000000002
-lea (%ecx) = 0000000000000004
-lea (
%edx) = 0000000000000008
-lea (%%esi) = 0000000000000010...

76c2975a 11/21/2013 05:56 pm Paolo Bonzini

target-i386: do not override nr_cores for -cpu host

Commit 787aaf5 (target-i386: forward CPUID cache leaves when -cpu host is
used, 2013-09-02) brings bits 31..26 of CPUID leaf 04h out of sync with
the APIC IDs that QEMU reserves for each package. This number must come...

81f3053b 11/21/2013 05:55 pm Paolo Bonzini

target-i386: yield to another VCPU on PAUSE

After commit b1bbfe7 (aio / timers: On timer modification, qemu_notify
or aio_notify, 2013-08-21) FreeBSD guests report a huge slowdown.

The problem shows up as soon as FreeBSD turns out its periodic (~1 ms)
tick, but the timers are only the trigger for a pre-existing problem....

ef4cbe14 11/07/2013 01:14 pm Stefan Weil

kvm: Fix uninitialized cpuid_data

This error was reported by valgrind when running qemu-system-x86_64
with kvm:

975 Conditional jump or move depends on uninitialised value(s)
975 at 0x521C38: cpuid_find_entry (kvm.c:176)
975 by 0x5235BA: kvm_arch_init_vcpu (kvm.c:686)...
0fd53fec 11/05/2013 09:34 am Paolo Bonzini

KVM: x86: fix typo in KVM_GET_XCRS

Only the first item of the array was ever looked at. No
practical effect, but still worth fixing.

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

fc8ead74 10/18/2013 08:03 pm Anthony Liguori

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

  1. By Paolo Bonzini (2) and Jan Kiszka (1)
  2. Via Gleb Natapov
    • qemu-kvm/uq/master:
      kvmvapic: Prevent reading beyond the end of guest RAM
      x86: cpuid: reconstruct leaf 0Dh data
      x86: fix migration from pre-version 12...
1cb9b64d 10/18/2013 08:01 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/configure' into staging

  1. By Peter Maydell (3) and Ákos Kovács (2)
  2. Via Paolo Bonzini
    • bonzini/configure:
      ui/Makefile.objs: delete unnecessary cocoa.o dependency
      default-configs/: CONFIG_GDBSTUB_XML removed
      Makefile.target: CONFIG_NO_* variables removed...
cf01ba9e 10/16/2013 07:21 pm Ákos Kovács

Makefile.target: CONFIG_NO_* variables removed

CONFIG_NO_* variables replaced with the lnot logical function

Signed-off-by: Ákos Kovács <>
[PMM: fixed a few CONFIG_NO_* uses that were missed]
Signed-off-by: Peter Maydell <>...

ab1eb72b 10/11/2013 07:36 pm Anthony Liguori

Merge remote-tracking branch 'rth/tcg-pull' into staging

  1. By Richard Henderson
  2. Via Richard Henderson
    • rth/tcg-pull:
      exec: Add both big- and little-endian memory helpers
      tcg: Add qemu_ld_st_i32/64
      tcg: Add TCGMemOp
      configure: Remove CONFIG_QEMU_LDST_OPTIMIZATION...
39c153b8 10/10/2013 11:16 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings / X86CPU

  • Fix for X86CPU model field of qemu32/qemu64 CPU models
  • Bug fix for longjmp on FreeBSD
  • Removal of unused function
  • Confinement of clone syscall infrastructure to linux-user...
5cd8f621 10/10/2013 09:43 pm Richard Henderson

tcg: Move helper registration into tcg_context_init

No longer needs to be done on a per-target basis.

Signed-off-by: Richard Henderson <>

51fb256a 10/07/2013 12:48 pm Andreas Färber

cpu: Drop cpu_model_str from CPU_COMMON

Since this is only read in cpu_copy() and linux-user has a global
cpu_model, drop the field from generic code.

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

00fdef65 10/02/2013 09:55 pm Stefan Weil

target-i386: Fix compiler warning (integer constant is too large)

From buildbot default_i386_rhel61:

CC    i386-softmmu/target-i386/arch_memory_mapping.o
target-i386/arch_memory_mapping.c: In function 'walk_pde':
target-i386/arch_memory_mapping.c:110: warning:...
2560f19f 10/02/2013 06:58 pm Paolo Bonzini

x86: cpuid: reconstruct leaf 0Dh data

The data in leaf 0Dh depends on information from other feature bits.
Instead of passing it blindly from the host, compute it based on
whether these feature bits are enabled.

Signed-off-by: Paolo Bonzini <>...

c74f41bb 10/02/2013 06:58 pm Paolo Bonzini

x86: fix migration from pre-version 12

On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv,
and not restore anything.

Since FP and SSE data are always valid, set them in xstate_bv at reset
time. In fact, that value is the same that KVM_GET_XSAVE returns on...

f8e6a11a 10/02/2013 05:51 pm Eduardo Habkost

target-i386: Set model=6 on qemu64 & qemu32 CPU models

There's no Intel CPU with family=6,model=2, and Linux and Windows guests
disable SEP when seeing that combination due to Pentium Pro erratum #82.

In addition to just having SEP ignored by guests, Skype (and maybe other...

2e6ae666 09/23/2013 07:52 pm Anthony Liguori

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

  1. By Stefan Weil (8) and others
  2. Via Michael Tokarev
    • mjt/trivial-patches:
      tests/.gitignore: ignore test-throttle
      exec: Fix broken build for MinGW (regression)
      kvm: Fix compiler warning (clang)...
3e4be9c2 09/23/2013 07:52 pm Anthony Liguori

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

  1. By Alexey Kardashevskiy (3) and others
  2. Via Paolo Bonzini
    • qemu-kvm/uq/master:
      target-i386: add feature kvm_pv_unhalt
      linux-headers: update to 3.12-rc1
      target-i386: forward CPUID cache leaves when -cpu host is used...
469936ae 09/20/2013 07:09 pm Tobias Markus

target-i386: Fix segment cache dump

When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default
operation size bit (D/B bit) is not set for Long Mode Data Segments since
there are only Data Segments in Long Mode and no explicit 16/32/64-bit
Descriptors....

f010bc64 09/20/2013 01:38 pm Andrew Jones

target-i386: add feature kvm_pv_unhalt

I don't know yet if want this feature on by default, so for now I'm
just adding support for "-cpu ...,+kvm_pv_unhalt".

Signed-off-by: Andrew Jones <>
Reviewed-by: Eduardo Habkost <>...

787aaf57 09/20/2013 01:38 pm Benoît Canet

target-i386: forward CPUID cache leaves when -cpu host is used

Some users running cpu intensive tasks checking the cache CPUID leaves at
startup and making decisions based on the result reported that the guest was
not reflecting the host CPUID leaves when -cpu host is used....

97577fd4 09/20/2013 01:37 pm James Hogan

cpu: Move cpu state syncs up into cpu_dump_state()

The x86 and ppc targets call cpu_synchronize_state() from their
*_cpu_dump_state() callbacks to ensure that up to date state is dumped
when KVM is enabled (for example when a KVM internal error occurs).
...

0e503577 09/20/2013 01:37 pm Marcelo Tosatti

fix steal time MSR vmsd callback to proper opaque type

Convert steal time MSR vmsd callback pointer to proper X86CPU type.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Paolo Bonzini <>

bff93281 09/12/2013 09:24 pm Peter Maydell

target-i386: Only provide CMOV and friends if feature bit set

The instructions CMOVcc, FCMOVcc and F[U]COMI[P] should only be
present if the CMOV feature bit is set. Add missing feature bit
checks so we correctly fault if emulating a 486 or 586.
This fixes bug LP:1201446....

f2f8560c 09/12/2013 09:20 pm Paolo Bonzini

target-i386: fix disassembly with PAE=1, PG=0

CR4.PAE=1 will not enable paging if CR0.PG=0, but the "if" chain
in x86_cpu_get_phys_page_debug says otherwise. Check CR0.PG
before everything else.

Fixes "-d in_asm" for a code section at the beginning of OVMF....

5e891bf8 09/03/2013 01:25 pm Eduardo Habkost

target-i386: Use #defines instead of magic numbers for CPUID cache info

This is an attempt to make the CPUID cache topology code clearer, by
replacing the magic numbers in the code with #defines, and moving all
the cache information to the same place in the file....

bdc44640 09/03/2013 01:25 pm Andreas Färber

cpu: Use QTAILQ for CPU list

Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand
macros.

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

8cfd0495 09/02/2013 07:08 pm Richard Henderson

tcg: Change tcg_gen_exit_tb argument to uintptr_t

And update all users.

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

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...
7477cd38 08/20/2013 07:38 pm Marcelo Tosatti

kvm: i386: fix LAPIC TSC deadline timer save/restore

The configuration of the timer represented by MSR_IA32_TSCDEADLINE depends on:

- APIC LVT Timer register.
- TSC value.

Change the order to respect the dependency.

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

df67696e 08/20/2013 07:37 pm Liu Jinsong

kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled

This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623

IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to
cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs...

4a44d85e 08/20/2013 06:51 pm Seiji Aguchi

Convert stderr message calling error_get_pretty() to error_report()

Convert stderr messages calling error_get_pretty()
to error_report().

Timestamp is prepended by -msg timstamp option with it.

Per Markus's comment below, A conversion from fprintf() to...

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

56c4bfb3 08/08/2013 06:01 pm Laszlo Ersek

dump: rebase from host-private RAMBlock offsets to guest-physical addresses

RAMBlock.offset --> GuestPhysBlock.target_start
RAMBlock.offset + RAMBlock.length --> GuestPhysBlock.target_end
RAMBlock.length --> GuestPhysBlock.target_end -...

cd7b87ff 08/06/2013 08:27 pm Andreas Färber

target-i386: Fix X86CPU error handling

Error **errp argument is not for emitting warnings, it means an error
has occurred and the caller should not make any assumptions about the
state of other return values (unless otherwise documented).

Therefore cpu_x86_create() must unref the new X86CPU itself, and...

c1399112 07/29/2013 04:29 pm Eduardo Habkost

target-i386: Pass X86CPU object to cpu_x86_find_by_name()

This will help us change the initialization code to not require carrying
some intermediate values in a x86_def_t struct (and eventually kill the
x86_def_t struct entirely).

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

9337e3b6 07/29/2013 04:29 pm Eduardo Habkost

target-i386: Disable PMU CPUID leaf by default

Bug description: QEMU currently gets all bits from GET_SUPPORTED_CPUID
for CPUID leaf 0xA and passes them directly to the guest. This makes
the guest ABI depend on host kernel and host CPU capabilities, and
breaks live migration if we migrate between hosts with different...

14a10fc3 07/29/2013 04:29 pm Andreas Färber

cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.
This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".

The reason for the failure is that CPUClass::kvm_fd is not yet...

986a2998 07/27/2013 01:04 am Andreas Färber

gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions

This avoids polluting the global namespace with a non-prefixed macro and
makes it obvious in the call sites that we return.

Semi-automatic conversion using, e.g.,
sed i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target*/gdbstub.c...

5b50e790 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_{read,write}_register()

Completes migration of target-specific code to new target-*/gdbstub.c.

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

f20f9df0 07/27/2013 12:24 am Andreas Färber

target-i386: Move cpu_gdb_{read,write}_register()

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

a0e372f0 07/27/2013 12:23 am Andreas Färber

cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs

CPUState::gdb_num_regs replaces num_g_regs.
CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.

Allows building gdb_register_coprocessor() for xtensa, too.

As a side effect this should fix coprocessor register numbering for SMP....

38e478ec 07/27/2013 12:05 am Stefan Weil

kvm: Change prototype of kvm_update_guest_debug()

Passing a CPUState pointer instead of a CPUArchState pointer eliminates
the last target dependent data type in sysemu/kvm.h.

It also simplifies the code.

Signed-off-by: Stefan Weil <>
Acked-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 <>...

f03d07d4 07/23/2013 06:57 pm Anthony Liguori

Merge remote-tracking branch 'quintela/migration.next' into staging

  1. By Michael R. Hines (8) and others
  2. Via Juan Quintela
    • quintela/migration.next:
      migration: add autoconvergence documentation
      Fix real mode guest segments dpl value in savevm
      Fix real mode guest migration...
444ba679 07/23/2013 03:36 pm Orit Wasserman

Fix real mode guest migration

Older KVM versions save CS dpl value to an invalid value for real mode guests
(0x3). This patch detect this situation when loading CPU state and set all the
segments dpl to zero.
This will allow migration from older KVM on host without unrestricted guest...

3e47c249 07/23/2013 03:36 pm Orit Wasserman

Fix real mode guest segments dpl value in savevm

Older KVM version put invalid value in the segments registers dpl field for
real mode guests (0x3).
This breaks migration from those hosts to hosts with unrestricted guest support.
We detect it by checking CS dpl value for real mode guest and fix the dpl values...

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

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

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

cpu: Move singlestep_enabled field from CPU_COMMON to CPUState

Prepares for changing cpu_single_step() argument to CPUState.

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

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

cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()

This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.

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

51455c59 07/10/2013 06:54 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

  • Fix for OpenRISCCPU subclasses
  • Fix for gdbstub CPU selection
  • Move linux-user CPU functions into new header
  • CPUState part 10 refactoring: first_cpu, next_cpu, cpu_single_env et al....
ca4c810a 07/09/2013 10:33 pm Andreas Färber

target-i386: Change do_interrupt_all() argument to X86CPU

Prepares for log_cpu_state() changing argument to CPUState.

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

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

log: Change log_cpu_state[_mask]() argument to CPUState

Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turn
cpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is no
longer needed.

Add documentation and make the functions available through qemu/log.h...

8995b7a0 07/09/2013 10:33 pm Andreas Färber

target-i386: Change LOG_PCALL_STATE() argument to CPUState

Since log_cpu_state_mask() argument was changed to CPUState,
CPUArchState is no longer needed.

Choose CPUState rather than X86CPU to not hide type mismatches with CPU.

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

91b1df8c 07/09/2013 10:33 pm Andreas Färber

cpu: Move reset logging to CPUState

x86 was using additional CPU_DUMP_* flags, so make that configurable in
CPUClass::reset_dump_flags.

This adds reset logging for alpha, unicore32 and xtensa.

Acked-by: Michael Walle <> (for lm32)
Reviewed-by: Richard Henderson <>...

467215c2 07/09/2013 10:33 pm Andreas Färber

target-i386: Change gen_intermediate_code_internal() argument to X86CPU

Also use bool type while at it.

Prepares for moving singlestep_enabled field to CPUState.

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

369ff018 07/09/2013 10:33 pm Andreas Färber

target-i386: Don't overuse CPUArchState

Use CPUX86State instead in dump support code.

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

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

6e42be7c 07/09/2013 10:20 pm Andreas Färber

cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

A transition from CPUFooState to FooCPU can be considered safe,
just like FooCPU::env access in the opposite direction.
The only benefit of the FOO_CPU() casts would be protection against
bogus CPUFooState pointers, but then surrounding code would likely...

36ad0e94 07/09/2013 09:38 pm Markus Armbruster

Fix -machine options accel, kernel_irqchip, kvm_shadow_mem

Multiple -machine options with the same ID are merged. All but the
one without an ID are to be silently ignored.

In most places, we query these options with a null ID. This is
correct.

In some places, we instead query whatever options come first in the...

1b5ec234 07/04/2013 06:42 pm Paolo Bonzini

memory: return MemoryRegion from qemu_ram_addr_from_host

It will be needed in the next patch.

Reviewed-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

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

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

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

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

kvm: Change kvm_cpu_synchronize_state() argument to CPUState

It no longer relies on CPUArchState since 20d695a.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>...

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

90a2541b 06/15/2013 08:50 pm liguang

target-i386: fix over 80 chars warnings

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

0bc60a8a 06/15/2013 08:50 pm liguang

target-i386/helper: remove redundant env->eip assignment

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

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

a23bbfda 06/11/2013 07:03 pm Andreas Färber

cpu: Turn cpu_get_memory_mapping() into a CPUState hook

Change error reporting from return value to Error argument.

Reviewed-by: Jens Freimann <>
Reviewed-by: Luiz Capitulino <>
[AF: Fixed cpu_get_memory_mapping() documentation]...

444d5590 06/11/2013 06:50 pm Andreas Färber

cpu: Turn cpu_paging_enabled() into a CPUState hook

Relocate assignment of x86 get_arch_id to have all hooks in one place.

Reviewed-by: Jens Freimann <>
Reviewed-by: Luiz Capitulino <>
Signed-off-by: Andreas Färber <>

31ccdde2 06/11/2013 12:33 am Igor Mammedov

target-i386: cpu: Fix potential buffer overrun in get_register_name_32()

Spotted by Coverity,
x86_reg_info_32[] is CPU_NB_REGS32 elements long, so accessing
x86_reg_info_32[CPU_NB_REGS32] will be one element off array.

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

ffce9ebb 06/11/2013 12:33 am Eduardo Habkost

target-i386: Update model values on Conroe/Penryn/Nehalem CPU models

The CPUID model values on Conroe, Penryn, and Nehalem are too
conservative and don't reflect the values found on real Conroe, Penryn,
and Nehalem CPUs.

This causes at least one known problems: Windows XP disables sysenter...

6b11322e 06/11/2013 12:33 am Eduardo Habkost

target-i386: Set level=4 on Conroe/Penryn/Nehalem

The CPUID level value on Conroe, Penryn, and Nehalem are too low. This
causes at least one known problem: the -smp "threads" option doesn't
work as expect if level is < 4, because thread count information is...

dec3fc96 05/31/2013 08:51 pm Richard Henderson

target-i386: Fix aflag logic for CODE64 and the 0x67 prefix

The code reorganization in commit 4a6fd938 broke handling of PREFIX_ADR.
While fixing this, tidy and comment the code so that it's more obvious
what's going on in setting both aflag and dflag.

The TARGET_X86_64 ifdef can be eliminated because CODE64 expands to the...

bff63471 05/31/2013 04:02 pm Qiao Nuohan

target-i386: Fix mask of pte index in memory mapping

Function walk_pte() needs pte index to calculate virtual address.
However, pte index of PAE paging or IA-32e paging is 9 bit, so the mask
should be 0x1ff.

Signed-off-by: Qiao Nuohan <>...

fbc2ed95 05/31/2013 04:02 pm Luiz Capitulino

target-i386: fix abort on bad PML4E/PDPTE/PDE/PTE addresses

The code used to walk IA-32e page-tables, and possibly PAE page-tables,
uses the bit mask ~0xfff to get the next PML4E/PDPTE/PDE/PTE address.

However, as we use a uint64_t to store the resulting address, that mask...