From 32b4f9d4a44671e6539ba75e0b714ca12b4de461 Mon Sep 17 00:00:00 2001 From: HW42 Date: Tue, 30 Aug 2016 12:08:45 +0200 Subject: [PATCH] qubes-hcl-report: add check for HAP/SLAT bassed on https://wiki.xenproject.org/wiki/Xen_Common_Problems#How_can_I_check_if_my_CPU_supports_HAP_.28Hardware_Assisted_Paging.29_.3F --- qvm-tools/qubes-hcl-report | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qvm-tools/qubes-hcl-report b/qvm-tools/qubes-hcl-report index 671f0000..b484f666 100755 --- a/qvm-tools/qubes-hcl-report +++ b/qvm-tools/qubes-hcl-report @@ -101,6 +101,7 @@ XEN_EXTRA=`cat $TEMP_DIR/xl-info |grep xen_extra |cut -d: -f2 |tr -d ' '` QUBES=`cat $TEMP_DIR/qubes-release |cut -d '(' -f2 |cut -d ')' -f1` XL_VTX=`cat $TEMP_DIR/xl-info |grep xen_caps | grep hvm` XL_VTD=`cat $TEMP_DIR/xl-info |grep virt_caps |grep hvm_directio` +XL_HAP=`cat $TEMP_DIR/xl-dmesg |grep 'HVM: Hardware Assisted Paging (HAP) detected'` PCRS=`find /sys/devices/ -name pcrs` FILENAME="Qubes-HCL-${BRAND//[^[:alnum:]]/_}-${PRODUCT//[^[:alnum:]]/_}-$DATE" @@ -127,6 +128,12 @@ if [[ $XL_VTD ]] fi +if [ -n "$XL_HAP" ]; then + HAP="yes" +else + HAP="no" +fi + if [[ $PCRS ]] then # try tu run tcsd and: grep the logs, try get version info. @@ -152,6 +159,7 @@ echo -e "Net:\n$NET\n" echo -e "SCSI:\n$SCSI\n" echo -e "HVM:\t\t$VTX" echo -e "I/O MMU:\t$VTD" +echo -e "HAP/SLAT:\t${HAP^}" echo -e "TPM:\t\t$TPM" echo @@ -164,6 +172,8 @@ hvm: '$HVM' iommu: '$IOMMU' +slat: + '$HAP' tpm: '$TPM_s' brand: |