aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-12-17 03:27:07 +0100
committerAndreas Färber <afaerber@suse.de>2013-01-15 04:09:13 +0100
commitce3960ebe57d0601a3628b64adac6fd23c901f70 (patch)
tree0f3cbd92e527d7164bcdd88c6d624d2d6834498c /include/qom
parentcf7c3f0cb5a7129f57fa9e69d410d6a05031988c (diff)
cpu: Move nr_{cores,threads} fields to CPUState
To facilitate the field movements, pass MIPSCPU to malta_mips_config(); avoid that for mips_cpu_map_tc() since callers only access MIPS Thread Contexts, inside TCG helpers. 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 fbacb2756b..806b01a01d 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -57,6 +57,8 @@ struct kvm_run;
/**
* CPUState:
+ * @nr_cores: Number of cores within this CPU package.
+ * @nr_threads: Number of threads within this CPU.
* @created: Indicates whether the CPU thread has been successfully created.
* @stop: Indicates a pending stop request.
* @stopped: Indicates the CPU has been artificially stopped.
@@ -69,6 +71,9 @@ struct CPUState {
DeviceState parent_obj;
/*< public >*/
+ int nr_cores;
+ int nr_threads;
+
struct QemuThread *thread;
#ifdef _WIN32
HANDLE hThread;