lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Jun 2012 19:33:19 -0500
From:	Mehul Chadha <mehulc87@...il.com>
To:	sheng qiu <herbert1984106@...il.com>
Cc:	kvm <kvm@...r.kernel.org>, linux-kernel@...r.kernel.org
Subject: Re: how to map a host virtual address (hva) to guest address space (gva/gpa/gfn)

On Tue, Jun 19, 2012 at 6:09 PM, sheng qiu <herbert1984106@...il.com> wrote:
> Hi all,
>
> is there any existing function in KVM that can map a host virtual
> address (hva) to the guest address space. So that the guest VM can
> access it.
> i.e. translate hva to a gpa or gva or gfn, so the guest VM can use
> that converted address to access?
I am not aware of a function that exists in kvm, but you can write one using
__gfn_to_memslot()  as a reference implementation.

you can check if the hva falls in a particular memslot using
userspace_addr member
of the memslot structure, and then calculate the corresponding gfn from that.
>
> Thanks,
> Sheng
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