mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-02 04:15:46 +00:00
libxl: set shadow memory for any guest type, not only HVM
Otherwise starting PVH guest will result in "arch_setup_bootlate: mapping shared_info failed (pfn=..., rc=-1, errno: 12): Internal error". After this change the behavior is the same as in `xl`. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
429281e7b7
commit
d4a8fa0cd1
@ -634,11 +634,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Allow libxl to calculate shadow memory requirements */
|
|
||||||
b_info->shadow_memkb =
|
|
||||||
libxl_get_required_shadow_memory(b_info->max_memkb,
|
|
||||||
b_info->max_vcpus);
|
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* For compatibility with the legacy xen toolstack, default to pygrub
|
* For compatibility with the legacy xen toolstack, default to pygrub
|
||||||
@ -692,6 +687,11 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Allow libxl to calculate shadow memory requirements */
|
||||||
|
b_info->shadow_memkb =
|
||||||
|
libxl_get_required_shadow_memory(b_info->max_memkb,
|
||||||
|
b_info->max_vcpus);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
],
|
],
|
||||||
"max_memkb": 524288,
|
"max_memkb": 524288,
|
||||||
"target_memkb": 524288,
|
"target_memkb": 524288,
|
||||||
|
"shadow_memkb": 8192,
|
||||||
"sched_params": {
|
"sched_params": {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
],
|
],
|
||||||
"max_memkb": 524288,
|
"max_memkb": 524288,
|
||||||
"target_memkb": 524288,
|
"target_memkb": 524288,
|
||||||
|
"shadow_memkb": 8192,
|
||||||
"sched_params": {
|
"sched_params": {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user