aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2012-08-31 12:43:17 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2012-08-31 12:43:17 -0300
commit1cc707b10567b0ebf2670e39f4a3c01da664fd6a (patch)
tree16cdc115c50e38a550915ca1ca2a014abce4d569 /target-i386/cpu.c
parent352183cdb01761ba813576b3bc559947cbccbae8 (diff)
parent01fd4b8e9e28b92f124556a5889167820c52635f (diff)
Merge branch 'upstream-merge'qemu-kvm-1.2.0-rc2
* upstream-merge: (47 commits) w32: Fix broken build Update version for 1.2.0-rc2 scsi-disk: Fix typo (uint32 -> uint32_t) msix: make [un]use vectors on reset/load optional kvm: get/set PV EOI MSR linux-headers: update to 3.6-rc3 target-i386: disable pv eoi to fix migration across QEMU versions reset PMBA and PMREGMISC PIIX4 registers. qemu-ga: Fix null pointer passed to unlink in failure branch memory: Fix copy&paste mistake in memory_region_iorange_write ivshmem: remove redundant ioeventfd configuration hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfo tcg/mips: fix broken CONFIG_TCG_PASS_AREG0 code Update OpenBIOS PPC image target-ppc: fix altivec instructions audio/winwave: previous audio buffer should be flushed iscsi: Set number of blocks to 0 for blank CDROM devices scsi: more fixes to properties for passthrough devices esp: support 24-bit DMA megasas: Add 'hba_serial' property ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r--target-i386/cpu.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 120a2e3d3..423e00905 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -33,6 +33,9 @@
#include "hyperv.h"
#include "hw/hw.h"
+#if defined(CONFIG_KVM)
+#include <linux/kvm_para.h>
+#endif
/* feature flags taken from "Intel Processor Identification and the CPUID
* Instruction" and AMD's "CPUID Specification". In cases of disagreement
@@ -887,7 +890,17 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
memcpy(x86_cpu_def, def, sizeof(*def));
}
- plus_kvm_features = ~0; /* not supported bits will be filtered out later */
+#if defined(CONFIG_KVM)
+ plus_kvm_features = (1 << KVM_FEATURE_CLOCKSOURCE) |
+ (1 << KVM_FEATURE_NOP_IO_DELAY) |
+ (1 << KVM_FEATURE_MMU_OP) |
+ (1 << KVM_FEATURE_CLOCKSOURCE2) |
+ (1 << KVM_FEATURE_ASYNC_PF) |
+ (1 << KVM_FEATURE_STEAL_TIME) |
+ (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT);
+#else
+ plus_kvm_features = 0;
+#endif
add_flagname_to_bitmaps("hypervisor", &plus_features,
&plus_ext_features, &plus_ext2_features, &plus_ext3_features,