• Andrew Jones's avatar
    KVM: selftests: Add aarch64 get-reg-list test · fd02029a
    Andrew Jones authored
    Check for KVM_GET_REG_LIST regressions. The blessed list was
    created by running on v4.15 with the --core-reg-fixup option.
    The following script was also used in order to annotate system
    registers with their names when possible. When new system
    registers are added the names can just be added manually using
    the same grep.
    
    while read reg; do
    	if [[ ! $reg =~ ARM64_SYS_REG ]]; then
    		printf "\t$reg\n"
    		continue
    	fi
    	encoding=$(echo "$reg" | sed "s/ARM64_SYS_REG(//;s/),//")
    	if ! name=$(grep "$encoding" ../../../../arch/arm64/include/asm/sysreg.h); then
    		printf "\t$reg\n"
    		continue
    	fi
    	name=$(echo "$name" | sed "s/.*SYS_//;s/[\t ]*sys_reg($encoding)$//")
    	printf "\t$reg\t/* $name */\n"
    done < <(aarch64/get-reg-list --core-reg-fixup --list)
    Signed-off-by: default avatarAndrew Jones <drjones@redhat.com>
    Message-Id: <20201029201703.102716-3-drjones@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    fd02029a
kvm_util.h 10.9 KB