diff options
author | Andreas Färber <afaerber@suse.de> | 2013-05-28 13:28:38 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-11 17:50:09 +0200 |
commit | 444d55907871f88276a654fc7fdc8c7db95f4b59 (patch) | |
tree | 10dde797d560c58dbd9a70405c0b38891fef5fc1 /include/qom/cpu.h | |
parent | c51a944b7505ba827adc897d5452d2b54dbf86bb (diff) | |
download | qemu-444d55907871f88276a654fc7fdc8c7db95f4b59.tar.gz qemu-444d55907871f88276a654fc7fdc8c7db95f4b59.tar.bz2 qemu-444d55907871f88276a654fc7fdc8c7db95f4b59.zip |
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>
Diffstat (limited to 'include/qom/cpu.h')
-rw-r--r-- | include/qom/cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 7cd9442503..1f70240991 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -48,6 +48,7 @@ typedef struct CPUState CPUState; * @reset: Callback to reset the #CPUState to its initial state. * @do_interrupt: Callback for interrupt handling. * @get_arch_id: Callback for getting architecture-dependent CPU ID. + * @get_paging_enabled: Callback for inquiring whether paging is enabled. * @vmsd: State description for migration. * * Represents a CPU family or model. @@ -62,6 +63,7 @@ typedef struct CPUClass { void (*reset)(CPUState *cpu); void (*do_interrupt)(CPUState *cpu); int64_t (*get_arch_id)(CPUState *cpu); + bool (*get_paging_enabled)(const CPUState *cpu); const struct VMStateDescription *vmsd; int (*write_elf64_note)(WriteCoreDumpFunction f, CPUState *cpu, @@ -138,6 +140,14 @@ struct CPUState { }; /** + * cpu_paging_enabled: + * @cpu: The CPU whose state is to be inspected. + * + * Returns: %true if paging is enabled, %false otherwise. + */ +bool cpu_paging_enabled(const CPUState *cpu); + +/** * cpu_write_elf64_note: * @f: pointer to a function that writes memory to a file * @cpu: The CPU whose memory is to be dumped |