i386: Add cache information in X86CPUDefinition

Add cache information in X86CPUDefinition and CPUX86State.

Backports commit 6aaeb05492ef668f415324f43e7d875c0f1e90b3 from qemu
This commit is contained in:
Babu Moger 2018-05-17 18:56:05 -04:00 committed by Lioncash
parent db87beaaa6
commit c5b8a6a704
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 9 additions and 0 deletions

View file

@ -1239,6 +1239,7 @@ struct X86CPUDefinition {
FeatureWordArray features;
const char *model_id;
bool cache_info_passthrough;
CPUCaches *cache_info;
};
static X86CPUDefinition builtin_x86_defs[] = {

View file

@ -1053,6 +1053,13 @@ typedef struct CPUCacheInfo {
bool complex_indexing;
} CPUCacheInfo;
typedef struct CPUCaches {
CPUCacheInfo l1d_cache;
CPUCacheInfo l1i_cache;
CPUCacheInfo l2_cache;
CPUCacheInfo l3_cache;
} CPUCaches;
typedef struct CPUX86State {
/* standard registers */
target_ulong regs[CPU_NB_REGS];
@ -1227,6 +1234,7 @@ typedef struct CPUX86State {
/* Features that were explicitly enabled/disabled */
FeatureWordArray user_features;
uint32_t cpuid_model[12];
CPUCaches *cache_info;
/* MTRRs */
uint64_t mtrr_fixed[11];