mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 11:01:43 +00:00
a76b9641ad
This will be used to set up shared info pages etc. Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
31 lines
992 B
C
31 lines
992 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright © 2019 Oracle and/or its affiliates. All rights reserved.
|
|
* Copyright © 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
*
|
|
* KVM Xen emulation
|
|
*/
|
|
|
|
#ifndef __ARCH_X86_KVM_XEN_H__
|
|
#define __ARCH_X86_KVM_XEN_H__
|
|
|
|
#include <linux/jump_label_ratelimit.h>
|
|
|
|
extern struct static_key_false_deferred kvm_xen_enabled;
|
|
|
|
int kvm_xen_hvm_set_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data);
|
|
int kvm_xen_hvm_get_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data);
|
|
int kvm_xen_hypercall(struct kvm_vcpu *vcpu);
|
|
int kvm_xen_write_hypercall_page(struct kvm_vcpu *vcpu, u64 data);
|
|
int kvm_xen_hvm_config(struct kvm *kvm, struct kvm_xen_hvm_config *xhc);
|
|
void kvm_xen_destroy_vm(struct kvm *kvm);
|
|
|
|
static inline bool kvm_xen_hypercall_enabled(struct kvm *kvm)
|
|
{
|
|
return static_branch_unlikely(&kvm_xen_enabled.key) &&
|
|
(kvm->arch.xen_hvm_config.flags &
|
|
KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL);
|
|
}
|
|
|
|
#endif /* __ARCH_X86_KVM_XEN_H__ */
|