]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
cpu: Introduce get_arch_id() method and override it for X86CPU
authorIgor Mammedov <imammedo@redhat.com>
Tue, 23 Apr 2013 08:29:41 +0000 (10:29 +0200)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 14 Jun 2013 16:43:20 +0000 (17:43 +0100)
commite48f3af500a229bf9bf63fbe02ca6ef35abc2820
tree4539025a8718d4eab9e4aa49ce852dcd33e074ca
parentdc89442fbf098e9846423b907046b7a063532f07
cpu: Introduce get_arch_id() method and override it for X86CPU

get_arch_id() adds possibility for generic code to get a guest-visible
CPU ID without accessing CPUArchState.
If derived classes don't override it, it will return cpu_index.

Override it on target-i386 in X86CPU to return the APIC ID.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
(cherry picked from QEMU commit 997395d3888fcde6ce41535a8208d7aa919d824b)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
include/qemu/cpu.h
qom/cpu.c
target-i386/cpu.c