mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 18:12:03 +02:00
KVM: x86: Rename __{g,s}et_sregs2() => kvm_vcpu_ioctl_x86_{g,s}et_sregs2()
Rename the KVM_{G,S}ET_SREGS2 helpers in anticipation of moving them out of
x86.c (while leaving the ioctl dispatch behind). Having globally visible
APIs named __{g,s}et_sregs2() would be "fine", but ugly, given that
__{g,s}et_sregs() will NOT be globally visible. As a bonus, this makes it
a bit more obvious that the helpers implement newer versions of
kvm_arch_vcpu_ioctl_set_sregs().
No functional change intended.
Cc: Yosry Ahmed <yosry@kernel.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Message-ID: <20260613000329.732085-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0217de7343
commit
bd130c8d72
|
|
@ -133,8 +133,10 @@ static void __kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags);
|
|||
static void store_regs(struct kvm_vcpu *vcpu);
|
||||
static int sync_regs(struct kvm_vcpu *vcpu);
|
||||
|
||||
static int __set_sregs2(struct kvm_vcpu *vcpu, struct kvm_sregs2 *sregs2);
|
||||
static void __get_sregs2(struct kvm_vcpu *vcpu, struct kvm_sregs2 *sregs2);
|
||||
static int kvm_vcpu_ioctl_x86_set_sregs2(struct kvm_vcpu *vcpu,
|
||||
struct kvm_sregs2 *sregs2);
|
||||
static void kvm_vcpu_ioctl_x86_get_sregs2(struct kvm_vcpu *vcpu,
|
||||
struct kvm_sregs2 *sregs2);
|
||||
|
||||
static DEFINE_MUTEX(vendor_module_lock);
|
||||
static void kvm_load_guest_fpu(struct kvm_vcpu *vcpu);
|
||||
|
|
@ -6623,7 +6625,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
|
|||
r = -ENOMEM;
|
||||
if (!u.sregs2)
|
||||
goto out;
|
||||
__get_sregs2(vcpu, u.sregs2);
|
||||
kvm_vcpu_ioctl_x86_get_sregs2(vcpu, u.sregs2);
|
||||
r = -EFAULT;
|
||||
if (copy_to_user(argp, u.sregs2, sizeof(struct kvm_sregs2)))
|
||||
goto out;
|
||||
|
|
@ -6642,7 +6644,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
|
|||
u.sregs2 = NULL;
|
||||
goto out;
|
||||
}
|
||||
r = __set_sregs2(vcpu, u.sregs2);
|
||||
r = kvm_vcpu_ioctl_x86_set_sregs2(vcpu, u.sregs2);
|
||||
break;
|
||||
}
|
||||
case KVM_HAS_DEVICE_ATTR:
|
||||
|
|
@ -12210,7 +12212,8 @@ static void __get_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
|
|||
(unsigned long *)sregs->interrupt_bitmap);
|
||||
}
|
||||
|
||||
static void __get_sregs2(struct kvm_vcpu *vcpu, struct kvm_sregs2 *sregs2)
|
||||
static void kvm_vcpu_ioctl_x86_get_sregs2(struct kvm_vcpu *vcpu,
|
||||
struct kvm_sregs2 *sregs2)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -12478,7 +12481,8 @@ static int __set_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __set_sregs2(struct kvm_vcpu *vcpu, struct kvm_sregs2 *sregs2)
|
||||
static int kvm_vcpu_ioctl_x86_set_sregs2(struct kvm_vcpu *vcpu,
|
||||
struct kvm_sregs2 *sregs2)
|
||||
{
|
||||
int mmu_reset_needed = 0;
|
||||
bool valid_pdptrs = sregs2->flags & KVM_SREGS2_FLAGS_PDPTRS_VALID;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user