Re: [PATCH V10 05/14] xen/pvh: balloon and grant changes.

From: David Vrabel
Date: Fri Dec 13 2013 - 06:03:05 EST


On 13/12/13 02:10, Konrad Rzeszutek Wilk wrote:
> From: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>
> For balloon changes we skip setting of local P2M as it's updated
> in Xen. For grant, the shared grant frame is the PFN and not MFN,
> hence its mapped via the same code path as HVM.

It's difficult to see how these are related. Please split.

I also think Stefano recently submitted an equivalent fix for the
balloon driver.

> --- a/drivers/xen/grant-table.c
> +++ b/drivers/xen/grant-table.c
> @@ -1056,14 +1056,20 @@ static void gnttab_unmap_frames_v2(void)
> static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
> {
> struct gnttab_setup_table setup;
> + unsigned long start_gpfn;
> xen_pfn_t *frames;
> unsigned int nr_gframes = end_idx + 1;
> int rc;
>
> - if (xen_hvm_domain()) {
> + if (xen_hvm_domain() || xen_feature(XENFEAT_auto_translated_physmap)) {
> struct xen_add_to_physmap xatp;
> unsigned int i = end_idx;
> rc = 0;
> +
> + if (xen_hvm_domain())
> + start_gpfn = xen_hvm_resume_frames >> PAGE_SHIFT;
> + else
> + start_gpfn = virt_to_pfn(gnttab_shared.addr);

Not really clear why PVH diverges from HVM here.

> @@ -1135,7 +1141,7 @@ static void gnttab_request_version(void)
> int rc;
> struct gnttab_set_version gsv;
>
> - if (xen_hvm_domain())
> + if (xen_hvm_domain() || xen_feature(XENFEAT_auto_translated_physmap))
> gsv.version = 1;
> else
> gsv.version = 2;

Why is PVH limited to version 1?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/