From: Andrea Arcangeli <andrea@qumranet.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com.br>, kvm@vger.kernel.org
Subject: [PATCH 6/6] kvm.git allow reserved pages to be used as guest phys ram
Date: Fri, 25 Jul 2008 16:44:03 +0200 [thread overview]
Message-ID: <20080725144403.GF8217@duo.random> (raw)
In-Reply-To: <20080725144043.GE8217@duo.random>
This is an incremental fix on top of Ben-Ami reserved-pages-mmio
patch. I need this for the reserved-ram 1:1 patch because I must allow
to map reserved pages with a valid pfn in the user address space of
the kvm task. This is because those reserved pages aren't mmio regions
for me but the real backing of the guest physical ram.
Reserved pages can be mapped through the ->fault api just fine, as
long as a pfn exists for them, and the reserved-ram patch ensures that
a pfn exists for them and that they're marked reserved as expected by
special ram reserved at boot time.
Signed-off-by: Andrea Arcangeli <andrea@qumranet.com>
kvm_main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: virt/kvm/kvm_main.c
--- virt/kvm/kvm_main.c.orig 2008-06-25 02:39:51.000000000 +0200
+++ a/virt/kvm/kvm_main.c 2008-06-25 02:40:35.000000000 +0200
@@ -604,10 +604,9 @@ struct page *gfn_to_page(struct kvm *kvm
pfn_t pfn;
pfn = gfn_to_pfn(kvm, gfn);
- if (!is_mmio_pfn(pfn))
+ if (pfn_valid(pfn))
return pfn_to_page(pfn);
-
- WARN_ON(is_mmio_pfn(pfn));
+ WARN_ON(1);
get_page(bad_page);
return bad_page;
next prev parent reply other threads:[~2008-07-25 14:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 14:24 [PATCH 1/6] kvm.git mmu notifier patch Andrea Arcangeli
2008-07-25 14:26 ` [PATCH 2/6] kvm.git allow reading aliases with mmu_lock Andrea Arcangeli
2008-07-25 14:32 ` [PATCH 3/6] kvm.git allow browsing memslots " Andrea Arcangeli
2008-07-25 14:38 ` [PATCH 4/6] kvm-userland.git mmu notifier compat Andrea Arcangeli
2008-07-25 14:40 ` [PATCH 5/6] kvm.git handle reserved pages as mmio Andrea Arcangeli
2008-07-25 14:44 ` Andrea Arcangeli [this message]
2008-07-29 12:49 ` [PATCH 4/6] kvm-userland.git mmu notifier compat Avi Kivity
2008-07-29 13:03 ` Andrea Arcangeli
2008-07-29 13:30 ` Avi Kivity
2008-07-29 13:37 ` Andrea Arcangeli
2008-07-28 21:51 ` [PATCH 3/6] kvm.git allow browsing memslots with mmu_lock Marcelo Tosatti
2008-07-28 22:06 ` Andrea Arcangeli
2008-07-28 21:43 ` [PATCH 2/6] kvm.git allow reading aliases " Marcelo Tosatti
2008-07-28 21:11 ` [PATCH 1/6] kvm.git mmu notifier patch Marcelo Tosatti
2008-07-28 21:15 ` Marcelo Tosatti
2008-07-29 9:31 ` Avi Kivity
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=20080725144403.GF8217@duo.random \
--to=andrea@qumranet.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com.br \
/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