On Tue, Apr 29, 2008 at 02:09:20PM -0500, Anthony Liguori wrote:
This patch allows VMA's that contain no backing page to be used for guest
memory. This is a drop-in replacement for Ben-Ami's first page in his direct
mmio series. Here, we continue to allow mmio pages to be represented in the
Muli Ben-Yehuda wrote:
On Tue, Apr 29, 2008 at 02:09:20PM -0500, Anthony Liguori wrote:
This patch allows VMA's that contain no backing page to be used for guest
memory. This is a drop-in replacement for Ben-Ami's first page in his direct
mmio series. Here, we continue to allow mmio
On Wed, Apr 30, 2008 at 11:59:47AM +0300, Avi Kivity wrote:
The code is not trying to find a vma for the address, but a vma for the
address which also has VM_PFNMAP set. The cases for vma not found, or vma
found, but not VM_PFNMAP, are folded together.
Muli's saying the comparison is
Andrea Arcangeli wrote:
On Wed, Apr 30, 2008 at 11:59:47AM +0300, Avi Kivity wrote:
The code is not trying to find a vma for the address, but a vma for the
address which also has VM_PFNMAP set. The cases for vma not found, or vma
found, but not VM_PFNMAP, are folded together.
Muli Ben-Yehuda wrote:
@@ -544,19 +545,35 @@ pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn)
npages = get_user_pages(current, current-mm, addr, 1, 1, 1, page,
NULL);
-if (npages != 1) {
-get_page(bad_page);
-return
Avi Kivity wrote:
Hollis/Xiantao/Carsten, can you confirm that this approach works for
you? Carsten, I believe you don't have mmio, but at least this
shouldn't interfere.
Should work fine on s390 afaics.
-
This SF.net
On Tuesday 29 April 2008 18:12:51 Anthony Liguori wrote:
IIUC PPC correctly, all IO pages have corresponding struct pages. This
means that get_user_pages() would succeed and you can reference count
them? In this case, we would never take the VM_PFNMAP path.
Is that correct?
I think
Andrea Arcangeli wrote:
On Tue, Apr 29, 2008 at 06:12:51PM -0500, Anthony Liguori wrote:
IIUC PPC correctly, all IO pages have corresponding struct pages. This
means that get_user_pages() would succeed and you can reference count them?
In this case, we would never take the VM_PFNMAP
This patch allows VMA's that contain no backing page to be used for guest
memory. This is a drop-in replacement for Ben-Ami's first page in his direct
mmio series. Here, we continue to allow mmio pages to be represented in the
rmap.
Since v1, I've taken into account Andrea's suggestions at
Anthony Liguori wrote:
This patch allows VMA's that contain no backing page to be used for guest
memory. This is a drop-in replacement for Ben-Ami's first page in his direct
mmio series. Here, we continue to allow mmio pages to be represented in the
rmap.
I like this very much, as it
Avi Kivity wrote:
Anthony Liguori wrote:
This patch allows VMA's that contain no backing page to be used for guest
memory. This is a drop-in replacement for Ben-Ami's first page in his direct
mmio series. Here, we continue to allow mmio pages to be represented in the
rmap.
Anthony Liguori wrote:
struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn)
{
-return pfn_to_page(gfn_to_pfn(kvm, gfn));
+pfn_t pfn;
+
+pfn = gfn_to_pfn(kvm, gfn);
+if (pfn_valid(pfn))
+return pfn_to_page(pfn);
+
+return NULL;
}
You're
Avi Kivity wrote:
It depends on what's going on? Does a page table point to mmio? Or
the glommerclock?
Not sure there is a single answer.
Perhaps we should be replacing consumers of gfn_to_page() with
copy_to_user() instead?
Indeed we should. The problem is access in atomic contexts.
Anthony Liguori wrote:
Avi Kivity wrote:
It depends on what's going on? Does a page table point to mmio? Or
the glommerclock?
Not sure there is a single answer.
Perhaps we should be replacing consumers of gfn_to_page() with
copy_to_user() instead?
Indeed we should. The problem is
Hollis Blanchard wrote:
On Tuesday 29 April 2008 17:17:49 Avi Kivity wrote:
I like this very much, as it only affects accessors and not the mmu core
itself.
Hollis/Xiantao/Carsten, can you confirm that this approach works for
you? Carsten, I believe you don't have mmio, but at least
15 matches
Mail list logo