From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: xitler adole <zqyleo@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: problems about EPT in kvm
Date: Fri, 27 Mar 2020 14:58:22 +0100 [thread overview]
Message-ID: <874ku95281.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <CA+9FcC=PGZ76Tj5Sn1se-GkjpiQDUunKM0fzpdKRzvivTkiEqw@mail.gmail.com>
xitler adole <zqyleo@gmail.com> writes:
> Dear developer:
>
> I am facing confusing problems, there is no way for me to figure it
> out, so I have to ask for help:
>
> 1. I am using the <asm/kvm_host.h> <linux/kvm_host.h> for using kvm
> in my module, but there are always some function undefined like
> kvm_arch_mmu_notifier_invalidate_range. Are those functions not
> visiable from outside?
kvm_arch_mmu_notifier_invalidate_range() is not exported to other
modules with EXPORT_SYMBOL_GPL() so you won't be able to call it.
>
> 2. With the ept technology, If I use "alloc_page" inside the guest
> virtual machine, and use "page_to_pfn" to get the pfn of the certain
> page, Is the pfn I get the gfn or the pfn of the host machine?
You'll get gfn. Basically, the guest doesn't know that it runs as guest.
>
> 3. I want to modify the EPT table, so that I can make the gva point
> to certain hpa just to share information between vm, Given the
> condition that I can not modify the kvm code, Is that possible?
You have two level of translation:
GVA -> GPA
GPA -> HPA
so to make it happen you'll need a maping inside the guest (GVA -> GPA)
+ an entry in EPT (GPA -> HPA).
--
Vitaly
prev parent reply other threads:[~2020-03-27 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 3:54 problems about EPT in kvm xitler adole
2020-03-27 13:58 ` Vitaly Kuznetsov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ku95281.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=zqyleo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).