1 /*
2  * arch/x86/mm/hap/private.h
3  *
4  * Copyright (c) 2007, AMD Corporation (Wei Huang)
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 #ifndef __HAP_PRIVATE_H__
20 #define __HAP_PRIVATE_H__
21 
22 #include "../mm-locks.h"
23 
24 /********************************************/
25 /*          GUEST TRANSLATION FUNCS         */
26 /********************************************/
27 unsigned long hap_gva_to_gfn_2_levels(struct vcpu *v,
28                                      struct p2m_domain *p2m,
29                                      unsigned long gva,
30                                      uint32_t *pfec);
31 unsigned long hap_gva_to_gfn_3_levels(struct vcpu *v,
32                                      struct p2m_domain *p2m,
33                                      unsigned long gva,
34                                      uint32_t *pfec);
35 unsigned long hap_gva_to_gfn_4_levels(struct vcpu *v,
36                                      struct p2m_domain *p2m,
37                                      unsigned long gva,
38                                      uint32_t *pfec);
39 
40 unsigned long hap_p2m_ga_to_gfn_2_levels(struct vcpu *v,
41     struct p2m_domain *p2m, unsigned long cr3,
42     paddr_t ga, uint32_t *pfec, unsigned int *page_order);
43 unsigned long hap_p2m_ga_to_gfn_3_levels(struct vcpu *v,
44     struct p2m_domain *p2m, unsigned long cr3,
45     paddr_t ga, uint32_t *pfec, unsigned int *page_order);
46 unsigned long hap_p2m_ga_to_gfn_4_levels(struct vcpu *v,
47     struct p2m_domain *p2m, unsigned long cr3,
48     paddr_t ga, uint32_t *pfec, unsigned int *page_order);
49 
50 #endif /* __HAP_PRIVATE_H__ */
51