WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Xen with dom0 pvops on ultra-recent "git tip" kernel on

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Xen with dom0 pvops on ultra-recent "git tip" kernel on x86_64
From: Christophe Saout <christophe@xxxxxxxx>
Date: Sun, 18 Jan 2009 21:10:11 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 18 Jan 2009 12:10:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1232209746.5342.7.camel@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <49690103.5020706@xxxxxx> <1231619339.5616.15.camel@xxxxxxxxxxxxxxxxxxxx> <20090110203706.GW15052@xxxxxxxxxxxxxxx> <1231622029.4778.1.camel@xxxxxxxxxxxxxxxxxxxx> <1231683478.4809.43.camel@xxxxxxxxxxxxxxxxxxxx> <1231685561.4809.50.camel@xxxxxxxxxxxxxxxxxxxx> <1231691732.5342.3.camel@xxxxxxxxxxxxxxxxxxxx> <1231769868.4838.4.camel@xxxxxxxxxxxxxxxxxxxx> <1231778480.4742.3.camel@xxxxxxxxxxxxxxxxxxxx> <1231838888.4823.5.camel@xxxxxxxxxxxxxxxxxxxx> <20090113153302.GZ15052@xxxxxxxxxxxxxxx> <1231864918.5257.6.camel@xxxxxxxxxxxxxxxxxxxx> <1231865847.5257.8.camel@xxxxxxxxxxxxxxxxxxxx> <4970C2A7.8010702@xxxxxxxx> <1232209746.5342.7.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

> > I haven't been brave enough to even attempt starting X; there's a lot of 
> > work to be done if you want to do anything beyond dumb framebuffer.
> > 
> > Anyway, in this case, I definitely haven't added this call, so it will 
> > need to be done somewhere.  Does it need to be called once at startup, 
> > or on every context switch?  There may well be a suitable place to hook 
> > this into already, but we can add a new pvop if its really needed.
> 
> Just to let you know.  I have this very preliminary, incomplete (x86_32
> parts are missing) and barely tested patch (barely tested under Xen, not
> checked if the native stuff works).  It seems to work on my test case,
> with a program where I ioperm some I/O range and try to inb() some bytes
> from it (segfaults when it should and/or returns values when it should),
> and it also survives context switches.

Eheh, while trying with gdb I found out that context switches do not
restore the bitmap correctly.  Guess what, two obvious and stupid
bugs. :-)  in enlighten.c:xen_set_io_bitmap it has to say "thread->"
instead of "current->thread." and in process_64.c the call has to pass
the "next" variable and not the "next_p" to set_io_bitmap (the thread,
not the task).  Then context switches actually do seem to work.

> However, the X server is now giving me a "Corrupted page table", which I
> caught on netconsole and I have no clue how I should debug that one.

Just checked, the machine isn't dead, just screen and keyboard, ssh
continues to work.  So, gdb'd it from ssh, and also removed the call to
"pgtable_bad" in arch/x86/mm/fault.c (which is triggered by the RSVD bit
being set on the page table, hmmmmm), so I get a segfault which gdb can
catch.

Ok, the X server first spits a strange message:
 (EE) RADEON(0): V_BIOS address 0x22c0 out of range
instead of
 (II) RADEON(0): Primary V_BIOS segment is: 0xc000
(in xf86int10GetBiosSegment)

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.

That base address of that one seems to be obtained by libpciaccess,
which, as far as I understand, digs around in /sys to get the relevant
PCI data and then maps it into memory, so I guess it is not related to
the warning message about the V_BIOS address.

I guess that X server is one of the few processes that try to map PCI
hardware MMIO ranges into memory, so perhaps there is also something
missing (especially since it triggers acceses to pages with the RSVD bit
set, something which should never happen under normal circumstances, if
I understand correctly).

Cheers,
        Christophe



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>