~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/asm-x86/hvm/svm/emulate.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * emulate.h: SVM instruction emulation bits.
 
3
 * Copyright (c) 2005, AMD Corporation.
 
4
 * Copyright (c) 2004, Intel Corporation.
 
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, write to the Free Software Foundation, Inc., 59 Temple
 
17
 * Place - Suite 330, Boston, MA 02111-1307 USA.
 
18
 */
 
19
 
 
20
#ifndef __ASM_X86_HVM_SVM_EMULATE_H__
 
21
#define __ASM_X86_HVM_SVM_EMULATE_H__
 
22
 
 
23
/* Enumerate some standard instructions that we support */
 
24
enum instruction_index {
 
25
    INSTR_INVD,
 
26
    INSTR_WBINVD,
 
27
    INSTR_CPUID,
 
28
    INSTR_RDMSR,
 
29
    INSTR_WRMSR,
 
30
    INSTR_VMCALL,
 
31
    INSTR_HLT,
 
32
    INSTR_INT3,
 
33
    INSTR_RDTSC,
 
34
    INSTR_MAX_COUNT /* Must be last - Number of instructions supported */
 
35
};
 
36
 
 
37
int __get_instruction_length_from_list(
 
38
    struct vcpu *v, enum instruction_index *list, unsigned int list_count);
 
39
 
 
40
static inline int __get_instruction_length(
 
41
    struct vcpu *v, enum instruction_index instr)
 
42
{
 
43
    return __get_instruction_length_from_list(v, &instr, 1);
 
44
}
 
45
 
 
46
#endif /* __ASM_X86_HVM_SVM_EMULATE_H__ */
 
47
 
 
48
/*
 
49
 * Local variables:
 
50
 * mode: C
 
51
 * c-set-style: "BSD"
 
52
 * c-basic-offset: 4
 
53
 * tab-width: 4
 
54
 * indent-tabs-mode: nil
 
55
 * End:
 
56
 */