Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp663155pxj; Thu, 3 Jun 2021 16:36:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVKsCkJEHlbtwy/UmxNWdzLqzctBv2AsYPPw+fqhlUpsrBHXmnd4rCGIlKNG5HhHlLxdda X-Received: by 2002:a17:906:e88:: with SMTP id p8mr1528762ejf.105.1622763391113; Thu, 03 Jun 2021 16:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622763391; cv=none; d=google.com; s=arc-20160816; b=Gdj+D5zHCm2ttDk33Jt+R7RjQ+wA9PU5SM4fHxJ2/HulYxx2eGZPoiMkh985QTUtOX ozo1RohpM/GPRS1YEj7K+7rlI86DRU4GexT32hqnLCMww+neWd1Q5ODaiz2XT5LsPslU JgjSTueoRys+GTqyV3NZd7lnoR98e/hMm7vAVo90bJpkoZBLJFIsIkU15eZqvPWwplhh LcWMgCckiSMYe9nJFJBmVQ3JAYtjItO9yuIzJ3/cYq01yQT472FgncQPgYwG0u4zrvBM xca5PEm6t6AvTRyf+Qs26mfcYoo1Haixzpw351Kl/gmfgUe2ukS5sCxjYkjPczV2dr2f X9NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=Nm6AlOLVmZwgkYOBbZa9wvTDsMlgIwmKCIMSNiEp2hI=; b=fgIP0k1HHTHQndOuLKDlgbKlzMrsTl3PYSmbp8dTtzD3uuTcq4ARxBQMhXfiAKfKTH lQp/ICO2XFFTgfGMIwJMISsSGJUoi4I58y8BgxO8N/hB60cvIj6weXrzZ7+KwrMy5eex uvYIkZTgsGr9wDUGdkVfFtJ+9H3c0x0N1qKJnXMAuMrj5i6N5DuoMg5Kh0ru3c6AjZug Zh/igSM9RLaIi5JsRWZFgNEf+cBz2Plbl62cqkeF9fsAR3a2elh/eDyVPGFAJQCZ/f7z iVW7EGaPAQd5TwhSDBdf3iikhBVE+3tqv2TQFEeOZodi53kdB1eDypF+1kT53VovM22V PQGg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si3901750eje.114.2021.06.03.16.36.07; Thu, 03 Jun 2021 16:36:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbhFCXes (ORCPT + 99 others); Thu, 3 Jun 2021 19:34:48 -0400 Received: from mga01.intel.com ([192.55.52.88]:61135 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbhFCXer (ORCPT ); Thu, 3 Jun 2021 19:34:47 -0400 IronPort-SDR: aACU/vHrmMuvBhCVVvIjYpiyCN9AujtYh5Wbqx0vPrjwOD20MJ87T3OgPK1PAT4/AlsUNWSj4h 8SwLawDUN2WQ== X-IronPort-AV: E=McAfee;i="6200,9189,10004"; a="225488691" X-IronPort-AV: E=Sophos;i="5.83,246,1616482800"; d="scan'208";a="225488691" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 16:33:00 -0700 IronPort-SDR: qAh/G4h1oAVmxnpXqZzvzXCuEocjpQVTLKofsVYdH1zoxAHAjOZW/w7M8EFkVDo5EB13y1/Kmd 5P5MI2NAPGSw== X-IronPort-AV: E=Sophos;i="5.83,246,1616482800"; d="scan'208";a="550880326" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.7.237]) ([10.209.7.237]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 16:32:59 -0700 Subject: Re: [PATCH v1 1/8] virtio: Force only split mode with protected guest To: Andy Lutomirski , mst@redhat.com Cc: Jason Wang , virtualization@lists.linux-foundation.org, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, iommu@lists.linux-foundation.org, the arch/x86 maintainers , sathyanarayanan.kuppuswamy@linux.intel.com, Josh Poimboeuf , Linux Kernel Mailing List References: <20210603004133.4079390-1-ak@linux.intel.com> <20210603004133.4079390-2-ak@linux.intel.com> <2b2dec75-a0c1-4013-ac49-a49f30d5ac3c@www.fastmail.com> <3159e1f4-77cd-e071-b6f2-a2bb83cfc69a@linux.intel.com> From: Andi Kleen Message-ID: <884f34e0-fcd2-bb82-9e9e-4269823fa9b2@linux.intel.com> Date: Thu, 3 Jun 2021 16:32:58 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > We do not need an increasing pile of kludges Do you mean disabling features is a kludge? If yes I disagree with that characterization. > to make TDX and SEV “secure”. We need the actual loaded driver to be secure. The virtio architecture is full of legacy nonsense, > and there is no good reason for SEV and TDX to be a giant special case. I don't know where you see a "giant special case". Except for the limited feature negotiation all the changes are common, and the disabling of features (which is not new BTW, but already done e.g. with forcing DMA API in some cases) can be of course used by all these other technologies too. But it just cannot be done by default for everything because it would break compatibility. So every technology with such requirements has to explicitly opt-in. > > As I said before, real PCIe (Thunderbolt/USB-C or anything else) has the exact same problem. The fact that TDX has encrypted memory is, at best, a poor proxy for the actual condition. The actual condition is that the host does not trust the device to implement the virtio protocol correctly. Right they can do similar limitations of feature sets. But again it cannot be default. > >> >> TDX and SEV use the arch hook to enforce DMA API, so that part is also >> solved. >> > Can you point me to the code you’re referring to? See 4/8 in this patch kit. It uses an existing hook which is already used in tree by s390. -Andi