From: =?utf-8?B?6IOh5bCR6b6ZICA=?= Subject: oops when access xenstore in hvm guest Date: Tue, 3 Aug 2010 11:32:49 +0800 (CST) Message-ID: <529864.42086.qm@web92406.mail.cnh.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1132288676==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1132288676== Content-Type: multipart/alternative; boundary="0-1987579292-1280806369=:42086" --0-1987579292-1280806369=:42086 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, =C2=A0=C2=A0=C2=A0 I use follow code get xenstore ring and event channel, t= hen i wrapped writing and reading function to operate it ,but it came to oo= ps: =C2=A0=C2=A0=C2=A0 struct xenstore_domain_interface {=0D =C2=A0=C2=A0=C2=A0 char req[XENSTORE_RING_SIZE]; /* Requests to xenstore da= emon. */=0D =C2=A0=C2=A0=C2=A0 char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch= events. */=0D =C2=A0=C2=A0=C2=A0 XENSTORE_RING_IDX req_cons, req_prod;=0D =C2=A0=C2=A0=C2=A0 XENSTORE_RING_IDX rsp_cons, rsp_prod;=0D =C2=A0=C2=A0=C2=A0 }; =C2=A0=C2=A0=C2=A0 struct xenstore_domain_interface *xenstore; =C2=A0=C2=A0=C2=A0 xen_hvm_param_t param;=0D =C2=A0=C2=A0=C2=A0 param.domid =3D DOMID_SELF;=0D =C2=A0=C2=A0=C2=A0 param.index =3D HVM_PARAM_STORE_PFN;=0D =C2=A0=C2=A0=C2=A0 if ( hypercall_hvm_op(HVMOP_get_param, ¶m) )=0D =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 BUG();=0D =C2=A0=C2=A0=C2=A0 xenstore =3D (void *) (unsigned long) (param.value << PA= GE_SHIFT);=0D =C2=A0=C2=A0=C2=A0 param.domid =3D DOMID_SELF;=0D =C2=A0=C2=A0=C2=A0 param.index =3D HVM_PARAM_STORE_EVTCHN;=0D =C2=A0=C2=A0=C2=A0 if ( hypercall_hvm_op(HVMOP_get_param, ¶m) )=0D =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 BUG();=0D =C2=A0=C2=A0=C2=A0 xenstore_event =3D param.value;=0D =C2=A0=C2=A0=C2=A0 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 u= sing xen-3.4, any idea?Thanks. =C2=A0=20 =0A=0A=0A --0-1987579292-1280806369=:42086 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,
    I use follow code g= et xenstore ring and event channel, then i wrapped writing and reading func= tion to operate it ,but it came to oops:
    struct xenst= ore_domain_interface {=0D
    char req[XENSTORE_RING_SIZE= ]; /* Requests to xenstore daemon. */=0D
    char rsp[XEN= STORE_RING_SIZE]; /* Replies and async watch events. */=0D
  &= nbsp; XENSTORE_RING_IDX req_cons, req_prod;=0D
    XENSTO= RE_RING_IDX rsp_cons, rsp_prod;=0D
    };
  =   struct xenstore_domain_interface *xenstore;
    xe= n_hvm_param_t param;=0D
    param.domid =3D DOMID_SELF;= =0D
    param.index =3D HVM_PARAM_STORE_PFN;=0D
 =    if ( hypercall_hvm_op(HVMOP_get_param, &param) ) =0D
        BUG();=0D
  =   xenstore =3D (void *) (unsigned long) (param.value << PAGE_SHI= FT);=0D
    param.domid =3D DOMID_SELF;=0D
  = ;  param.index =3D HVM_PARAM_STORE_EVTCHN;=0D
    if= ( hypercall_hvm_op(HVMOP_get_param, &param) )=0D
   =      BUG();=0D
    xenstore_event =3D= param.value;=0D

    I get the xenstore ring whose ad= dress 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 virtua= l address feffc804", i am using xen-3.4, any idea?Thanks.
 

=0A=0A=0A=0A=0A=0A=0A   --0-1987579292-1280806369=:42086-- --===============1132288676== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1132288676==--