[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/16] cpu: Introduce CPUSystemOperations structure
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 07/16] cpu: Introduce CPUSystemOperations structure |
Date: |
Fri, 26 Feb 2021 17:32:18 +0100 |
Introduce a structure to hold handler specific to sysemu.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/core/cpu.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index b12028c3c03..ab89235cb45 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -80,6 +80,12 @@ struct TCGCPUOps;
/* see accel-cpu.h */
struct AccelCPUClass;
+/*
+ * struct CPUSystemOperations: System operations specific to a CPU class
+ */
+typedef struct CPUSystemOperations {
+} CPUSystemOperations;
+
/**
* CPUClass:
* @class_by_name: Callback to map -cpu command line model name to an
@@ -190,6 +196,9 @@ struct CPUClass {
bool gdb_stop_before_watchpoint;
struct AccelCPUClass *accel_cpu;
+ /* when system emulation is not available, this pointer is NULL */
+ struct CPUSystemOperations system_ops;
+
/* when TCG is not available, this pointer is NULL */
struct TCGCPUOps *tcg_ops;
};
--
2.26.2
- [PATCH 00/16] cpu: Introduce CPUSystemOperations structure, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 01/16] target: Set CPUClass::vmsd instead of DeviceClass::vmsd, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 02/16] cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 03/16] cpu: Introduce cpu_virtio_is_big_endian(), Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 04/16] cpu: Directly use cpu_write_elf*() fallback handlers in place, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 05/16] cpu: Directly use get_paging_enabled() fallback handlers in place, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 06/16] cpu: Directly use get_memory_mapping() fallback handlers in place, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 08/16] cpu: Move CPUClass::vmsd to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 07/16] cpu: Introduce CPUSystemOperations structure,
Philippe Mathieu-Daudé <=
- [PATCH 11/16] cpu: Move CPUClass::write_elf* to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 09/16] cpu: Move CPUClass::virtio_is_big_endian to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 10/16] cpu: Move CPUClass::get_crash_info to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 13/16] cpu: Move CPUClass::get_phys_page_debug to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 12/16] cpu: Move CPUClass::asidx_from_attrs to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 14/16] cpu: Move CPUClass::get_memory_mapping to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 15/16] cpu: Move CPUClass::get_paging_enabled to CPUSystemOperations, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH 16/16] cpu: Restrict cpu_paging_enabled / cpu_get_memory_mapping to sysemu, Philippe Mathieu-Daudé, 2021/02/26