Signed-off-by: Jan Beulich <jbeul...@suse.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);
- [PATCH 0/5] x86: introduce read_sregs() and elf_core_save_re... Jan Beulich
- [PATCH 1/5] x86: introduce read_sregs() to allow storin... Jan Beulich
- Re: [PATCH 1/5] x86: introduce read_sregs() to allo... Andrew Cooper
- Re: [PATCH 1/5] x86: introduce read_sregs() to ... Jan Beulich
- Re: [PATCH 1/5] x86: introduce read_sregs() to ... Jan Beulich
- Re: [PATCH 1/5] x86: introduce read_sregs()... Andrew Cooper
- [PATCH 2/5] x86/ELF: don't open-code read_sreg() Jan Beulich
- Re: [PATCH 2/5] x86/ELF: don't open-code read_sreg(... Andrew Cooper
- [PATCH 3/5] x86/ELF: don't store function pointer in el... Jan Beulich
- Re: [PATCH 3/5] x86/ELF: don't store function point... Andrew Cooper
- [PATCH 4/5] x86/ELF: also record FS/GS bases in elf_cor... Jan Beulich
- Re: [PATCH 4/5] x86/ELF: also record FS/GS bases in... Andrew Cooper
- [PATCH 5/5] x86/ELF: eliminate pointless local variable... Jan Beulich
- Re: [PATCH 5/5] x86/ELF: eliminate pointless local ... Andrew Cooper
- [PATCH 6/5] x86/ELF: drop unnecessary volatile from asm... Jan Beulich
- Re: [PATCH 6/5] x86/ELF: drop unnecessary volatile ... Andrew Cooper