Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3287598pxj; Mon, 14 Jun 2021 20:03:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbTQM8fk2dBpOssYQTmdk+oQeNNIEs/BBZDo7EuijQRA+aHDLijvqoah8E4l1p9lDxVrKE X-Received: by 2002:a92:da0d:: with SMTP id z13mr16177246ilm.18.1623726194907; Mon, 14 Jun 2021 20:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623726194; cv=none; d=google.com; s=arc-20160816; b=FEwTTpm7/NjE32mXjci5MVI4czac6a0VL/dT3vCKpcPzGlREfJUby0iuCCnexEflE9 tsXhkTHErulJqu+gj/KzhW8B8oBGzhLv4+UrYZTNJFxIRjvit2cI7Rwb3dMIyba+8L8Q vzgQynHs53oNcePPOa7jXT/goA5Gsn8o3pvzRIagosKamY5KJ9eg1YZLKPL8uKNP0GoA IIiT4dFvpI0VmN/1uLADzx/A/hvRu2+Ck3KAK5fFNgUgI0W8gtmwCjyJE+Yj02OX7kAm Bo1Gs9QvomF78Oi22zw+vrBKGzmAK3eMGX/ygrhEIZI8A5huuHk1+dH9G/nYyy6ql5CL zjcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lbogKHW8qkKdGG4ctidnUD+FZuRlje0jwgTya1yLZHg=; b=nBSlOwE8ouXOKL9U0XhI1uPpJhrvduisssojm6in3KxYJf5N6C/zolVMQsIK1ZJ6Rc vSkPBMNLhgXpqlR7o9kAWLrt0a8tqKILBXZCaxgB9SNNDz9iEAOkdCJXzY7BkfXRfKl2 mPAfYDkv6Q94DexV6S9BiXmnMZR3tPLW+OvANRbrx8GyLJlybxvTBm9ZSN+XJNfKl2CJ a8sRcAjmHC6gog9d1mbhDC/8di2y5rwzlKWLfzgl2N7xDn12y8WN9CXZ5LbN1KYViJTQ 03WnFVkxSW1xciadbbfZjFp/G4MFOlRfblwxsXSV7kzqbh1MWUcyAzx0juX3/BVR+LfL ZmZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X7ekhUyS; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si20128782jad.33.2021.06.14.20.03.03; Mon, 14 Jun 2021 20:03:14 -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=@gmail.com header.s=20161025 header.b=X7ekhUyS; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbhFODDu (ORCPT + 99 others); Mon, 14 Jun 2021 23:03:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbhFODDs (ORCPT ); Mon, 14 Jun 2021 23:03:48 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66909C0617AF; Mon, 14 Jun 2021 20:01:44 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id x196so16678122oif.10; Mon, 14 Jun 2021 20:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lbogKHW8qkKdGG4ctidnUD+FZuRlje0jwgTya1yLZHg=; b=X7ekhUySfyrlRCdPDw/Egqzv7vbiolEHNPnzmqO7fUlO+/7gvmKgPMqc1FK7EMjPzV 2MwjNcrADpX3M9K5iGiziyeRju65eYqDCJXGGgiOdQ8I9ppRsdq8As9IHfdAp9mWFV+T zWaS3BlP2EP8kmolk0N469EDqkznplPXvE+6bK0tmRge/jwNCGoeNeISZXamiS/UG6cq P3ijHqleogyY4vgO/JY0wabhEWGfc7eD7ilk7sXpLno/aDV03tZllCRe1wWibYGvANG5 6CFqIFSYwrhfwczVdgcecox/FTZCj9/hHmDJGDgS1bHIdIaxB8mE2/f5youniiHbYa1b Anvw== 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=lbogKHW8qkKdGG4ctidnUD+FZuRlje0jwgTya1yLZHg=; b=KaMH3DMXHzxgHxCPhfBy29r0bdMc4HyuN/Zwv0L4dxnEgcKN6tqYYIKJ6MiYARoiWC mWwKNYp5sQsq7xdAmu1NFAV3apzb1lec/Bcc9R0lyWIDLD9NgeEigUdJOdLr3pYBO88F vn3YHZLOTkif4byrzb/qwhLjvCwM5TyzCGbsS4XLKeOUyJF1+eqzDjBnl4yDPjE+Out9 vy9P77v8FE8BPE3O9GkKaO4At56v0j8AEjjrijzlhoCs5iCTdS+cSjE+h72jqwUtxGvq nqcGquenYPPn0lG2rQ6qisMXbjv5hIlEwwiVUAb+342L0pNFMCz4TcROQadehYQIjVsH Ob1w== X-Gm-Message-State: AOAM532W+X+Z2XLYUYO3gRoU3b6CaIfCpuoXuz96uZX3ZuKBdMr6xmN8 Sej2/ZrWJaCdf5RC6T54+wMOAkhO7Nc= X-Received: by 2002:a17:90a:aa8c:: with SMTP id l12mr2077416pjq.90.1623719444134; Mon, 14 Jun 2021 18:10:44 -0700 (PDT) Received: from localhost ([2601:647:4600:1ed4:adaa:7ff5:893e:b91]) by smtp.gmail.com with ESMTPSA id n129sm13416200pfn.167.2021.06.14.18.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 18:10:43 -0700 (PDT) Date: Mon, 14 Jun 2021 18:10:42 -0700 From: Isaku Yamahata To: Erdem Aktas Cc: "Yamahata, Isaku" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , x86 , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, isaku.yamahata@gmail.com, Sean Christopherson , Xiaoyao Li , Kai Huang , Isaku Yamahata Subject: Re: [RFC PATCH 64/67] KVM: TDX: Add "basic" support for building and running Trust Domains Message-ID: <20210615011042.GA4075334@private.email.ne.jp> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 07:33:29PM -0700, Erdem Aktas wrote: > some more feedback on KVM_TDX_INIT_MEM_REGION: > > KVM_TDX_INIT_MEM_REGION requires a source and destination address > which is a little counterintuitive (debatable). I think this requires > better documentation to explain the usage better. I was wrongly > expecting to provide the guest memory which has the code as a pointer > and expecting it to be in-place measured and encrypted. > > KVM_TDX_INIT_MEM_REGION crashes the host when: > * Target gpa is not valid or not backed by a page > * When source and destination overlap Thanks for feedback. On next respin, I'm going to document new API more. -- Isaku Yamahata