Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2805898pxb; Tue, 21 Sep 2021 08:04:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkEnhUFmWz2iSAH2FfpA573twWQ6MXkscoZQsNoBvd/xIT9FnIkhFeYGyBhnA91o3aHSCM X-Received: by 2002:a6b:4f04:: with SMTP id d4mr341581iob.95.1632236699538; Tue, 21 Sep 2021 08:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632236699; cv=none; d=google.com; s=arc-20160816; b=KJiGqodwuMFo9/Xw656zPDaK6ANA2yJOPGpthXIFSuPJIWGxfOmnbqRNhEKG6vMjit C34g4BQXUabvHik3qUocQTqheJwOwT4UW7A9GL3Xw29i4BFlyRfOI7oWVHsHjEGxAg90 IfjO29YIjTRx7j9kXumEmoS6rQ7j77++LQntGInlOjWBfSH//NLrEuE9UQO/ylNsysS2 EeShL9DtDMMUW461kzoVHSj8c1YjmkIiF85YF3GzqhIciMFsvzZ59l2/+19f9JpXxgC/ nR/0oCIzBt4MZtzmKZCAqAIMqwqv+BZ7qkrW8F7p+SSBelEOziNrD0e4RydwZGqs/vQQ X5+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=L/4OnH+mvURjID3uqU8rRzyG0pt7Jf+RfI2TY4GAoXI=; b=H06Yc2vCaGAH692/8gntLy3UUiPTbLf2r6wZ5MweB5MrgbJwwe/QaipJMMFHQENBdV pd1D+0T4cLrKIeveQZmZLkcD31EKGqb23D7h7jv2W912Ao6o+y4uxU7o9HeelMwwx2ut Rh3Tm6TEOae4rIZqmklSUT9GglzEfNYzFkoWWXnu5ypDHiPw9wAuUpxnxf1hdDhEB/kG zoRaxYgJc/8DAiWKLyScRJjSdAC5d0X/pIlXECTFnLUsBLohsNkQi9iomuDAHyvA5XoC zJ88lwRvAIRoeLLh85wjG9ejUE0vTT31aTeWDRAzxDf8aOQWQOZ+BR5yvEqeL6qpgVrH CUdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=H4W4p4bF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si10904551ilc.109.2021.09.21.08.04.46; Tue, 21 Sep 2021 08:04:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=H4W4p4bF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233853AbhIUPFT (ORCPT + 99 others); Tue, 21 Sep 2021 11:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbhIUPFS (ORCPT ); Tue, 21 Sep 2021 11:05:18 -0400 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0537C061574 for ; Tue, 21 Sep 2021 08:03:49 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id a15-20020a0ce34f000000b0037a944f655dso227610472qvm.5 for ; Tue, 21 Sep 2021 08:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=L/4OnH+mvURjID3uqU8rRzyG0pt7Jf+RfI2TY4GAoXI=; b=H4W4p4bFnJk+FJOYa/Qnb4t8nVwi8/HlId2FwiQtRMq7H9DWq6d4oaRvFQoZRitZBk bqGX3I4mhy+dYHHLPAubIAoSpsT5VcyyUkq4aqQD8+9n19TxVZ9/R/2mamtGtNLDqSE+ TbTkuQhMbOfm0b6QuUMu5xLJAgK1a2h0skpwXVybU/UI2qjgHKmGSeGPJQt7Gl3jFLva miI3Oa0CpypicCSwy7lrJlYRjio4nc9zOVo6mPPNLA5kKd51zIYQzEH5PnuHEv4z8eTQ DZGlrmLxBnYz1kAX9lQiobRDD5NLDO6iEGt7ySDhnS/klDX0OJf/NJf8Re5Kn6P8sGuw KmCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=L/4OnH+mvURjID3uqU8rRzyG0pt7Jf+RfI2TY4GAoXI=; b=pdlek1uABFPSp7I3HEG6+VO/5cZS3FgofVlSftQ/anDuVXvvgcBKRpXfbYSCd0oTPm XcLiYKm2E6gRvYiH6BFN8c+PaQWiwyn/uOSg+jGX5sR1rzyWewXr9bdglR6OYOypO9VE ImD0KSMMvLHiyrHipmicD+jMhryO439ZQoZ1eMi/5u3iv4g3o9qP2+cIpF3OCpk8Z70x u/doeXQtGWPCFKmaUO4qLn91Vok3z2s0bdJ2YadPPR4jMyQadAikDDoOcE3CSyhn5ZW5 zpOBf1UGpMAeTD09KkRwCCvSaHEVb6pbUeadUn2IwT5K3ceQrvV+Kw8AROy6v8+H7iu9 XrxQ== X-Gm-Message-State: AOAM531pZGvBHbOD5FM8SFu9O8lxduFWHBAoLj3GusSsUdq/NUaq3dzo sXdvps5Ib8c2xMUMv9VhpQ3jteomIuM= X-Received: from pgonda1.kir.corp.google.com ([2620:15c:29:204:784b:c8dc:f1c:ecde]) (user=pgonda job=sendgmr) by 2002:a25:afce:: with SMTP id d14mr38390368ybj.14.1632236628868; Tue, 21 Sep 2021 08:03:48 -0700 (PDT) Date: Tue, 21 Sep 2021 08:03:43 -0700 Message-Id: <20210921150345.2221634-1-pgonda@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog Subject: [PATCH 0/2] KVM: SEV: Allow for mirroring of SEV-ES VMs From: Peter Gonda To: kvm@vger.kernel.org Cc: Peter Gonda , Marc Orr , Nathan Tempelman , Paolo Bonzini , Sean Christopherson , Steve Rutherford , Brijesh Singh , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To mirror SEV-ES VMs the mirror VM needs to call LAUNCH_UPDATE_VMSA before the original VM runs LAUNCH_FINISH. This allows the mirror's vCPUs to be encrypted into the SEV-ES guests context and measured into the launch digest. Peter Gonda (2): KVM: SEV: Update svm_vm_copy_asid_from for SEV-ES KVM: SEV: Allow launch vmsa from mirror VM arch/x86/kvm/svm/sev.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) Cc: Marc Orr Cc: Nathan Tempelman Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Steve Rutherford Cc: Brijesh Singh Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org -- 2.33.0.464.g1972c5931b-goog