From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10D4CC433F5 for ; Fri, 25 Mar 2022 13:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359241AbiCYNIA (ORCPT ); Fri, 25 Mar 2022 09:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356447AbiCYNHy (ORCPT ); Fri, 25 Mar 2022 09:07:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EC59A9B2 for ; Fri, 25 Mar 2022 06:06:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C140B61A15 for ; Fri, 25 Mar 2022 13:06:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 299A0C340E9; Fri, 25 Mar 2022 13:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648213578; bh=swW6vKfLJ/bg7/isdfkMnhqLLtpKDbNCQcaqcFU5LGk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=leJoBTbbKeHcaYKmkZdhnopLbgbqQdNdQS18MW4ruJlC8bhzQ1UiNfgNcPysjk1x8 jaIwMf+bI3J4ZKNzy7ale35o1lno1ySk7ZuDaTicy/GjIHg+hSCPYAKpyJeZrwOZ3S CDpaa+G+9sHv4Bys6eYShOL1XvgzlgKexTe6B4RF+3btqLhXXoxRZI9pqbUV3ucNpy Lc6RklQZWFrOMwslgpsMCcYYxk3sIX3NXGqOXuEiptbvPFNCHcmjUvBLuSLLtCLUxz 8QwyTLH+hbDDk8tR4xVj5B/RrPeuZeQgxb+Et1ECOrKph47wdXTByPztoELrzEMtEB awlgPFafxkFcw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nXjdw-00GuwY-1A; Fri, 25 Mar 2022 13:06:16 +0000 Date: Fri, 25 Mar 2022 13:06:15 +0000 Message-ID: <87ils25ghk.wl-maz@kernel.org> From: Marc Zyngier To: =?UTF-8?B?6LCi5piO?= Cc: , , , Subject: Re: =?UTF-8?B?5Zue5aSNOg==?= Re: [PATCH] kvm: fix gpu passthrough into vm on arm64 In-Reply-To: <1zpfpvw7azf-1zpgztpmct8@nsmail6.0> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: xieming@kylinos.cn, christoffer.dall@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 25 Mar 2022 01:06:17 +0000, =E8=B0=A2=E6=98=8E wrote: >=20 > thanks for your reply ! > you are right, 'If the device supports NORMAL_NC, this should > be known by the host kernel and exposed to KVM'=EF=BC=8C accordding the k= vm > combining rules on arm64=EF=BC=8C stage1 is setting to NORMAL_NC=EF=BC=8C= so can > we add a conditional judement when ioremapping on stage2, if the > device suppurt NORMAL_NC we setting the memory attribute to > PAGE_S2_NC ? The question remains: how do you convey that capability to the host? There is nothing currently telling KVM what memory type to use. M. --=20 Without deviation from the norm, progress is not possible.