tools/testing/selftests/kvm/arm64/host_sve.c

Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/arm64/host_sve.c

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/kvm/arm64/host_sve.c
Extension
.c
Size
2229 bytes
Lines
128
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (get_ucall(vcpu, &uc)) {
		case UCALL_NONE:
			do_sve_roundtrip();
			do_sve_roundtrip();
			break;
		case UCALL_DONE:
			guest_done = true;
			break;
		case UCALL_ABORT:
			REPORT_GUEST_ASSERT(uc);
			break;
		default:
			TEST_FAIL("Unexpected guest exit");
		}
	}

	kvm_vm_free(vm);
}

int main(void)
{
	/*
	 * This is testing the host environment, we don't care about
	 * guest SVE support.
	 */
	if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
		printf("SVE not supported\n");
		return KSFT_SKIP;
	}

	test_run();
	return 0;
}

Annotation

Implementation Notes