Received: by 2002:a17:907:c68a:b0:84d:2074:29bb with SMTP id ue10csp651126ejc; Thu, 19 Jan 2023 14:09:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXv0CxvDGjHGuYOV34PV04zDocnhl2P5LSYJweepWzZlAfZyfJfPsCgviJB9ph8gpRMegsQS X-Received: by 2002:ad4:58b3:0:b0:534:1fd6:10d8 with SMTP id ea19-20020ad458b3000000b005341fd610d8mr15741409qvb.13.1674166140759; Thu, 19 Jan 2023 14:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674166140; cv=none; d=google.com; s=arc-20160816; b=WFpTOSQwmPHANz5Uc5taXF1v10LDS7eeRoxO3WDEyJ1SfII6jYXA3KwKTFbyb/L4ja P1pB+Vk5E3EHAKlUwW4WHqm7AU4+5/i6iYZGj4nfxwobod6yuXUTjiBXn7gIzB+TLeiD iFruoFXNoGmNIlGxLUwcj0nsmEI/1zYWTxqAEf2iQ2+44Krrymqn0oeiVp+Sxue4zsY4 l3iIWlMwL7ftvRzkWqsWjGUd6I5sa1XFihS0BK3Htq3Co46X2x57qAerY4rAzhrOr3zo RKSO8PHVMQRYCUwrzJ5i5jtIv36El5+5dpUN8DKnGc40520l1A+T9qNHlQwZiWRSuQos Re4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature:dkim-filter; bh=yaL9U5qPbERxoMFF9/XB1bBrqry+09uCNni20nEZlb0=; b=g1muFCgGxjCBlhl8UF3jb4PtEGpXtVwuXNM1Oh5mRZZAY7trTrMBC2iRPpy0UIezhu xIpp879xWZXERwPmvmR1o5LhWpyFpBphc1coZadCp0gN2Y7NJe8iuk739XYJgk9EArYn pRkDIqQ47ciK7xOqvdztFL6q0HQt9tNPKAr08CnSeaxs6DJWxMPr82De7FdA0w3aaHRh wvw2jwFP4ouh9Lvxcb+QPcWTJCs7/TnaG0l3MyCxURAaUlf9yCI278CX0YesHV+0i07U G31U3GgYlFqfBRqc0VYk0YNPlBjsZFuPI4zN3yjcWIrgKJrkobl6N3jcu9b6vkxBBdD4 Yv3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=KJ5NikZI; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id kk20-20020a056214509400b005353bfe0a5asi4312051qvb.122.2023.01.19.14.09.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 14:09:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=KJ5NikZI; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pId5G-0004SN-Sf; Thu, 19 Jan 2023 17:08:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pId5F-0004SA-Tw; Thu, 19 Jan 2023 17:08:33 -0500 Received: from linux.microsoft.com ([13.77.154.182]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pId5E-0007Pc-1Q; Thu, 19 Jan 2023 17:08:33 -0500 Received: from [192.168.0.20] (unknown [77.64.253.186]) by linux.microsoft.com (Postfix) with ESMTPSA id D328C20E09FE; Thu, 19 Jan 2023 14:08:29 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D328C20E09FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1674166110; bh=yaL9U5qPbERxoMFF9/XB1bBrqry+09uCNni20nEZlb0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KJ5NikZIuSZaqeFNs4gCLV77dwcaixV21akvSBQFWr/yHuZacrf/39qApk/+QJ7aV /2UC/PVOB0CSW2jtS95FroR9jr6fQ3eTQUoY2nuC9XTW3uQzUMAHPjtwM9eT9f51bn kCWOdQ4BD/2TP9SiALxJw3TNOSTZbGVlfa1YWfK0= Message-ID: <95207957-10b6-838b-d2c9-35feb282d49e@linux.microsoft.com> Date: Thu, 19 Jan 2023 23:08:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RFC] 2-stage translation emulation support for SMMUv3 on TCG Content-Language: en-US To: eric.auger@redhat.com, qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org, Peter Maydell References: <1fe1dc81-f6bc-3da8-81c1-16dd248cc23d@redhat.com> From: Evgeny Iakovlev In-Reply-To: <1fe1dc81-f6bc-3da8-81c1-16dd248cc23d@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=13.77.154.182; envelope-from=eiakovlev@linux.microsoft.com; helo=linux.microsoft.com X-Spam_score_int: -198 X-Spam_score: -19.9 X-Spam_bar: ------------------- X-Spam_report: (-19.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.094, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: P7amfTR8mpYh On 1/17/2023 18:00, Eric Auger wrote: > Hi Evgeny, > On 1/16/23 16:37, Evgeny Iakovlev wrote: >> Hi! >> >> >> We are using qemu-tcg-aarch64 to run Hyper-V test and debug builds for >> arm. Besides some minor fixes that i have submitted over the last >> couple of weeks, one big compatibility item for us is SMMUv3 2-stage >> translations support. We can do fine without it right now, but having >> it would also allow us to test nested arm guests with SMMUv3, which is >> great. >> >> >> One idea we have floating around is implementing 2-stage translations >> in SMMUv3 in Qemu. We can't make a commitment yet, but before we >> consider it i think it would be wise to ask the community about it, >> specifically: >> >> * Do 2-stage translations sound like something qemu-arm would be keen >> on accepting? Are there any other use-cases for it besides an arguably >> wild corner case of nesting an EL2 hypervisor on software-emulated arm64? > Personally I don't have anything against. I guess we cannot prevent you > from adding a feature that is supported by the spec ;-) One concern I > have is the extra complexity it will bring to the device. At least I > would recommend you to try to isolate stage2 support at most from the > rest and make your utmost to keep the stage1 perf as close as possible > to what it is currently. Indeed the main "production" use case is S1 > vSMMU with KVM acceleration. Currently in linux arm-smmuv3 driver, only > S1 is used. Out of curiosity how are the S2 and S1+S2 used with HyperV? > > I am mostly involved in KVM accelerated use cases so I will let others > comment on potential use cases using S2. Hyper-V is using 2-stage xlate i think in the same scenario KVM/vfio does: to expose SMMU to the guest and allow it to program stage 1 tables and also support some nesting scenarious. >> * Is there anyone already working on it as we speak maybe? > afaik I am not aware of anybody working on that at the moment >> * Were there any previous attempts to do this and if yes why they >> evidently didn't get through? > afaik there were no series sent publicly Thanks for confirming, Eric! > > Thanks > > Eric >> >> Thanks! >> >>