Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp184819lqr; Wed, 5 Jun 2024 02:59:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU34ftVvQpRM0uaXKPcPIddLbXINmMuDQl+GQxUBV1aLBbTg1zyIvxTT90It8mgy1g1n4LYP+so1qpxqiDxLiw7vr/6GR7si/mkwv0tOw== X-Google-Smtp-Source: AGHT+IEKGCz6agWEcMQX+O7u3xPZwaGBFJh5wvk6jvjYHM8yh/j5In+SNP6/ewCXvkquBRW/dap0 X-Received: by 2002:a05:6a20:da9d:b0:1b2:a889:f7da with SMTP id adf61e73a8af0-1b2b71793admr2340178637.55.1717581581892; Wed, 05 Jun 2024 02:59:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717581581; cv=pass; d=google.com; s=arc-20160816; b=XGDbGKBR0ImKtFN0h9l3JUklEbxyctYzceLxDcykcQz8d+SnFx1PQ08AncsjJcW+Ax pJ9LLh6HH1EevoW4lq0eKTToriKTR7esQ1pBkbEatEtow2D8iyTdaz+G0bK6ft/r1b0D /eu64sCW+yczSla6X6L8sYO3mr3JLw51geIJWfRtWGqHfthdBzbUPySBlY5nTdBqObFc m1XkOYrG5jti0dkBMC3o9/MB/4uH2w+fkimCad5DF6Gv3aswCYRAVdR9YAu20KJlYj7R py7j1CAybQ1UIvRTQ3SyEuwsVrME7mwxiwg/nW9adesdWVB8R5fW2kKTy4VrcWlky7C9 lc/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=aNW/jW/zcZb0X9zZ0EGV7IURArZuKNEloHawawvdNaQ=; fh=mU6xl5FN63PgqIKyLHx/u5uRervM0V89cYoVjXl22Bs=; b=I3aWmwvlCspgSFLqzAZwOZJJTataVivnzyfgvZGT9Jiqr6MpDNI7bUiozfItlNo9yh p4GB8BG1FQs1NB6pqjev5pmWLp3lZZC8bDDfMX2QrV2eanJwmgbKkTYCqUyM879xgjdf YZ8+/bgIuZCKLU8Y/9iDyYYmlJWRalrc4XYtic1S4bT88FAyvInOuBvSQMOIy7Eqavkr wA5/+v6LEMrROiJzDpbm1JWyCxkBiB/xXIoZ+ZtO790RroHdVZ/MR0XvqyAE0o2DzT5K M6Lnxc38ZwZnzKRYXV+oenPfzWZ7e+NXVRVAe2OS1QP4oNdKRCb5sJFaNs0OKj6o6So7 UpzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-70276531d94si4537279b3a.10.2024.06.05.02.59.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 02:59:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0F920B28B97 for ; Wed, 5 Jun 2024 09:33:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28087193076; Wed, 5 Jun 2024 09:30:42 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61E81193064; Wed, 5 Jun 2024 09:30:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717579841; cv=none; b=mF0NYKyCr7+CGX9GzhZxbV5p04nvWW+geekJUP8LWKTQPhHkJDiBv5eD4qdvK8gwKdvv5WL5RkhzJ/MDqrYVEDTQHf+HBDyitMmsnsw4mQYpVhIie3Q0u3YI7gYwDMGfcGwxaChq9YwC4ozvEMaDMp1Abp+Lvme4N/yU7a9kMPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717579841; c=relaxed/simple; bh=C30FIBDNOKB2NdwcI7wHovadNEvWIc5qcaCjjIynEgA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tw88f010ZPuadQi54RE709xNS84S6hVR8CAmA1yqJxXYY5X1jcd8veE3epzC2xRmp7iEUyvCwY2fr6Ynwmgfg8qo6GZaCtjfnn3QzY0bjuKlmIbmJ5/seL5i+CTfvBFcZunE0KHsLsU2TwAsDpqPlwFsV3/INDFZafmZlwDccY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31D13DA7; Wed, 5 Jun 2024 02:31:04 -0700 (PDT) Received: from e122027.arm.com (unknown [10.57.39.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5695C3F792; Wed, 5 Jun 2024 02:30:36 -0700 (PDT) From: Steven Price To: kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: Suzuki K Poulose , Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Steven Price Subject: [PATCH v3 05/14] fixmap: Allow architecture overriding set_fixmap_io Date: Wed, 5 Jun 2024 10:29:57 +0100 Message-Id: <20240605093006.145492-6-steven.price@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605093006.145492-1-steven.price@arm.com> References: <20240605093006.145492-1-steven.price@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Suzuki K Poulose For a realm guest it will be necessary to ensure IO mappings are shared so that the VMM can emulate the device. The following patch will provide an implementation of set_fixmap_io for arm64 setting the shared bit (if in a realm). Signed-off-by: Suzuki K Poulose Signed-off-by: Steven Price --- include/asm-generic/fixmap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h index 8cc7b09c1bc7..c5ce0368c1ee 100644 --- a/include/asm-generic/fixmap.h +++ b/include/asm-generic/fixmap.h @@ -94,8 +94,10 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) /* * Some fixmaps are for IO */ +#ifndef set_fixmap_io #define set_fixmap_io(idx, phys) \ __set_fixmap(idx, phys, FIXMAP_PAGE_IO) +#endif #define set_fixmap_offset_io(idx, phys) \ __set_fixmap_offset(idx, phys, FIXMAP_PAGE_IO) -- 2.34.1