From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Christopherson Date: Wed, 28 Feb 2024 14:40:20 -0800 Subject: [PATCH v9 00/11] KVM: selftests: Add SEV and SEV-ES smoke tests In-Reply-To: <170900037528.3692126.18029642068469384283.b4-ty@google.com> References: <20240223004258.3104051-1-seanjc@google.com> <170900037528.3692126.18029642068469384283.b4-ty@google.com> Message-ID: List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Feb 26, 2024, Sean Christopherson wrote: > On Thu, 22 Feb 2024 16:42:47 -0800, Sean Christopherson wrote: > > Add basic SEV and SEV-ES smoke tests. Unlike the intra-host migration tests, > > this one actually runs a small chunk of code in the guest. > > > > Unless anyone strongly objects to the quick and dirty approach I've taken for > > SEV-ES, I'll get all of this queued for 6.9 soon-ish. > > > > As for _why_ I added the quick-and-dirty SEV-ES testcase, I have a series to > > cleanup __svm_sev_es_vcpu_run(), and found out that apparently I have a version > > of OVMF that doesn't quite have to the right for SEV-ES, and so I > > could even get a "real" VM to reach KVM_RUN. I assumed (correctly, yay!) that > > hacking together a selftest would be faster than figuring out what firmware > > magic I am missing. > > > > [...] > > Applied to kvm-x86 selftests, thanks! > > [01/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype > https://github.com/kvm-x86/linux/commit/309d1ad7b6ff > [02/11] KVM: selftests: Make sparsebit structs const where appropriate > https://github.com/kvm-x86/linux/commit/6077c3ce4021 > [03/11] KVM: selftests: Add a macro to iterate over a sparsebit range > https://github.com/kvm-x86/linux/commit/8811565ff68e > [04/11] KVM: selftests: Add support for allocating/managing protected guest memory > https://github.com/kvm-x86/linux/commit/29e749e8faff > [05/11] KVM: selftests: Add support for protected vm_vaddr_* allocations > https://github.com/kvm-x86/linux/commit/1e3af7cf984a > [06/11] KVM: selftests: Explicitly ucall pool from shared memory > https://github.com/kvm-x86/linux/commit/5ef7196273b6 > [07/11] KVM: selftests: Allow tagging protected memory in guest page tables > https://github.com/kvm-x86/linux/commit/a8446cd81de8 > [08/11] KVM: selftests: Add library for creating and interacting with SEV guests > https://github.com/kvm-x86/linux/commit/f3ff1e9b2f9c > [09/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test > https://github.com/kvm-x86/linux/commit/0837ddb51f9b > [10/11] KVM: selftests: Add a basic SEV smoke test > https://github.com/kvm-x86/linux/commit/5101f1e27683 > [11/11] KVM: selftests: Add a basic SEV-ES smoke test > https://github.com/kvm-x86/linux/commit/f3750b0c7f6e FYI, the hashes changed due to a force push to squash a bug in a different series. [1/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype https://github.com/kvm-x86/linux/commit/126190379c57 [2/11] KVM: selftests: Make sparsebit structs const where appropriate https://github.com/kvm-x86/linux/commit/35f50c91c43e [3/11] KVM: selftests: Add a macro to iterate over a sparsebit range https://github.com/kvm-x86/linux/commit/57e19f057758 [4/11] KVM: selftests: Add support for allocating/managing protected guest memory https://github.com/kvm-x86/linux/commit/cd8eb2913205 [5/11] KVM: selftests: Add support for protected vm_vaddr_* allocations https://github.com/kvm-x86/linux/commit/d210eebb51a2 [6/11] KVM: selftests: Explicitly ucall pool from shared memory https://github.com/kvm-x86/linux/commit/31e00dae72fd [7/11] KVM: selftests: Allow tagging protected memory in guest page tables https://github.com/kvm-x86/linux/commit/bf47e87c65be [8/11] KVM: selftests: Add library for creating and interacting with SEV guests https://github.com/kvm-x86/linux/commit/bdceeebcddb8 [9/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test https://github.com/kvm-x86/linux/commit/8b174eb9d289 [10/11] KVM: selftests: Add a basic SEV smoke test https://github.com/kvm-x86/linux/commit/faa0d7027de3 [11/11] KVM: selftests: Add a basic SEV-ES smoke test https://github.com/kvm-x86/linux/commit/974ba6f0e595 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C0692B9A7 for ; Wed, 28 Feb 2024 22:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709160030; cv=none; b=qq/3+49e3Bhb3bA1GXiYKlUXDTbVDnVFJ0S2kiZgeIusxoS7R0V+fDPKdPGSNeCfnnbzCLARl5qy6cX2dKmeY0WqJF4upJpJ6Q9t8K7obb931mcL948sF2QH2bsf4u1doJcG+QIh/E4Y7fO/G1gOt2zZNjTATbR3RinMm7L+12M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709160030; c=relaxed/simple; bh=UI4N3O0p1OPV51s6ww8VE+iOxUsmCX0+oAuufGaCP2g=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jIK21neXITyLrtsVHicFwimE9D+4KRKTKU3vGovfLTaQoBO/v7DhU1B4IvwzufvW/Chr7H/d2ZXPZbYWY1I0w50RqkC6iL23/0ucwemwv0tx/QVJRI0dOIqxQevqWgj/lnHdX/lNzxY72JOHTSXRRCY1BQIWbs2CHg0bTwEZrl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Kzf81D3c; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Kzf81D3c" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-60942936e31so4849277b3.1 for ; Wed, 28 Feb 2024 14:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709160027; x=1709764827; darn=lists.linux.dev; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=l+UTQgqjeTeuB4joWxs/sUGJ8L/gPUO2H1zeCMeGlUc=; b=Kzf81D3cefJwIT/SffujprSjJN+2ilp7PD56kvcVjZCd7NJp2cDYzYoDXn/qwMKbf0 +WTwKIS9lfOjopuXcivDM8gebQ3+MRe1oZiYeoNE5MRbTcFNrBj4lQaR1zSN3XIQa64G KeEEJQ20qb9UxgNk5OEa7ar6iG4cjXmRefHjaDVCc1pHoEqDdCOjgBEd6nZ7MfiyV8aJ RZ0w9ZhrbfFhKR/VPH5FnDjPxNureoyPhSXPP0XGsIJR6tXqKtWLKpTfXzTWJ719qwWJ RMgwbZevj1Av7SSYZPaoDRPUsW/Q4Qn0OvrRN6zDqmKDr+j4OeIOd8p3F+9CAxJw2UgK YKIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709160027; x=1709764827; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l+UTQgqjeTeuB4joWxs/sUGJ8L/gPUO2H1zeCMeGlUc=; b=Str2Y9PPwOiuVGKYysTbW8Ja9g54smb/FcO2tydHktjlgH8DNMkhG3ui4UIvkK39QU 95MXqqVT9izh8nzFgMjyw7waX2jZN0aRSpBSw+AyLni4wcAIdV2tAS407PWKWaL/exgJ aoFUInhx9eIvNMRWfW+iBRrWR2DeQU2QCRkZIVj6yiacbPeX4ddKOUEZdS9eHEyyeQhy 9B0sM2Wst2GcX7lrvf2/KUok/+g2pVK3eb4j/YpkQtIoXZx1eWzOOWVG4+E8u9uoBbm0 m2M7HFnNptStubh2tJBq+cxG3fHW+W/VjVdErbt9oSu/2MAPBnKRnJ9wUldl29+1PCxw ZYzQ== X-Forwarded-Encrypted: i=1; AJvYcCX3+2wIo8X2l+dmK7Rhd3jF1ZKOuzSNw9mqErgIqfE/rRc2yRxEbkggUQIHqCtmI5kvREAjUYcPSlyfbcZCM4hZBx4+BDZ2 X-Gm-Message-State: AOJu0Yyp6VJkD69jDdDGjOnky1u7yQNjkKA5f/vYiy4pQrIqGVbPcvcd hoWnz1Z1CvoRtXqBeOsESS4ZjwjsG1FBEGZKTUuXj7wgfyr0LA3YJ3MWAl9FCbjF+HLyJgfeXaB 4Mg== X-Google-Smtp-Source: AGHT+IFUPZtJnUkx4ZeqCTT90Ca+tWDsq48kFwktE+9CygIbxZw4LB/eimUqGjDzbeY7BpvlpduVfE/E17k= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:abc2:0:b0:dc7:48ce:d17f with SMTP id v60-20020a25abc2000000b00dc748ced17fmr140494ybi.10.1709160027352; Wed, 28 Feb 2024 14:40:27 -0800 (PST) Date: Wed, 28 Feb 2024 14:40:20 -0800 In-Reply-To: <170900037528.3692126.18029642068469384283.b4-ty@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240223004258.3104051-1-seanjc@google.com> <170900037528.3692126.18029642068469384283.b4-ty@google.com> Message-ID: Subject: Re: [PATCH v9 00/11] KVM: selftests: Add SEV and SEV-ES smoke tests From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Vishal Annapurve , Ackerley Tng , Andrew Jones , Tom Lendacky , Michael Roth , Carlos Bilbao , Peter Gonda , Itaru Kitayama Content-Type: text/plain; charset="us-ascii" On Mon, Feb 26, 2024, Sean Christopherson wrote: > On Thu, 22 Feb 2024 16:42:47 -0800, Sean Christopherson wrote: > > Add basic SEV and SEV-ES smoke tests. Unlike the intra-host migration tests, > > this one actually runs a small chunk of code in the guest. > > > > Unless anyone strongly objects to the quick and dirty approach I've taken for > > SEV-ES, I'll get all of this queued for 6.9 soon-ish. > > > > As for _why_ I added the quick-and-dirty SEV-ES testcase, I have a series to > > cleanup __svm_sev_es_vcpu_run(), and found out that apparently I have a version > > of OVMF that doesn't quite have to the right for SEV-ES, and so I > > could even get a "real" VM to reach KVM_RUN. I assumed (correctly, yay!) that > > hacking together a selftest would be faster than figuring out what firmware > > magic I am missing. > > > > [...] > > Applied to kvm-x86 selftests, thanks! > > [01/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype > https://github.com/kvm-x86/linux/commit/309d1ad7b6ff > [02/11] KVM: selftests: Make sparsebit structs const where appropriate > https://github.com/kvm-x86/linux/commit/6077c3ce4021 > [03/11] KVM: selftests: Add a macro to iterate over a sparsebit range > https://github.com/kvm-x86/linux/commit/8811565ff68e > [04/11] KVM: selftests: Add support for allocating/managing protected guest memory > https://github.com/kvm-x86/linux/commit/29e749e8faff > [05/11] KVM: selftests: Add support for protected vm_vaddr_* allocations > https://github.com/kvm-x86/linux/commit/1e3af7cf984a > [06/11] KVM: selftests: Explicitly ucall pool from shared memory > https://github.com/kvm-x86/linux/commit/5ef7196273b6 > [07/11] KVM: selftests: Allow tagging protected memory in guest page tables > https://github.com/kvm-x86/linux/commit/a8446cd81de8 > [08/11] KVM: selftests: Add library for creating and interacting with SEV guests > https://github.com/kvm-x86/linux/commit/f3ff1e9b2f9c > [09/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test > https://github.com/kvm-x86/linux/commit/0837ddb51f9b > [10/11] KVM: selftests: Add a basic SEV smoke test > https://github.com/kvm-x86/linux/commit/5101f1e27683 > [11/11] KVM: selftests: Add a basic SEV-ES smoke test > https://github.com/kvm-x86/linux/commit/f3750b0c7f6e FYI, the hashes changed due to a force push to squash a bug in a different series. [1/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype https://github.com/kvm-x86/linux/commit/126190379c57 [2/11] KVM: selftests: Make sparsebit structs const where appropriate https://github.com/kvm-x86/linux/commit/35f50c91c43e [3/11] KVM: selftests: Add a macro to iterate over a sparsebit range https://github.com/kvm-x86/linux/commit/57e19f057758 [4/11] KVM: selftests: Add support for allocating/managing protected guest memory https://github.com/kvm-x86/linux/commit/cd8eb2913205 [5/11] KVM: selftests: Add support for protected vm_vaddr_* allocations https://github.com/kvm-x86/linux/commit/d210eebb51a2 [6/11] KVM: selftests: Explicitly ucall pool from shared memory https://github.com/kvm-x86/linux/commit/31e00dae72fd [7/11] KVM: selftests: Allow tagging protected memory in guest page tables https://github.com/kvm-x86/linux/commit/bf47e87c65be [8/11] KVM: selftests: Add library for creating and interacting with SEV guests https://github.com/kvm-x86/linux/commit/bdceeebcddb8 [9/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test https://github.com/kvm-x86/linux/commit/8b174eb9d289 [10/11] KVM: selftests: Add a basic SEV smoke test https://github.com/kvm-x86/linux/commit/faa0d7027de3 [11/11] KVM: selftests: Add a basic SEV-ES smoke test https://github.com/kvm-x86/linux/commit/974ba6f0e595 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F6AAC5478C for ; Wed, 28 Feb 2024 22:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=U4hBDwzZ9cN1ABZIrL/e3rZMfOXvaecBzd2Ib6BMvTc=; b=BAIBkXBCI2fBoQs083cEZ4MZgh qCy6h9jW8ZGg2uVXbJW4dflm62YQoHUhI9HFa2hmRbJp47SyY3vQXhA+FazpgktkczVlfPTahX8hz F9ntIbk7sZdsxcPLZaK8vfLFfCX+AklaGp0xBG+lF4vkwKXL3qkRBd5/zNmf82LnJbPqJ3sLBf7mi rEmH1MSgE9+1REipgcyOY93P6XKmyYZCKFKVewmcdUO0XU/Dg1CpG00hvi2pCRubZwWW2aOkw1cvJ Z9e//j4OmbMKZf/N2ZgvKF+gaOE5JrF7iGnEHtBnSoWaERrIk8DJus5nSvzkGv8LYr8C0XW/h1Jpe aUjVJt4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfSbI-0000000B9X6-2utS; Wed, 28 Feb 2024 22:40:32 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfSbE-0000000B9Vr-40n7 for linux-riscv@lists.infradead.org; Wed, 28 Feb 2024 22:40:30 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-6087ffdac8cso4000217b3.2 for ; Wed, 28 Feb 2024 14:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709160027; x=1709764827; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=l+UTQgqjeTeuB4joWxs/sUGJ8L/gPUO2H1zeCMeGlUc=; b=RTKhRdzD/N2UlNuBkoHSqdSCuB3Ih3ShnfvJ00nCvwhRvQ/F9+nc6dAi9hYFSvl0zR YTCZKGzTz8fYx1at6SR14xy5A20wBqhZdry5mkT6/+hDWJ8FGNveiTYxdR3P829QIYMr 8dfhwKJOyLfncsiUX8IkLUr5/rA+xyh9pFDJZSlAXwozsQH3AGwNaBdnipqUsjVAP+0C kA4rv1RYHVh4mlAFsLg5yZKrMzZj4GVe4FN4+y7yXwQ7Twdtf+NupdKTneW90rsNy1As fB3BswVXolIrf8P9e2+7HddwZIFcjAicZCj1P4gdoQsx2Jvyg08OEEFwgMjS/uZfKLj3 Bdjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709160027; x=1709764827; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l+UTQgqjeTeuB4joWxs/sUGJ8L/gPUO2H1zeCMeGlUc=; b=krobklvqSV7RFmPfjq0JVaaVDLQsaJ9469vkbciSeziMOTPikZvJjdt86ZQd4ktsD2 yu1eH5pSz2vrzO+0JyStmxNGZXjqE8frGNPZvcKX0WGhH8m21JCdSh7gPiwr9PE6UD6P LauuEB54eGcULGypoRgfdzijXOd+WBjE3S9g/0jhkRatkQtnQHkaoNSiJOpksVY6a//4 xeaY9YOKY8acebO7H2pQXEUTx643Munr/k3Wj3FQSZs3+86YCf7MukqLLoD4opNssIv5 7kcOwPnFn1q5fH1WD0n6l5oTJSvzfEvO8V1UDdhzSEa53OlhD2JoaCgb4na3NZCum3GW UxRg== X-Forwarded-Encrypted: i=1; AJvYcCVmUaLaqYsM/Des4314JBaj2S8CCSgrzbvLVArVyktpa02CdOFbVKf3QWMCJykJ06Q7g+a0rDzm5Bg7fchofZ5HEDheqSkkr30YBKYjf/ai X-Gm-Message-State: AOJu0Yyi9eQ0zGoL2lAHjJQKApVvZ+SPwDf2AVKvBwlFvtHDDbvL9t2N NagxhFDjXJYDLQdXVh+TP+MeTl4h/LML84NAR7Areyw/DQufdH9bOosG7yTmj6VxKRwZJsSF8V0 o7A== X-Google-Smtp-Source: AGHT+IFUPZtJnUkx4ZeqCTT90Ca+tWDsq48kFwktE+9CygIbxZw4LB/eimUqGjDzbeY7BpvlpduVfE/E17k= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:abc2:0:b0:dc7:48ce:d17f with SMTP id v60-20020a25abc2000000b00dc748ced17fmr140494ybi.10.1709160027352; Wed, 28 Feb 2024 14:40:27 -0800 (PST) Date: Wed, 28 Feb 2024 14:40:20 -0800 In-Reply-To: <170900037528.3692126.18029642068469384283.b4-ty@google.com> Mime-Version: 1.0 References: <20240223004258.3104051-1-seanjc@google.com> <170900037528.3692126.18029642068469384283.b4-ty@google.com> Message-ID: Subject: Re: [PATCH v9 00/11] KVM: selftests: Add SEV and SEV-ES smoke tests From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Vishal Annapurve , Ackerley Tng , Andrew Jones , Tom Lendacky , Michael Roth , Carlos Bilbao , Peter Gonda , Itaru Kitayama X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_144029_054327_4609A138 X-CRM114-Status: GOOD ( 18.45 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, Feb 26, 2024, Sean Christopherson wrote: > On Thu, 22 Feb 2024 16:42:47 -0800, Sean Christopherson wrote: > > Add basic SEV and SEV-ES smoke tests. Unlike the intra-host migration tests, > > this one actually runs a small chunk of code in the guest. > > > > Unless anyone strongly objects to the quick and dirty approach I've taken for > > SEV-ES, I'll get all of this queued for 6.9 soon-ish. > > > > As for _why_ I added the quick-and-dirty SEV-ES testcase, I have a series to > > cleanup __svm_sev_es_vcpu_run(), and found out that apparently I have a version > > of OVMF that doesn't quite have to the right for SEV-ES, and so I > > could even get a "real" VM to reach KVM_RUN. I assumed (correctly, yay!) that > > hacking together a selftest would be faster than figuring out what firmware > > magic I am missing. > > > > [...] > > Applied to kvm-x86 selftests, thanks! > > [01/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype > https://github.com/kvm-x86/linux/commit/309d1ad7b6ff > [02/11] KVM: selftests: Make sparsebit structs const where appropriate > https://github.com/kvm-x86/linux/commit/6077c3ce4021 > [03/11] KVM: selftests: Add a macro to iterate over a sparsebit range > https://github.com/kvm-x86/linux/commit/8811565ff68e > [04/11] KVM: selftests: Add support for allocating/managing protected guest memory > https://github.com/kvm-x86/linux/commit/29e749e8faff > [05/11] KVM: selftests: Add support for protected vm_vaddr_* allocations > https://github.com/kvm-x86/linux/commit/1e3af7cf984a > [06/11] KVM: selftests: Explicitly ucall pool from shared memory > https://github.com/kvm-x86/linux/commit/5ef7196273b6 > [07/11] KVM: selftests: Allow tagging protected memory in guest page tables > https://github.com/kvm-x86/linux/commit/a8446cd81de8 > [08/11] KVM: selftests: Add library for creating and interacting with SEV guests > https://github.com/kvm-x86/linux/commit/f3ff1e9b2f9c > [09/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test > https://github.com/kvm-x86/linux/commit/0837ddb51f9b > [10/11] KVM: selftests: Add a basic SEV smoke test > https://github.com/kvm-x86/linux/commit/5101f1e27683 > [11/11] KVM: selftests: Add a basic SEV-ES smoke test > https://github.com/kvm-x86/linux/commit/f3750b0c7f6e FYI, the hashes changed due to a force push to squash a bug in a different series. [1/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype https://github.com/kvm-x86/linux/commit/126190379c57 [2/11] KVM: selftests: Make sparsebit structs const where appropriate https://github.com/kvm-x86/linux/commit/35f50c91c43e [3/11] KVM: selftests: Add a macro to iterate over a sparsebit range https://github.com/kvm-x86/linux/commit/57e19f057758 [4/11] KVM: selftests: Add support for allocating/managing protected guest memory https://github.com/kvm-x86/linux/commit/cd8eb2913205 [5/11] KVM: selftests: Add support for protected vm_vaddr_* allocations https://github.com/kvm-x86/linux/commit/d210eebb51a2 [6/11] KVM: selftests: Explicitly ucall pool from shared memory https://github.com/kvm-x86/linux/commit/31e00dae72fd [7/11] KVM: selftests: Allow tagging protected memory in guest page tables https://github.com/kvm-x86/linux/commit/bf47e87c65be [8/11] KVM: selftests: Add library for creating and interacting with SEV guests https://github.com/kvm-x86/linux/commit/bdceeebcddb8 [9/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test https://github.com/kvm-x86/linux/commit/8b174eb9d289 [10/11] KVM: selftests: Add a basic SEV smoke test https://github.com/kvm-x86/linux/commit/faa0d7027de3 [11/11] KVM: selftests: Add a basic SEV-ES smoke test https://github.com/kvm-x86/linux/commit/974ba6f0e595 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1C12C47DD9 for ; Wed, 28 Feb 2024 22:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mrRs5Qyo1029T/FMVlATB/9iIsqev2RkmnaYNa/E8mw=; b=dVPbMjnzFV/OtP9uDnjC1N542P PZTWNshqicoVLK/ieA1HNP559UFoGmIgF1BEZqjHBx2mx/Qf5z3PfdW8A012D9yUMIQyQ5AahbEaU D84TOqHQSj9G4U42HiZi9GI5cU2xHl3BZSFu0pgdY60gha76i9Bu2QZG8qitySCnMjj2YfN98a7Jy QQr434MinUMY8nff3FOjhKHU6FPpi6bBU9cZHlP5BbakRRFcmHoZGFxJBSNUKEhsh7ijRranvOCiR IOs0BBUSg5GJKZMLYoUc1A2L3ttF7D/VjDLgTKgADZfY9RmX5lX33xB7JFLnPO9sJVwwuuqrEA6Iq 2fuo4M1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfSbI-0000000B9Wv-08u1; Wed, 28 Feb 2024 22:40:32 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfSbE-0000000B9Vu-42nY for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2024 22:40:30 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-60966f363c1so2648597b3.3 for ; Wed, 28 Feb 2024 14:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709160027; x=1709764827; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=l+UTQgqjeTeuB4joWxs/sUGJ8L/gPUO2H1zeCMeGlUc=; b=RTKhRdzD/N2UlNuBkoHSqdSCuB3Ih3ShnfvJ00nCvwhRvQ/F9+nc6dAi9hYFSvl0zR YTCZKGzTz8fYx1at6SR14xy5A20wBqhZdry5mkT6/+hDWJ8FGNveiTYxdR3P829QIYMr 8dfhwKJOyLfncsiUX8IkLUr5/rA+xyh9pFDJZSlAXwozsQH3AGwNaBdnipqUsjVAP+0C kA4rv1RYHVh4mlAFsLg5yZKrMzZj4GVe4FN4+y7yXwQ7Twdtf+NupdKTneW90rsNy1As fB3BswVXolIrf8P9e2+7HddwZIFcjAicZCj1P4gdoQsx2Jvyg08OEEFwgMjS/uZfKLj3 Bdjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709160027; x=1709764827; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l+UTQgqjeTeuB4joWxs/sUGJ8L/gPUO2H1zeCMeGlUc=; b=Q4pjfMHfDw1YPuPrBsvY65ZQrvUMPQLAspu2CZ0SnTqMJyBlToVz6gXO4oK6ZBTAVg oOFoPihIdBdEsxFP3Afoiolt+XqQxyFfpGNKqJ0NV7qGbYe0AuccieTmBlCq66f4dX2E FBUgKoscjykZMB/pAaZiq65el93pqLz3rVekHF5PbhAhM6vPFdKj7E6wBvrmoAhXwVee vLCUuZcejblhy5Gu6qRQddgI/Z9PQp8tYQol6z44NZQ000ep/pKstc6zukwlWOfRwgby 0KzG33QzYx5OEPONIDkW/Zbn3HrMYMSP3F+LZSoCo6VWMDOs+1fm1gNhMnWJ242Vh0LK V83w== X-Forwarded-Encrypted: i=1; AJvYcCURmrIKUGSSU4whz1iRa2bhuSDr4R3gwa/NYc70SRW0iYEJbb572HP98BKflZDcWnuS0PR5dsWr6KexJ+u4BhcPbDpd1jIfUJiB3NbEHxzz55UCWdE= X-Gm-Message-State: AOJu0YyHx21koh4jDCx4fKwiG1CoIw73b5sSpECxA7/PZORImfojjLI/ oob5mxDhnVXlXPtSEIBhDH55pCnTGSYcnChHuTcWuQ79aUepNrCXTGwSaknNER3CYMoK5vlD5GV fUg== X-Google-Smtp-Source: AGHT+IFUPZtJnUkx4ZeqCTT90Ca+tWDsq48kFwktE+9CygIbxZw4LB/eimUqGjDzbeY7BpvlpduVfE/E17k= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:abc2:0:b0:dc7:48ce:d17f with SMTP id v60-20020a25abc2000000b00dc748ced17fmr140494ybi.10.1709160027352; Wed, 28 Feb 2024 14:40:27 -0800 (PST) Date: Wed, 28 Feb 2024 14:40:20 -0800 In-Reply-To: <170900037528.3692126.18029642068469384283.b4-ty@google.com> Mime-Version: 1.0 References: <20240223004258.3104051-1-seanjc@google.com> <170900037528.3692126.18029642068469384283.b4-ty@google.com> Message-ID: Subject: Re: [PATCH v9 00/11] KVM: selftests: Add SEV and SEV-ES smoke tests From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Vishal Annapurve , Ackerley Tng , Andrew Jones , Tom Lendacky , Michael Roth , Carlos Bilbao , Peter Gonda , Itaru Kitayama X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_144029_054365_52D080E4 X-CRM114-Status: GOOD ( 20.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 26, 2024, Sean Christopherson wrote: > On Thu, 22 Feb 2024 16:42:47 -0800, Sean Christopherson wrote: > > Add basic SEV and SEV-ES smoke tests. Unlike the intra-host migration tests, > > this one actually runs a small chunk of code in the guest. > > > > Unless anyone strongly objects to the quick and dirty approach I've taken for > > SEV-ES, I'll get all of this queued for 6.9 soon-ish. > > > > As for _why_ I added the quick-and-dirty SEV-ES testcase, I have a series to > > cleanup __svm_sev_es_vcpu_run(), and found out that apparently I have a version > > of OVMF that doesn't quite have to the right for SEV-ES, and so I > > could even get a "real" VM to reach KVM_RUN. I assumed (correctly, yay!) that > > hacking together a selftest would be faster than figuring out what firmware > > magic I am missing. > > > > [...] > > Applied to kvm-x86 selftests, thanks! > > [01/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype > https://github.com/kvm-x86/linux/commit/309d1ad7b6ff > [02/11] KVM: selftests: Make sparsebit structs const where appropriate > https://github.com/kvm-x86/linux/commit/6077c3ce4021 > [03/11] KVM: selftests: Add a macro to iterate over a sparsebit range > https://github.com/kvm-x86/linux/commit/8811565ff68e > [04/11] KVM: selftests: Add support for allocating/managing protected guest memory > https://github.com/kvm-x86/linux/commit/29e749e8faff > [05/11] KVM: selftests: Add support for protected vm_vaddr_* allocations > https://github.com/kvm-x86/linux/commit/1e3af7cf984a > [06/11] KVM: selftests: Explicitly ucall pool from shared memory > https://github.com/kvm-x86/linux/commit/5ef7196273b6 > [07/11] KVM: selftests: Allow tagging protected memory in guest page tables > https://github.com/kvm-x86/linux/commit/a8446cd81de8 > [08/11] KVM: selftests: Add library for creating and interacting with SEV guests > https://github.com/kvm-x86/linux/commit/f3ff1e9b2f9c > [09/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test > https://github.com/kvm-x86/linux/commit/0837ddb51f9b > [10/11] KVM: selftests: Add a basic SEV smoke test > https://github.com/kvm-x86/linux/commit/5101f1e27683 > [11/11] KVM: selftests: Add a basic SEV-ES smoke test > https://github.com/kvm-x86/linux/commit/f3750b0c7f6e FYI, the hashes changed due to a force push to squash a bug in a different series. [1/11] KVM: selftests: Extend VM creation's @shape to allow control of VM subtype https://github.com/kvm-x86/linux/commit/126190379c57 [2/11] KVM: selftests: Make sparsebit structs const where appropriate https://github.com/kvm-x86/linux/commit/35f50c91c43e [3/11] KVM: selftests: Add a macro to iterate over a sparsebit range https://github.com/kvm-x86/linux/commit/57e19f057758 [4/11] KVM: selftests: Add support for allocating/managing protected guest memory https://github.com/kvm-x86/linux/commit/cd8eb2913205 [5/11] KVM: selftests: Add support for protected vm_vaddr_* allocations https://github.com/kvm-x86/linux/commit/d210eebb51a2 [6/11] KVM: selftests: Explicitly ucall pool from shared memory https://github.com/kvm-x86/linux/commit/31e00dae72fd [7/11] KVM: selftests: Allow tagging protected memory in guest page tables https://github.com/kvm-x86/linux/commit/bf47e87c65be [8/11] KVM: selftests: Add library for creating and interacting with SEV guests https://github.com/kvm-x86/linux/commit/bdceeebcddb8 [9/11] KVM: selftests: Use the SEV library APIs in the intra-host migration test https://github.com/kvm-x86/linux/commit/8b174eb9d289 [10/11] KVM: selftests: Add a basic SEV smoke test https://github.com/kvm-x86/linux/commit/faa0d7027de3 [11/11] KVM: selftests: Add a basic SEV-ES smoke test https://github.com/kvm-x86/linux/commit/974ba6f0e595 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel