mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
kvm: Create kvm_arch_vcpu_id() function
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 <ehabkost@redhat.com> Acked-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
2969475869
commit
b164e48ed1
5 changed files with 19 additions and 1 deletions
|
@ -411,6 +411,11 @@ static void cpu_update_state(void *opaque, int running, RunState state)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned long kvm_arch_vcpu_id(CPUState *cpu)
|
||||
{
|
||||
return cpu->cpu_index;
|
||||
}
|
||||
|
||||
int kvm_arch_init_vcpu(CPUState *cs)
|
||||
{
|
||||
struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue