Skip to contentSkip to conversation

qemu-kvm: Remove kvm_set_boot_cpu_id

PATCH Applied Jan Kiszka 2 participants 2 messages Jun 3, 2011 – Jun 20, 2011 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 qemu-kvm: Remove kvm_set_boot_cpu_id

Upstream just as well as qemu-kvm only support CPU 0 as boot CPU. And that is also the KVM ABI default if the user does not issue any KVM_SET_BOOT_CPU_ID.

So let's drop this redundancy. It can be re-introduced via upstream once we support something more sophisticated.

---
 qemu-kvm.c        |   11 -----------
 qemu-kvm.h        |    2 --
 target-i386/kvm.c |    5 -----
 3 files changed, 0 insertions(+), 18 deletions(-)
qemu-kvm.c +0 -11
index 649af9c..80cc077 100644
@@ -655,14 +655,3 @@ int kvm_update_ioport_access(CPUState *env)
 #endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */
     return 0;
 }
-
-int kvm_set_boot_cpu_id(KVMState *s, uint32_t id)
-{
-#ifdef KVM_CAP_SET_BOOT_CPU_ID
-    int r = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SET_BOOT_CPU_ID);
-    if (r > 0) {
-        return kvm_vm_ioctl(s, KVM_SET_BOOT_CPU_ID, id);
-    }
-#endif
-    return -ENOSYS;
-}
qemu-kvm.h +0 -2
index 942baf2..09d07d0 100644
@@ -291,8 +291,6 @@ extern unsigned int kvm_shadow_memory;
 
 int kvm_handle_tpr_access(CPUState *env);
 
-int kvm_set_boot_cpu_id(KVMState *s, uint32_t id);
-
 #else
 #define kvm_nested 0
 #endif
target-i386/kvm.c +0 -5
index 74a9960..de26646 100644
@@ -662,11 +662,6 @@ int kvm_arch_init(KVMState *s)
         }
     }
 
-    ret = kvm_set_boot_cpu_id(s, 0);
-    if (ret < 0 && ret != -ENOSYS) {
-        return ret;
-    }
-
     return 0;
 }
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 7 lines · Jan Kiszka

Upstream just as well as qemu-kvm only support CPU 0 as boot CPU. And that is also the KVM ABI default if the user does not issue any KVM_SET_BOOT_CPU_ID.

So let's drop this redundancy. It can be re-introduced via upstream once we support something more sophisticated.

Quoted 6 lines
---
 qemu-kvm.c        |   11 -----------
 qemu-kvm.h        |    2 --
 target-i386/kvm.c |    5 -----
 3 files changed, 0 insertions(+), 18 deletions(-)

Applied, thanks.