WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [Patch] Fix for re-enabling PV-on-HVM on IPF

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Patch] Fix for re-enabling PV-on-HVM on IPF
From: Doi.Tsunehisa@xxxxxxxxxxxxxx
Date: Wed, 07 Mar 2007 08:55:19 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 06 Mar 2007 15:54:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: Your message of Tue, 06 Mar 2007 23:59:20 +0900. <20070306145920.GA26842%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45ED64EE.5080002@xxxxxxxxxxxxxx><20070306145920.GA26842%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Yamahata-san,

  Thank you for your comment.

You (yamahata) said:
> On Tue, Mar 06, 2007 at 09:56:14PM +0900, DOI Tsunehisa wrote:
>>     - we have to modify guest_physmap_add_page() to support it.
>>       (this is straight reason of hypervisor crash)
> 
> The patch breaks the the p2m/m2p table convension.
> get_page() shouldn't fail because xen heap page must be owned
> by the domain when guest_physmap_add_page() is called.
> share_xen_page_with_guest() does it.

  I've thought that this patch is tricky, but I didn't find the
correct way to modify to avoid hypervisor crash issue.

> What kind of page was passed when you observed the panic?
> Who allocated and passed it?

  Currently, without this patch, hypervisor crashes in PV-on-HVM
initialization phase..

  * at share_info page remapping: success
    - called from HYPERVISOR_memory_op in init_xen_info()..
      (unmodified_drivers/linux-2.6/platform-pci/platform-pci.c)
  * at grant table page remapping: crash
    - called from gnttab_init() in init_xen_info()
    - call tree in driver code is 
      gnttab_init() -> gnttab_resume() -> gnttab_map()
         -> HYPERVISOR_memory_op
      (linux-2.6-xen-sparse/drivers/xen/core/gnttab.c)
    - at guest_physmap_add_page() in hypervisor code,

  1706  void
  1707  guest_physmap_add_page(struct domain *d, unsigned long gpfn,
  1708                         unsigned long mfn)
  1709  {
  1710      int ret;
  1711
  1712      BUG_ON(!mfn_valid(mfn));
  1713      ret = get_page(mfn_to_page(mfn), d);
  1714      BUG_ON(ret == 0);           <<==== it crashes at this point.
  1715      set_gpfn_from_mfn(mfn, gpfn);
  1716      smp_mb();

  So, at grant table page remapping, the hypervisor crashes,
I think.

Thanks,
- Tsunehisa Doi

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel