diff options
author | Avi Kivity <avi@redhat.com> | 2011-04-20 06:37:53 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 07:57:10 -0400 |
commit | 0f65dd70a442ff498da10cec0a599fbd9d2d6f9e (patch) | |
tree | a460005086619e5959242404c8cd7be0d766de3d /arch/x86/include | |
parent | 7295261cdd42e6d41666df38d1b613cdd9e95f46 (diff) |
KVM: x86 emulator: drop vcpu argument from memory read/write callbacks
Making the emulator caller agnostic.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 9b760c8f2576..b4d846708a4b 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -92,8 +92,9 @@ struct x86_emulate_ops { | |||
92 | * @val: [OUT] Value read from memory, zero-extended to 'u_long'. | 92 | * @val: [OUT] Value read from memory, zero-extended to 'u_long'. |
93 | * @bytes: [IN ] Number of bytes to read from memory. | 93 | * @bytes: [IN ] Number of bytes to read from memory. |
94 | */ | 94 | */ |
95 | int (*read_std)(unsigned long addr, void *val, | 95 | int (*read_std)(struct x86_emulate_ctxt *ctxt, |
96 | unsigned int bytes, struct kvm_vcpu *vcpu, | 96 | unsigned long addr, void *val, |
97 | unsigned int bytes, | ||
97 | struct x86_exception *fault); | 98 | struct x86_exception *fault); |
98 | 99 | ||
99 | /* | 100 | /* |
@@ -103,8 +104,8 @@ struct x86_emulate_ops { | |||
103 | * @val: [OUT] Value write to memory, zero-extended to 'u_long'. | 104 | * @val: [OUT] Value write to memory, zero-extended to 'u_long'. |
104 | * @bytes: [IN ] Number of bytes to write to memory. | 105 | * @bytes: [IN ] Number of bytes to write to memory. |
105 | */ | 106 | */ |
106 | int (*write_std)(unsigned long addr, void *val, | 107 | int (*write_std)(struct x86_emulate_ctxt *ctxt, |
107 | unsigned int bytes, struct kvm_vcpu *vcpu, | 108 | unsigned long addr, void *val, unsigned int bytes, |
108 | struct x86_exception *fault); | 109 | struct x86_exception *fault); |
109 | /* | 110 | /* |
110 | * fetch: Read bytes of standard (non-emulated/special) memory. | 111 | * fetch: Read bytes of standard (non-emulated/special) memory. |
@@ -113,8 +114,8 @@ struct x86_emulate_ops { | |||
113 | * @val: [OUT] Value read from memory, zero-extended to 'u_long'. | 114 | * @val: [OUT] Value read from memory, zero-extended to 'u_long'. |
114 | * @bytes: [IN ] Number of bytes to read from memory. | 115 | * @bytes: [IN ] Number of bytes to read from memory. |
115 | */ | 116 | */ |
116 | int (*fetch)(unsigned long addr, void *val, | 117 | int (*fetch)(struct x86_emulate_ctxt *ctxt, |
117 | unsigned int bytes, struct kvm_vcpu *vcpu, | 118 | unsigned long addr, void *val, unsigned int bytes, |
118 | struct x86_exception *fault); | 119 | struct x86_exception *fault); |
119 | 120 | ||
120 | /* | 121 | /* |
@@ -123,11 +124,9 @@ struct x86_emulate_ops { | |||
123 | * @val: [OUT] Value read from memory, zero-extended to 'u_long'. | 124 | * @val: [OUT] Value read from memory, zero-extended to 'u_long'. |
124 | * @bytes: [IN ] Number of bytes to read from memory. | 125 | * @bytes: [IN ] Number of bytes to read from memory. |
125 | */ | 126 | */ |
126 | int (*read_emulated)(unsigned long addr, | 127 | int (*read_emulated)(struct x86_emulate_ctxt *ctxt, |
127 | void *val, | 128 | unsigned long addr, void *val, unsigned int bytes, |
128 | unsigned int bytes, | 129 | struct x86_exception *fault); |
129 | struct x86_exception *fault, | ||
130 | struct kvm_vcpu *vcpu); | ||
131 | 130 | ||
132 | /* | 131 | /* |
133 | * write_emulated: Write bytes to emulated/special memory area. | 132 | * write_emulated: Write bytes to emulated/special memory area. |
@@ -136,11 +135,10 @@ struct x86_emulate_ops { | |||
136 | * required). | 135 | * required). |
137 | * @bytes: [IN ] Number of bytes to write to memory. | 136 | * @bytes: [IN ] Number of bytes to write to memory. |
138 | */ | 137 | */ |
139 | int (*write_emulated)(unsigned long addr, | 138 | int (*write_emulated)(struct x86_emulate_ctxt *ctxt, |
140 | const void *val, | 139 | unsigned long addr, const void *val, |
141 | unsigned int bytes, | 140 | unsigned int bytes, |
142 | struct x86_exception *fault, | 141 | struct x86_exception *fault); |
143 | struct kvm_vcpu *vcpu); | ||
144 | 142 | ||
145 | /* | 143 | /* |
146 | * cmpxchg_emulated: Emulate an atomic (LOCKed) CMPXCHG operation on an | 144 | * cmpxchg_emulated: Emulate an atomic (LOCKed) CMPXCHG operation on an |
@@ -150,12 +148,12 @@ struct x86_emulate_ops { | |||
150 | * @new: [IN ] Value to write to @addr. | 148 | * @new: [IN ] Value to write to @addr. |
151 | * @bytes: [IN ] Number of bytes to access using CMPXCHG. | 149 | * @bytes: [IN ] Number of bytes to access using CMPXCHG. |
152 | */ | 150 | */ |
153 | int (*cmpxchg_emulated)(unsigned long addr, | 151 | int (*cmpxchg_emulated)(struct x86_emulate_ctxt *ctxt, |
152 | unsigned long addr, | ||
154 | const void *old, | 153 | const void *old, |
155 | const void *new, | 154 | const void *new, |
156 | unsigned int bytes, | 155 | unsigned int bytes, |
157 | struct x86_exception *fault, | 156 | struct x86_exception *fault); |
158 | struct kvm_vcpu *vcpu); | ||
159 | 157 | ||
160 | int (*pio_in_emulated)(int size, unsigned short port, void *val, | 158 | int (*pio_in_emulated)(int size, unsigned short port, void *val, |
161 | unsigned int count, struct kvm_vcpu *vcpu); | 159 | unsigned int count, struct kvm_vcpu *vcpu); |