Merge lp:~dannf/cpu-checker/arm-cortex-a15 into lp:cpu-checker

Proposed by dann frazier
Status: Needs review
Proposed branch: lp:~dannf/cpu-checker/arm-cortex-a15
Merge into: lp:cpu-checker
Diff against target: 86 lines (+28/-7)
3 files modified
debian/changelog (+8/-0)
debian/control (+2/-2)
kvm-ok (+18/-5)
To merge this branch: bzr merge lp:~dannf/cpu-checker/arm-cortex-a15
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Needs Information
dann frazier (community) Needs Resubmitting
CPU-Checker Developers Pending
Review via email: mp+171667@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Kees Cook (kees) wrote :

On Wed, Jun 26, 2013 at 09:22:23PM -0000, dann frazier wrote:
> -Architecture: amd64 i386
> -Depends: msr-tools, ${shlibs:Depends}, ${misc:Depends}
> +Architecture: all
> +Depends: ${shlibs:Depends}, ${misc:Depends}
> +Recommends: msr-tools

On x86, lacking msr-tools means this package is unusable. How about making
this Arch: any, and using Depends: msr-tools [i386,amd64] instead?

--
Kees Cook @outflux.net

lp:~dannf/cpu-checker/arm-cortex-a15 updated
45. By dann frazier

Make package "Architecture: any" to allow installation on ARM, but
restrict msr-tools dependency to x86

Revision history for this message
dann frazier (dannf) wrote :

> On Wed, Jun 26, 2013 at 09:22:23PM -0000, dann frazier wrote:
> > -Architecture: amd64 i386
> > -Depends: msr-tools, ${shlibs:Depends}, ${misc:Depends}
> > +Architecture: all
> > +Depends: ${shlibs:Depends}, ${misc:Depends}
> > +Recommends: msr-tools
>
> On x86, lacking msr-tools means this package is unusable. How about making
> this Arch: any, and using Depends: msr-tools [i386,amd64] instead?

Hi Kees! Thanks for the review. Resubmitted.

review: Needs Resubmitting
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Is there a way to make this support A50 which is basically the final target anyway?

review: Needs Information
Revision history for this message
dann frazier (dannf) wrote :

On Fri, Sep 13, 2013 at 5:02 AM, Zygmunt Krynicki
<email address hidden> wrote:
> Review: Needs Information
>
> Is there a way to make this support A50 which is basically the final target anyway?

I could certainly look at adding A50 support, but I don't see why
doing so should block this MP. My target for this patch is to really
to support A15.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

> On Fri, Sep 13, 2013 at 5:02 AM, Zygmunt Krynicki
> <email address hidden> wrote:
> > Review: Needs Information
> >
> > Is there a way to make this support A50 which is basically the final target
> anyway?
>
> I could certainly look at adding A50 support, but I don't see why
> doing so should block this MP. My target for this patch is to really
> to support A15.

Fair enough, no objections from me.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

This works well as far as I can see - thanks!

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I also tested this on Intel hardware which supports HW virtualization:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz
stepping : 6
microcode : 0x60c
cpu MHz : 800.000
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dtherm tpr_shadow vnmi flexpriority
bogomips : 5054.15
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz
stepping : 6
microcode : 0x60c
cpu MHz : 800.000
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dtherm tpr_shadow vnmi flexpriority
bogomips : 5054.15
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Outcome was:

INFO: /dev/kvm exists
KVM acceleration can be used

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Also on an Intel Atom system which does not support HW virtualization:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz
stepping : 2
microcode : 0x20a
cpu MHz : 800.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm
bogomips : 3192.07
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz
stepping : 2
microcode : 0x20a
cpu MHz : 1600.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm
bogomips : 3192.07
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:

The output is:

INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used

Unmerged revisions

45. By dann frazier

Make package "Architecture: any" to allow installation on ARM, but
restrict msr-tools dependency to x86

44. By dann frazier

Avoid magic number

43. By dann frazier

Add support ARM Cortex-A15 systems (LP: #1194632)

42. By dann frazier

Return package to "Architecture: all" by demoting msr-tools to Recommends

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-11-18 18:44:31 +0000
+++ debian/changelog 2013-06-27 17:03:26 +0000
@@ -1,3 +1,11 @@
1cpu-checker (0.8-0ubuntu1) UNRELEASED; urgency=low
2
3 * Make package "Architecture: any" to allow installation on ARM, but
4 restrict msr-tools dependency to x86
5 * Add support ARM Cortex-A15 systems (LP: #1194632)
6
7 -- dann frazier <dann.frazier@canonical.com> Wed, 26 Jun 2013 15:10:16 -0600
8
1cpu-checker (0.7-0ubuntu1) precise; urgency=low9cpu-checker (0.7-0ubuntu1) precise; urgency=low
210
3 [ Colin Watson ]11 [ Colin Watson ]
412
=== modified file 'debian/control'
--- debian/control 2011-11-18 18:12:36 +0000
+++ debian/control 2013-06-27 17:03:26 +0000
@@ -9,8 +9,8 @@
9Vcs-Bzr: lp:~cpu-checker-dev/cpu-checker/trunk9Vcs-Bzr: lp:~cpu-checker-dev/cpu-checker/trunk
1010
11Package: cpu-checker11Package: cpu-checker
12Architecture: amd64 i38612Architecture: any
13Depends: msr-tools, ${shlibs:Depends}, ${misc:Depends}13Depends: msr-tools [amd64 i386], ${shlibs:Depends}, ${misc:Depends}
14Conflicts: qemu-kvm (<< 0.12.3-0ubuntu13)14Conflicts: qemu-kvm (<< 0.12.3-0ubuntu13)
15Replaces: qemu-kvm (<< 0.12.3-0ubuntu13)15Replaces: qemu-kvm (<< 0.12.3-0ubuntu13)
16Description: tools to help evaluate certain CPU (or BIOS) features16Description: tools to help evaluate certain CPU (or BIOS) features
1717
=== modified file 'kvm-ok'
--- kvm-ok 2011-09-07 23:21:19 +0000
+++ kvm-ok 2013-06-27 17:03:26 +0000
@@ -39,10 +39,20 @@
39 fi39 fi
40}40}
4141
42ARM_CPU_PART_CORTEX_A15="0xc0f" # <asm/cputype.h>
43
42# check cpu flags for capability44# check cpu flags for capability
43virt=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)') || true45if [ "$(uname -m)" = "armv7l" ]; then
44[ "$virt" = "vmx" ] && brand="intel"46 if egrep -m1 -w '^CPU part[[:blank:]]*:' /proc/cpuinfo | \
45[ "$virt" = "svm" ] && brand="amd"47 egrep -wq "$ARM_CPU_PART_CORTEX_A15"; then
48 virt="ARM"
49 kvm_mod="kvm"
50 fi
51else
52 virt=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)') || true
53 [ "$virt" = "vmx" ] && kvm_mod="kvm_intel"
54 [ "$virt" = "svm" ] && kvm_mod="kvm_amd"
55fi
4656
47if [ -z "$virt" ]; then57if [ -z "$virt" ]; then
48 echo "INFO: Your CPU does not support KVM extensions"58 echo "INFO: Your CPU does not support KVM extensions"
@@ -56,7 +66,7 @@
56 verdict 066 verdict 0
57else67else
58 echo "INFO: /dev/kvm does not exist"68 echo "INFO: /dev/kvm does not exist"
59 echo "HINT: sudo modprobe kvm_$brand"69 echo "HINT: sudo modprobe $kvm_mod"
60fi70fi
6171
62assert_root72assert_root
@@ -66,7 +76,7 @@
66if [ ! -r "$msr" ]; then76if [ ! -r "$msr" ]; then
67 modprobe msr77 modprobe msr
68fi78fi
69if [ ! -r "$msr" ]; then79if [ -e "$msr" -a ! -r "$msr" ]; then
70 echo "You must be root to run this check." >&280 echo "You must be root to run this check." >&2
71 exit 281 exit 2
72fi82fi
@@ -90,6 +100,9 @@
90 if [ "$BIT" = "1" ]; then100 if [ "$BIT" = "1" ]; then
91 disabled=1101 disabled=1
92 fi102 fi
103elif [ "$virt" = "ARM" ]; then
104 # Should also test that we booted in HYP mode, if detectable
105 :
93else106else
94 echo "FAIL: Unknown virtualization extension: $virt"107 echo "FAIL: Unknown virtualization extension: $virt"
95 verdict 1108 verdict 1

Subscribers

People subscribed via source and target branches

to all changes: