From b164e48ed1600055bc190aa3ab42c18004d2c711 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Tue, 22 Jan 2013 18:25:01 -0200 Subject: kvm: Create kvm_arch_vcpu_id() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow each architecture to define how the VCPU ID is set on the KVM_CREATE_VCPU ioctl call. Signed-off-by: Eduardo Habkost Acked-by: Gleb Natapov Signed-off-by: Andreas Färber --- target-ppc/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'target-ppc/kvm.c') diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 2f4f06818a..2c64c634f1 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -384,6 +384,11 @@ static inline void kvm_fixup_page_sizes(PowerPCCPU *cpu) #endif /* !defined (TARGET_PPC64) */ +unsigned long kvm_arch_vcpu_id(CPUState *cpu) +{ + return cpu->cpu_index; +} + int kvm_arch_init_vcpu(CPUState *cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); -- cgit v1.2.3