2 * This header is for functions & variables that will ONLY be
3 * used inside libkvm for x86.
4 * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
7 * derived from libkvm.c
9 * Copyright (C) 2006 Qumranet, Inc.
12 * Avi Kivity <avi@qumranet.com>
13 * Yaniv Kamay <yaniv@qumranet.com>
15 * This work is licensed under the GNU LGPL license, version 2.
21 #include "kvm-common.h"
23 #define PAGE_SIZE 4096ul
24 #define PAGE_MASK (~(PAGE_SIZE - 1))
26 int kvm_set_tss_addr(kvm_context_t kvm
, unsigned long addr
);
31 * \brief Enable kernel tpr access reporting
33 * When tpr access reporting is enabled, the kernel will call the
34 * ->tpr_access() callback every time the guest vcpu accesses the tpr.
36 * \param kvm Pointer to the current kvm_context
37 * \param vcpu vcpu to enable tpr access reporting on
39 int kvm_enable_tpr_access_reporting(kvm_context_t kvm
, int vcpu
);
42 * \brief Disable kernel tpr access reporting
44 * Undoes the effect of kvm_enable_tpr_access_reporting().
46 * \param kvm Pointer to the current kvm_context
47 * \param vcpu vcpu to disable tpr access reporting on
49 int kvm_disable_tpr_access_reporting(kvm_context_t kvm
, int vcpu
);
53 #define smp_wmb() asm volatile("" ::: "memory")