Statistics
| Branch: | Revision:

root / target-i386 @ ac72472b

# Date Author Comment
ac72472b 08/28/2009 03:33 am Andre Przywara

push CPUID level to 4 to allow Intel multicore decoding

Intel CPUs store the number of cores in CPUID leaf 4. So push
the maxleaf value to 4 to allow the guests access to this leaf.

Signed-off-by: Andre Przywara <>
Signed-off-by: Anthony Liguori <>

0b5c1ce8 08/24/2009 04:21 pm Nathan Froyd

cleanup cpu-exec.c, part 0/N: consolidate handle_cpu_signal

handle_cpu_signal is very nearly copy-paste code for each target, with a
few minor variations. This patch sets up appropriate defaults for a
generic handle_cpu_signal and provides overrides for particular targets...

4a1418e0 08/24/2009 04:02 pm Anthony Liguori

Unbreak large mem support by removing kqemu

kqemu introduces a number of restrictions on the i386 target. The worst is that
it prevents large memory from working in the default build.

Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...

e2542fe2 07/27/2009 10:09 pm Juan Quintela

rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

5e650002 07/17/2009 06:20 am Anthony Liguori

Only allow -cpu host when KVM is enabled

-cpu host is not at all useful when using tcg.

Signed-off-by: Anthony Liguori <>

e6f9e6b4 07/17/2009 06:04 am Anthony Liguori

Initialize cpuid variables

This causes a build break when !KVM.

Signed-off-by: Anthony Liguori <>

09ac35ac 07/17/2009 01:28 am Andre Przywara

omit 3DNOW! CPUID bits from qemu64 CPU model

Since we recently do not disable 3DNOW! support anymore, we should
avoid setting the bits in the default qemu64 CPU model to ease
migration. TCG does not support it anyway and even AMD deprecates
it's usage nowadays....

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

84273177 07/16/2009 04:28 pm Jan Kiszka

gdbstub: x86: Support for setting segment registers

This allows to set segment registers via gdb also in system emulation
mode. Basic sanity checks are applied and nothing is changed if they
fail. But screwing up the target via this interface will never be...

d9db889f 07/10/2009 09:44 pm Jan Kiszka

kvm: Work around borken MSR_GET_INDEX_LIST

Allocate enough memory for KVM_GET_MSR_INDEX_LIST as older kernels shot
far beyond their limits, corrupting user space memory.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

e6a0575e 07/10/2009 09:41 pm Anthony Liguori

Make sure to mark MCE defines as ULL

Fixes build on 32-bit

Signed-off-by: Anthony Liguori <>

79c4f6b0 07/10/2009 12:04 am Huang Ying

QEMU: MCE: Add MCE simulation to qemu/tcg

- MCE features are initialized when VCPU is intialized according to CPUID.
- A monitor command "mce" is added to inject a MCE.
- A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE.

aliguori: fix build for linux-user...

6ad8702a 07/02/2009 08:07 pm Jan Kiszka

Use ctz64 in favor of ffsll

Not all host platforms support ffsll.

Signed-off-by: Jan Kiszka <>

97b35e35 07/01/2009 10:30 pm Blue Swirl

Suppress a GCC warning

Signed-off-by: Blue Swirl <>

059b8b1e 06/29/2009 10:18 pm Jan Kiszka

KVM: x86: Refactor persistent CPU state

This patch aligns the KVM-related layout and encoding of the CPU state
to be saved to disk or migrated with qemu-kvm. The major differences are
reordering of fields and a compressed interrupt_bitmap into a single
number as there can be no more than one pending IRQ at a time....

6c0d7ee8 06/29/2009 09:52 pm Andre Przywara

preserve the hypervisor bit while KVM trims the CPUID bits

The KVM kernel will disable all bits in CPUID which are not present in
the host. As this is mostly true for the hypervisor bit (1.ecx),
preserve its value before the trim and restore it afterwards....

6d2edc43 06/29/2009 09:52 pm Andre Przywara

allow hypervisor CPUID bit to be overriden

KVM defaults to the hypervisor CPUID bit to be set, whereas pure
QEMU clears it. On some occasions one wants to set or clear it the
other way round (for instance to get HyperV running inside a guest).

Move the bit-set to be done before the command line parsing and...

fe4bce09 06/29/2009 09:52 pm Andre Przywara

introduce -cpu host target

