1 /****************************************************************************** 2 * include/asm-x86/hap.h 3 * 4 * hardware-assisted paging 5 * Copyright (c) 2007 Advanced Micro Devices (Wei Huang) 6 * 7 * Parts of this code are Copyright (c) 2006 by XenSource Inc. 8 * Parts of this code are Copyright (c) 2006 by Michael A Fetterman 9 * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al. 10 * 11 * This program is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; If not, see <http://www.gnu.org/licenses/>. 23 */ 24 25 #ifndef _XEN_HAP_H 26 #define _XEN_HAP_H 27 28 #define HAP_PRINTK(_f, _a...) \ 29 debugtrace_printk("hap: %s(): " _f, __func__, ##_a) 30 31 /************************************************/ 32 /* hap domain level functions */ 33 /************************************************/ 34 void hap_domain_init(struct domain *d); 35 int hap_domctl(struct domain *d, struct xen_domctl_shadow_op *sc, 36 XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl); 37 int hap_enable(struct domain *d, u32 mode); 38 void hap_final_teardown(struct domain *d); 39 void hap_teardown(struct domain *d, bool *preempted); 40 void hap_vcpu_init(struct vcpu *v); 41 int hap_track_dirty_vram(struct domain *d, 42 unsigned long begin_pfn, 43 unsigned long nr, 44 XEN_GUEST_HANDLE(void) dirty_bitmap); 45 46 extern const struct paging_mode *hap_paging_get_mode(struct vcpu *); 47 int hap_set_allocation(struct domain *d, unsigned int pages, bool *preempted); 48 unsigned int hap_get_allocation(struct domain *d); 49 50 #endif /* XEN_HAP_H */ 51 52 /* 53 * Local variables: 54 * mode: C 55 * c-file-style: "BSD" 56 * c-basic-offset: 4 57 * indent-tabs-mode: nil 58 * End: 59 */ 60