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 X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F33C4338F for ; Mon, 23 Aug 2021 12:26:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8B746137D for ; Mon, 23 Aug 2021 12:26:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236894AbhHWM1Q (ORCPT ); Mon, 23 Aug 2021 08:27:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41965 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233755AbhHWM1P (ORCPT ); Mon, 23 Aug 2021 08:27:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629721592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RJ0AqHRn6/2wVuM6tXEF47SarvthZwWj7KBw4eo8LnU=; b=KPOK/ZLHQq6ed4w4BT7cTdLfU/vl+Dz8/nRp97rsC9hxnIuBobGrE1Ala0pX0OEwRKoQ5p YgFeB+gEAiDXwvhKPL3dOjAfq61PEPKQE/x7+HDqytJg4sdTtJmCE57EAqrCiwKJwgKK6j 5XBuukIx1x1PVZAY/qCXbIZ1vrpg3HI= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-iy5vczT-MaWd_nfRRx5b_w-1; Mon, 23 Aug 2021 08:26:31 -0400 X-MC-Unique: iy5vczT-MaWd_nfRRx5b_w-1 Received: by mail-wr1-f70.google.com with SMTP id v18-20020adfe2920000b029013bbfb19640so4996121wri.17 for ; Mon, 23 Aug 2021 05:26:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RJ0AqHRn6/2wVuM6tXEF47SarvthZwWj7KBw4eo8LnU=; b=n7GZzYq/GGMSEEfhDELokfN25mj3sE4/Hy8E/fAV8192xCd7D8viW9QToX4lkzpxFw P6P66CUHmLP6S0FipJKT9jVM4we2r8GAf12j3DGPoKhJ/ZgQrKaBr4qQyOB0oEk77sWI IugpIYxbYLwi3YK3uexM6MC94p8JNbKfql27jslL2qZig3cP7Vg0ACyRCsv7yBgV1/Qz w5uQ3MVyg1AvKS3xyFJViTNSVATACCC1zObSq6MMlCQbWW9/kqNyirzlMoL7j08nphH2 ype69ayfFSXw+LCJdcOHi2dzT3fEUBE8eTxdfqb1k/2g8mbaGNYLoc1RwKRoNDCVbE1Q GGqA== X-Gm-Message-State: AOAM5317/j7TCVF3I8VglgMHwiw2IrSFn4Kv2urXHcwMbCJTajkmvf9V Di9UKetH/WvVI3t3Hi/7H74SrKnFd90IDR9ISJyra4ffm3E1taGtmSerPlBhIe8hxuh7MBHv0v6 zPqTQp4LrINID X-Received: by 2002:a7b:c7cd:: with SMTP id z13mr10147543wmk.51.1629721590053; Mon, 23 Aug 2021 05:26:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWLrdzq7RAAw59P7YJ7wuwSOMa04Vxu2eLXc27mIUEoBjuTzPG0WAOjZHpS1Vxxbr90mRAOw== X-Received: by 2002:a7b:c7cd:: with SMTP id z13mr10147527wmk.51.1629721589816; Mon, 23 Aug 2021 05:26:29 -0700 (PDT) Received: from work-vm (cpc109021-salf6-2-0-cust453.10-2.cable.virginm.net. [82.29.237.198]) by smtp.gmail.com with ESMTPSA id l12sm12703907wms.24.2021.08.23.05.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 05:26:29 -0700 (PDT) Date: Mon, 23 Aug 2021 13:26:27 +0100 From: "Dr. David Alan Gilbert" To: James Bottomley Cc: Tobin Feldman-Fitzthum , Steve Rutherford , Paolo Bonzini , Ashish Kalra , thomas.lendacky@amd.com, brijesh.singh@amd.com, ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, tobin@ibm.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, frankeh@us.ibm.com, dovmurik@linux.vnet.ibm.com Subject: Re: [RFC PATCH 00/13] Add support for Mirror VM. Message-ID: References: <0fcfafde-a690-f53a-01fc-542054948bb2@redhat.com> <37796fd1-bbc2-f22c-b786-eb44f4d473b9@linux.ibm.com> <458ba932-5150-8706-3958-caa4cc67c8e3@linux.ibm.com> <538733190532643cc19b6e30f0eda4dd1bc2a767.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org * James Bottomley (jejb@linux.ibm.com) wrote: > On Thu, 2021-08-19 at 15:28 +0100, Dr. David Alan Gilbert wrote: > > * James Bottomley (jejb@linux.ibm.com) wrote: > > > On Thu, 2021-08-19 at 09:22 +0100, Dr. David Alan Gilbert wrote: > [...] > > > > I think it really does have to cope with migration to a new > > > > version of host. > > > > > > Well, you're thinking of OVMF as belonging to the host because of > > > the way it is supplied, but think about the way it works in > > > practice now, forgetting about confidential computing: OVMF is RAM > > > resident in ordinary guests, so when you migrate them, the whole of > > > OVMF (or at least what's left at runtime) goes with the migration, > > > thus it's not possible to change the guest OVMF by migration. The > > > above is really just an extension of that principle, the only > > > difference for confidential computing being you have to have an > > > image of the current OVMF ROM in the target to seed migration. > > > > > > Technically, the problem is we can't overwrite running code and > > > once the guest is re-sited to the target, the OVMF there has to > > > match exactly what was on the source for the RT to still > > > function. Once the migration has run, the OVMF on the target must > > > be identical to what was on the source (including internally > > > allocated OVMF memory), and if we can't copy the MH code, we have > > > to rely on the target image providing this identical code and we > > > copy the rest. > > > > I'm OK with the OVMF now being part of the guest image, and having to > > exist on both; it's a bit delicate though unless we have a way to > > check it (is there an attest of the destination happening here?) > > There will be in the final version. The attestations of the source and > target, being the hash of the OVMF (with the registers in the -ES > case), should be the same (modulo any firmware updates to the PSP, > whose firmware version is also hashed) to guarantee the OVMF is the > same on both sides. We'll definitely take an action to get QEMU to > verify this ... made a lot easier now we have signed attestations ... Hmm; I'm not sure you're allowed to have QEMU verify that - we don't trust it; you need to have either the firmware say it's OK to migrate to the destination (using the existing PSP mechanism) or get the source MH to verify a quote from the destination. [Somewhere along the line, if you're not using the PSP, I think you also need to check the guest policy to check it is allowed to migrate]. Dave > James > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK 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 X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD88EC4320A for ; Mon, 23 Aug 2021 12:31:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64FD56137D for ; Mon, 23 Aug 2021 12:31:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 64FD56137D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:32774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI96W-0007NC-D4 for qemu-devel@archiver.kernel.org; Mon, 23 Aug 2021 08:31:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI92G-0003Db-2M for qemu-devel@nongnu.org; Mon, 23 Aug 2021 08:26:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI92B-0003ra-M9 for qemu-devel@nongnu.org; Mon, 23 Aug 2021 08:26:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629721592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RJ0AqHRn6/2wVuM6tXEF47SarvthZwWj7KBw4eo8LnU=; b=KPOK/ZLHQq6ed4w4BT7cTdLfU/vl+Dz8/nRp97rsC9hxnIuBobGrE1Ala0pX0OEwRKoQ5p YgFeB+gEAiDXwvhKPL3dOjAfq61PEPKQE/x7+HDqytJg4sdTtJmCE57EAqrCiwKJwgKK6j 5XBuukIx1x1PVZAY/qCXbIZ1vrpg3HI= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-R3fHa-9YNFOCTbkUeyvhNg-1; Mon, 23 Aug 2021 08:26:31 -0400 X-MC-Unique: R3fHa-9YNFOCTbkUeyvhNg-1 Received: by mail-wm1-f71.google.com with SMTP id c2-20020a7bc8420000b0290238db573ab7so8400528wml.5 for ; Mon, 23 Aug 2021 05:26:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RJ0AqHRn6/2wVuM6tXEF47SarvthZwWj7KBw4eo8LnU=; b=i5QcEipGDZGzmWFCe8IkVIaJ3U2sGX5kA1y9fBTiDMZwhI+ZaLtxMwE8ow5wJZ1peD TSdy+lQlXSflm0iBGyNPvr/m4VjgH2WhrkYHpcy9MzPsaVxYw/ISr1Wy5KnaYAJeRf18 SWaXGegGOuVrz0pw6ya78CRNN1NUo+v3fzPP1qEuOfWWc7l/j84Nk+LfgTjOFSTkeE/0 DTlwMy/PF3gSAgYidyJD7fGlz5ipewB904WuVIpZZVm3cLTL0NQCIOzFgmO8aBFTIltK IsjKV6msWQdSG4Y4DvSqhZ1fCW2/nKman7I9yotvwWwKFxxdOy8EXThxCQoHk1sXnCGm 3mLQ== X-Gm-Message-State: AOAM532zfNZi0vEooKkEJAyChZ7FdRgr0CEv+RIxUtTbqbo1VJ0+68km 0Gpqll8le1OUGo6UgyaqaNxE4Ttft1skJQmdpbRoJ0gaEwAX9ztbpcq1nXmumZMLhG5z07FUOhB 6VxDYTdoNoC7Ls4Y= X-Received: by 2002:a7b:c7cd:: with SMTP id z13mr10147552wmk.51.1629721590054; Mon, 23 Aug 2021 05:26:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWLrdzq7RAAw59P7YJ7wuwSOMa04Vxu2eLXc27mIUEoBjuTzPG0WAOjZHpS1Vxxbr90mRAOw== X-Received: by 2002:a7b:c7cd:: with SMTP id z13mr10147527wmk.51.1629721589816; Mon, 23 Aug 2021 05:26:29 -0700 (PDT) Received: from work-vm (cpc109021-salf6-2-0-cust453.10-2.cable.virginm.net. [82.29.237.198]) by smtp.gmail.com with ESMTPSA id l12sm12703907wms.24.2021.08.23.05.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 05:26:29 -0700 (PDT) Date: Mon, 23 Aug 2021 13:26:27 +0100 From: "Dr. David Alan Gilbert" To: James Bottomley Subject: Re: [RFC PATCH 00/13] Add support for Mirror VM. Message-ID: References: <0fcfafde-a690-f53a-01fc-542054948bb2@redhat.com> <37796fd1-bbc2-f22c-b786-eb44f4d473b9@linux.ibm.com> <458ba932-5150-8706-3958-caa4cc67c8e3@linux.ibm.com> <538733190532643cc19b6e30f0eda4dd1bc2a767.camel@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.743, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.lendacky@amd.com, Ashish Kalra , brijesh.singh@amd.com, ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, Steve Rutherford , richard.henderson@linaro.org, tobin@ibm.com, qemu-devel@nongnu.org, frankeh@us.ibm.com, Tobin Feldman-Fitzthum , Paolo Bonzini , dovmurik@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" * James Bottomley (jejb@linux.ibm.com) wrote: > On Thu, 2021-08-19 at 15:28 +0100, Dr. David Alan Gilbert wrote: > > * James Bottomley (jejb@linux.ibm.com) wrote: > > > On Thu, 2021-08-19 at 09:22 +0100, Dr. David Alan Gilbert wrote: > [...] > > > > I think it really does have to cope with migration to a new > > > > version of host. > > > > > > Well, you're thinking of OVMF as belonging to the host because of > > > the way it is supplied, but think about the way it works in > > > practice now, forgetting about confidential computing: OVMF is RAM > > > resident in ordinary guests, so when you migrate them, the whole of > > > OVMF (or at least what's left at runtime) goes with the migration, > > > thus it's not possible to change the guest OVMF by migration. The > > > above is really just an extension of that principle, the only > > > difference for confidential computing being you have to have an > > > image of the current OVMF ROM in the target to seed migration. > > > > > > Technically, the problem is we can't overwrite running code and > > > once the guest is re-sited to the target, the OVMF there has to > > > match exactly what was on the source for the RT to still > > > function. Once the migration has run, the OVMF on the target must > > > be identical to what was on the source (including internally > > > allocated OVMF memory), and if we can't copy the MH code, we have > > > to rely on the target image providing this identical code and we > > > copy the rest. > > > > I'm OK with the OVMF now being part of the guest image, and having to > > exist on both; it's a bit delicate though unless we have a way to > > check it (is there an attest of the destination happening here?) > > There will be in the final version. The attestations of the source and > target, being the hash of the OVMF (with the registers in the -ES > case), should be the same (modulo any firmware updates to the PSP, > whose firmware version is also hashed) to guarantee the OVMF is the > same on both sides. We'll definitely take an action to get QEMU to > verify this ... made a lot easier now we have signed attestations ... Hmm; I'm not sure you're allowed to have QEMU verify that - we don't trust it; you need to have either the firmware say it's OK to migrate to the destination (using the existing PSP mechanism) or get the source MH to verify a quote from the destination. [Somewhere along the line, if you're not using the PSP, I think you also need to check the guest policy to check it is allowed to migrate]. Dave > James > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK