[lkml]   [2010]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/5] KVM: SVM: Optimize nested svm msrpm merging
On 02/26/2010 03:04 PM, Joerg Roedel wrote:
>> I'm still not convinced on this way of doing things. If it's static,
>> make it static. If it's dynamic, make it dynamic. Dynamically
>> generating a static list just sounds plain wrong to me.
> Stop. I had a static list in the first version of the patch. This list
> was fine except the fact that a developer needs to remember to update
> this list if the list of non-intercepted msrs is expanded. The whole
> reason for a dynamically built list is to take the task of maintaining
> the list away from the developer and remove a possible source of hard to
> find bugs. This is what the current approach does.

The problem was the two lists. If you had a

static struct svm_direct_access_msrs = {
u32 index;
bool longmode_only;
} direct_access_msrs = {

You could generate

static unsigned *msrpm_offsets_longmode, *msrpm_offsets_legacy;

as well as the original bitmaps at module init, no?

Do not meddle in the internals of kernels, for they are subtle and quick to panic.

 \ /
  Last update: 2010-02-26 14:13    [W:0.085 / U:7.908 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site