From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH 08/62] x86/boot/compressed/64: Add IDT Infrastructure Date: Fri, 14 Feb 2020 11:40:36 -0800 Message-ID: <87k14p5557.fsf@linux.intel.com> References: <20200211135256.24617-1-joro@8bytes.org> <20200211135256.24617-9-joro@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20200211135256.24617-9-joro@8bytes.org> (Joerg Roedel's message of "Tue, 11 Feb 2020 14:52:02 +0100") Sender: linux-kernel-owner@vger.kernel.org To: Joerg Roedel Cc: x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Joerg Roedel List-Id: virtualization@lists.linuxfoundation.org Joerg Roedel writes: > + addq $8, %rsp > + > + /* > + * Make sure we return to __KERNEL_CS - the CS selector on > + * the IRET frame might still be from an old BIOS GDT > + */ > + movq $__KERNEL_CS, 8(%rsp) This doesn't make sense. Either it's running on the correct CS before the exception or not. Likely there's some other problem here that you patched over with this hack. -Andi