Statistics
| Branch: | Revision:

root / target-i386 @ 250b086e

# Date Author Comment
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...

7e680753 03/07/2012 12:31 pm Michael S. Tsirkin

kvm: fill in padding to help valgrind

valgrind warns about padding fields which are passed
to vcpu ioctls uninitialized.
This is not an error in practice because kvm ignored padding.
Since the ioctls in question are off data path and
the cost is zero anyway, initialize padding to 0...

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...
5918ff68 03/01/2012 11:26 pm Anthony Liguori

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

  • qemu-kvm/uq/master:
    pc-bios: update kvmvapic.bin
    kvmvapic: Use optionrom helpers
    optionsrom: Reserve space for checksum
    kvmvapic: Simplify mp/up_set_tpr
    kvmvapic: Introduce TPR access optimization for Windows guests...
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 <>

ed5e1ec3 02/24/2012 05:06 pm Andreas Färber

target-i386: Introduce x86_cpuid_version_set_family()

Move the logic for setting the family and extended family into a
helper function.

To make the helper self-contained and in preparation of future
unordered/multiple uses, mask out any previous family values first....

b0704cbd 02/24/2012 05:06 pm Andreas Färber

target-i386: Introduce x86_cpuid_version_set_model()

Move the logic for setting the model and extended model fields
into a helper function.

To make the function self-contained and to prepare for future
unordered/multiple uses, mask out any previous model values first....

38c3dc46 02/24/2012 05:06 pm Andreas Färber

target-i386: Introduce x86_cpuid_version_set_stepping()

Move the logic for setting the stepping field into a helper function.

To make the function self-contained and to prepare for future
unordered/multiple uses, mask out any previous stepping values first....

dcce6675 02/24/2012 05:06 pm Andreas Färber

target-i386: Introduce x86_cpuid_set_model_id()

Move the logic to transform the 48-char model ID into the 12-word model
value into a helper.

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

f370be3c 02/22/2012 09:24 pm Eduardo Habkost

cpu flags: aliases: pclmuldq|pclmulqdq and ffxsr|fxsr_opt

pclmulqdq: /proc/cpuinfo on Linux and all documentation I have seen uses
pclmulqdq as the flag name. As the only document using pclmuldq seems to
be the Intel CPUID documentation (Application Note 485), it looks like a...

3ac8ebfe 02/22/2012 09:24 pm Eduardo Habkost

cpu defs: use Intel flag names for Intel models (v2)

Use 'i64' instead of 'lm' and 'xd' instead of 'nx' on Intel models.

The flags have different names on Intel docs, so use those names for clarity.

This is based on a previous patch from John Cooper where this was introduced...

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

d1f86636 02/16/2012 06:21 pm Gleb Natapov

kvm: Synchronize cpu state in kvm_arch_stop_on_emulation_error()

Call to kvm_cpu_synchronize_state() is missing.
kvm_arch_stop_on_emulation_error may look at outdated registers here.

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

39d6960a 02/08/2012 07:57 pm Jan Kiszka

kvm: Allow to set shadow MMU size

Introduce the KVM-specific machine option kvm_shadow_mem. It allows to
set a custom shadow MMU size for the virtual machine. This is useful for
stress testing e.g.

Only x86 supports this for now, but it is in principle a generic...

3d4b2649 02/08/2012 07:57 pm Jan Kiszka

kvm: Implement kvm_irqchip_in_kernel like kvm_enabled

To both avoid that kvm_irqchip_in_kernel always has to be paired with
kvm_enabled and that the former ends up in a function call, implement it
like the latter. This means keeping the state in a global variable and...

61eb1f38 01/23/2012 10:04 pm Blue Swirl

hyperv: fix build on non-KVM hosts

Signed-off-by: Blue Swirl <>

84b058d7 01/19/2012 01:14 pm Jan Kiszka

kvm: Introduce core services for in-kernel irqchip support

Add the basic infrastructure to active in-kernel irqchip support, inject
interrupts into these models, and maintain IRQ routes.

Routing is optional and depends on the host arch supporting
KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as...

680c1c6f 01/19/2012 01:14 pm Jan Kiszka

kvm: x86: Add user space part for in-kernel APIC

This introduces the alternative APIC device which makes use of KVM's
in-kernel device model. External NMI injection via LINT1 is emulated by
checking the current state of the in-kernel APIC, only injecting a NMI...

eab70139 01/19/2012 12:33 pm Vadim Rozenfeld

hyper-v: initialize Hyper-V CPUID leaves.

Signed-off-by: Marcelo Tosatti <>

