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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1320680757.17809.2.camel@twins>
Date:	Mon, 07 Nov 2011 16:45:57 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Gleb Natapov <gleb@...hat.com>
Cc:	kvm@...r.kernel.org, avi@...hat.com, mtosatti@...hat.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu,
	acme@...stprotocols.net
Subject: Re: [PATCHv2 7/9] KVM: Expose the architectural performance
 monitoring CPUID leaf

On Mon, 2011-11-07 at 17:41 +0200, Gleb Natapov wrote:
> > > +               entry->eax = min(cap.version, 2)
> > > +                       | (cap.num_counters_gp << 8)
> > > +                       | (cap.bit_width_gp << 16)
> > > +                       | (cap.events_mask_len << 24); 


> Do you mean by doing cpuid here directly instead of checking perf
> capability?

No I meant something like:
        
        union cpuid10_eax eax;
        
        eax.version	 = min(cap.version, 2);
        eax.bit_width	 = cap.bit_width;
        eax.num_counters = cap.num_counters;
        eax.mask_length	 = cap.mask_length;
        
        entry->eax = eax.full;
        

--
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