On 08/15/2018 01:07 PM, Andrew Cooper wrote:
> OSVW data is technically per-cpu, but it is the firmwares reponsibility to
> make it equivelent on each cpu.  A guests OSVW data is sources from global
> data in Xen, clearly making it per-domain data rather than per-vcpu data.
>
> Move the data from struct arch_svm_struct to struct svm_domain, and call
> svm_guest_osvw_init() from svm_domain_initialise() instead of
> svm_vcpu_initialise().
>
> In svm_guest_osvw_init(), reading osvw_length and osvw_status must be done
> under the osvw_lock to avoid observing mismatched values.  The guests view of
> osvw_length also needs clipping at 64 as we only offer one status register (To
> date, 5 is the maximum index defined AFAICT).  Avoid opencoding max().


Reviewed-by: Boris Ostrovsky <[email protected]>

We should probably emit a warning when MSR_AMD_OSVW_ID_LENGTH reports
more than 64 bits in svm_host_osvw_init().


-boris

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to