From: Avi Kivity <avi@qumranet.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm-devel@lists.sourceforge.net,
Andrea Arcangeli <andrea@qumranet.com>,
Ben-Ami Yassour <BENAMI@il.ibm.com>
Subject: Re: [PATCH] Don't assume struct page for x86 MMU
Date: Sun, 06 Apr 2008 14:44:56 +0300 [thread overview]
Message-ID: <47F8B7B8.8070605@qumranet.com> (raw)
In-Reply-To: <1207165616-26818-1-git-send-email-aliguori@us.ibm.com>
Anthony Liguori wrote:
> This patch introduces a gfn_to_pfn() function and corresponding functions like
> kvm_release_pfn_dirty(). Using these new functions, we can modify the x86
> MMU to no longer assume that it can always get a struct page for any given gfn.
>
> We don't want to eliminate gfn_to_page() entirely because a number of places
> assume they can do gfn_to_page() and then kmap() the results. When we support
> IO memory, gfn_to_page() will fail for IO pages although gfn_to_pfn() will
> succeed.
>
> This does not implement support for avoiding reference counting for reserved
> RAM or for IO memory. However, it should make those things pretty straight
> forward.
>
> Since we're only introducing new common symbols, I don't think it will break
> the non-x86 architectures but I haven't tested those. I've tested Intel,
> AMD, NPT, and hugetlbfs with Windows and Linux guests.
>
>
Applied, thanks.
> @ -1089,7 +1086,7 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
> if (largepage)
> spte |= PT_PAGE_SIZE_MASK;
>
> - spte |= page_to_phys(page);
> + spte |= (pfn << PAGE_SHIFT);
>
This overflows on i386 with >=4GB RAM. I fixed it before committing.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
prev parent reply other threads:[~2008-04-06 11:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 19:46 [PATCH] Don't assume struct page for x86 MMU Anthony Liguori
2008-04-06 11:44 ` Avi Kivity [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=47F8B7B8.8070605@qumranet.com \
--to=avi@qumranet.com \
--cc=BENAMI@il.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=andrea@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
/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