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] vmx: last branch recording MSR emulation

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] vmx: last branch recording MSR emulation
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 15 Oct 2007 15:35:05 +0100
Cc: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Delivery-date: Mon, 15 Oct 2007 07:35:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <46BB22B8.76E4.0078.0@xxxxxxxxxx>
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: AcgPOJOp0g/FfnsrEdybfQAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] vmx: last branch recording MSR emulation
User-agent: Microsoft-Entourage/11.3.6.070618
On 9/8/07 13:20, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> .. to have feature parity with SVM.
> 
> This required adding infrastructure to make use of VMX' MSR save/
> restore feature as well as making the MSR intercept bitmap per-VM.

> +    rdmsr(MSR_IA32_VMX_MISC, vmx_msr_low, vmx_msr_high);
> +    /* 16-byte entries in 512-entry steps */
> +    vmx_msr_max_order = ((vmx_msr_low >> 25) & 7) + 13 - PAGE_SHIFT;

It's not clear to me from the reference manual how VMX_MISC[25:27] is
supposed to be interpreted. The manual claims in G.5 that if the value is N
then the maximum number of MSRs is (N+1)*512. Note that the formula is
linear in N, not exponential, so I think turning N into an order variable
(vmx_msr_max_order) is incorrect.

However, the manual then confuses me. In 20.7.2 it says "it is recommended
that [MSR-store] count not exceed 512 bytes". This doesn't tally with the
formula G.5 which would imply that the smallest limit would be 512 *MSRs*,
not 512 bytes. I wonder if 20.7.2 is incorrect?

I'd like to get this latter point clarified (I cc'ed Xin Li at Intel to see
if he has any idea). If the smallest limit is indeed 512 MSRs then I see
little point in interrogating VMX_MISC at all, or including limit-checking
code. We're absolutely nowhere near pushing the limit of 512 MSRS. Also that
limit requires 8kB of MSR data -- we can't really guarantee success of
contiguous multi-page allocations anyway (as you have seen) so actually we'd
like to keep to a 256-MSR limit for that reason.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH] vmx: last branch recording MSR emulation, Keir Fraser <=