2022-12-03 20:51:13 +03:00
|
|
|
/*
|
|
|
|
* Xen HVM emulation support in KVM
|
|
|
|
*
|
|
|
|
* Copyright © 2019 Oracle and/or its affiliates. All rights reserved.
|
|
|
|
* Copyright © 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QEMU_I386_KVM_XEN_EMU_H
|
|
|
|
#define QEMU_I386_KVM_XEN_EMU_H
|
|
|
|
|
2022-12-06 13:48:53 +03:00
|
|
|
#define XEN_HYPERCALL_MSR 0x40000000
|
|
|
|
#define XEN_HYPERCALL_MSR_HYPERV 0x40000200
|
2022-12-03 20:51:13 +03:00
|
|
|
|
2022-12-06 13:48:53 +03:00
|
|
|
#define XEN_CPUID_SIGNATURE 0
|
|
|
|
#define XEN_CPUID_VENDOR 1
|
|
|
|
#define XEN_CPUID_HVM_MSR 2
|
|
|
|
#define XEN_CPUID_TIME 3
|
|
|
|
#define XEN_CPUID_HVM 4
|
|
|
|
|
|
|
|
#define XEN_VERSION(maj, min) ((maj) << 16 | (min))
|
|
|
|
|
|
|
|
int kvm_xen_init(KVMState *s, uint32_t hypercall_msr);
|
2022-12-16 14:05:29 +03:00
|
|
|
int kvm_xen_init_vcpu(CPUState *cs);
|
2018-06-13 17:14:31 +03:00
|
|
|
int kvm_xen_handle_exit(X86CPU *cpu, struct kvm_xen_exit *exit);
|
2018-06-29 17:54:50 +03:00
|
|
|
int kvm_put_xen_state(CPUState *cs);
|
|
|
|
int kvm_get_xen_state(CPUState *cs);
|
2022-12-03 20:51:13 +03:00
|
|
|
|
|
|
|
#endif /* QEMU_I386_KVM_XEN_EMU_H */
|