[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/4] microvm: use 3G split unconditionally
From: |
Gerd Hoffmann |
Subject: |
[PULL 1/4] microvm: use 3G split unconditionally |
Date: |
Wed, 17 Jun 2020 14:28:58 +0200 |
Looks like the logic was copied over from q35.
q35 does this for backward compatibility, there is no reason to do this
on microvm though. Also microvm doesn't need much mmio space, 1G is
more than enough. Using an mmio window smaller than 1G is bad for
gigabyte alignment and hugepages though. So split @ 3G unconditionally.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20200529073957.8018-2-kraxel@redhat.com
---
hw/i386/microvm.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 937db10ae6a5..44f940813b07 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -170,23 +170,9 @@ static void microvm_memory_init(MicrovmMachineState *mms)
MemoryRegion *ram_below_4g, *ram_above_4g;
MemoryRegion *system_memory = get_system_memory();
FWCfgState *fw_cfg;
- ram_addr_t lowmem;
+ ram_addr_t lowmem = 0xc0000000; /* 3G */
int i;
- /*
- * Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory
- * and 256 Mbytes for PCI Express Enhanced Configuration Access Mapping
- * also known as MMCFG).
- * 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.
- */
- if (machine->ram_size >= 0xb0000000) {
- lowmem = 0x80000000;
- } else {
- lowmem = 0xb0000000;
- }
-
/*
* Handle the machine opt max-ram-below-4g. It is basically doing
* min(qemu limit, user limit).
--
2.18.4
- [PULL 0/4] Microvm 20200617 patches, Gerd Hoffmann, 2020/06/17
- [PULL 4/4] microvm: move virtio base to 0xfeb00000, Gerd Hoffmann, 2020/06/17
- [PULL 3/4] x86: move max-ram-below-4g to pc, Gerd Hoffmann, 2020/06/17
- [PULL 2/4] microvm: drop max-ram-below-4g support, Gerd Hoffmann, 2020/06/17
- [PULL 1/4] microvm: use 3G split unconditionally,
Gerd Hoffmann <=
- Re: [PULL 0/4] Microvm 20200617 patches, no-reply, 2020/06/17
- Re: [PULL 0/4] Microvm 20200617 patches, Peter Maydell, 2020/06/18