Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp892884rbd; Fri, 23 Feb 2024 06:54:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVzgEYmjQLwp6YyO249bsUfLbAwutZpmPlsoGHcdL9DWQTj5NyV09kZXm09DT5DBkLgiwu+DVL4S/0NmK0Fb2BI2AQ1VcB02opGwMufXw== X-Google-Smtp-Source: AGHT+IGVUldk/NZuPavx3Xs6dxTn373hENLuZyX3vmLnSSThD1avJ/6Qe9TWplcon5/avS8U+11G X-Received: by 2002:a05:620a:1676:b0:787:6c14:e934 with SMTP id d22-20020a05620a167600b007876c14e934mr42695qko.29.1708700043441; Fri, 23 Feb 2024 06:54:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708700043; cv=pass; d=google.com; s=arc-20160816; b=xXaTXApEy+oEvz2/X6p2i1EgXxjYeNkAsSySdqxtQ5JynYjZSBIVBoQ3gygEcy6Zm4 g2Om5+QNOtoFN0IDs/cVHLFEPIWzL2FdobasU2cqdiTyEo4RBMRZJ/B+9YfjYeuAA19s ssUB40K2IsmNtgqej1xp4UC2+tb0jnTcgXNHv1u4ZNj/Cy34rGErrZQeYHCc03L3Cp1O PHYQM8EyNihLorNdHoizWQempJ5R8bnedlrHupSUIsagdFYGiFGhK0NhbMLAAnrZg7AT XPtw4OXLquPs0K2/ekj8EzBEFewIIOsRX0Sl8yqVJDmyIsOjEy7TQ9xMFBjUQ6tGwiKH dSvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=l+Bp0j81YCtt42ZPmce2E9eJ5egKQ53HbTyLQykPyKo=; fh=snuN8lTu7CCcd4L/3/zvkp75hhbwDFXBlKsWrCpSFxM=; b=Lp4sJhXYsSPQlCNYnDUkMSQen37CuJw5PffNY5hjpmMnZ3Z+wEvTrvwlbM3WWyl4vR ShESqY73OXLCZX90KzMSwqFxKYu0NaeqHyWHzxFnbXniDSqKIIl/32Z4X7kUeJ7jvCeL SAMGSnrK4RHAKcL5pDSPaxaD8kRU5g0BChwNTpL541kTMKrTk0mtDZa5Cj5FzaQGpxOd cdHLJADzdhhiAvhD6lVPB/yVrl2GZUJzBZX0riZMjc9gTwJUDsaT9B+g0hBSsIUCe1tP hqe8zkA7kPWoGVLcx0aQQxv5WGLboywfVzDgsPE2/z62nsWDEZ75l1gJtzFXWt97qf+v 9mtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g6A6twrN; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-78545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l4-20020a37f504000000b0078770e84db6si9366962qkk.511.2024.02.23.06.54.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 06:54:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g6A6twrN; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-78545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 32AE81C23272 for ; Fri, 23 Feb 2024 14:54:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C00980C19; Fri, 23 Feb 2024 14:52:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="g6A6twrN" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (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 07E174A3D for ; Fri, 23 Feb 2024 14:52:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708699978; cv=none; b=nw80mM68ial0Zk9DqRo5Lo78bQAzcPQhu0r3cvpjt6GuqSVbjlebk1b4LyszLt1xEpIplvtI2npadD7OO2OVX02eivMqn3TXK9AtEGB3C+UPw7DSid6gych6XSs6p6vMh13mKar8NwlI5WMcFIUeN+AHzhPNFPX7qK2Ps0nIvtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708699978; c=relaxed/simple; bh=sgx0r1cn9JSy0yPc7VwhrZv9QBTVEh5xLqCzgNCv6v8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=XppVOhbdU1DxOk7w2nrdb9rYGR7bAlVT/sjc0MuVO0uRkAgTpOvRyahJAOcjdrLr9rSctwKHNsGQVyPmXpbzO1K5j8JaUpF50Tt2VDIlBX3fZgwDPVilFZJ06bTuzhTY59oDqs/xgoQO7teltJO16mfMtKK8Qijo9VbrZFa2L6g= 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=g6A6twrN; arc=none smtp.client-ip=209.85.128.201 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 Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-607838c0800so3559007b3.1 for ; Fri, 23 Feb 2024 06:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708699976; x=1709304776; darn=vger.kernel.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+Bp0j81YCtt42ZPmce2E9eJ5egKQ53HbTyLQykPyKo=; b=g6A6twrNqwBZfmb2TSFOpBGFS5fHhoy7Aj226PIEwoCwLZxU+I1uhA9PhkEjgYogzI emVFX18YWO6Jfi6d5WufvSmJXgo+yEUzGviz1wC3a81ZWu1vqfjOCzmFS3YmsSJebaC4 /tgQF4ApSEqlYXkG3uK21HzY1DECFQd9ggTWpzHUJ4E6rbcgX/gIbnFhy4qY+dGaBqIC BbaHgkEzy130mYcXUIea+08AwDaRc8ep1W971abun5TiWqOsvTVCMRYGD9Qt/Xfa6LLY 2rFDRGSYwjEQM2tMPB2WiIDCukXgFV1gVPnKEiV+IAaKHdzd5ab3Tk23NqKzR6S3HIft 1lhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708699976; x=1709304776; 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+Bp0j81YCtt42ZPmce2E9eJ5egKQ53HbTyLQykPyKo=; b=wqAhWCVrepNMqDRfAkiq3Jt4g3Abrxs60owPDkJDLvcjQ00558M6Qrfd7T8ug5tJ0A VaGIykgojaVwL9KXF9pyLYezhXjuPcLI9WIh6ry/+UtI+3DBveO+i4d+dS7ZYV7ORnIu XHGZbqOKD2wOcVrcJTRbOoivJimr6OLWq2qWaeQO7fqyzH6p+SEcwR0nbC8TDT8J5ps/ k3KCuJekbImRMHNajpr+CkZz3Z0v28hpgTmBDvIOP5u4R8MIIsKymQnOeiQBC92ThHly uBkfdbsauBiexcXsPgibJs/g16gte3BmRT4yBwOpUiLlRfbHrm4uTXcgYRnK5zpqfN2V wJtg== X-Gm-Message-State: AOJu0Yzt18nrHQ1WYmiID0wvpYi+pNl0CbZ3ZsBF+nxmWj7z42GbHFbs 7n2qiNTbDKqpd20l1Nyo2oYTrpJYYh1juRj3s7YrmLWyfjzCm8epmBtB2hJ8UKTvt4bEcjpYyjn nZA== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:9bc8:0:b0:dc7:4ca0:cbf0 with SMTP id w8-20020a259bc8000000b00dc74ca0cbf0mr972ybo.3.1708699975965; Fri, 23 Feb 2024 06:52:55 -0800 (PST) Date: Fri, 23 Feb 2024 06:52:54 -0800 In-Reply-To: <20240223104009.632194-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240223104009.632194-1-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH v2 00/11] KVM: SEV: allow customizing VMSA features From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, michael.roth@amd.com, aik@amd.com Content-Type: text/plain; charset="us-ascii" On Fri, Feb 23, 2024, Paolo Bonzini wrote: > Paolo Bonzini (11): > KVM: SEV: fix compat ABI for KVM_MEMORY_ENCRYPT_OP > KVM: introduce new vendor op for KVM_GET_DEVICE_ATTR > Documentation: kvm/sev: separate description of firmware > KVM: SEV: publish supported VMSA features > KVM: SEV: store VMSA features in kvm_sev_info > KVM: SEV: disable DEBUG_SWAP by default > KVM: x86: define standard behavior for bits 0/1 of VM type > KVM: x86: Add is_vm_type_supported callback > KVM: SEV: define VM types for SEV and SEV-ES > KVM: SEV: introduce KVM_SEV_INIT2 operation > selftests: kvm: add tests for KVM_SEV_INIT2 > > Documentation/virt/kvm/api.rst | 2 + > .../virt/kvm/x86/amd-memory-encryption.rst | 81 +++++++-- > arch/x86/include/asm/kvm-x86-ops.h | 2 + > arch/x86/include/asm/kvm_host.h | 11 +- > arch/x86/include/uapi/asm/kvm.h | 35 ++++ > arch/x86/kvm/svm/sev.c | 110 +++++++++++- > arch/x86/kvm/svm/svm.c | 14 +- > arch/x86/kvm/svm/svm.h | 6 +- > arch/x86/kvm/x86.c | 157 ++++++++++++++---- > tools/testing/selftests/kvm/Makefile | 1 + > .../selftests/kvm/include/kvm_util_base.h | 6 +- > .../selftests/kvm/set_memory_region_test.c | 8 +- > .../selftests/kvm/x86_64/sev_init2_tests.c | 146 ++++++++++++++++ > 13 files changed, 510 insertions(+), 69 deletions(-) > create mode 100644 tools/testing/selftests/kvm/x86_64/sev_init2_tests.c FYI, there are 4-5 minor conflicts with kvm-x86/next, and going off my memory, I think the conflicts come from ~3 different topic branches. Given that this is based on kvm/next, I assume it's destined for 6.9. So maybe rebase on kvm-x86/next for v3, and then I'll get my 6.9 pull requests sent for the conflicting branches early next week so that this can land in a topic branch that's based on kvm/next?