[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Mini-OS interrupt handling (broken?)


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Dave Pacheco" <dap@xxxxxxxxxxxx>
  • Date: Thu, 17 May 2007 22:39:14 -0400
  • Cc: Joel Weinberger <joel@xxxxxxxxxxxx>
  • Delivery-date: Thu, 17 May 2007 19:37:42 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:mime-version:content-type:x-google-sender-auth; b=cX9iH/vadI9l90HDdo2ZNt9Be8RZ5QoGsJSHd/7OKOReP0tx5CL+AEBK2oIBjSZS7MVZsIJfjbIJyGWRAboWMIOX1+95G+9J2hSyPfmoxY+OF9A+qKNSsqj+wCz5UH1qW/QxRR0B2UDoOdjxoRGdlDvA+/wpnw5LF8HDHT2lVd4=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

We're writing the pagefault handler for our OS, which is based more and more loosely on the Mini-OS. As the handler exits, however, it raises a GPF. After staring at the assembly in x86_32.S for a while and playing a bit, I started wondering whether this code works. It's not inconceivable that it might not work because most of the interrupts never occur in practice, and the implementations halt the kernel anyway. Moreover, the GPF is raised even when I replace do_page_fault with an empty function (so I've obviously not changed the state of the system), which I don't think is proper behavior (but then, I'm not intimately familiar with the x86 spec).

The GPF occurs on line 138 of x86_32.S (same code in 3.0.3 and 3.0.4), where it appears to be testing whether more events need to be processed. (This is also sort of bizarre, because it's in the middle of hypervisor_callback, a function I didn't think actually got called in this code path, based on the comment at the top of trap.c in the Mini-OS.)

Any insight would be appreciated. Why might the GPF be raised? Does this code actually get run? Is it known to work?

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.