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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 631E8C433ED for ; Wed, 7 Apr 2021 11:16:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4093A6138B for ; Wed, 7 Apr 2021 11:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351792AbhDGLQS (ORCPT ); Wed, 7 Apr 2021 07:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351780AbhDGLQR (ORCPT ); Wed, 7 Apr 2021 07:16:17 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F416C061756; Wed, 7 Apr 2021 04:16:08 -0700 (PDT) Received: from zn.tnic (p200300ec2f08fb002f59ec04e5c6bba4.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:fb00:2f59:ec04:e5c6:bba4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D98A11EC027D; Wed, 7 Apr 2021 13:16:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1617794166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=D0JcvFianX0tItl+iWM+jBE8SZ1OCPp25pYI6pX32D0=; b=mgs8dav9hNc8eAOpB8WxPMPsJg1VfPzq/XuM5rWMQxNMq3tcDAMX7kK8HVH28QnEK7g3Mv 3MM82xEvEJg//xOQFsPdcpFb1HCZp6Ia21vuIwn92SyqYHQkWArgBfFWk0mpKkK2nBkgdu F/xErIQfhRM4WqjwK+78HBJH+Tf9yq4= Date: Wed, 7 Apr 2021 13:16:04 +0200 From: Borislav Petkov To: Brijesh Singh Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, ak@linux.intel.com, Thomas Gleixner , Ingo Molnar , Joerg Roedel , "H. Peter Anvin" , Tony Luck , Dave Hansen , "Peter Zijlstra (Intel)" , Paolo Bonzini , Tom Lendacky , David Rientjes , Sean Christopherson Subject: Re: [RFC Part1 PATCH 06/13] x86/compressed: rescinds and validate the memory used for the GHCB Message-ID: <20210407111604.GA25319@zn.tnic> References: <20210324164424.28124-1-brijesh.singh@amd.com> <20210324164424.28124-7-brijesh.singh@amd.com> <20210406103358.GL17806@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 06, 2021 at 10:47:18AM -0500, Brijesh Singh wrote: > Before the GHCB is established the caller does not need to save and > restore MSRs. The page_state_change() uses the GHCB MSR protocol and it > can be called before and after the GHCB is established hence I am saving > and restoring GHCB MSRs. I think you need to elaborate on that, maybe with an example. What the other sites using the GHCB MSR currently do is: 1. request by writing it 2. read the response None of them save and restore it. So why here? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette