From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Christophe Saout <christophe@saout.de>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: Xen with dom0 pvops on ultra-recent "git tip" kernel on x86_64
Date: Tue, 20 Jan 2009 12:08:44 -0800 [thread overview]
Message-ID: <49762F4C.1040801@goop.org> (raw)
In-Reply-To: <1232314122.5653.53.camel@leto.intern.saout.de>
Christophe Saout wrote:
> Hi again,
>
>
>> and the later dies in the radeon driver with the bad memory / pagetable
>> access in radeon_card_posted() in what seems to be the fast attempt to
>> do an access to the card's MMIO area.
>>
>
> Uhoh,
>
> diff -u ioremap.c ioremap-xen.c
>
> suggests there is some more work to do. :-(
>
> The native Xen kernel defines io_remap_pfn_range to
> direct_remap_pfn_range, whereas !XEN defines it to remap_pfn_range
> (which is also the case for the pv_ops kernel at the moment)
>
> I guess that makes io_remap_pfn_range another candidate for a new
> paravirt op.
>
Well, I'm taking a different approach for this. The problem is that
there's two distinct address spaces: the dom0 pseudo-physical address
space, and the machine's real physical address space. When you're
mapping devices, you need to map the real machine addresses rather than
the pseudo-phys ones. When you map with PAGE_IOMAP then the existing
Xen pte-setup pvops will do the appropriate things to set up a hardware
mapping. Therefore, to map devices from userspace, you just need to
make sure that PAGE_IOMAP gets set appropriately - which is the tricky
question.
> If this really has to be implemented, what about this in asm/mmu.h:
>
> typedef struct {
> ...
> #ifdef CONFIG_XEN
> unsigned has_foreign_mappings:1;
> #endif
> ...
> } mm_context_t;
>
> There is some logic in the native Xen kernel which prevents a call to
> mm_unpin if there are "foreign mappings", i.e. set by
> direct_remap_pfn_range. What's up with that?
>
You have to remove any foreign mappings (ie, established with a grant
table operation) before unpinning. My plan is to do something a bit
different from this, by using a shadow pagetable to keep track of the
grant references, and use a page flag in the pgd when there's a grant
reference present in a pagetable (which is uncommon).
> Note that I noticed a completely unrelated issue: After some minutes it
> can happen that the AHCI goes dead on me. Hard disk accesses hang and
> in the log there are several tries to revive the controller (resets and
> errors) until the kernel at some point decides to panic.
>
Yes, that's an open mystery. For me AHCI fails immediately (fails to
probe drives). Others have varying degrees of success. Several minutes
uptime is very good.
J
next prev parent reply other threads:[~2009-01-20 20:08 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-10 19:22 Xen with dom0 pvops on ultra-recent "git tip" kernel on x86_64 Christophe Saout
2009-01-10 20:11 ` Marc - A. Dahlhaus
2009-01-10 20:28 ` Christophe Saout
2009-01-10 20:37 ` Pasi Kärkkäinen
2009-01-10 20:49 ` Marc - A. Dahlhaus
2009-01-10 20:54 ` Christophe Saout
2009-01-10 21:13 ` Christophe Saout
2009-01-11 14:17 ` Christophe Saout
2009-01-11 14:52 ` Christophe Saout
2009-01-11 16:35 ` Christophe Saout
2009-01-11 16:59 ` Christophe Saout
2009-01-11 20:13 ` Christophe Saout
2009-01-12 14:17 ` Christophe Saout
2009-01-12 16:41 ` Christophe Saout
2009-01-13 9:28 ` Christophe Saout
2009-01-13 15:33 ` Pasi Kärkkäinen
2009-01-13 16:41 ` Christophe Saout
2009-01-13 16:57 ` Christophe Saout
2009-01-16 17:23 ` Jeremy Fitzhardinge
2009-01-16 17:40 ` Christophe Saout
2009-01-16 17:52 ` Jeremy Fitzhardinge
2009-01-17 16:29 ` Christophe Saout
2009-01-18 20:10 ` Christophe Saout
2009-01-18 21:28 ` Christophe Saout
2009-01-18 22:39 ` Xen with dom0 pvops on ultra-recent "git tip"kernel " Keir Fraser
2009-01-19 9:52 ` Christophe Saout
2009-01-19 12:33 ` Christophe Saout
2009-02-22 23:28 ` Jeremy Fitzhardinge
2009-02-24 9:32 ` Christophe Saout
2009-02-24 10:41 ` Christophe Saout
2009-02-24 16:20 ` Boris Derzhavets
2009-02-24 21:22 ` Jeremy Fitzhardinge
2009-02-24 21:51 ` Andrew Lyon
2009-02-25 7:16 ` Boris Derzhavets
2009-04-23 21:49 ` Nvidia drivers on " Nigel Gamble
2009-04-24 7:43 ` Andrew Lyon
[not found] ` <1240816930.4387.18.camel@petrie>
2009-04-28 0:07 ` Jeremy Fitzhardinge
2009-04-28 5:33 ` William Pitcock
2009-04-29 15:13 ` Attempt to load the most recent 2.6.30-rc-tip under Xen-3.3.1 on F11-preview Boris Derzhavets
2009-04-29 15:58 ` Boris Derzhavets
2009-04-29 16:35 ` Jeremy Fitzhardinge
2009-04-29 18:42 ` Boris Derzhavets
2009-02-25 6:39 ` Xen with dom0 pvops on ultra-recent "git tip"kernel on x86_64 Boris Derzhavets
2009-01-20 20:08 ` Jeremy Fitzhardinge [this message]
2009-01-20 21:27 ` Xen with dom0 pvops on ultra-recent "git tip" kernel " Pasi Kärkkäinen
2009-01-21 18:32 ` Andrew Lyon
2009-01-26 19:56 ` Adam Wendt
2009-01-13 18:16 ` Pasi Kärkkäinen
2009-01-16 17:26 ` Jeremy Fitzhardinge
2009-01-16 18:22 ` Pasi Kärkkäinen
2009-01-10 20:40 ` Marc - A. Dahlhaus
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=49762F4C.1040801@goop.org \
--to=jeremy@goop.org \
--cc=christophe@saout.de \
--cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.