aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2016-07-11 20:28:46 +0100
committerEduardo Habkost <ehabkost@redhat.com>2016-07-20 11:58:44 -0300
commit11f6fee576680a2d482123535da920f8ceb33eb5 (patch)
treeccaeace2ef5f45b7135936b9bae859d9527ab2ff /target-i386/cpu.h
parent9f3aab58539b4cc716e42e772be8116dc2e7d159 (diff)
target-i386: Set physical address bits based on host
Add the host-phys-bits boolean property, if true, take phys-bits from the hosts physical bits value, overriding either the default or the user specified value. We can also use the value we read from the host to check the users explicitly set value and warn them if it doesn't match. Note: a) We only read the hosts value in KVM mode (because on non-x86 we get an abort if we try) b) We don't warn about trying to use host-phys-bits in TCG mode, we just fall back to the TCG default. This allows the machine type to set the host-phys-bits flag if it wants and then to work in both TCG and KVM. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r--target-i386/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 10d562d4ea..0ff88e155a 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -1206,6 +1206,9 @@ struct X86CPU {
/* if true fill the top bits of the MTRR_PHYSMASKn variable range */
bool fill_mtrr_mask;
+ /* if true override the phys_bits value with a value read from the host */
+ bool host_phys_bits;
+
/* Number of physical address bits supported */
uint32_t phys_bits;