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

Re: [Xen-devel] [PATCH 2/2] x86/vMCE: save/restore MCA capabilities

Jan Beulich wrote:
>>>> On 06.03.12 at 09:29, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote:
>> Jan Beulich wrote:
>>>>>> On 05.03.12 at 21:19, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
>>>>>> wrote: 
>>>> Another question is, why in the patch mcg_cap defined as per vcpu
>>>> while others (mcg_ctl/ mcg_status/ mci_ctl) defined as per domain?
>>>> Semantically it looks some weird anyway.
>>> That question goes back to you (as a company), who wrote the
>>> original code: Why were these made per-domain in the first place
>>> when they're really per-vCPU? All I did here is make per-vCPU
>>> what I needed to touch anyway for save/restore (in order to not
>>> carry over the same mistake into the save/restore definitions and
>>> logic). 
>>> Jan
>> Per my understanding, the original design may think that per vcpu
>> mca msr is not necessary: vcpu are not 1:1 w/ pcpu, and multi-copies
>> of same error info (if per vcpu) is pointless, so it designed as per
>> domain, as long as it successfully emulated mca msr for guest.
> But as with anything that is being done differently when virtualized,
> this may come back and bite us when a need for per-vCPU treatment
> is needed. As long as this was purely internal to a particular
> hypervisor instance, this was just poor design needing a potentially
> larger patch to overcome, but with the involvement of save/restore
> it needs to be done properly to allow forward compatibility.
> But we're getting all the farther away from the actual question: Do
> we need to provide for saving/restoring of any of the _CTL
> registers?

Per Tony's elaboration about _CTL h/w meaning, I thought they are model 
specific mainly used for debug purpose and os defaultly set all 1's to them (if 
any misunderstanding please point out to me).
So how about unbind _CTL with host (say, pure software emulated msr, not 
involve h_mcg_ctl/h_mci_ctrl[bank])? If so we don't need save/restore _CTL. 
After all they are model specific, and emulated as all 1's to guest seems 

Xen-devel mailing list



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