mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Use the kernel's canonical $(ARCH) paths instead of the raw target triple for KVM selftests directories. KVM selftests are quite nearly the only place in the entire kernel that using the target triple for directories, tools/testing/selftests/drivers/s390x being the lone holdout. Using the kernel's preferred nomenclature eliminates the minor, but annoying, friction of having to translate to KVM's selftests directories, e.g. for pattern matching, opening files, running selftests, etc. Opportunsitically delete file comments that reference the full path of the file, as they are obviously prone to becoming stale, and serve no known purpose. Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-16-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
22 lines
551 B
C
22 lines
551 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* ucall support. A ucall is a "hypercall to userspace".
|
|
*
|
|
* Copyright (C) 2019 Red Hat, Inc.
|
|
*/
|
|
#include "kvm_util.h"
|
|
|
|
void *ucall_arch_get_ucall(struct kvm_vcpu *vcpu)
|
|
{
|
|
struct kvm_run *run = vcpu->run;
|
|
|
|
if (run->exit_reason == KVM_EXIT_S390_SIEIC &&
|
|
run->s390_sieic.icptcode == 4 &&
|
|
(run->s390_sieic.ipa >> 8) == 0x83 && /* 0x83 means DIAGNOSE */
|
|
(run->s390_sieic.ipb >> 16) == 0x501) {
|
|
int reg = run->s390_sieic.ipa & 0xf;
|
|
|
|
return (void *)run->s.regs.gprs[reg];
|
|
}
|
|
return NULL;
|
|
}
|