Although the guest's CPUID bits can be controlled in a fine grained way
in QEMU, a simple way to inject the host CPU is missing. This is handy
for KVM desktop virtualization, where one wants the guest to support the
full host feature set....

f441bee8 06/29/2009 09:52 pm Andre Przywara

CPUID Fn8000_0001.EAX is family/model/stepping, not features

Signed-off-by: Andre Przywara <>
Signed-off-by: Anthony Liguori <>

6c1f42fe 06/29/2009 09:52 pm Andre Przywara

fix KVMs GET_SUPPORTED_CPUID feature usage

If we want to trim the user provided CPUID bits for KVM to be not greater
than that of the host, we should not remove the bits after we sent
them to the kernel.
This fixes the masking of features that are not present on the host by...

671e4676 06/29/2009 09:52 pm Andre Przywara

remove CPUID host hacks

KVM provides an in-kernel feature to disable CPUID bits that are not
present in the current host. So there is no need here to duplicate this
work. Additionally allows 3DNow! on capable processors, since the
restriction seems to apply to QEMU/TCG only....

b09ea7d5 06/22/2009 06:15 pm Gleb Natapov

Handle init/sipi in a main cpu exec loop. (v2)

This should fix compilation problem in case of CONFIG_USER_ONLY.

Currently INIT/SIPI is handled in the context of CPU that sends IPI.
This patch changes this to handle them like all other events in a main
cpu exec loop. When KVM will gain thread per vcpu capability it will...

ef768138 06/16/2009 11:36 pm Andre Przywara

allow CPUID vendor override

KVM-enabled QEMU will always report the vendor ID of the physical CPU it is
running on. Allow to override this if explicitly requested on the
command line. It will not suffice to name a CPU type (like -cpu phenom),
but you have to explicitly set the vendor: -cpu phenom,vendor=AuthenticAMD...

538f3686 06/16/2009 11:36 pm Nitin A Kamble

QEMU KVM: i386: Fix the cpu reset state

As per the IA32 processor manual, the accessed bit is set to 1 in the
processor state after reset. qemu pc cpu_reset code was missing this
accessed bit setting.

Signed-off-by: Nitin A Kamble <>...

a2397807 05/22/2009 06:50 pm Jan Kiszka

x86: Add support for resume flag

Signed-off-by: Jan Kiszka <>

f8d926e9 05/22/2009 06:50 pm Jan Kiszka

kvm: x86: Save/restore KVM-specific CPU states

Save and restore all so far neglected KVM-specific CPU states. Handling
the TSC stabilizes migration in KVM mode. The interrupt_bitmap and
mp_state are currently unused, but will become relevant for in-kernel...

b0a46a33 05/22/2009 06:50 pm Jan Kiszka

kvm: Add missing bits to support live migration

This patch adds the missing hooks to allow live migration in KVM mode.
It adds proper synchronization before/after saving/restoring the VCPU
states (note: PPC is untested), hooks into
cpu_physical_memory_set_dirty_tracking() to enable dirty memory logging...

f80f9ec9 05/21/2009 04:47 pm Anthony Liguori

Convert machine registration to use module init functions

This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.

Signed-off-by: Anthony Liguori <>

76ae317f 05/20/2009 05:12 pm Mark McLoughlin

kvm: work around supported cpuid ioctl() brokenness

KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG
when it runs out of entries. Detect this by always trying again
with a bigger table if the ioctl() fills the table.

Signed-off-by: Mark McLoughlin <>

55616505 05/13/2009 10:54 pm Paul Brook

Include assert.h from qemu-common.h

Include assert.h from qemu-common.h and remove other direct uses.
cpu-all.h still need to include it because of the dyngen-exec.h hacks

Signed-off-by: Paul Brook <>

001faf32 05/13/2009 08:53 pm Blue Swirl

Replace gcc variadic macro extension with C99 version

Signed-off-by: Blue Swirl <>

989cebff 05/08/2009 11:51 pm Anthony Liguori

Remove noisy printf when KVM masks CPU features

Signed-off-by: Anthony Liguori <>

b827df58 05/08/2009 11:42 pm Avi Kivity

kvm: Add support for querying supported cpu features

kvm does not support all cpu features; add support for dunamically querying
the supported feature set.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

c6fa82c4 05/08/2009 11:42 pm Avi Kivity

Make x86 cpuid feature names available in file scope

To be used later.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

02b049df 05/08/2009 11:42 pm Avi Kivity

