Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp393662rdg; Tue, 10 Oct 2023 13:33:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRH9Z94X0FS9pwQ6qW+Ib8tD31fywkae8hnOL/YLBzy4ABwnlv007LAFbX+dW6yj5QPl/i X-Received: by 2002:a17:902:e750:b0:1c5:efd1:82b4 with SMTP id p16-20020a170902e75000b001c5efd182b4mr23422029plf.29.1696969994013; Tue, 10 Oct 2023 13:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696969994; cv=none; d=google.com; s=arc-20160816; b=gQEXRYYRr5kbHPMk0OjSyqG5T8jAqC2hCunHmlcgg6Me9LDxidbPkeLn7Zeak2HWKT 7zBZhSgIfI/8o33+jinFuRykgI4vFZBvnt1uzeYKzx/nMfPp4shczFpOAI7kqb06hvqV 28ZbbRBtefDpThWWpcGkcdRt5yP/zaoHGbv3vWWZ9Y6K9Z2yaR/0FoDH15Pc5DeHTWLf EdzCdzv7UH0CymRcReOy0OMz5x4SIci9TOlqgwZw8PHe2n5M7QQH1Eb5kbCfX9DzbEzo Mm6vD7k+F7rgnV2ESiOFx0FkL0qFxbWWWDyUmaimF/6nEl9JurbH+HQxcjXOjrzotmNk mQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :message-id:user-agent:references:in-reply-to:subject:cc:to:from :date:mime-version; bh=30vpozEsZq3CRzD6RTqEFinUq6CI6i9wIX9oW/e4SPE=; fh=j02+4PO1Ra5MmX1AaqPtPruKSpL8/0z/k2hDzDmjysw=; b=QGyCRqnvDBX4hniV067y7NT2HT7SleJzd2a3ITOBT70qIosIJecdIT6hynzzvUsAH4 EvJMy4qLppP27xh7f0YaUz2sxGR35ElMzaLW3xIXt/E8ESfCHcRcME5FxwjuH75d7C4P QGp4xi/BmcofPCpZTAczn7ACpK2UgEznoshOkoEYvNsYWSfkzAfN0ICK0yeSve90HOOM aOdTI2Dh8DXBiau42KASKRAvQV/lgeyNyADGEwy045Ane/foMhT9EAoy4+Hv6E4BX2m8 ziQ/2FhWnhS5dNfz9qRgDxI93OiCEaNLqoy/AajWCSDuYI1OYYKLjFZ3uxgVJpQR70PM RiCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y7-20020a636407000000b00580e32f7793si12798864pgb.151.2023.10.10.13.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 13:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A220580C47A8; Tue, 10 Oct 2023 13:33:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbjJJUc4 (ORCPT + 99 others); Tue, 10 Oct 2023 16:32:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJJUcz (ORCPT ); Tue, 10 Oct 2023 16:32:55 -0400 Received: from 14.mo582.mail-out.ovh.net (14.mo582.mail-out.ovh.net [46.105.56.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4226B8E for ; Tue, 10 Oct 2023 13:32:53 -0700 (PDT) Received: from director2.ghost.mail-out.ovh.net (unknown [10.108.20.52]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 8B49524204 for ; Tue, 10 Oct 2023 18:03:39 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-rfnfq (unknown [10.110.103.92]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 26EE71FE7B; Tue, 10 Oct 2023 18:03:39 +0000 (UTC) Received: from RCM-web2.webmail.mail.ovh.net ([176.31.232.109]) by ghost-submission-6684bf9d7b-rfnfq with ESMTPSA id GIhHCPuRJWW7fgAACGw8uA (envelope-from ); Tue, 10 Oct 2023 18:03:39 +0000 MIME-Version: 1.0 Date: Tue, 10 Oct 2023 21:03:38 +0300 From: =?UTF-8?Q?Jos=C3=A9_Pekkarinen?= To: Peter Gonda Cc: seanjc@google.com, pbonzini@redhat.com, skhan@linuxfoundation.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH] kvm/sev: make SEV/SEV-ES asids configurable In-Reply-To: References: <20231010100441.30950-1-jose.pekkarinen@foxhound.fi> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <8fd78d002d84f3164eb5a9337e694fa1@foxhound.fi> X-Sender: jose.pekkarinen@foxhound.fi Organization: Foxhound Ltd. X-Originating-IP: 23.128.248.14 X-Webmail-UserID: jose.pekkarinen@foxhound.fi Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 10519001355388888742 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgdduudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepggffhffvvefujghffgfkgihoihgtgfesthekjhdttderjeenucfhrhhomheplfhoshorucfrvghkkhgrrhhinhgvnhcuoehjohhsvgdrphgvkhhkrghrihhnvghnsehfohighhhouhhnugdrfhhiqeenucggtffrrghtthgvrhhnpeekhfeguddufeegvdelgedtvdffgeehvddtkeevkeejvedvgeeitdefleehtdeitdenucfkphepuddvjedrtddrtddruddpvdefrdduvdekrddvgeekrddugedpudejiedrfedurddvfedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeojhhoshgvrdhpvghkkhgrrhhinhgvnhesfhhogihhohhunhgurdhfiheqpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmohehkedvpdhmohguvgepshhmthhpohhuth X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 13:33:11 -0700 (PDT) X-Spam-Level: ** On 2023-10-10 19:49, Peter Gonda wrote: > On Tue, Oct 10, 2023 at 5:22 AM José Pekkarinen > wrote: >> >> There are bioses that doesn't allow to configure the >> number of asids allocated for SEV/SEV-ES, for those >> cases, the default behaviour allocates all the asids >> for SEV, leaving no room for SEV-ES to have some fun. >> If the user request SEV-ES to be enabled, it will >> find the kernel just run out of resources and ignored >> user request. This following patch will address this >> issue by making the number of asids for SEV/SEV-ES >> configurable over kernel module parameters. >> > > All this patch does is introduce an error case right? Because if the > BIOS hasn't actually configured those SEV-ES asids and KVM tries to > use an SEV as an SEV-ES asid commands to the ASP will fail, right? > > What happens when you try to create an SEV-ES VM with this patch, when > the BIOS hasn't allocated any SEV-ES asids? It still doesn't enable SEV-ES since the cpu exposes min_sev_asids as 1, and there is a check to bail out in the hardware setup function, so definitely this is not fixing anything. I may not being understanding something here though, since my BIOS doesn't seem to have any options nor hints about SEV-ES, so I'm not quite sure it really does something to provide the functionality. For the records it is a Supermicro H11SSL-NC. Thanks! José.