Skip to content

Commit

Permalink
Added vmcap script in the verification image
Browse files Browse the repository at this point in the history
- vmcap script identifies the virtualization capabilities of x64 hosts.
  It does that by reading a special file in /dev/cpu/<CPUNUM>/msr, which
  is an interface to read and write model specific registers (MSRs).

Signed-off-by: Ioannis Sfakianakis <jsfakas@gmail.com>
  • Loading branch information
jsfakian committed Jan 15, 2024
1 parent 9589a8e commit 6ff8920
Show file tree
Hide file tree
Showing 3 changed files with 396 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/mkverification-raw-efi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV BUILD_PKGS mkinitfs grep patch make coreutils musl-dev gcc g++ perl \
util-linux-dev flex linux-headers glib-dev libxrandr-dev zlib-dev \
libusb-dev kmod-dev curl eudev-dev libdrm-dev i2c-tools-dev hwinfo \
binutils-dev libaio-dev zlib-static libvncserver-dev python3 pixman-dev \
py3-setuptools bash perl cmake m4 pkgconf autoconf-archive tpm2-tss-dev
py3-setuptools bash perl cmake m4 pkgconf autoconf-archive tpm2-tss-dev go
ENV PKGS mtools dosfstools libarchive-tools sgdisk e2fsprogs util-linux \
squashfs-tools coreutils tar dmidecode smartmontools libaio libaio-dev \
perl glib zlib libusb curl xz pciutils usbutils hdparm util-linux \
Expand All @@ -38,7 +38,9 @@ ADD https://github.com/linuxhw/build-stuff/releases/download/1.6/hw-probe-1.6-AI
#ADD https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img /out/ubuntu-22.04-minimal-cloudimg-amd64.img
ADD https://github.com/tpm2-software/tpm2-tools/archive/5.2.tar.gz /out/5.2.tar.gz

COPY make-raw verify grub.cfg.in UsbInvocationScript.txt ./
COPY make-raw verify grub.cfg.in UsbInvocationScript.txt vmcap.go ./

RUN go build vmcap.go && rm vmcap.go

RUN tar -xf hw-probe-1.6-AI.tar.gz \
&& tar -xf ddcutil-1.2.2.tar.gz \
Expand Down
5 changes: 5 additions & 0 deletions pkg/mkverification-raw-efi/verify
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@ else
echo "No watchdogs available" > "$REPORT/watchdogs.log"
fi

ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then
/vmcap > "$REPORT/vmcap.log"
fi

cat "$REPORT/summary.log"

if [ -n "$REPORT" ]; then
Expand Down
Loading

0 comments on commit 6ff8920

Please sign in to comment.