On Tue, 04 Oct 2022 01:26:27 +0100, Gavin Shan <gs...@redhat.com> wrote: > > After the improvement to high memory region address assignment is > applied, the memory layout can be changed, introducing possible > migration breakage. For example, VIRT_HIGH_PCIE_MMIO memory region > is disabled or enabled when the optimization is applied or not, with > the following configuration. > > pa_bits = 40; > vms->highmem_redists = false; > vms->highmem_ecam = false; > vms->highmem_mmio = true;
The question is how are these parameters specified by a user? Short of hacking the code, this isn't really possible. > > # qemu-system-aarch64 -accel kvm -cpu host \ > -machine virt-7.2,compact-highmem={on, off} \ > -m 4G,maxmem=511G -monitor stdio > > Region compact-highmem=off compact-highmem=on > ---------------------------------------------------------------- > RAM [1GB 512GB] [1GB 512GB] > HIGH_GIC_REDISTS [512GB 512GB+64MB] [disabled] > HIGH_PCIE_ECAM [512GB+256MB 512GB+512MB] [disabled] > HIGH_PCIE_MMIO [disabled] [512GB 1TB] > > In order to keep backwords compatibility, we need to disable the > optimization on machines, which is virt-7.1 or ealier than it. It > means the optimization is enabled by default from virt-7.2. Besides, > 'compact-highmem' property is added so that the optimization can be > explicitly enabled or disabled on all machine types by users. Not directly related to this series, but it seems to me that we should be aiming at reproducible results across HW implementations (at least with KVM). Depending on how many PA bits the HW implements, we end-up with a set of devices or another, which is likely to be confusing for a user. I think we should consider an additional set of changes to allow a user to specify the PA bits as well as the devices they want to see enabled. Thanks, M. -- Without deviation from the norm, progress is not possible.