1 /*
2  * asid.h: ASID management
3  * Copyright (c) 2007, Advanced Micro Devices, Inc.
4  * Copyright (c) 2009, Citrix Systems, Inc.
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 __ASM_X86_HVM_ASID_H__
20 #define __ASM_X86_HVM_ASID_H__
21 
22 
23 struct vcpu;
24 struct hvm_vcpu_asid;
25 
26 /* Initialise ASID management for the current physical CPU. */
27 void hvm_asid_init(int nasids);
28 
29 /* Invalidate a particular ASID allocation: forces re-allocation. */
30 void hvm_asid_flush_vcpu_asid(struct hvm_vcpu_asid *asid);
31 
32 /* Invalidate all ASID allocations for specified VCPU: forces re-allocation. */
33 void hvm_asid_flush_vcpu(struct vcpu *v);
34 
35 /* Flush all ASIDs on this processor core. */
36 void hvm_asid_flush_core(void);
37 
38 /* Called before entry to guest context. Checks ASID allocation, returns a
39  * boolean indicating whether all ASIDs must be flushed. */
40 bool_t hvm_asid_handle_vmenter(struct hvm_vcpu_asid *asid);
41 
42 #endif /* __ASM_X86_HVM_ASID_H__ */
43 
44 /*
45  * Local variables:
46  * mode: C
47  * c-file-style: "BSD"
48  * c-basic-offset: 4
49  * tab-width: 4
50  * indent-tabs-mode: nil
51  * End:
52  */
53