>>> On 07.03.18 at 21:59, <konrad.w...@oracle.com> wrote:
> On Wed, Mar 07, 2018 at 06:58:35PM +0000, Andrew Cooper wrote:
>> Dispatch from the guest_{rd,wr}msr() functions.  The read side should be 
> safe
>> outside of current context, but the write side is definitely not.  As the
>> toolstack has no legitimate reason to access the APIC registers via this
>> interface (not least because whether they are accessible at all depends on
>> guest settings), unilaterally reject access attempts outside of current
>> context.
>> 
>> Rename to guest_{rd,wr}msr_x2apic() for consistency, and alter the functions
>> to use X86EMUL_EXCEPTION rather than X86EMUL_UNHANDLEABLE.  The previous
>> callers turned UNHANDLEABLE into EXCEPTION, but using UNHANDLEABLE will now
>> interfere with the fallback to legacy MSR handling.
>> 
>> While altering guest_rdmsr_x2apic() make a couple of minor improvements.
>> Reformat the initialiser for readable[] so it indents in a more natural way,
>> and alter high to be a 64bit integer to avoid shifting 0 by 32 in the common
>> path.
>> 
>> Observant people might notice that we now don't let PV guests read the 
> x2apic
>> MSRs.  They should never have been able to in the first place.
>> 
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>

Subject to the possible replacement of "goto out" in
xen/arch/x86/msr.c (as per the comment on patch 1)
Acked-by: Jan Beulich <jbeul...@suse.com>

Jan


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

Reply via email to