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, ¶m) ) 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, ¶m) ) 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@lists.xensource.com http://lists.xensource.com/xen-devel
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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of ??? Sent: 03 August 2010 04:33 To: xen-devel@lists.xensource.com 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, ¶m) ) 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, ¶m) ) 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@lists.xensource.com http://lists.xensource.com/xen-devel