[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 7/7] hw/arm/virt: Set minimum_page_bits to 12
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH v3 7/7] hw/arm/virt: Set minimum_page_bits to 12 |
Date: |
Tue, 11 Oct 2016 18:08:19 +0100 |
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 <address@hidden>
---
hw/arm/virt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 795740d..abef00c 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1496,6 +1496,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 = {
@@ -1563,6 +1565,8 @@ static void virt_machine_2_7_options(MachineClass *mc)
{
virt_machine_2_8_options(mc);
SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_7);
+ /* Stick with 1K pages for migration compatibility */
+ mc->minimum_page_bits = 0;
}
DEFINE_VIRT_MACHINE(2, 7)
--
2.7.4
- [Qemu-devel] [PATCH v3 0/7] Runtime pagesize computation, Peter Maydell, 2016/10/11
- [Qemu-devel] [PATCH v3 5/7] migration/savevm.c: migrate non-default page size, Peter Maydell, 2016/10/11
- [Qemu-devel] [PATCH v3 1/7] migration: Remove static allocation of xzblre cache buffer, Peter Maydell, 2016/10/11
- [Qemu-devel] [PATCH v3 4/7] cpu: Support a target CPU having a variable page size, Peter Maydell, 2016/10/11
- [Qemu-devel] [PATCH v3 2/7] exec.c: Remove static allocation of sub_section of sub_page, Peter Maydell, 2016/10/11
- Re: [Qemu-devel] [Qemu-arm] [PATCH v3 0/7] Runtime pagesize computation, Peter Maydell, 2016/10/11
- Re: [Qemu-devel] [PATCH v3 0/7] Runtime pagesize computation, Richard Henderson, 2016/10/11