Skip to contentSkip to conversation

One question on mcinfo_extended

DISCUSSION Jan Beulich 2 participants 2 messages Apr 20, 2010

lore
Share & tools
lore
#0 lore raw

The point of using void* here is that even in a 32-bit Dom0 running on 64-bit Xen should have access to all registers - I couldn't think of anything better back then. The implication is that Dom0 side code must be prepared to deal with that - which I think isn't the case at present.

Jan

Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jiang, Yunhong" 04/20/10 10:20 AM >>>

Hi, Jan, in 19465 changeset, the mcinfo_extended's mc_msr is changed to be an array of sizeof(void *) * 4. I assume your purpose is to make it works on both 32 and 64. But will it cause trouble to compatibility mode dom0? Especially if dom0 copy the information to local variable, and loop the variable through mcinfo_extended->mc_msrs?

Thanks
--jyh

#1 lore raw

I think two issues here:
a) As said in previous mail, the mc_msrs is set to be 19, while for dom0, mcinfo_extended contains at most 16. So if dom0 code simply loop based on mc_msrs, it may be wrong.
b) 32-bit dom0 can't get the extended MSR (r8. r9 etc), which is still needed for analysis IMO.

One hack I can think out is, if dom0 is 32-on-64, we can change the mc_msrs when copy that to guest in XEN_MC_fetch, but that should not fix item b still.

In fact, I don't know if any platform has this extended MSR capability :(

--jyh

Quoted 23 lines

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: Tuesday, April 20, 2010 4:39 PM
To: Jiang, Yunhong
Cc: [email protected]
Subject: Re: One question on mcinfo_extended

The point of using void* here is that even in a 32-bit Dom0 running on 64-bit Xen should have access to all registers - I couldn't think of anything better back then. The implication is that Dom0 side code must be prepared to deal with that - which I think isn't the case at present.

Jan

Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jiang, Yunhong" 04/20/10 10:20 AM >>>

Hi, Jan, in 19465 changeset, the mcinfo_extended's mc_msr is changed to be an array of sizeof(void *) * 4. I assume your purpose is to make it works on both 32 and
64. But will it cause trouble to compatibility mode dom0? Especially if dom0 copy the information to local variable, and loop the variable through mcinfo_extended->mc_msrs?

Thanks
--jyh