[PATCH 11/11] KVM: SVM: Optimize nested svm msrpm merging

2010-02-24 Thread Joerg Roedel
This patch optimizes the way the msrpm of the host and the guest are merged. The old code merged the 2 msrpm pages completly. This code needed to touch 24kb of memory for that operation. The optimized variant this patch introduces merges only the parts where the host msrpm may contain zero bits.

Re: [PATCH 11/11] KVM: SVM: Optimize nested svm msrpm merging

2010-02-24 Thread Alexander Graf
On 24.02.2010, at 18:59, Joerg Roedel wrote: This patch optimizes the way the msrpm of the host and the guest are merged. The old code merged the 2 msrpm pages completly. This code needed to touch 24kb of memory for that operation. The optimized variant this patch introduces merges only the

Re: [PATCH 11/11] KVM: SVM: Optimize nested svm msrpm merging

2010-02-24 Thread Joerg Roedel
On Wed, Feb 24, 2010 at 08:27:50PM +0100, Alexander Graf wrote: + static const u32 msrpm_offsets[] = { + 0x002c, /* SYSENTER_CS */ + + 0x0038, /* LASTBRANCHFROMIP + LASTBRANCHTOIP + LASTINTFROMIP +

Re: [PATCH 11/11] KVM: SVM: Optimize nested svm msrpm merging

2010-02-24 Thread Alexander Graf
On 24.02.2010, at 20:58, Avi Kivity wrote: On 02/24/2010 09:37 PM, Joerg Roedel wrote: Isn't there such a list around somewhere already? We really should only keep this list once throughout the whole code. If necessary, just create the list on the fly when bits get set in the msrpm.