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

Re: [Xen-devel] [PATCH v2] x86/msr: Fix fallout from mostly c/s 832c180



>>> Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 04/15/19 2:03 PM >>>
 >* Fix the shim build by providing a !CONFIG_HVM declaration for
>hvm_get_guest_bndcfgs(), and removing the introduced
>ASSERT(is_hvm_domain(d))'s.  They are needed for DCE to keep the build
>working.  Furthermore, in this way, the risk of runtime type confusion is
>removed.
>* Revert the de-const'ing of the vcpu pointer in vmx_get_guest_bndcfgs().
>vmx_vmcs_enter() really does mutate the vcpu, and may cause it to undergo a
>full de/reschedule, which is in violation of the ABI described by
>hvm_get_guest_bndcfgs().  guest_rdmsr() was always going to need to lose
>its const parameter, and this was the correct time for it to happen.

With the ABI violation claim here removed (e.g. replaced by saying that it
might be confusing to the reader)

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

This wrong (at least I continue to be of the opinion that it is) claim - just to
make it explicit - is what I've previously called being factual incorrect on the
v1 thread. As said before, there's no "ABI promise" to be derived from "const".

In fact I'd prefer VMCS reads in general to be viewed as reading "state", not
memory, and it just so happens that in certain cases some syncing between
memory and CPU needs to be done for correct "state" to be returned. This
doesn't alter what the caller sees (i.e. there's no change to "state", and any
locks acquired get released again before returning). I'd like to re-emphasize
the similarity to C++'s mutable here.


Jan


_______________________________________________
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®.