lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5E91C233-4FE1-43DB-A155-03F14FCEF919@suse.de>
Date:	Fri, 26 Feb 2010 14:26:32 +0100
From:	Alexander Graf <agraf@...e.de>
To:	Joerg Roedel <joerg.roedel@....com>
Cc:	Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] KVM: SVM: Optimize nested svm msrpm merging


On 26.02.2010, at 14:21, Joerg Roedel wrote:

> On Fri, Feb 26, 2010 at 03:10:13PM +0200, Avi Kivity wrote:
>> 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?
> 
> True for the msrs the guest always has access too. But for the lbr-msrs
> the intercept bits may change at runtime. So an addtional flag is
> required to indicate if the bits should be cleared initially.

So the msrpm bitmap changes dynamically for each vcpu? Great, make it fully dynamic then, changing the vcpu->arch.msrpm only from within its vcpu context. No need for atomic ops.

Alex--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