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][PATCH]Fix the read error from IRR,ISR and TMR

To: "Xin, Xiaohui" <xiaohui.xin@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH]Fix the read error from IRR,ISR and TMR
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 23:27:28 +0100
Delivery-date: Thu, 31 Aug 2006 15:27:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9A1462408D6D394C8A7A812E98F00A4D0E531B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbM0cC4LzpDP1xsScihn3p0rzSgGAAeuNQ6
Thread-topic: [Xen-devel][PATCH]Fix the read error from IRR,ISR and TMR
User-agent: Microsoft-Entourage/11.2.5.060620
On 31/8/06 8:47 am, "Xin, Xiaohui" <xiaohui.xin@xxxxxxxxx> wrote:

> Since from SDM3 spec, for APIC registers, all 32-bit registers should be
> accessed using 128-bit aligned 32bit loads or stores.
> 
> And wider registers (64-bit or 256-bit) must be accessed using multiple
> 32-bit loads or stores.
> 
> In old APIC virtualization code, we use IRR, ISR and TMR which are
> 256-bit registers as contiguous bit maps other than multiple 32-bit.

SDM3 is not at all clear that these bitmaps are 8 32-bit registers rather
than a single 256-bit register. In fact, the manual makes it look very much
like they are the latter (e.g., by saying that some registers are 256 bits,
and that access to secondary 32-bit subwords happen at non-128-bit aligned
addresses), which is very misleading!

Yet another example where the manuals provide heaps of obvious and redundant
info (like explaining that APIC registers are not MSRs -- duh!) but being
ambiguous or misleading on subtle but essential details like this.

Since it turns out that *all* registers are 128-bit aligned and 32-bits, I
think the regs block should be changed to be an array of 32-bit registers,
skipping the unused parts of the APIC page (i.e., so that register x can be
found by regs[x>>4]). Then the bitmaps would be conveniently contiguous
again! And since the array would be only 1kB, it would mean we can get rid
of the alloc_domheap_page() and map_domain_page_global().

 -- Keir



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

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