- Timestamp:
- Nov 1, 2013 12:45:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRC/VMMRCA.asm
r49145 r49362 233 233 push ebp 234 234 mov ebp, esp 235 pushad 236 237 mov ecx, [ebp + 8] ; the MSR to read. 235 pushf 236 cli 237 238 mov ecx, [ebp + 8] ; The MSR to read. 238 239 mov eax, 0deadbeefh 239 240 mov edx, 0deadbeefh … … 246 247 mov [ecx + 4], edx 247 248 248 pop ad249 popf 249 250 mov eax, 1 250 251 leave … … 252 253 253 254 .trapped: 254 pop ad255 popf 255 256 mov eax, 0 256 257 leave 257 258 ret 258 259 ENDPROC vmmRCSafeMsrRead 260 261 262 ;; 263 ; Safely writes an MSR. 264 ; @returns boolean 265 ; @param uMsr The MSR to red. 266 ; @param u64Value The value to write. 267 ; 268 GLOBALNAME vmmRCSafeMsrWrite 269 push ebp 270 mov ebp, esp 271 pushf 272 cli 273 274 mov ecx, [ebp + 8] ; The MSR to write to. 275 mov eax, [ebp + 12] ; The value to write. 276 mov edx, [ebp + 16] 277 278 TRPM_GP_HANDLER NAME(TRPMRCTrapHyperHandlerSetEIP), .trapped 279 wrmsr 280 281 popf 282 mov eax, 1 283 leave 284 ret 285 286 .trapped: 287 popf 288 mov eax, 0 289 leave 290 ret 291 ENDPROC vmmRCSafeMsrWrite 259 292 260 293
Note:
See TracChangeset
for help on using the changeset viewer.