|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8 3/9] xen/x86: support per-domain flag for xpti
On 18/04/18 11:42, Sergey Dyasli wrote:
> Hi Juergen,
>
> 2 small requests from me below.
>
> On Wed, 2018-04-18 at 10:30 +0200, Juergen Gross wrote:
>> Instead of switching XPTI globally on or off add a per-domain flag for
>> that purpose. This allows to modify the xpti boot parameter to support
>> running dom0 without Meltdown mitigations. Using "xpti=nodom0" as boot
>> parameter will achieve that.
>>
>> Move the xpti boot parameter handling to xen/arch/x86/pv/domain.c as
>> it is pv-domain specific.
>>
>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
>
>> diff --git a/docs/misc/xen-command-line.markdown
>> b/docs/misc/xen-command-line.markdown
>> index b353352adf..d4f758487a 100644
>> --- a/docs/misc/xen-command-line.markdown
>> +++ b/docs/misc/xen-command-line.markdown
>> @@ -1955,14 +1955,24 @@ clustered mode. The default, given no hint from the
>> **FADT**, is cluster
>> mode.
>>
>> ### xpti
>> -> `= <boolean>`
>> +> `= List of [ default | <boolean> | dom0=<bool> | domu=<bool> ]`
>>
>> -> Default: `false` on AMD hardware
>> +> Default: `false` on hardware not vulnerable to Meltdown (e.g. AMD)
>
> Could this line please be changed to:
>
> `false` on hardware known not to be vulnerable to Meltdown (e.g. AMD)
Sure.
>
>> > Default: `true` everywhere else
>>
>> Override default selection of whether to isolate 64-bit PV guest page
>> tables.
>>
>> +`true` activates page table isolation even on hardware not vulnerable by
>> +Meltdown for all domains.
>> +
>> +`false` deactivates page table isolation on all systems for all domains.
>> +
>> +`default` sets the default behaviour.
>> +
>> +With `dom0` and `domu` it is possible to control page table isolation
>> +for dom0 or guest domains only.
>> +
>> ### xsave
>> > `= <boolean>`
>>
>
>> diff --git a/xen/include/asm-x86/spec_ctrl.h
>> b/xen/include/asm-x86/spec_ctrl.h
>> index 5ab4ff3f68..b4fa43269e 100644
>> --- a/xen/include/asm-x86/spec_ctrl.h
>> +++ b/xen/include/asm-x86/spec_ctrl.h
>> @@ -29,6 +29,10 @@ void init_speculation_mitigations(void);
>> extern bool opt_ibpb;
>> extern uint8_t default_bti_ist_info;
>>
>> +extern uint8_t opt_xpti;
>> +#define OPT_XPTI_DOM0 0x01
>> +#define OPT_XPTI_DOMU 0x02
>> +
>> static inline void init_shadow_spec_ctrl_state(void)
>> {
>> struct cpu_info *info = get_cpu_info();
>
> Could you please also include something like the following:
>
> @@ -119,8 +122,9 @@ static void __init print_details(enum ind_thunk thunk)
> boot_cpu_has(X86_FEATURE_RSB_NATIVE) ? " RSB_NATIVE" : "",
> boot_cpu_has(X86_FEATURE_RSB_VMEXIT) ? " RSB_VMEXIT" : "");
>
> - printk("XPTI: %s\n",
> - boot_cpu_has(X86_FEATURE_NO_XPTI) ? "disabled" : "enabled");
> + printk("XPTI: Dom0 %s, DomU (64-bit PV only) %s\n",
> + opt_xpti & OPT_XPTI_DOM0 ? "enabled" : "disabled",
> + opt_xpti & OPT_XPTI_DOMU ? "enabled" : "disabled");
> }
As stated already in the reply to Jan: I'll use the text:
"XPTI (64-bit PV only): Dom0 ...".
> (just noticed that commit message also needs update regarding param name)
Aah, yes.
Thanks,
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |