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] VPMU issue on Nehalem cpus

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] VPMU issue on Nehalem cpus
From: Keir Fraser <keir@xxxxxxx>
Date: Mon, 22 Nov 2010 09:28:57 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Haitao Shan <haitao.shan@xxxxxxxxx>
Delivery-date: Mon, 22 Nov 2010 01:30:16 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:cc:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=t1KMY4NbTtyiZfqBa9ZHFD4MQEmjBFZodCojhDf6AiM=; b=JS3fI/Vsf8h7qEI/5LShIoit08yTzSQfJrooDMH38JwTvXMtSG4E7yNPEtpanXxd/h 8OUsSv6GgAWbn3f9FUkvHEf8kbbkArwM+N2nRSVklCSlxfDDUX6pQB7AnUpgnDFWPc83 yUdLTvqUnGFrp/lRZFdD1OCo8SolLGasalq34=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=G6nmSOhfg1ge4FrAjxXdrFyT3rHKBbLcsu3PTTBk/3Q/xk2wF4HhwHiaQnSSdBxaO5 SBsowdwZrw5SrcHMAcBDE0kyIQ8pbGgYBPHVSIpEHJZXloIfBkSEeRSHmFua+zG5T0PB QZ47CW+kq1C9Oaw9ekdueagAXq52QkeCqiqKA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CEA439E020000780002396B@xxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuKJ6/rzlzBiFBMSUWgRNbfE8B8WA==
Thread-topic: [Xen-devel] [PATCH] VPMU issue on Nehalem cpus
User-agent: Microsoft-Entourage/12.27.0.100910
On 22/11/2010 09:19, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>>>> +    val = msr_content & ((1 << num_gen_pmc) - 1);
>>> 
>>> What's the point of masking if the subsequent loop looks at the
>>> bottom so many bits only anyway?
>> 
>> Bits 0-31 flag the overflow of the general counters (currently max 4) and
>> 32-63
>> flag the overflow of the fixed counter (currently max 3).
>> Yes the first mask is not necessary, maybe a comment would be better?
> 
> Neither is the second mask (below) - the shift is all that's really
> needed. Afaic, a comment doesn't seem necessary, but Keir
> may by of different opinion here.

It's clear from the code that the mask operation is unnecessary. No code
comment required.

 -- Keir



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