mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: jayakumar.lkml@gmail.com, damm@opensource.se,
	linux-kernel@vger.kernel.org
Cc: armbru@redhat.com, jeremy@goop.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH 2/3] xen pvfb: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers.
Date: Thu,  3 Dec 2009 10:31:57 -0500	[thread overview]
Message-ID: <1259854318-16907-3-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1259854318-16907-2-git-send-email-konrad.wilk@oracle.com>

In Xen-paravirt mode, VM_IO flag signifies that the page frame number (PFN)
is actually a machine frame number (MFN). This is correct for memory backed by
PCI devices, but wrong for memory allocated from System RAM where the PFN
!= MFN.

During page faults, pages with VM_IO, get assigned to special domain I/O
domain and as said, the PFN is interpreted as MFN. When Xen hypervisor
modifies the PTE it interprets the PFN as the MFN, complains and
fails the PTE modification.

The end result is an infinitive page fault in the domain.
---
 drivers/video/xen-fbfront.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
index 54cd916..91a68e9 100644
--- a/drivers/video/xen-fbfront.c
+++ b/drivers/video/xen-fbfront.c
@@ -440,7 +440,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
 	fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
 	fb_info->fix.accel = FB_ACCEL_NONE;
 
-	fb_info->flags = FBINFO_FLAG_DEFAULT;
+	fb_info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
 
 	ret = fb_alloc_cmap(&fb_info->cmap, 256, 0);
 	if (ret < 0) {
-- 
1.6.2.5


  reply	other threads:[~2009-12-03 15:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 15:31 [PATCH] fb-defio: Inhibit setting VM_IO flag if FBINFO_VIRTFB is set Konrad Rzeszutek Wilk
2009-12-03 15:31 ` [PATCH 1/3] fb-defio: If FBINFO_VIRTFB is defined, do not set VM_IO flag Konrad Rzeszutek Wilk
2009-12-03 15:31   ` Konrad Rzeszutek Wilk [this message]
2009-12-03 15:31     ` [PATCH 3/3] fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers Konrad Rzeszutek Wilk
2009-12-04  0:35       ` Jaya Kumar
2009-12-04  0:52         ` Jeremy Fitzhardinge
2009-12-04  1:13           ` Jaya Kumar
2009-12-03 18:50   ` [PATCH 1/3] fb-defio: If FBINFO_VIRTFB is defined, do not set VM_IO flag Jeremy Fitzhardinge
2009-12-03 18:56     ` Konrad Rzeszutek Wilk
2009-12-03 19:05       ` Jeremy Fitzhardinge
2009-12-04  0:34   ` Jaya Kumar
2009-12-04  7:42   ` Magnus Damm

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=1259854318-16907-3-git-send-email-konrad.wilk@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=armbru@redhat.com \
    --cc=damm@opensource.se \
    --cc=jayakumar.lkml@gmail.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®