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] oops when access xenstore in hvm guest

To: 胡少龙 <sunofblack@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] oops when access xenstore in hvm guest
From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
Date: Tue, 3 Aug 2010 09:36:00 +0100
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Tue, 03 Aug 2010 01:36:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <529864.42086.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <529864.42086.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsyvMibV99ce2GGSW2bxt5dfB6dbwAKd78w
Thread-topic: [Xen-devel] oops when access xenstore in hvm guest

The store *PFN* is called that for a reason… it’s a guest page *frame* number i.e. a physical address. You need to get a kva for it before you can use it.

 

  Paul

 

From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of ???
Sent: 03 August 2010 04:33
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] oops when access xenstore in hvm guest

 

Hi,
    I use follow code get xenstore ring and event channel, then i wrapped writing and reading function to operate it ,but it came to oops:
    struct xenstore_domain_interface {
    char req[XENSTORE_RING_SIZE]; /* Requests to xenstore daemon. */
    char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */
    XENSTORE_RING_IDX req_cons, req_prod;
    XENSTORE_RING_IDX rsp_cons, rsp_prod;
    };
    struct xenstore_domain_interface *xenstore;
    xen_hvm_param_t param;
    param.domid = DOMID_SELF;
    param.index = HVM_PARAM_STORE_PFN;
    if ( hypercall_hvm_op(HVMOP_get_param, &param) )
        BUG();
    xenstore = (void *) (unsigned long) (param.value << PAGE_SHIFT);
    param.domid = DOMID_SELF;
    param.index = HVM_PARAM_STORE_EVTCHN;
    if ( hypercall_hvm_op(HVMOP_get_param, &param) )
        BUG();
    xenstore_event = param.value;

    I get the xenstore ring whose address is 0xfeffc000, and event channel port 2, but when i read the xenstore->req_prod, it came to "unable to handle kernel paging request at virtual address feffc804", i am using xen-3.4, any idea?Thanks.
 


 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>