how can I tell in /proc/cpuinfo weather my amd processor can do hardware assisted vitalisation _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Alex Samad > Sent: 24 May 2007 04:21 > To: xen-users@lists.xensource.com > Subject: [Xen-users] amd processors + virtualisation > > how can I tell in /proc/cpuinfo weather my amd processor can > do hardware > assisted vitalisation"cat /proc/cpuinfo|grep svm" should give you a line of "flags" containing "svm" if your processor has AMD-V (aka SVM). The other pretty easy way is to tell from the type of memory the motherboard uses. If it''s got DDR2 memories, then it''s got AMD-V with one exception: processors called "Sempron" don''t have AMD-V, but all others do (Athlon, Opteron, Turion). -- Mats _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
$ egrep ''vmx|svm'' /proc/cpuinfo -- optix ~ $ fortune No hardware designer should be allowed to produce any piece of hardware until three software guys have signed off for it. -- Andy Tanenbaum> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] OnBehalf Of Alex Samad> Sent: Wednesday, May 23, 2007 8:21 PM > To: xen-users@lists.xensource.com > Subject: [Xen-users] amd processors + virtualisation > > how can I tell in /proc/cpuinfo weather my amdprocessor can> do hardware > assisted vitalisation > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, May 24, 2007 at 10:38:59AM -0700, Brett Campbell wrote:> $ egrep ''vmx|svm'' /proc/cpuinfocan I presume that vmx is the intel one ?> > -- > optix ~ $ fortune > No hardware designer should be allowed to produce any > piece of hardware > until three software guys have signed off for it. > -- Andy Tanenbaum > > > -----Original Message----- > > From: xen-users-bounces@lists.xensource.com > > [mailto:xen-users-bounces@lists.xensource.com] On > Behalf Of Alex Samad > > Sent: Wednesday, May 23, 2007 8:21 PM > > To: xen-users@lists.xensource.com > > Subject: [Xen-users] amd processors + virtualisation > > > > how can I tell in /proc/cpuinfo weather my amd > processor can > > do hardware > > assisted vitalisation > > > > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats wrote:>> how can I tell in /proc/cpuinfo weather my amd processor can >> do hardware >> assisted vitalisation > > "cat /proc/cpuinfo|grep svm" should give you a line of "flags" > containing "svm" if your processor has AMD-V (aka SVM). > > The other pretty easy way is to tell from the type of memory the > motherboard uses. If it''s got DDR2 memories, then it''s got AMD-V with > one exception: processors called "Sempron" don''t have AMD-V, but all > others do (Athlon, Opteron, Turion).I vaguely remember back when I was setting up Xen 3.0.2 on a Gentoo box (in mid-2006), that the "svm" flag didn''t show up in that list until I had compiled in support for HVM (i.e. adding in Xen). Now, I was running a custom kernel on the Gentoo box at that point in time, with the bare minimum of built-in options. So it was likely an error on my part that cause the "svm" flag to be hidden. On the newer CentOS5 boxes using AM2 Athlon64 X2 and SocketF Opteron CPUs, the default CentOS5 kernel does allow the "svm" flag to peek through. And I have not installed virtualization support on this box (yet). _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: Thomas Harold [mailto:tgh@tgharold.com] > Sent: 29 May 2007 15:25 > To: Petersson, Mats > Cc: Alex Samad; xen-users@lists.xensource.com > Subject: Re: [Xen-users] amd processors + virtualisation > > Petersson, Mats wrote: > >> how can I tell in /proc/cpuinfo weather my amd processor can > >> do hardware > >> assisted vitalisation > > > > "cat /proc/cpuinfo|grep svm" should give you a line of "flags" > > containing "svm" if your processor has AMD-V (aka SVM). > > > > The other pretty easy way is to tell from the type of memory the > > motherboard uses. If it''s got DDR2 memories, then it''s got > AMD-V with > > one exception: processors called "Sempron" don''t have AMD-V, but all > > others do (Athlon, Opteron, Turion). > > I vaguely remember back when I was setting up Xen 3.0.2 on a > Gentoo box > (in mid-2006), that the "svm" flag didn''t show up in that > list until I > had compiled in support for HVM (i.e. adding in Xen). Now, I was > running a custom kernel on the Gentoo box at that point in time, with > the bare minimum of built-in options. So it was likely an > error on my > part that cause the "svm" flag to be hidden.There isn''t any compile option to remove/add this flag as such. There is of course a need to have a new-enough kernel that knows about this flag, so an older kernel may not recognise the flag itself.> > On the newer CentOS5 boxes using AM2 Athlon64 X2 and SocketF Opteron > CPUs, the default CentOS5 kernel does allow the "svm" flag to peek > through. And I have not installed virtualization support on > this box (yet).Presumably, you have a recent enough kernel now (it''s been in there for quite some time, I spent a few minutes trying to locate the version where it went in, but I (using google) wasn''t able to find it...) -- Mats> > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats wrote:>> On the newer CentOS5 boxes using AM2 Athlon64 X2 and SocketF Opteron >> CPUs, the default CentOS5 kernel does allow the "svm" flag to peek >> through. And I have not installed virtualization support on >> this box (yet). > > Presumably, you have a recent enough kernel now (it''s been in there for > quite some time, I spent a few minutes trying to locate the version > where it went in, but I (using google) wasn''t able to find it...)Ah, that makes sense. (Goes poking through his session logs...) Here''s the original install, probably using Gentoo 2006.0 w/ the 2.6.15 kernel (but Gentoo''s version). As you can see, the grep didn''t find the "svm" flag. livecd ~ # cat /proc/cpuinfo | grep ''flags'' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mm xext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy livecd ~ # cat /proc/cpuinfo | grep ''svm'' livecd ~ # cat /proc/version Linux version 2.6.15-gentoo-r5 (root@poseidon) (gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)) #1 SMP Tue Feb 21 17: 19:47 UTC 2006 livecd ~ # Here''s an entry from the next day after upgrading to 2.6.17. This one shows the "svm" flag. azure ~ # cat /proc/version Linux version 2.6.17-gentoo-r4 (root@livecd) (gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)) #1 SMP Sat Aug 26 00:34 :30 EDT 2006 livecd ~ # cat /proc/cpuinfo | grep ''flags'' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mm xext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy So it was probably either 2.6.16 or 2.6.17 where the code for the "svm" flag was added. ... I wasn''t sure how the kernel detected those flags. I didn''t know whether it was special detection code (which had to be updated for new features) or whether the processor spit back a string listing. Thanks for the responses. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: Thomas Harold [mailto:tgh@tgharold.com] > Sent: 29 May 2007 17:09 > To: Petersson, Mats > Cc: xen-users@lists.xensource.com > Subject: Re: [Xen-users] amd processors + virtualisation > > Petersson, Mats wrote: > >> On the newer CentOS5 boxes using AM2 Athlon64 X2 and > SocketF Opteron > >> CPUs, the default CentOS5 kernel does allow the "svm" flag to peek > >> through. And I have not installed virtualization support on > >> this box (yet). > > > > Presumably, you have a recent enough kernel now (it''s been > in there for > > quite some time, I spent a few minutes trying to locate the version > > where it went in, but I (using google) wasn''t able to find it...) > > Ah, that makes sense. (Goes poking through his session logs...) > > Here''s the original install, probably using Gentoo 2006.0 w/ > the 2.6.15 > kernel (but Gentoo''s version). As you can see, the grep > didn''t find the > "svm" flag. > > livecd ~ # cat /proc/cpuinfo | grep ''flags'' > flags : fpu vme de pse tsc msr pae mce cx8 apic sep > mtrr pge > mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mm > xext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy > > livecd ~ # cat /proc/cpuinfo | grep ''svm'' > livecd ~ # cat /proc/version > Linux version 2.6.15-gentoo-r5 (root@poseidon) (gcc version 3.4.4 > (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)) #1 SMP Tue Feb 21 17: > 19:47 UTC 2006 > livecd ~ # > > Here''s an entry from the next day after upgrading to 2.6.17. > This one > shows the "svm" flag. > > azure ~ # cat /proc/version > Linux version 2.6.17-gentoo-r4 (root@livecd) (gcc version > 3.4.4 (Gentoo > 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)) #1 SMP Sat Aug 26 00:34 > :30 EDT 2006 > > livecd ~ # cat /proc/cpuinfo | grep ''flags'' > flags : fpu vme de pse tsc msr pae mce cx8 apic sep > mtrr pge > mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mm > xext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy > svm cr8_legacy > > So it was probably either 2.6.16 or 2.6.17 where the code for > the "svm" > flag was added.Probably 2.6.16 then, as we''ve had that in Xen for quite some time, and I know it worked there...> > ... > > I wasn''t sure how the kernel detected those flags. I didn''t know > whether it was special detection code (which had to be > updated for new > features) or whether the processor spit back a string listing.It''s not produced by the processor itself - the processor has a set of bits reported via the CPUID instruction that are either 1 or 0 based on what the processor can or can''t do (e.g. it''s a 1 in a particular bit to say SVM is possible, another to say "supports Long Mode"[64-bit], another for MMX, SSE[1, 2, 3], and so on). Some CPUID information is more complex, such as the number of bytes of cache or number of bytes per cache-line, etc, but in summary, the processor has "bits" to tell you what it can and can''t do. The kernel contains code to "decode" those bits into more easily readable symbols. -- Mats> > Thanks for the responses. > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users