cpu: Turn cpu_get_memory_mapping() into a CPUState hook
Change error reporting from return value to Error argument.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>[AF: Fixed cpu_get_memory_mapping() documentation]...
cpu: Turn cpu_paging_enabled() into a CPUState hook
Relocate assignment of x86 get_arch_id to have all hooks in one place.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: aggressively optimize qom casting
This patch adds a small typename cache to ObjectClass. This allowscaching positive casts within each ObjectClass. Benchmarking aPPC workload provided by Aurelien, this patch eliminates everysingle g_hash_table_lookup() happening during the benchmark (which...
qom: pass file/line/function to asserting casts
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1368188203-3407-5-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom: allow turning cast debugging off
Cast debugging can have a substantial cost (20% or more). Instead of addingspecial-cased "fast casts" in the hot paths, we can just disable it inreleases. The tracing facilities we just added make it easier to analyze...
qom: improve documentation of cast functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1368188203-3407-2-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
cpu: Move cpu_write_elfXX_note() functions to CPUState
Convert cpu_write_elfXX_note() functions to CPUClass methods and passCPUState as argument. Update target-i386 accordingly.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>[AF: Retain stubs as CPUClass' default method implementation; style changes]...
cpu: Introduce get_arch_id() method and override it for X86CPU
get_arch_id() adds possibility for generic code to get a guest-visibleCPU 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....
cpu: Add qemu_for_each_cpu()
Wrapper to avoid open-coded loops and to make CPUState iterationindependent of CPUArchState.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Add helper cpu_exists(), to check if CPU with specified id exists
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
View revisions
Also available in: Atom