28f52cc0 01/19/2012 12:32 pm Vadim Rozenfeld

hyper-v: introduce Hyper-V support infrastructure.

[Jan: fix build with CONFIG_USER_ONLY]

Signed-off-by: Marcelo Tosatti <>

20f8bd48 01/13/2012 05:01 pm Aurelien Jarno

target-i386: fix compilation with --enable-debug-tcg

Commit 2355c16e74ffa4d14e7fc2b4a23b055565ac0221 introduced a new ldmxcsr
helper taking an i32 argument, but the helper is actually passed a long.
Fix that by truncating the long to i32.

Signed-off-by: Aurelien Jarno <>

a4d1f142 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions

minpd, minps, minsd, minss and maxpd, maxps, maxsd, maxss SSE2
instructions have been broken when switching target-i386 to softfloat.
It's not possible to use comparison instructions on float types anymore...

adc71666 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix round{pd,ps,sd,ss} SSE2 instructions

roundps and roundss SSE2 instructions have been broken when switching
target-i386 to softfloat. They use float64_round_to_int to convert a
float32, and while the implicit conversion from float32 to float64 was...

170d5b4b 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix dpps and dppd SSE2 instructions

The helpers implemented dpps and dppd SSE instructions are not passing
the correct argument types to the softfloat functions. While they do
work anyway providing a correct behaviour, this patch fixes that....

2355c16e 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix SSE rounding and flush to zero

SSE rounding and flush to zero control has never been implemented. However
given that softfloat-native was using a single state for FPU and SSE and
given that glibc is setting both FPU and SSE state in fesetround(), this...

f3c6a169 01/03/2012 10:39 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into staging

  • qemu-kvm/memory/page_desc: (22 commits)
    Remove cpu_get_physical_page_desc()
    sparc: avoid cpu_get_physical_page_desc()
    virtio-balloon: avoid cpu_get_physical_page_desc()
    vhost: avoid cpu_get_physical_page_desc()...
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 <>

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

kvm: x86: Drop redundant apic base and tpr update from kvm_get_sregs

The latter was already commented out, the former is redundant as well.
We always get the latest changes after return from the guest via
kvm_arch_post_run.

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

a0fa8208 12/22/2011 06:53 pm Gleb Natapov

enable architectural PMU cpuid leaf for kvm

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

6b42494b 12/22/2011 06:53 pm Jan Kiszka

kvm: x86: Use symbols for all xsave field

Field 0 (FCW+FSW) and 1 (FTW+FOP) were hard-coded so far.

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

9f213ed9 12/20/2011 02:14 pm Avi Kivity

kvm: switch kvm slots to use host virtual address instead of ram_addr_t

This simplifies a later switch to the memory API in slot management.

Signed-off-by: Avi Kivity <>

f7e80adf 12/11/2011 10:46 pm Andreas Gustafsson

target-i386: fix cmpxchg instruction emulation

When the i386 cmpxchg instruction is executed with a memory operand
and the comparison result is "unequal", do the memory write before
changing the accumulator instead of the other way around, because
otherwise the new accumulator value will incorrectly be used in the...

45009a30 11/29/2011 12:20 am Markus Armbruster

x86/cpuid: Tighten parsing of tsc_freq=FREQ

cpu_x86_find_by_name() uses strtosz_suffix_unit(), but screws up the
error checking. It detects some failures, but not all. Undetected
failures result in a zero tsc_khz value (error value -1 divided by
1000), which means "no tsc_freq set"....

a1fd24af 11/28/2011 04:42 pm Anthony Liguori

Revert "i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID"

This reverts commit 66e3dd9282141b5ae75637c9676002cf3ceeb988.

From Avi,

"Anthony, I think we should revert that commit and refactor cpuid for
1.1. The logic is spread over too many places which makes it hard to...
1571b6cb 11/21/2011 10:36 pm Anthony Liguori

Merge remote-tracking branch 'origin/master' into staging

bc426899 11/19/2011 03:51 pm Blue Swirl

x86: fix pcmpestrm and pcmpistrm

Fix obvious typos (decrement and off-by-one error) in pcmpestrm and pcmpistrm
which resulted in infinite loop. Reported by Frank Mehnert,
spotted also by Coverity (bug 84752853).

Reported-by: Frank Mehnert <>...

12619721 11/17/2011 02:57 pm Vagrant Cascadian

Fix typo: runnning -> running

One n too many for running, need we say more.

Signed-Off-By: Vagrant Cascadian <>

Signed-off-by: Stefan Hajnoczi <>

d3c481b3 11/10/2011 02:29 pm Markus Armbruster

x86/cpuid: Convert remaining strdup() to g_strdup()

Fixes missing error checking.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

99e1dec0 11/10/2011 02:29 pm Markus Armbruster

x86/cpuid: Plug memory leak in cpudef_setfield()

To reproduce the leak, put two name options into the same [cpudef]
section of target-x86_64.conf.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

04c5b17a 11/10/2011 02:29 pm Markus Armbruster

x86/cpuid: Fix crash on -cpu ""

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

66e3dd92 11/09/2011 08:06 pm Avi Kivity

i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID

The fact that a host cpu supports a feature doesn't mean that QEMU and KVM
will also support it, yet -cpuid host brings host features wholesale.

We need to whitelist each feature separately to make sure we support it....

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

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

bccd9ec5 10/01/2011 12:31 pm Blue Swirl

softmmu_header: pass CPUState to tlb_fill

Pass CPUState pointer to tlb_fill() instead of architecture local
cpu_single_env hacks.

Signed-off-by: Blue Swirl <>

86ce7a5e 10/01/2011 09:21 am Jan Kiszka

target-i386: Remove redundant word mask in port out instructions

T0 was already masked to 16 bits when loading it.

Signed-off-by: Jan Kiszka <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

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

7f67d892 09/20/2011 11:16 pm Anthony Liguori

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

5c6562c2 09/17/2011 08:13 pm Max Reitz

target-i386: Fix several SSE3 instructions.

haddp[sd], hsubp[sd] and addsubp[sd] operate on floats, thus it is
necessary to use the appropriate floating point calculation functions.
If this is not done, those functions operate merely on integers, which
is not correct....

1dfb4dd9 09/15/2011 10:39 pm Luiz Capitulino

Replace the VMSTOP macros with a proper state type

Today, when notifying a VM state change with vm_state_notify(),
we pass a VMSTOP macro as the 'reason' argument. This is not ideal
because the VMSTOP macros tell why qemu stopped and not exactly
what the current VM state is....

1354869c 09/15/2011 10:39 pm Luiz Capitulino

Drop the vm_running global variable

Use runstate_is_running() instead, which is introduced by this commit.

Signed-off-by: Luiz Capitulino <>

6115c0a8 09/10/2011 05:50 pm Blue Swirl

kvm: remove unnecessary assignments

Avoid these warnings from clang analyzer:
/src/qemu/target-i386/kvm.c:772:5: warning: Value stored to 'cwd' is never read
cwd = swd = twd = 0;
/src/qemu/target-i386/kvm.c:772:11: warning: Although the value stored to 'swd' is used in the enclosing expression, the value is never actually read from 'swd'...

07ff2c44 09/08/2011 05:25 pm Anthony Liguori

Merge remote-tracking branch 'origin/master' into staging

82786041 09/08/2011 05:10 pm Richard Henderson

target-i386: Compute all flag data inside %cl != 0 test.

The (x << (cl - 1)) quantity is only used if CL != 0. Move the
computation of that quantity nearer its use.

This avoids the creation of undefined TCG operations when the
constant propagation optimization proves that CL == 0, and thus...

9d0baba1 09/08/2011 04:59 pm Anthony Liguori

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

541dc0d4 09/03/2011 01:45 pm Stefan Weil

Use new macro QEMU_PACKED for packed structures

Most changes were made using these commands:

git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'...

c6bfc164 09/02/2011 01:08 pm Boris Figovsky

x86: fix daa opcode for al register values higher than 0xf9

The second if statement should consider the original al register value,
and not the new one.

Signed-off-by: Boris Figovsky <>
Reviewed-by: Peter Maydell <>...

fdc9c41a 08/25/2011 11:21 am Jan Kiszka

Fix up some style nits of last uq/master merge

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

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

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

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

ac363c90 08/05/2011 06:10 pm Marcelo Tosatti

Remove #ifdef KVM_CAP_TSC_CONTROL

Signed-off-by: Marcelo Tosatti <>

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

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

qemu-x86: Set tsc_khz in kvm when supported

Make use of the KVM_TSC_CONTROL feature if available.

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

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

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

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

exec.h: fix coding style and change cpu_has_work to return bool

Before the next patch, fix coding style of the areas affected.

Change the type of the return value from cpu_has_work() and
qemu_cpu_has_work() to bool.

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

1162c041 06/26/2011 09:25 pm Blue Swirl

cpu_loop_exit: avoid using AREG0

Make cpu_loop_exit() take a parameter for CPUState instead of relying
on global env.

Signed-off-by: Blue Swirl <>

ca98557a 06/21/2011 07:53 pm Marcelo Tosatti

kvm: fix FPU state subsection

There is no need to specify version on the subsection fields.

Signed-off-by: Marcelo Tosatti <>

31e8c696 06/20/2011 09:26 pm Andre Przywara

KVM: Fix XSAVE feature bit enumeration

When iterating through the XSAVE feature enumeration CPUID leaf (0xD)
we should not stop at the first zero EAX, but instead keep scanning
since there are gaps in the enumeration (ECX=1 for instance).
This fixes the proper usage of AVX in KVM guests....

ba9bc59e 06/20/2011 09:24 pm Jan Kiszka

kvm: x86: Pass KVMState to kvm_arch_get_supported_cpuid

kvm_arch_get_supported_cpuid checks for global cpuid restrictions, it
does not require any CPUState reference. Changing its interface allows
to call it before any VCPU is initialized.

CC: Eduardo Habkost <>...

e56ff191 06/20/2011 09:19 pm Jan Kiszka

kvm: x86: Drop KVM_CAP build dependencies

No longer needed with accompanied kernel headers.

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

5802e066 06/20/2011 09:16 pm Jan Kiszka

kvm: Drop CONFIG_KVM_PARA

The kvm_para.h header is now always available.

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

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

f7911686 06/14/2011 05:34 pm Yang, Wei Y

kvm: Enable CPU SMEP feature

This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
Protection) in QEMU-KVM. SMEP prevents kernel from executing code in application.
Updated Intel SDM describes this CPU feature. The document will be published soon....

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

8001c294 06/08/2011 11:04 am Martin Simmons

target-i386: Make x86 mfence and lfence illegal without SSE2

While trying to use qemu -cpu pentium3 to test for incorrect uses of certain
SSE2 instructions, I found that QEMU allowed the mfence and lfence
instructions to be executed even though Pentium 3 doesn't support them....

66fcf8ff 06/03/2011 05:07 pm Aurelien Jarno

target-i386: use floatx80 constants in helper_fld*_ST0()

Instead of using a table which doesn't correspond to anything from
physical in the CPU, use directly the constants in helper_fld*_ST0().

Cc: Andreas Färber <>
Reviewed-by: Peter Maydell <>...

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

4a043713 05/02/2011 03:51 pm Paolo Bonzini

kvm: use qemu_free consistently

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

e41e0fc6 05/02/2011 03:38 pm Jan Kiszka

x86: Allow multiple cpu feature matches of lookup_feature

kvmclock is represented by two feature bits. Therefore, lookup_feature
needs to continue its search even after the first match. Enhance it
accordingly and switch to a bool return type at this chance....

642258c6 05/02/2011 03:38 pm Glauber Costa

kvm: add kvmclock to its second bit

We have two bits that can represent kvmclock in cpuid.
They signal the guest which msr set to use. When we tweak flags
involving this value - specially when we use "-", we have to act on both.

Signed-off-by: Glauber Costa <>...

0c31b744 05/02/2011 02:24 pm Glauber Costa

kvm: use kernel-provided para_features instead of statically coming up with new capabilities

Use the features provided by KVM_GET_SUPPORTED_CPUID directly to
mask out features from guest-visible cpuid.

The old get_para_features() mechanism is kept for older kernels that do not implement it....

788e7336 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix helper_fbld_ST0() wrt softfloat

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

c9ad19c5 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix helper_fxtract() wrt softfloat

With softfloat it's not possible to play with the overflow of an
unsigned value to get the 0 case partially correct. Use a special case
for that. Using a division to generate an infinity is the easiest way
that works for both softfloat and softfloat-native....

13822781 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix helper_fdiv() wrt softfloat

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

fec05e42 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix helper_fsqrt() wrt softfloat

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

c2ef9a83 04/25/2011 12:18 pm Aurelien Jarno

target-i386: replace approx_rsqrt and approx_rcp by softfloat ops

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

47c0143c 04/25/2011 12:18 pm Aurelien Jarno

target-i386: add CPU86_LDouble <-> double conversion functions

Add functions to convert CPU86_LDouble to double and vice versa. They
are going to be used to implement logarithmic and trigonometric function
until softfloat implement them.

Reviewed-by: Peter Maydell <>...

a2c9ed3c 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix logarithmic and trigonometric helpers wrt softfloat

Use the new CPU86_LDouble <-> double conversion functions to make logarithmic
and trigonometric helpers working with softfloat.

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

bcb5fec5 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix helper_fprem() and helper_fprem1() wrt softfloat

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

a1d8db07 04/25/2011 12:18 pm Aurelien Jarno

target-i386: fix constants wrt softfloat

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