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] TPR write optimization (even improves 2003 sp2)

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] TPR write optimization (even improves 2003 sp2)
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Wed, 7 Jan 2009 23:35:29 +1100
Cc:
Delivery-date: Wed, 07 Jan 2009 04:35:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C58A33BA.20D03%keir.fraser@xxxxxxxxxxxxx>
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: <AEC6C66638C05B468B556EA548C1A77D01550245@trantor> <C58A33BA.20D03%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclwbQESFc81qMn2SR2vAjv2yU5MgQABpemAAAyUQdEAAFfuQAAAdgGuAAA1Q7AAAPb/BAAAN9OgAADpQpkABCI/MA==
Thread-topic: [Xen-devel] TPR write optimization (even improves 2003 sp2)
> > From memory, there is a register somewhere that says what the
highest
> > interrupt level that is currently blocked is... I'll look at that.
This
> > doesn't actually sound that hard...
> 
> An interrupt is delivered if:
>   highest_prio(IRR) > max(highest_prio(ISR), TPR).
> 
> Where highest_prio() is based on a backwards bitmap scan.
> 
> If you go down the route of setting a TPR threshold for vmexit, that
would
> be (hp = highest_prio):
>   TPR_thresh = ((hp(IRR) > hp(ISR)) && (hp(IRR) < TPR)) ? hp(IRR) : 0
> 
> Where VMEXIT occurs if TPR is updated to a value less than the
threshold.
> 

I really need to get xentrace working... if there are lots of reads and
writes to the IRR and ISR registers that all involve VMEXIT's then it
may well be worth mapping the entire APIC register range into the DomU's
memory space (somehow).

Otherwise I can make sure that each write to IRR and ISR (by xen or
domU) gets echo's into DomU's memory in such a form that I can calculate
the value of TPR_thresh that you have given above in my kernel patch and
VMEXIT when necessary from there...

I think I should figure out why xentrace isn't telling me what I want to
know as there are too many conditionals at the moment to know what the
right solution is...

James


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