|
From: | David Hildenbrand |
Subject: | Re: [PATCH] mem/x86: add processor address space check for VM memory |
Date: | Mon, 18 Sep 2023 11:33:00 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
/* * The 64bit pci hole starts after "above 4G RAM" and * potentially the space reserved for memory hotplug. */ There is the ROUND_UP(hole64_start, 1 * GiB); in there that is not really required for the !hole64 case. It shouldn't matter much in practice I think (besides an aligned value showing up in the error message). We could factor out most of that calculation into a separate function, skipping that alignment to make that clearer.Yeah this whole memory segmentation is quite complicated and might benefit from a qemu doc or a refactoring.Absolutely. Do you have time to work on that (including the updated fix?).Other than the fix you proposed I am not sure if we need to fix anything else atm. Seems physical address space bound checks are already in place. Re: doc, maybe. I will add it to my TODO list.
Will you send a proper patch, ideally not using pc_pci_hole64_start() but instead the same logic without the final alignment to 1 GiB?
I can also do it, but might take a bit longer. -- Cheers, David / dhildenb
[Prev in Thread] | Current Thread | [Next in Thread] |