Skip to content

Commit

Permalink
KVM: x86: export kvm_vcpu_ioctl_x86_get_xsave()
Browse files Browse the repository at this point in the history
This function is needed for the KVMI_VCPU_GET_XSAVE command.

Signed-off-by: Nicușor Cîțu <nicu.citu@icloud.com>
Signed-off-by: Adalbert Lazăr <alazar@bitdefender.com>
  • Loading branch information
Nicușor Cîțu authored and intel-lab-lkp committed Nov 25, 2020
1 parent b4b0312 commit 311f49f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kvm/x86.c
Expand Up @@ -4497,8 +4497,8 @@ static void load_xsave(struct kvm_vcpu *vcpu, u8 *src)
}
}

static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
struct kvm_xsave *guest_xsave)
void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
struct kvm_xsave *guest_xsave)
{
if (boot_cpu_has(X86_FEATURE_XSAVE)) {
memset(guest_xsave, 0, sizeof(struct kvm_xsave));
Expand Down
2 changes: 2 additions & 0 deletions include/linux/kvm_host.h
Expand Up @@ -921,6 +921,8 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu);
int kvm_arch_vcpu_set_guest_debug(struct kvm_vcpu *vcpu,
struct kvm_guest_debug *dbg);
void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
struct kvm_xsave *guest_xsave);

int kvm_arch_init(void *opaque);
void kvm_arch_exit(void);
Expand Down

0 comments on commit 311f49f

Please sign in to comment.