tools/pvh: set coherent MTRR state for all vCPUs
PATCH v2 1/1 tools/pvh: set coherent MTRR state for all vCPUs
Instead of just doing it for the BSP. This requires storing the maximum number of possible vCPUs in xc_dom_image.
This has been a latent bug so far because PVH doesn't yet support pci-passthrough, so the effective memory cache attribute is forced to WB by the hypervisor. Note also that even without this in place vCPU#0 is preferred in certain scenarios in order to calculate the memory cache attributes.
Reported-by Andrew Cooper <[email protected]>
Signed-off-by Roger Pau Monné <[email protected]>
Acked-by Wei Liu <[email protected]>
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Andrew Cooper <[email protected]>
---
Changes since v1:
- s/nr_vcpus/max_vcpus/.
- assert max_vcpus is set.
--- tools/libxc/include/xc_dom.h | 3 ++ tools/libxc/xc_dom_x86.c | 71 +++++++++++++++++++++++++----------- tools/libxl/libxl_dom.c | 2 + 3 files changed, 54 insertions(+), 22 deletions(-)
tools/libxc/include/xc_dom.h +3 -0
@@ -230,6 +230,9 @@ struct xc_dom_image {#endif xen_pfn_t vuart_gfn; + +/* Number of vCPUs */ +unsigned int max_vcpus; };/* --- pluggable kernel loader ------------------------------------- */
tools/libxc/xc_dom_x86.c +49 -22
101 lines not on this page · raw message
tools/libxl/libxl_dom.c +2 -0
@@ -803,6 +803,7 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid, dom->xenstore_evtchn = state->store_port; dom->xenstore_domid = state->store_domid; dom->claim_enabled =libxl_defbool_val (info->claim_mode); + dom->max_vcpus = info->max_vcpus;if (info->num_vnuma_nodes !=0 ) {unsigned int i;
@@ -1256,6 +1257,7 @@ int libxl__build_hvm(libxl__gc *gc, uint32_t domid, dom->mmio_start = mmio_start; dom->vga_hole_size = device_model ?LIBXL_VGA_HOLE_SIZE :0 ; dom->device_model = device_model; + dom->max_vcpus = info->max_vcpus; rc = libxl__domain_device_construct_rdm(gc, d_config, info->u.hvm.rdm_mem_boundary_memkb*1024,
Signature · 7 lines
2.19.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel