Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp265034pxb; Fri, 15 Oct 2021 05:13:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPBUC8AyzSebVUq5zK7enb6VM72GLq+GrBNkgSD6lD/pkDtROiXp7+sJwixsnjsCyeNZHk X-Received: by 2002:a63:3852:: with SMTP id h18mr3973378pgn.143.1634300021787; Fri, 15 Oct 2021 05:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634300021; cv=none; d=google.com; s=arc-20160816; b=Z8OKWIskwQ2BY0oHUo7sRnFCaYa9wJ4Xvumgi/xYDwD9uOCQypRNAb+MWTTPySwoRB 91lDgZFvKLxq7ac/p4rOWSVkDlOu0HJUcmI9lESfT6sjddSwag0wXZvH3c35Yqkjg+7n Ucgr644D/+3s5OH8B4tisQ3iL2IeLbWyZFoK5BTsprN7iT7TOCUTHl/8O/JhXZ4ess2l kzAW7SJgNOJIkwTq9sz3OQK93xs1awpkbRShmgwzHzXVydz7T1KNJ3wfyYSzPLyG+ofK Xu2+g396+fh0iVHPm3d6sj95wHe5wxV+r34+nviw4a8GuWvZry6FnYbLJS+DvLnpWSeM v5jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=zlXb8Tpm84MZ0WTEkctJ3UUO7JvGCHefB0mvsLn2qCI=; b=afd69PdRs3wFzl5OAkf40utA7siHN6A0HhrcvUA+c598eAMSIkXUAzrJVLW4fBIP4n 81+B9be0o9i9sxN8irWizyCZrz66/JD13IthmlE6g6VK9/MHzbqegSH9LQdAvNPGVnvv 2jPlgY2EyKw/v1Eoa7NF2VwHOq0k7cCoVhZkl3veqRLJeBRcCjGSoY7X9GqoQH8lK5dg Xj3gfCLeZ6UwJ9vBlTgNUosJWH/EUD6Iai65GXvLwVth+jKmEMGGZGN3cdWfcZlAX5z8 WvrBnx0oZ4Qx/11wqazw3KV4IacnbNOmJ+taB5ChsbCk8vqQxpuEfZK5fZ7m6NfEXTCI oofw== 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 np5si8841396pjb.9.2021.10.15.05.13.26; Fri, 15 Oct 2021 05:13:41 -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 S235419AbhJOFxJ (ORCPT + 99 others); Fri, 15 Oct 2021 01:53:09 -0400 Received: from mga12.intel.com ([192.55.52.136]:44416 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbhJOFxI (ORCPT ); Fri, 15 Oct 2021 01:53:08 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="207968503" X-IronPort-AV: E=Sophos;i="5.85,374,1624345200"; d="scan'208";a="207968503" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 22:51:02 -0700 X-IronPort-AV: E=Sophos;i="5.85,374,1624345200"; d="scan'208";a="481583984" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.55.104]) ([10.209.55.104]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 22:51:00 -0700 Message-ID: Date: Thu, 14 Oct 2021 22:50:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v5 16/16] x86/tdx: Add cmdline option to force use of ioremap_host_shared Content-Language: en-US To: "Michael S. Tsirkin" Cc: Kuppuswamy Sathyanarayanan , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , Bjorn Helgaas , Richard Henderson , Thomas Bogendoerfer , James E J Bottomley , Helge Deller , "David S . Miller" , Arnd Bergmann , Jonathan Corbet , Paolo Bonzini , David Hildenbrand , Andrea Arcangeli , Josh Poimboeuf , Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, virtualization@lists.linux-foundation.org References: <20211009003711.1390019-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20211009003711.1390019-17-sathyanarayanan.kuppuswamy@linux.intel.com> <20211009070132-mutt-send-email-mst@kernel.org> <8c906de6-5efa-b87a-c800-6f07b98339d0@linux.intel.com> <20211011075945-mutt-send-email-mst@kernel.org> <9d0ac556-6a06-0f2e-c4ff-0c3ce742a382@linux.intel.com> <20211011142330-mutt-send-email-mst@kernel.org> <4fe8d60a-2522-f111-995c-dcbefd0d5e31@linux.intel.com> <20211012165705-mutt-send-email-mst@kernel.org> <20211012171846-mutt-send-email-mst@kernel.org> From: Andi Kleen In-Reply-To: <20211012171846-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I thought you basically create an OperationRegion of SystemMemory type, > and off you go. Maybe the OSPM in Linux is clever and protects > some memory, I wouldn't know. I investigated this now, and it looks like acpi is using ioremap_cache(). We can hook into that and force non sharing. It's probably safe to assume that this is not used on real IO devices. I think there are still some other BIOS mappings that use just plain ioremap() though. -Andi