From mboxrd@z Thu Jan 1 00:00:00 1970 From: xinyue Subject: Performance problem about address translation Date: Mon, 6 Jul 2015 15:22:58 +0800 (CST) Message-ID: <1064283602.109093.1436167378616.JavaMail.tomcat@nfs.iscas.ac.cn> Reply-To: xinyue@nfs.iscas.ac.cn Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8791261028965832153==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZC1Ba-0005IL-4R for xen-devel@lists.xenproject.org; Mon, 06 Jul 2015 07:51:30 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "ian.campbell" , xen-devel List-Id: xen-devel@lists.xenproject.org --===============8791261028965832153== Content-Type: multipart/alternative; boundary="----=_Part_109092_719554037.1436167378615" ------=_Part_109092_719554037.1436167378615 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi,     For I want to translate the virtual address in HVM DomU to virtual address in Xen. But when I use the function paging_gva_to_gfn and get_gfn, I can feel the performance down quickly, the machine become very hot and then I have to force the machine shutting down. The codes I used as below:     uint32_t pfec = PFEC_page_present;     unsigned long gfn;     unsigned long mfn;     unsigned long virtaddr;     struct vcpu *vcpu = current;     struct domain *d = vcpu->domain;     gfn = paging_gva_to_gfn(current, 0xc0290000, &pfec);     mfn = get_gfn(d, gfn, &t);     virtaddr = map_domain_page(mfn_x(mfn)); I also use the dbg_hvm_va2mfn function in debug.c, performance problem still present. I don't know why, could someone give me some advices. Thanks for any advice and best regards! xinyue ------=_Part_109092_719554037.1436167378615 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi,

    For I want to translate the virtual address in HVM DomU to virtual address in Xen. But when I use the function paging_gva_to_gfn and get_gfn, I can feel the performance down quickly, the machine become very hot and then I have to force the machine shutting down.

The codes I used as below:
    uint32_t pfec = PFEC_page_present;
    unsigned long gfn;
    unsigned long mfn;
    unsigned long virtaddr;
    struct vcpu *vcpu = current;
    struct domain *d = vcpu->domain;

    gfn = paging_gva_to_gfn(current, 0xc0290000, &pfec);
    mfn = get_gfn(d, gfn, &t);
    virtaddr = map_domain_page(mfn_x(mfn));

I also use the dbg_hvm_va2mfn function in debug.c, performance problem still present.

I don't know why, could someone give me some advices.

Thanks for any advice and best regards!

xinyue
------=_Part_109092_719554037.1436167378615-- --===============8791261028965832153== 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.xen.org http://lists.xen.org/xen-devel --===============8791261028965832153==--