1249967Sneel/*-
2249967Sneel * Copyright (c) 2013 Anish Gupta (akgupt3@gmail.com)
3249967Sneel * All rights reserved.
4249967Sneel *
5249967Sneel * Redistribution and use in source and binary forms, with or without
6249967Sneel * modification, are permitted provided that the following conditions
7249967Sneel * are met:
8249967Sneel * 1. Redistributions of source code must retain the above copyright
9249967Sneel *    notice unmodified, this list of conditions, and the following
10249967Sneel *    disclaimer.
11249967Sneel * 2. Redistributions in binary form must reproduce the above copyright
12249967Sneel *    notice, this list of conditions and the following disclaimer in the
13249967Sneel *    documentation and/or other materials provided with the distribution.
14249967Sneel *
15249967Sneel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16249967Sneel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17249967Sneel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18249967Sneel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19249967Sneel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20249967Sneel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21249967Sneel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22249967Sneel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23249967Sneel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24249967Sneel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25249967Sneel *
26249967Sneel * $FreeBSD: releng/10.3/sys/amd64/vmm/amd/svm.h 285015 2015-07-01 19:46:57Z neel $
27249967Sneel */
28249967Sneel
29249967Sneel#ifndef _SVM_H_
30249967Sneel#define _SVM_H_
31249967Sneel
32285015Sneelstruct pcpu;
33285015Sneel
34249967Sneel/*
35272195Sneel * Guest register state that is saved outside the VMCB.
36249967Sneel */
37272195Sneelstruct svm_regctx {
38272195Sneel	register_t	sctx_rbp;
39272195Sneel	register_t	sctx_rbx;
40272195Sneel	register_t	sctx_rcx;
41249967Sneel	register_t	sctx_rdx;
42249967Sneel	register_t	sctx_rdi;
43249967Sneel	register_t	sctx_rsi;
44249967Sneel	register_t	sctx_r8;
45249967Sneel	register_t	sctx_r9;
46249967Sneel	register_t	sctx_r10;
47249967Sneel	register_t	sctx_r11;
48249967Sneel	register_t	sctx_r12;
49249967Sneel	register_t	sctx_r13;
50249967Sneel	register_t	sctx_r14;
51249967Sneel	register_t	sctx_r15;
52249967Sneel};
53249967Sneel
54285015Sneelvoid svm_launch(uint64_t pa, struct svm_regctx *gctx, struct pcpu *pcpu);
55249967Sneel
56249967Sneel#endif /* _SVM_H_ */
57