Fix x86 feature modifications for features that set multiple bits

QEMU allows adding or removing cpu features by using the syntax '-cpu +feature'
or '-cpu -feature'. Some cpuid features cause more than one bit to be set or
cleared; but QEMU stops after just one bit has been modified, causing the...

e8a6aec9 05/08/2009 11:42 pm Avi Kivity

kvm: Trim cpu features not supported by kvm

Remove cpu features that are not supported by kvm from the cpuid features
reported to the guest.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

0bf46a40 04/24/2009 09:03 pm aliguori

qemu: introduce qemu_init_vcpu (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162

6a4955a8 04/24/2009 09:03 pm aliguori

qemu: per-arch cpu_has_work (Marcelo Tosatti)

Blue Swirl: fix Sparc32 breakage

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7238 c046a42c-6fe2-441c-8c8c-71466251a162

00ea18d1 04/23/2009 04:16 pm aliguori

Fix i386-linux-user build (Laurent Desnogues)

This broke due to r7230.

Signed-off-by: Laurent Desnogues <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7233 c046a42c-6fe2-441c-8c8c-71466251a162

2ed51f5b 04/22/2009 11:20 pm aliguori

put valid data into exit_int_info if needed (Gleb Natapov)

If fault happened during event delivery exit_int_info should contain
valid info about the event on vm exit.

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

e37630ca 04/22/2009 06:19 pm aliguori

xen: groundwork for xen support (Gerd Hoffmann)

- configure script and build system changes.
- wind up new machine type.
- add xen* command line options.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>...

640f42e4 04/19/2009 01:18 pm blueswir1

kqemu: merge CONFIG_KQEMU and USE_KQEMU

Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".

Signed-off-by: Paul Bolle <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162

a3867ed2 04/18/2009 06:36 pm aliguori

x86: Enhanced dump of segment registers (Jan Kiszka)

Parse the descriptor flags that segment registers refer to and show the
result in a more human-friendly format. The output of info registers eg.
then looks like this:

[...]
ES =007b 00000000 ffffffff 00cff300 DPL=3 DS [-WA]...

a33609ca 04/17/2009 11:50 pm aliguori

kvm: Fix cpuid initialization (Jan Kiszka)

Fix (more or less) spurious guest boot failures due to corrupted cpuid
states. The reason was insufficient initialization of cpuid entries
before passing them to the kernel.

At this chance also fix improper entry pointer progression and simplify...

1b530a6d 04/05/2009 11:08 pm aurel32

Add new command line option -singlestep for tcg single stepping.

This replaces a compile time option for some targets and adds
this feature to targets which did not have a compile time option.

Add monitor command to enable or disable single step mode.

Modify monitor command "info status" to display single step mode....

8cd6345d 04/03/2009 01:54 am malc

Immediate versions of ro[lr]

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6968 c046a42c-6fe2-441c-8c8c-71466251a162

64bf3f4e 03/28/2009 07:51 pm aliguori

kvm: Drop kvm_patch_opcode_byte (Jan Kiszka)

As cpu_memory_rw_debug is now capable of modifying ROM, we can drop our
own patch function.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6906 c046a42c-6fe2-441c-8c8c-71466251a162

dc1ded53 03/20/2009 06:13 pm aliguori

x86: Add NULL check to lsl (Jan Kiszka)

According to the Intel specs, lsl performs a check against NULL for the
provided selector, just like lar does. helper_lar() includes the
corresponding code, helper_lsl() was lacking it so far.

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

8777643e 03/13/2009 11:35 am aurel32

target-i386: use the new bswap* TCG ops

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6836 c046a42c-6fe2-441c-8c8c-71466251a162

66896cb8 03/13/2009 11:34 am aurel32

tcg: rename bswap_i32/i64 functions

Rename bswap_i32 into bswap32_i32 and bswap_i64 into bswap64_i64

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6829 c046a42c-6fe2-441c-8c8c-71466251a162

e22a25c9 03/12/2009 10:12 pm aliguori

Guest debugging support for KVM (Jan Kiszka)

This is a backport of the guest debugging support for the KVM
accelerator that is now part of the KVM tree. It implements the reworked
KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
not yet part of any mainline kernel but will probably be 2.6.30 stuff....

c2764719 03/07/2009 05:24 pm pbrook

The _exit syscall is used for both thread termination in NPTL applications,
and process termination in legacy applications. Try to guess which we want
based on the presence of multiple threads.

Also implement locking when modifying the CPU list.

Signed-off-by: Paul Brook <>...

b36d24b6 03/05/2009 09:01 pm aliguori

Fix cpuid KVM crash on i386 (Lubomir Rintel)

Cpuid should return into vec, not overwrite past address in count.
Changeset 6565 broke this.

Signed-off-by: Lubomir Rintel <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6689 c046a42c-6fe2-441c-8c8c-71466251a162

ff3c01ca 03/04/2009 11:00 pm balrog

Fix "info registers" under kvm.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6684 c046a42c-6fe2-441c-8c8c-71466251a162

680c3069 02/27/2009 10:05 pm aliguori

x86: use qemu_log_mask on triple faults (Chris Wright)

replace open coded qemu_log_mask with proper macro

Signed-off-by: Chris Wright <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6649 c046a42c-6fe2-441c-8c8c-71466251a162

b136a4c6 02/11/2009 11:00 pm aliguori

KVM: cpuid function 2: store all values (Amit Shah)

Incrementing the array index was missed in the previous series which causes
us to not store all the values.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>...

a36b1029 02/09/2009 05:50 pm aliguori

KVM: Get all cpuid values from function 2 (Amit Shah)

cpuid function 2 can have multiple values to describe cache behaviour.
Loop till we have fetched all the values.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>...

486bd5a2 02/09/2009 05:50 pm aliguori

KVM: Fetch sub-leaf cpuid values for functions 4, 0xb, 0xd. (Amit Shah)

CPUID functions 4, 0xb and 0xd have sub-leaf values which depend on the
input value of ECX. Store these values as well.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>...

e00b6f80 02/09/2009 05:50 pm aliguori

KVM: CPUID takes ecx as input value for some functions (Amit Shah)

The CPUID instruction takes the value of ECX as an input parameter
in addition to the value of EAX as the count for functions 4, 0xb
and 0xd. Make sure we pass the value to the instruction....

0d0266a5 02/06/2009 12:06 am aliguori

targets: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6530 c046a42c-6fe2-441c-8c8c-71466251a162

9bdba1b6 02/02/2009 07:10 pm aliguori

Add phenom CPU descriptor (Alexander Graf)

As part of my ongoing effort to make nested SVM useful, I started working to get
VMware ESX run inside KVM.

VMware couples itself pretty tightly to the CPUID, so it's a good idea to emulate
a machine that officially supports SVM and should thus exploit the powers of...

eef26553 02/02/2009 07:10 pm aliguori

Implement FFXSR (Alexander Graf)

Newer AMD CPUs have the FFXSR capability. This leaves out XMM
register in FXSAVE/FXRESTORE when in CPL=0 and 64-bit mode.

This is required for Hyper-V.

Signed-off-by: Alexander Graf <>
Signed-off-by: Anthony Liguori <>...

a5e50b26 02/02/2009 12:19 am malc

Replace noreturn with QEMU_NORETURN

Thanks to Robert Riebisch for analysis [1]

[1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6492 c046a42c-6fe2-441c-8c8c-71466251a162

33049de7 01/29/2009 09:45 pm aliguori

Fix a typo in ext2_feature_name (Carl-Daniel Hailfinger)

Signed-off-by: Carl-Daniel Hailfinger <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6474 c046a42c-6fe2-441c-8c8c-71466251a162

6e48a40d 01/29/2009 07:02 pm aliguori

Use new logging API in reset handling (Jan Kiszka)

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6473 c046a42c-6fe2-441c-8c8c-71466251a162

dd5e3b17 01/29/2009 07:02 pm aliguori

MTRR support on x86, part 2 (Carl-Daniel Hailfinger)

Load and save MTRR state together with machine state.

Add support for the MTRRcap MSR which is used by the latest Bochs BIOS
and some operating systems.

Fix a typo in ext2_feature_name.

With this patch, MTRR emulation should be good enough to not trigger any...

8c6c919e 01/26/2009 10:32 pm aliguori

kvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)

It seems that the conversion of the kernel-delivered eflags state into
qemu's internal split representation was once needed in an older kvm
design (register read-back may have taken place from inside cpu_exec)....

f55761a0 01/26/2009 09:54 pm aliguori

x86: Issue reset on triple faults (Jan Kiszka)

As discussed a few times on this list: A triple fault causes a system
reset on x86, and some guests make use of this (e.g. 386BSD). To keep
the chance of tracing unexpected resets, log them if CPU_LOG_RESET is...

eca1bdf4 01/26/2009 09:54 pm aliguori

Log reset events (Jan Kiszka)

Original idea&code by Kevin Wolf, split-up in two patches and added more
archs.

This patch introduces a flag to log CPU resets. Useful for tracing
unexpected resets (such as those triggered by x86 triple faults).

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

165d9b82 01/26/2009 07:53 pm aliguori

MTRR support on x86 (Carl-Daniel Hailfinger)

The current codebase ignores MTRR (Memory Type Range Register)
configuration writes and reads because Qemu does not implement caching.
All BIOS/firmware in know of for x86 do implement a mode called
Cache-as-RAM (CAR) which locks down the CPU cache lines and uses the CPU...

8fec2b8c 01/16/2009 12:36 am aliguori

global s/loglevel & X/qemu_loglevel_mask(X)/ (Eduardo Habkost)

These are references to 'loglevel' that aren't on a simple 'if (loglevel &
X) qemu_log()' statement.

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

93fcfe39 01/16/2009 12:34 am aliguori

Convert references to logfile/loglevel to use qemu_log*() macros

This is a large patch that changes all occurrences of logfile/loglevel
global variables to use the new qemu_log*() macros.

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

d12d51d5 01/15/2009 11:48 pm aliguori

Clean up debugging code #ifdefs (Eduardo Habkost)

Use macros to avoid #ifdefs on debugging code.

This patch doesn't try to merge logging macros from different files,
but just unify the debugging code #ifdefs onto a macro on each file. A
further cleanup can unify the debugging macros on a common header, later...

1c918eba 01/14/2009 09:27 pm blueswir1

Suppress i386 warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6304 c046a42c-6fe2-441c-8c8c-71466251a162

7d99a001 01/14/2009 09:00 pm blueswir1

Add noreturn function attribute

Introduce noreturn attribute and attach it to cpu_loop_exit as well as
interrupt/exception helpers for i386. This avoids a bunch of gcc4
warnings.

[ Note that this patch comes with a workaround to include qemu-common.h
even in cases where is currently causes conflicts with dyngen-exec.h....

fad6cb1a 01/05/2009 12:05 am aurel32

Update FSF address in GPL/LGPL boilerplate

The attached patch updates the FSF address in the GPL/LGPL boilerplate
in most GPL/LGPLed files, and also in COPYING.LIB.

Signed-off-by: Stuart Brady <>
Signed-off-by: Aurelien Jarno <>...

b1503cda 12/22/2008 10:33 pm malc

Use the ARRAY_SIZE() macro where appropriate.

Change from v1:
Avoid changing the existing coding style in certain files.

Signed-off-by: Stuart Brady <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162

55308450 12/13/2008 10:49 pm aliguori

Initialize msr list size properly in KVM

Hollis Blanchard noticed that the last commit was not sufficient. We also need
to initialize the msr size in our newly allocated list.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6018 c046a42c-6fe2-441c-8c8c-71466251a162

4c9f7372 12/13/2008 10:41 pm aliguori

Correctly initialize msr list in KVM

I believe this was spotted by Gerd Hoffman but I can't find his patch
now. This will cause very subtle corruption on the heap because we
don't allocate the appropriately sized buffer.

Signed-off-by: Anthony Liguori <>...

f60d2728 12/13/2008 05:51 pm malc

Fix smsw for x86_64 guest and bigendian host case

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6009 c046a42c-6fe2-441c-8c8c-71466251a162

d9957a8b 12/13/2008 01:49 pm blueswir1

x86 cleanup

Remove some unnecessary includes, add needed includes, move prototypes to
cpu.h to suppress missing prototype warnings.

Remove unused functions and prototypes (cpu_x86_flush_tlb, cpu_lock,
cpu_unlock, restore_native_fp_state, save_native_fp_state)....

40a2d705 12/11/2008 11:03 pm aliguori

Fix crash in kvm.c (Stefan Weil)

Fix crash with kvm enabled.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5984 c046a42c-6fe2-441c-8c8c-71466251a162

32938e12 12/10/2008 05:02 pm aurel32

target-i386: Fix jmp im on x86_64 when executing 32-bit code

When running grub-install (32-bit) on an x86_64 Linux system in qemu, it
hangs on a pagefault forever, because an integer overflow occurs on the
IP on "jmp im". This patch masks overflows for 32 bit IPs on a 64 bit...

db8d9902 12/07/2008 08:15 pm aurel32

Remove FORCE_RET() and RETURN

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5923 c046a42c-6fe2-441c-8c8c-71466251a162

0b97134b 12/07/2008 08:15 pm aurel32

target-i386: fix CVE-2007-1322

The icebp instruction can be abused to terminate the emulation,
resulting in denial of service.

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5921 c046a42c-6fe2-441c-8c8c-71466251a162

d4b55be5 12/02/2008 09:40 pm aliguori

Fix register name typo in dumping debug registers (Jan Kiszka)

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5855 c046a42c-6fe2-441c-8c8c-71466251a162

dcfd12b8 12/01/2008 03:52 am balrog

Fix pmovsx* / pmovzx* SSE instructions (original fix by Frank Mehnert).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5841 c046a42c-6fe2-441c-8c8c-71466251a162

2cbd949d 11/30/2008 06:23 pm aurel32

Common cpu_loop_exit prototype

All archs use the same cpu_loop_exit, so move the prototype in a common
header. i386 was carrying a __hidden attribute, but that was empty for
this arch anyway.

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

c0ce998e 11/26/2008 12:13 am aliguori

Use sys-queue.h for break/watchpoint managment (Jan Kiszka)

This switches cpu_break/watchpoint_* to TAILQ wrappers, simplifying the
code and also fixing a use after release issue in
cpu_break/watchpoint_remove_all.

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

9c99d2ab 11/25/2008 07:19 pm aliguori

i386: remove unused function prototypes (Laurent Desnogues)

This patch removes two unused prototypes from i386 target exec.h file.

Signed-off-by: Laurent Desnogues <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5795 c046a42c-6fe2-441c-8c8c-71466251a162

a59cb4e0 11/18/2008 11:09 pm aliguori

x86: Dump debug registers (Jan Kiszka)

As the debug registers are no longer dummies, let's include their
current state into the 'info registers' output and other register dumps.

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

01df040b 11/18/2008 11:08 pm aliguori

x86: Debug register emulation (Jan Kiszka)

Built on top of previously enhanced breakpoint/watchpoint support, this
patch adds full debug register emulation for the x86 architecture.

Many corner cases were considered, and the result was successfully
tested inside a Linux guest with gdb, but I won't be surprised if one...

a1d1bb31 11/18/2008 10:07 pm aliguori

Refactor and enhance break/watchpoint API (Jan Kiszka)

This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow the
succeeding enhancements this series comes with.

First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switching
to dynamically allocated data structures that are kept in linked lists....

6b917547 11/18/2008 09:46 pm aliguori

Refactor translation block CPU state handling (Jan Kiszka)

This patch refactors the way the CPU state is handled that is associated
with a TB. The basic motivation is to move more arch specific code out
of generic files. Specifically the long #ifdef clutter in tb_find_fast()...

622ed360 11/18/2008 09:36 pm aliguori

Convert CPU_PC_FROM_TB to static inline (Jan Kiszka)

as macros should be avoided when possible.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5735 c046a42c-6fe2-441c-8c8c-71466251a162

a7812ae4 11/17/2008 04:43 pm pbrook

TCG variable type checking.

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5729 c046a42c-6fe2-441c-8c8c-71466251a162

30913bae 11/16/2008 09:15 pm aurel32

target-i386: fix helper_pmovmskb_mmx helper

(malc)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5728 c046a42c-6fe2-441c-8c8c-71466251a162

10781c09 11/13/2008 09:37 pm aliguori

x86: fix warning without CONFIG_KVM (Mark McLoughlin)

Warning is:

target-i386/helper.c: In function `cpu_x86_cpuid':
target-i386/helper.c:1373: warning: implicit declaration of function `host_cpuid'

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>...

57003085 11/13/2008 09:28 pm aliguori

Fix CPUID ext2 features masking (Avi Kivity)

Typo. Exposes rdtscp which kills some guests.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5717 c046a42c-6fe2-441c-8c8c-71466251a162

984b5181 11/13/2008 09:21 pm aliguori

Define kvm_ioctl in the same way as ioctl

The third argument to ioctl is a ... which allows any value to be passed. In
practice, glibc always treats the argument as a void *.

Do the same thing for the kvm ioctls to keep things consistent with a
traditional ioctl....