| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V10 05/14] xen/pvh: balloon and grant changes.
 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |