[PATCH 2/5] Use get_para_features() from upstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 qemu-kvm-x86.c    |   28 ----------------------------
 target-i386/kvm.c |    4 ++--
 2 files changed, 2 insertions(+), 30 deletions(-)

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 0eb4060..3b9be6d 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1116,34 +1116,6 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *e, uint32_t function,
     e->edx = env->regs[R_EDX];
 }
 
-struct kvm_para_features {
-	int cap;
-	int feature;
-} para_features[] = {
-#ifdef KVM_CAP_CLOCKSOURCE
-	{ KVM_CAP_CLOCKSOURCE, KVM_FEATURE_CLOCKSOURCE },
-#endif
-#ifdef KVM_CAP_NOP_IO_DELAY
-	{ KVM_CAP_NOP_IO_DELAY, KVM_FEATURE_NOP_IO_DELAY },
-#endif
-#ifdef KVM_CAP_PV_MMU
-	{ KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP },
-#endif
-	{ -1, -1 }
-};
-
-static int get_para_features(CPUState *env)
-{
-	int i, features = 0;
-
-	for (i = 0; i < ARRAY_SIZE(para_features)-1; i++) {
-		if (kvm_check_extension(kvm_state, para_features[i].cap))
-			features |= (1 << para_features[i].feature);
-	}
-
-	return features;
-}
-
 static void kvm_trim_features(uint32_t *features, uint32_t supported)
 {
     int i;
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 87c1133..ac9e17b 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -133,8 +133,6 @@ uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function, int reg)
 
 #endif
 
-#ifdef KVM_UPSTREAM
-
 #ifdef CONFIG_KVM_PARA
 struct kvm_para_features {
         int cap;
@@ -165,6 +163,8 @@ static int get_para_features(CPUState *env)
 }
 #endif
 
+#ifdef KVM_UPSTREAM
+
 int kvm_arch_init_vcpu(CPUState *env)
 {
     struct {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux