Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp412633lqh; Fri, 31 May 2024 05:30:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXR3uHoveKQzCNUXt0P1OauWwR9t9q93OjPFic+aXvotUGtDZrQ7G41ZrnYJ5px9nYZY7BX1vY09yOSQ3SQdlyOifO4oPYMz8u1PLsjsw== X-Google-Smtp-Source: AGHT+IFtvdVDA26GV6medzCSPBSJv3MKiejGWlHFMqEz1dnAkrsdvOSeWBvWUnjhvsjeMHZdF676 X-Received: by 2002:a05:6a20:734e:b0:1af:6541:8a08 with SMTP id adf61e73a8af0-1b26f11f24emr2131891637.20.1717158658582; Fri, 31 May 2024 05:30:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717158658; cv=pass; d=google.com; s=arc-20160816; b=x3VtPqCJ2FL5NkvKA3H1T4ru4lgimGKYELIVOjrhIHTmzy6iYLxbgEYCu2wA9onmxc iOtvYEeJ40e/FSKZJjBM6HnT8lcezT5R0UH/rlLkVXwZTgh1qqfaTbMRTPEHrj4ebino 26pSl7MWMgM3K7fLJ7fi2ifol+/8x3BAuPvTm0YxSaUyyFHqrg2kO3lFzqqWbbeJ2IdH /mspAJh3lFt6/nlSRRG8C/uXSP5CwYmUKbbiOak/GzcxXowJMiFLd28jVR8BFcoSlr/H EG4wBd4gZh9/LrMobVw3op+1ZvxI6a251o96GVu3HoEBkN+nq520meqpuHtcrLNcn5fU mwjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Cp7gWFWCgunxt2EZJJB/aMuJ7vmygLLqyPm4seO3fyo=; fh=yOXSm0E/8tOfmRnhk0JfE6MKLQieMwDr2DHng9Fw+Y4=; b=vICGrRTzA/5OKSr0/r6uPrvHnOBzXLWo1QjlTVf6O0nuNs0SLL7ogo8ksj725qVhFI gsNKeuql69orAtHfhoWPzBQBIiHUy8yEFC87rrodPWMG01H6dxSwtD1e6Vz70g99RZby QJABguGPKUPXelfo5llLg5qIXuNbhfd4ZO9WtVwDNvlEW5WO+UeiDz8M56gX9HkGX8EY LhZeJ7bnx4p6GH9/l3wC7cgbhDDRZmy1wyQPyQIR5MBJ0C07fCdJvNwtSwpyvkJjqwxp AACRGuhPlO5vVnAYLZTnO6tGZmS4a/IIGAIvlLroZWqhKQZZLflNRlmIRy0pER2bU6A0 vxPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=SMApdGDK; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-196778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196778-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35d59ed9csi1452712a12.855.2024.05.31.05.30.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=SMApdGDK; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-196778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196778-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A846CB25086 for ; Fri, 31 May 2024 12:30:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88B6F1586EE; Fri, 31 May 2024 12:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="SMApdGDK" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6762AD2D for ; Fri, 31 May 2024 12:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158628; cv=none; b=BVDrELH4CqiUYkrkxTIqopYXnLhlvRmyf5GXY9xzzqHy9aYz5dZ99UdXzOtu6Aaz1xCD1fPVJFHGAt0ifJYaOs4IWzyJrx+zINpDxULJ/JIFcJ55cVsTwGIJLKCjMQ5trchYrKZ1p7+QfU9c6WVZPI7CzawmdEaru6Cyubn5Biw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158628; c=relaxed/simple; bh=2mc0HWTfOV1Teq6IYJqOMKDrFW1OILUGkAVGkdJ9Acc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DVNe8mpWyxd2rA5TlsiGHggKVXOVspmXuzpvbkkwtdjrKMq6cnyWf/J4JHjW8R8yXNrMwKmTxmsTvBqu4ogkr4r7JiaSD9IORaHWD81FnqYHQCiFP70pH37VGBG7A8H6Uu7bnD2avxxT9TMjqazkcpxH39rA1m8QdB26U8d9HZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=SMApdGDK; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 5A6C440E0192; Fri, 31 May 2024 12:30:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sPIeD_FlmuX3; Fri, 31 May 2024 12:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1717158619; bh=Cp7gWFWCgunxt2EZJJB/aMuJ7vmygLLqyPm4seO3fyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SMApdGDKJuXYKkzBsXvwplsjbBQp5vqi+c5SXxkmQngoAniCZWwd+D8iDQqxgQXAq 9aIylFmNIC2SiiDYnmCouKbPaNfEIcXMoILkbr70GUv16+ylobyh2c832VEhU6uUvK 3UrxUutyaYyOU0uMnM06iX0V9wfxNLY2ZrFxfNc5IKxoRlV2CukGQ7eMjX3zkxTTv6 6CptbotB/rPBL/D1tn7nwnWvqv14u1ke7ld8OTKUJ64iDVVeM0/jgadH9AaMFCv6mH sXlu7OcCjKqOZaYJdLeMGlXEZMTAn6E8yqbeNosVT3qL1RocRBTA1uXTxSfLfimK2Z qVf20E6SmUCF9rvTjWdhdXMumbv5LmoIPqXFNfZfwavzsrFB4Zrvb+QkPJun87P8/W 7fHkb9g+ehc6LED69c92QsZed8qHvOuMrlYvptYKteNzFhNhrssmXihrxp63rdVVZ5 VyjQ+wiYsqWQMH1T5o0MlQCXHzxejAua71GG9eh+LtM9GJGjHynoSFV7QbLfDequXq qnbKRMXMswlVjY/GpL+0/xbCssqOmNuFYtSP5+i/p8G0vUZsqcSrqYFh23d5v7vNlN NLVcMASThnwqJxikvCi5OOmsM2y5PvBeVvd8ndXCkSC4UYJiPzJIRnzpoSntafxkmA vLHMB5HIbule/nrq7PtTEjdE= Received: from zn.tnic (p5de8ee85.dip0.t-ipconnect.de [93.232.238.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E1EE540E0177; Fri, 31 May 2024 12:30:04 +0000 (UTC) Date: Fri, 31 May 2024 14:29:59 +0200 From: Borislav Petkov To: Tom Lendacky Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-coco@lists.linux.dev, svsm-devel@coconut-svsm.dev, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Dan Williams , Michael Roth , Ashish Kalra Subject: Re: [PATCH v4 07/15] x86/sev: Use the SVSM to create a vCPU when not in VMPL0 Message-ID: <20240531122959.GCZlnCx8uxvozjmfly@fat_crate.local> References: <20240527123304.GBZlR9gBzBIjqEKKo6@fat_crate.local> <4f704d19-088a-89d7-0515-144db61b93a5@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4f704d19-088a-89d7-0515-144db61b93a5@amd.com> On Tue, May 28, 2024 at 03:28:28PM -0500, Tom Lendacky wrote: > I just think it's easier to follow, with specific functions for the > situation and less indentation. But if you want, I can put it all in one > function. Well, if the function were huge and hard to read sure, but right now it is simple and with single indentation level. There's the other side of having too many small helpers, leading into not seeing the flow. The logic we should follow is: if the function is big and fat and has too many indentation levels, you split into smaller functions. The "Functions" section in Documentation/process/coding-style.rst has some blurb on the matter. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette