[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6.5 08/26] x86/entry: Erase guest GPR state on entry to Xen
On Mon, 2018-01-22 at 10:18 +0000, Andrew Cooper wrote: > On 22/01/2018 10:04, David Woodhouse wrote: > > > > On Thu, 2018-01-04 at 00:15 +0000, Andrew Cooper wrote: > > > > > > --- a/xen/include/asm-x86/asm_defns.h > > > +++ b/xen/include/asm-x86/asm_defns.h > > > @@ -217,22 +217,34 @@ static always_inline void stac(void) > > > addq $-(UREGS_error_code-UREGS_r15), %rsp > > > cld > > > movq %rdi,UREGS_rdi(%rsp) > > > + xor %edi, %edi > > > movq %rsi,UREGS_rsi(%rsp) > > > + xor %esi, %esi > > > movq %rdx,UREGS_rdx(%rsp) > > > + xor %edx, %edx > > > movq %rcx,UREGS_rcx(%rsp) > > > + xor %ecx, %ecx > > > movq %rax,UREGS_rax(%rsp) > > > + xor %eax, %eax > > You didn't want to erase all 64 bits? > > This does erase all 64 bits. (We're in long mode, so the upper 32 bits > are implicitly zeroed, without an added rex prefix.) Eww. In the grand scheme of things, I'd rather the assembler knew that (and happily omitted the rex prefix all by itself to use the more efficient encoding of the instruction), and not me. Attachment:
smime.p7s _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |