[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/19] pc_piix: document gigabyte_align
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 02/19] pc_piix: document gigabyte_align |
Date: |
Mon, 23 Dec 2013 18:11:36 +0200 |
Document the logic behind the below/above 4G split.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/pc_piix.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index acb9445..832e20c 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -61,6 +61,10 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
static bool has_pci_info;
static bool has_acpi_build = true;
static bool smbios_type1_defaults = true;
+/* Make sure that guest addresses aligned at 1Gbyte boundaries get mapped to
+ * host addresses aligned at 1Gbyte boundaries. This way we can use 1GByte
+ * pages in the host.
+ */
static bool gigabyte_align = true;
/* PC hardware initialisation */
@@ -107,6 +111,13 @@ static void pc_init1(QEMUMachineInitArgs *args,
kvmclock_create();
}
+ /* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory).
+ * If it doesn't, we need to split it in chunks below and above 4G.
+ * In any case, try to make sure that guest addresses aligned at
+ * 1G boundaries get mapped to host addresses aligned at 1G boundaries.
+ * For old machine types, use whatever split we used historically to avoid
+ * breaking migration.
+ */
if (args->ram_size >= 0xe0000000) {
ram_addr_t lowmem = gigabyte_align ? 0xc0000000 : 0xe0000000;
above_4g_mem_size = args->ram_size - lowmem;
--
MST
- [Qemu-devel] [PULL 00/19] acpi, pci, pc, fedora, virtio fixes and enhancements, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 01/19] piix: gigabyte alignment for ram, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 02/19] pc_piix: document gigabyte_align,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 03/19] hw/i386/pc_sysfw: support two flash drives, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 04/19] i440fx-test: qtest_start() should be paired with qtest_end(), Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 05/19] i440fx-test: give each GTest case its own qtest, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 06/19] i440fx-test: generate temporary firmware blob, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 07/19] i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 08/19] acpi: piix4: remove not needed GPE0 mask, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 09/19] acpi: factor out common pm_update_sci() into acpi core, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 10/19] acpi: ich9: allow guest to clear SCI rised by GPE, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 11/19] ACPI: Q35 DSDT: fix CPU hotplug GPE0.2 handler, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 12/19] ACPI/DSDT-CPU: cleanup bogus comment, Michael S. Tsirkin, 2013/12/23