aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-28 19:31:32 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-23 02:41:32 +0200
commitbdf7ae5bbdb3f050d97862b2ba0261fa902ebc53 (patch)
treedec1f74f86690f2f5e7e9682e82ae08e40c0ac49 /include/qom
parentb42eab27beaefd5c9bf9353383d6403e0628c014 (diff)
cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()
Where no extra implementation is needed, fall back to CPUClass::set_pc(). Acked-by: Michael Walle <michael@walle.cc> (for lm32) Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 4620fee540..4e5ec77919 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -60,6 +60,8 @@ typedef void (*CPUUnassignedAccess)(CPUState *cpu, hwaddr addr,
bool is_write, bool is_exec, int opaque,
unsigned size);
+struct TranslationBlock;
+
/**
* CPUClass:
* @class_by_name: Callback to map -cpu command line model name to an
@@ -74,6 +76,8 @@ typedef void (*CPUUnassignedAccess)(CPUState *cpu, hwaddr addr,
* @get_paging_enabled: Callback for inquiring whether paging is enabled.
* @get_memory_mapping: Callback for obtaining the memory mappings.
* @set_pc: Callback for setting the Program Counter register.
+ * @synchronize_from_tb: Callback for synchronizing state from a TCG
+ * #TranslationBlock.
* @vmsd: State description for migration.
*
* Represents a CPU family or model.
@@ -98,6 +102,7 @@ typedef struct CPUClass {
void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list,
Error **errp);
void (*set_pc)(CPUState *cpu, vaddr value);
+ void (*synchronize_from_tb)(CPUState *cpu, struct TranslationBlock *tb);
const struct VMStateDescription *vmsd;
int (*write_elf64_note)(WriteCoreDumpFunction f, CPUState *cpu,