On 28/09/2020 13:06, Jan Beulich wrote:
> Signed-off-by: Jan Beulich <jbeul...@suse.com>
Any idea why this wasn't done before?  At a minimum, I'd be tempted to
put a sentence in the commit message saying "no idea why this wasn't
done before".

Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>

>
> --- a/xen/include/asm-x86/x86_64/elf.h
> +++ b/xen/include/asm-x86/x86_64/elf.h
> @@ -1,6 +1,7 @@
>  #ifndef __X86_64_ELF_H__
>  #define __X86_64_ELF_H__
>  
> +#include <asm/msr.h>
>  #include <asm/regs.h>
>  
>  typedef struct {
> @@ -59,8 +60,8 @@ static inline void elf_core_save_regs(EL
>      asm volatile("pushfq; popq %0" :"=m"(core_regs->rflags));
>      asm volatile("movq %%rsp,%0" : "=m"(core_regs->rsp));
>      asm volatile("movl %%ss, %%eax;" :"=a"(core_regs->ss));
> -    /* thread_fs not filled in for now */
> -    /* thread_gs not filled in for now */
> +    rdmsrl(MSR_FS_BASE, core_regs->thread_fs);
> +    rdmsrl(MSR_GS_BASE, core_regs->thread_gs);
>      core_regs->ds = read_sreg(ds);
>      core_regs->es = read_sreg(es);
>      core_regs->fs = read_sreg(fs);
>


Reply via email to