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-devel

Re: [Xen-devel] [PATCH 2 of 6] early PV on HVM

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 6] early PV on HVM
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Thu, 22 Apr 2010 16:42:51 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 22 Apr 2010 16:43:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1004221606290.11380@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1004221606290.11380@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
On 04/22/2010 08:15 AM, Stefano Stabellini wrote:
> From: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
>
> this patch:
>
> - adds a xen_guest_init hook in setup.c right after kvm_guest_init;
>
> - initializes basic pv on hvm features in xen_guest_init;
>   

Looks mostly OK, except:

> diff --git a/drivers/xen/xenbus/xenbus_probe.c 
> b/drivers/xen/xenbus/xenbus_probe.c
> index ab04a1b..7d11957 100644
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -55,6 +55,8 @@
>  #include <xen/events.h>
>  #include <xen/page.h>
>  
> +#include <xen/hvm.h>
> +
>  #include "xenbus_comms.h"
>  #include "xenbus_probe.h"
>  
> @@ -708,10 +710,19 @@ static int __init xenbus_probe_init(void)
>               xen_store_interface = mfn_to_virt(xen_store_mfn);
>       } else {
>               xenstored_ready = 1;
> -             xen_store_evtchn = xen_start_info->store_evtchn;
> -             xen_store_mfn = xen_start_info->store_mfn;
> +             if (xen_hvm_domain()) {
> +                     xen_store_evtchn =
> +                             hvm_get_parameter(HVM_PARAM_STORE_EVTCHN);
> +                     xen_store_mfn =
> +                             hvm_get_parameter(HVM_PARAM_STORE_PFN);
> +                     xen_store_interface =
> +                             ioremap(xen_store_mfn << PAGE_SHIFT, PAGE_SIZE);
>   

I think I'd prefer to see these wrap 80 cols than be line-broken like this.

> +             } else {
> +                     xen_store_evtchn = xen_start_info->store_evtchn;
> +                     xen_store_mfn = xen_start_info->store_mfn;
> +                     xen_store_interface = mfn_to_virt(xen_store_mfn);
> +             }
>       }
> -     xen_store_interface = mfn_to_virt(xen_store_mfn);
>  
>       /* Initialize the interface to xenstore. */
>       err = xs_init();
> diff --git a/include/xen/xen.h b/include/xen/xen.h
> index a164024..cb8c48b 100644
> --- a/include/xen/xen.h
> +++ b/include/xen/xen.h
> @@ -9,8 +9,10 @@ enum xen_domain_type {
>  
>  #ifdef CONFIG_XEN
>  extern enum xen_domain_type xen_domain_type;
> +extern void xen_guest_init(void);
>  #else
>  #define xen_domain_type              XEN_NATIVE
> +#define xen_guest_init() do { } while (0)
>  #endif
>   

This isn't an appropriate header for this.  Something under
arch/x86/include/asm would be better.

    J

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

<Prev in Thread] Current Thread [Next in Thread>