diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-24 16:26:50 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-24 16:26:50 +0100 |
commit | a2519ad1828dd443af9f9c293db18db6d6123762 (patch) | |
tree | c5e4ef27965a9ee1b91519316076e6bfad61acc8 | |
parent | e97da98f1173c764e8fd8d2c84f84ec3bdc87488 (diff) | |
download | qemu-a2519ad1828dd443af9f9c293db18db6d6123762.zip qemu-a2519ad1828dd443af9f9c293db18db6d6123762.tar.gz qemu-a2519ad1828dd443af9f9c293db18db6d6123762.tar.bz2 |
hw/arm/virt: Set minimum_page_bits to 12
Since the virt board model will never create a CPU which is
pre-ARMv7, we know that our minimum page size is 4K and can
set minimum_page_bits accordingly, for improved performance.
Note that this is a migration compatibility break, so
we introduce it only for the virt-2.8 machine and onward;
virt-2.7 continues using the old 1K pages.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
-rw-r--r-- | hw/arm/virt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 895446f..47ec7ff 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1499,6 +1499,8 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) mc->block_default_type = IF_VIRTIO; mc->no_cdrom = 1; mc->pci_allow_0_address = true; + /* We know we will never create a pre-ARMv7 CPU which needs 1K pages */ + mc->minimum_page_bits = 12; } static const TypeInfo virt_machine_info = { @@ -1570,6 +1572,8 @@ static void virt_machine_2_7_options(MachineClass *mc) SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_7); /* ITS was introduced with 2.8 */ vmc->no_its = true; + /* Stick with 1K pages for migration compatibility */ + mc->minimum_page_bits = 0; } DEFINE_VIRT_MACHINE(2, 7) |