Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107109055
D43639.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43639.diff
View Options
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -1532,6 +1532,7 @@
/* int rdmsr_safe(u_int msr, uint64_t *data) */
PUSH_FRAME_POINTER
movq PCPU(CURPCB),%r8
+ movq PCB_ONFAULT(%r8),%r9
movq $msr_onfault,PCB_ONFAULT(%r8)
movl %edi,%ecx
rdmsr /* Read MSR pointed by %ecx. Returns
@@ -1540,8 +1541,8 @@
movl %eax,%eax /* zero-extend %eax -> %rax */
orq %rdx,%rax
movq %rax,(%rsi)
- xorq %rax,%rax
- movq %rax,PCB_ONFAULT(%r8)
+ movq %r9,PCB_ONFAULT(%r8)
+ xorl %eax,%eax
POP_FRAME_POINTER
ret
@@ -1553,6 +1554,7 @@
/* int wrmsr_safe(u_int msr, uint64_t data) */
PUSH_FRAME_POINTER
movq PCPU(CURPCB),%r8
+ movq PCB_ONFAULT(%r8),%r9
movq $msr_onfault,PCB_ONFAULT(%r8)
movl %edi,%ecx
movl %esi,%eax
@@ -1560,8 +1562,8 @@
movl %esi,%edx
wrmsr /* Write MSR pointed by %ecx. Accepts
hi byte in edx, lo in %eax. */
- xorq %rax,%rax
- movq %rax,PCB_ONFAULT(%r8)
+ movq %r9,PCB_ONFAULT(%r8)
+ xorl %eax,%eax
POP_FRAME_POINTER
ret
@@ -1570,7 +1572,7 @@
*/
ALIGN_TEXT
msr_onfault:
- movq $0,PCB_ONFAULT(%r8)
+ movq %r9,PCB_ONFAULT(%r8)
movl $EFAULT,%eax
POP_FRAME_POINTER
ret
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:09 AM (19 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15751184
Default Alt Text
D43639.diff (1 KB)
Attached To
Mode
D43639: rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting
Attached
Detach File
Event Timeline
Log In to Comment