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>
cpu: Introduce cpu_resume(), for single CPU
Also add a stub for it, to make possible to use it in qom/cpu.c,which is shared with user emulators.
Fix typos and misspellings
Fix various typos and misspellings. The bulk of these were found withcodespell.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
View revisions
Also available in: Atom