From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC108C388F9 for ; Wed, 21 Oct 2020 12:49:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F69122249 for ; Wed, 21 Oct 2020 12:49:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442613AbgJUMty (ORCPT ); Wed, 21 Oct 2020 08:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442605AbgJUMty (ORCPT ); Wed, 21 Oct 2020 08:49:54 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A5C9C0613CE for ; Wed, 21 Oct 2020 05:49:54 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 165ED249; Wed, 21 Oct 2020 14:49:53 +0200 (CEST) Date: Wed, 21 Oct 2020 14:49:46 +0200 From: Joerg Roedel To: Arvind Sankar Cc: Joerg Roedel , x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Kees Cook , Martin Radev , Tom Lendacky , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path Message-ID: <20201021124946.GA30514@8bytes.org> References: <20201020121856.19427-1-joro@8bytes.org> <20201020121856.19427-4-joro@8bytes.org> <20201020141259.GC2996696@rani.riverdale.lan> <20201020154812.GB22179@suse.de> <20201020160428.GA3233355@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201020160428.GA3233355@rani.riverdale.lan> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2020 at 12:04:28PM -0400, Arvind Sankar wrote: > This is called from both assembly and C, but anyway, you're already > assuming r10 and r11 can be clobbered safely, and you just took out the > save/restores in set_sev_encryption_mask, which is actually called only > from assembly. Alright, maybe I was a bit too caucious. I changed the CR4 handling to use %r8 and %r9 instead, which are also clobbered. Regards, Joerg