Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1561707pxy; Mon, 2 Aug 2021 05:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHsAIB+R39mNyweLnLq14+LTnqUYC46HUzPucBATSjScq6R1bnFQxua7P3kav5hsZTMGKH X-Received: by 2002:a5e:dc48:: with SMTP id s8mr1279067iop.133.1627905857246; Mon, 02 Aug 2021 05:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627905857; cv=none; d=google.com; s=arc-20160816; b=NQXM1nW9K/chsBRCItzr5gVfrZofH/Wz5h9Opx1I9hhbxUFauACmlZstQTLkwjBh6x kpmYQmngXsbBqdcffKJMH4RWAm/WiC4QclwnB5qrcjvcnPc+j2Psqhw1Ya0ThgsNBqCR 7qQ9Z1mo/f2m1YspKabu65FqAhjUvuH70sohvSt0BTjlzRueWkYlU8lTp5tnYOoLxvJn nQxyKlFm/FHET8U9kV6A5wTU9BtDG6wFaetlUgaBR7tSE1ZgsYaOqru0BwuJd7Enp2pk 6fSEQhOIOw63ofo7Z7aoBCvqxdlX5xD6P19CSsB3ef4/mN31mzrKaCp3MPI3cslopZY3 WrvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tMa9oZ8ejrcsrO8XgBPq8cpNjoq1BjW9iD6bSAgypVs=; b=VNf6xGWA7/oMZM3A+vXTfFufq+UEIEQg2sR7OAjk7ew/FhZFrALIKFd1l1wRcp7N8C TnN9pSyWiT/0ShB6saZtLeHbN1vY76W1nYPAz0rwMl7YM9KjW9WUfT6UM3is8oTFcrI4 ZKayiTImiMfaiFjI46uOeBlnnbOzcpqnRtEUwBX8YQMBHHu06900vXmhZFp6EwkqXFue LxOJISD3+CVscwtG+7khHe7dVo2CTfVHi41n0MILhL/izegqKoP+qj6/soOjwado2Xdm vlfuBWKRAK/48cTl6O/5aHx7Y7MubT7aolbJ4TrEWizIkvIpg50YG1WQG6yNGca8afX8 vTRw== 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=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si12509933ioj.25.2021.08.02.05.04.03; Mon, 02 Aug 2021 05:04:17 -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=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233568AbhHBMB7 (ORCPT + 99 others); Mon, 2 Aug 2021 08:01:59 -0400 Received: from 8bytes.org ([81.169.241.247]:52728 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbhHBMB4 (ORCPT ); Mon, 2 Aug 2021 08:01:56 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 2A79D379; Mon, 2 Aug 2021 14:01:45 +0200 (CEST) Date: Mon, 2 Aug 2021 14:01:41 +0200 From: Joerg Roedel To: Dave Hansen Cc: Tianyu Lan , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, will@kernel.org, davem@davemloft.net, kuba@kernel.org, jejb@linux.ibm.com, martin.petersen@oracle.com, arnd@arndb.de, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, ardb@kernel.org, Tianyu.Lan@microsoft.com, rientjes@google.com, martin.b.radev@gmail.com, akpm@linux-foundation.org, rppt@kernel.org, kirill.shutemov@linux.intel.com, aneesh.kumar@linux.ibm.com, krish.sadhukhan@oracle.com, saravanand@fb.com, xen-devel@lists.xenproject.org, pgonda@google.com, david@redhat.com, keescook@chromium.org, hannes@cmpxchg.org, sfr@canb.auug.org.au, michael.h.kelley@microsoft.com, iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, vkuznets@redhat.com, anparri@microsoft.com Subject: Re: [PATCH 03/13] x86/HV: Add new hvcall guest address host visibility support Message-ID: References: <20210728145232.285861-1-ltykernel@gmail.com> <20210728145232.285861-4-ltykernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 08:29:41AM -0700, Dave Hansen wrote: > __set_memory_enc_dec() is turning into a real mess. SEV, TDX and now > Hyper-V are messing around in here. I was going to suggest a PV_OPS call where the fitting implementation for the guest environment can be plugged in at boot. There is TDX and an SEV(-SNP) case, a Hyper-V case, and likely more coming up from other cloud/hypervisor vendors. Hiding all these behind feature checks is not going to make things cleaner. Regards, Joerg