On 08.03.2022 17:22, Andrew Cooper wrote:
> On 08/03/2022 08:15, Jan Beulich wrote:
>> On 07.03.2022 21:53, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/machine_kexec.c
>>> +++ b/xen/arch/x86/machine_kexec.c
>>> @@ -156,6 +156,16 @@ void machine_kexec(struct kexec_image *image)
>>>       */
>>>      local_irq_disable();
>>>  
>>> +    /* Reset CPUID masking and faulting to the host's default. */
>>> +    ctxt_switch_levelling(NULL);
>>> +
>>> +    /* Disable CET. */
>>> +    if ( read_cr4() & X86_CR4_CET )
>>> +    {
>>> +        wrmsrl(MSR_S_CET, 0);
>>> +        write_cr4(read_cr4() & ~X86_CR4_CET);
>>> +    }
>>> +
>>>      /* Now regular interrupts are disabled, we need to reduce the impact
>>>       * of interrupts not disabled by 'cli'.
>>>       *
>> Besides introducing somewhat of a disconnect between the comment in
>> context here and the earlier local_irq_disable(), is it really
>> necessary to do both actions with IRQs off?
> 
> We are a handful of instructions away from discarding Xen's context
> entirely.  IRQs are not a relevant concern.

Well, as said - the comment was what caught my eye. But as you appear to
think that slight disconnect is not an issue: I don't mean my remark to
be an objection. Feel free to commit with David's R-b.

Jan


Reply via email to