From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Brian Woods <brian.woods@amd.com>,
Jan Beulich <JBeulich@suse.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH] x86/svm: Fixes to OS Visible Workaround handling
Date: Tue, 21 Aug 2018 11:09:22 -0400 [thread overview]
Message-ID: <a0f81b84-d016-8ca8-ec23-bea7aeb045b7@oracle.com> (raw)
In-Reply-To: <1534352869-27401-1-git-send-email-andrew.cooper3@citrix.com>
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 <boris.ostrovsky@oracle.com>
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
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2018-08-21 15:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 17:07 [PATCH] x86/svm: Fixes to OS Visible Workaround handling Andrew Cooper
2018-08-21 15:09 ` Boris Ostrovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0f81b84-d016-8ca8-ec23-bea7aeb045b7@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=brian.woods@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).