Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1661734

Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3

From Andrew Cooper <andrew.cooper3@citrix.com>
Newsgroups linux.kernel
Subject Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3
Date 2017-06-09 00:10 +0200
Message-ID <tQdMS-1yv-11@gated-at.bofh.it> (permalink)
References (2 earlier) <tPRjk-44i-17@gated-at.bofh.it> <tQcH7-FJ-21@gated-at.bofh.it> <tQcH7-FJ-19@gated-at.bofh.it> <tQd0u-11f-13@gated-at.bofh.it> <tQd0u-11f-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/06/2017 22:17, Boris Ostrovsky wrote:
> On 06/08/2017 05:02 PM, Tom Lendacky wrote:
>> On 6/8/2017 3:51 PM, Boris Ostrovsky wrote:
>>>>> What may be needed is making sure X86_FEATURE_SME is not set for PV
>>>>> guests.
>>>> And that may be something that Xen will need to control through either
>>>> CPUID or MSR support for the PV guests.
>>>
>>> Only on newer versions of Xen. On earlier versions (2-3 years old) leaf
>>> 0x80000007 is passed to the guest unchanged. And so is MSR_K8_SYSCFG.
>> The SME feature is in leaf 0x8000001f, is that leaf passed to the guest
>> unchanged?
> Oh, I misread the patch where X86_FEATURE_SME is defined. Then all
> versions, including the current one, pass it unchanged.
>
> All that's needed is setup_clear_cpu_cap(X86_FEATURE_SME) in
> xen_init_capabilities().

AMD processors still don't support CPUID Faulting (or at least, I
couldn't find any reference to it in the latest docs), so we cannot
actually hide SME from a guest which goes looking at native CPUID. 
Furthermore, I'm not aware of any CPUID masking support covering that leaf.

However, if Linux is using the paravirtual cpuid hook, things are
slightly better.

On Xen 4.9 and later, no guests will see the feature.  On earlier
versions of Xen (before I fixed the logic), plain domUs will not see the
feature, while dom0 will.

For safely, I'd recommend unilaterally clobbering the feature as Boris
suggested.  There is no way SME will be supportable on a per-PV guest
basis, although (as far as I am aware) Xen as a whole would be able to
encompass itself and all of its PV guests inside one single SME instance.

~Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against  just the physical address in cr3 Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-08 00:10 +0200
  Re: [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against  just the physical address in cr3 Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-08 23:00 +0200
    Re: [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against  just the physical address in cr3 Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-08 23:20 +0200
      Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use  __va() against just the physical address in cr3 Andrew Cooper <andrew.cooper3@citrix.com> - 2017-06-09 00:10 +0200
        Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use  __va() against just the physical address in cr3 Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-09 20:50 +0200
          Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use  __va() against just the physical address in cr3 Andrew Cooper <andrew.cooper3@citrix.com> - 2017-06-09 21:00 +0200
          Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use  __va() against just the physical address in cr3 Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-09 21:50 +0200

csiph-web