[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Is there any way to read msr in hypervisor code?


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Minjun Hong <nickeysgo@xxxxxxxxx>
  • Date: Tue, 27 Feb 2018 18:37:48 +0900
  • Delivery-date: Tue, 27 Feb 2018 09:37:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello, I've tried to read msr in hypervisor code:

uint64_t reg;  
rdmsr_safe(0x412e, ret);

But, I all failed to read it because the hypervisor is running in ring-1 CPL as I did googling.
When I accessed msr, the crash log is below:


(XEN) ----[ Xen-4.9.0  x86_64  debug=n   Not tainted ]----
(XEN) CPU:    7
(XEN) RIP:    e008:[<ffff82d08024139d>] mcsched.c#shscan_timer_fn+0xd/0x180
(XEN) RFLAGS: 0000000000010206   CONTEXT: hypervisor
(XEN) rax: ffff83084abfe028   rbx: ffff83084abfe300   rcx: 000000000000412e
(XEN) rdx: ffff83084abb7fff   rsi: ffff82d080632f00   rdi: 0000000000000000
(XEN) rbp: ffff82d080241390   rsp: ffff83084abb7e30   r8:  ffff830868d4bdc0
(XEN) r9:  0000000000000005   r10: 0000012da75b50a5   r11: ffff8300782f3060
(XEN) r12: 0000000000000000   r13: 0000012d9f9d6e07   r14: ffff83084abb7fff
(XEN) r15: ffff82d08062ad80   cr0: 000000008005003b   cr4: 00000000003526e0
(XEN) cr3: 00000003426f3000   cr2: 00007fc3c21d4000
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e010   cs: e008
(XEN) Xen code around <ffff82d08024139d> (mcsched.c#shscan_timer_fn+0xd/0x180):
(XEN)  00 00 41 55 41 54 55 53 <0f> 32 4c 8d 05 0a 79 11 00 48 8d 0d 91 45 14 00
(XEN) Xen stack trace from rsp=ffff83084abb7e30:
(XEN)    ffff83084abfe300 ffff82d080241390 0000000000000000 0000012d9f9d6e07
(XEN)    ffff83084abb7fff ffff82d08023841d ffff83084abfe300 ffff82d080632f00
(XEN)    ffff830868d4bdb0 ffff82d0802385c6 ffff82d080641240 00000000ffffffff
(XEN)    0000000000000000 ffff82d08062aa00 ffffffffffffffff ffff83084abb7fff
(XEN)    ffff82d08062ad80 ffff82d080234e0a ffff83084abb7fff 00000000ffffffff
(XEN)    ffff83084abb7fff 00000000ffffffff ffff830868ce2000 ffff8306e5a36000
(XEN)    ffff82d080641240 ffff82d08026b725 0000000000000000 ffff830077ff8000
(XEN)    ffff8300782f3000 ffffffff81e00000 0000000000000000 0000000000000000
(XEN)    0000000000000000 ffffffff81e03e68 ffffffff81f3c9c0 0000000000000246
(XEN)    0000000000007ff0 0000000000000000 ffff88003f810580 0000000000000000
(XEN)    ffffffff810013aa ffffffff81e55450 0000000000000000 0000000000000001
(XEN)    0000010000000000 ffffffff810013aa 000000000000e033 0000000000000246
(XEN)    ffffffff81e03e38 000000000000e02b 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000007 ffff830077ff8000
(XEN)    00000037ca5a7300 00000000003526e0
(XEN) Xen call trace:
(XEN)    [<ffff82d08024139d>] mcsched.c#shscan_timer_fn+0xd/0x180
(XEN)    [<ffff82d080241390>] mcsched.c#shscan_timer_fn+0/0x180
(XEN)    [<ffff82d08023841d>] timer.c#execute_timer+0x3d/0x60
(XEN)    [<ffff82d0802385c6>] timer.c#timer_softirq_action+0x66/0x250
(XEN)    [<ffff82d080234e0a>] softirq.c#__do_softirq+0x7a/0xc0
(XEN)    [<ffff82d08026b725>] domain.c#idle_loop+0x35/0x70
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 7:
(XEN) GENERAL PROTECTION FAULT
(XEN) [error_code=0000]
(XEN) ****************************************


So... I need to find any way to access msr.
Please give me some clue to solve this problem.

Thanks!

Minjun Hong 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.