mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
linux-user: Diagnose misaligned -R size
We have been enforcing host page alignment for the non-R fallback of MAX_RESERVED_VA, but failing to enforce for -R. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
This commit is contained in:
1 parent
1ff4a81bd3
commit
2f7828b572
1 file changed
+6
@@ -793,6 +793,12 @@ int main(int argc, char **argv, char **envp)
|
||||
*/
|
||||
max_reserved_va = MAX_RESERVED_VA(cpu);
|
||||
if (reserved_va != 0) {
|
||||
if (reserved_va % qemu_host_page_size) {
|
||||
char *s = size_to_str(qemu_host_page_size);
|
||||
fprintf(stderr, "Reserved virtual address not aligned mod %s\n", s);
|
||||
g_free(s);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (max_reserved_va && reserved_va > max_reserved_va) {
|
||||
fprintf(stderr, "Reserved virtual address too big\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
Reference in new issue
Block a user