|
From: | Ani Sinha |
Subject: | Re: [PATCH] mem/x86: add processor address space check for VM memory |
Date: | Mon, 18 Sep 2023 15:37:35 +0530 |
>>
>>>> /*
>>>> * 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] |