Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp184620pxb; Wed, 18 Nov 2020 01:34:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTs/qeSEGKTsCuL0qEm2Y7fnBgTk1ZIwLc/jHvN/x4Ai/hu3bY+BR+yLF0qkllsA33iCnv X-Received: by 2002:a05:6402:2da:: with SMTP id b26mr24385220edx.176.1605692056584; Wed, 18 Nov 2020 01:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605692056; cv=none; d=google.com; s=arc-20160816; b=moaCmmsa7s51QnEx88oagb3n0HBUB359MOC6WraGLD3B8wz5o18IVfd3tmEz/3MUh8 X2BUSeFBZEaHP2kGMFT7th146KPq3KF1JBVDUjFWCf1YC+/zwC396VThPgKrk5LcU26D abfl3os2pq8r+S51/eog4PYmDRiBJrMwtKSZvH1ZjNv6C//rnPQVHRHPOrV85mY4YRfn usX4+QgydQFYnwDopfSwfPdNFwK/chYrABuyLLB0CNwEHyWEMjSmhQvsVr4UXF8RfsaT 1OXW76TKR7YVggmFqCy5IRqYE6oZE2sKy4IZEbxAq8M5uhj7GpC+yhfvBpSeEj/Z13jv L1qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rIT1mFbEat++q/fOI2Mz1b9yVpWkTzwwX++pQ7a41t8=; b=EKKnCzoWMYN0d+5bKw+PBAg9KrD0WrbYMZuBIiuySeBECsm5IISTjG3PZcX/hbh5WB +Rg9/RETS4j97PkKkEZdcT3Od5n4VmGSP+2FJxCaCVarp0w/3csfRI5lEdCrp6mKQgD+ B3yiXuXPIOhOKFrfyBHPgD7Fe8ZS9Y26ZMXmgTt6vc6Afx2hPIqK99/RKDrx9LlrjZJ4 C6sSaarJ9r5gkUOtZJiF1L00OnKtNhoglvXJbRgvt7axKaFwOfPr6DUUi2Y22qNj4kDj tKF8V8kkgLfXPLBVIL7cjdKqLZCpArBahUoDm00e+fx6X8prNGqwTmUT5O71uCq1NQra h0Zg== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si8672723ejb.377.2020.11.18.01.33.52; Wed, 18 Nov 2020 01:34:16 -0800 (PST) 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbgKRJb5 (ORCPT + 99 others); Wed, 18 Nov 2020 04:31:57 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:33183 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbgKRJb5 (ORCPT ); Wed, 18 Nov 2020 04:31:57 -0500 Received: by mail-wm1-f66.google.com with SMTP id p19so3728846wmg.0; Wed, 18 Nov 2020 01:31:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rIT1mFbEat++q/fOI2Mz1b9yVpWkTzwwX++pQ7a41t8=; b=ExCLecBVwO+ca/4IAZDu8b6GjCMA5OE7XHAL54jof1Gp+W8/EUIw0qyCZzS/BRcSdq b/Bn+su6MOcfknUG6Wr+tVQ4VCtMbO7NpWBFh78+ryZovQ5eDDthFvqghZbnCrkADSA9 XuegazkJZJpA6Uw7yUk8SeZ0KGVT2LxeE4cdYHwx2uFD5is+f3NZ89Yk2iLQzWMUvhDR SKAJBv5YLQElKyaE4blgqmyi6IvqiKD4g7wfUecyeZkiTKWi6ZrLz5g8ikUZczHNGwLf YiYlCttJ7ghC0S+D/mL6sCFLS55iQGZiGIFkewDokXx/ZIrHJWQTVK2GSjjhLEHVhniT Tlfw== X-Gm-Message-State: AOAM530pEfjNDB70wSwL6fZwmkF6xvoxdVHpjxo8XrEiNbV6sKYCmrtF /9bHTURdfcQWvV0t3sg3nlE= X-Received: by 2002:a7b:c1ce:: with SMTP id a14mr3302058wmj.169.1605691915142; Wed, 18 Nov 2020 01:31:55 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id d63sm2799773wmd.12.2020.11.18.01.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 01:31:54 -0800 (PST) Date: Wed, 18 Nov 2020 09:31:53 +0000 From: Wei Liu To: Michael Kelley Cc: Dexuan Cui , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , "b.zolnierkie@samsung.com" , "linux-hyperv@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Wei Hu Subject: Re: [PATCH] video: hyperv_fb: Fix the cache type when mapping the VRAM Message-ID: <20201118093153.irs3i342nskkbuil@liuwe-devbox-debian-v2> References: <20201118000305.24797-1-decui@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 12:20:11AM +0000, Michael Kelley wrote: > From: Dexuan Cui Sent: Tuesday, November 17, 2020 4:03 PM > > > > x86 Hyper-V used to essentially always overwrite the effective cache type > > of guest memory accesses to WB. This was problematic in cases where there > > is a physical device assigned to the VM, since that often requires that > > the VM should have control over cache types. Thus, on newer Hyper-V since > > 2018, Hyper-V always honors the VM's cache type, but unexpectedly Linux VM > > users start to complain that Linux VM's VRAM becomes very slow, and it > > turns out that Linux VM should not map the VRAM uncacheable by ioremap(). > > Fix this slowness issue by using ioremap_cache(). > > > > On ARM64, ioremap_cache() is also required as the host also maps the VRAM > > cacheable, otherwise VM Connect can't display properly with ioremap() or > > ioremap_wc(). > > > > With this change, the VRAM on new Hyper-V is as fast as regular RAM, so > > it's no longer necessary to use the hacks we added to mitigate the > > slowness, i.e. we no longer need to allocate physical memory and use > > it to back up the VRAM in Generation-1 VM, and we also no longer need to > > allocate physical memory to back up the framebuffer in a Generation-2 VM > > and copy the framebuffer to the real VRAM. A further big change will > > address these for v5.11. > > > > Fixes: 68a2d20b79b1 ("drivers/video: add Hyper-V Synthetic Video Frame Buffer Driver") > > Tested-by: Boqun Feng > > Signed-off-by: Dexuan Cui > Reviewed-by: Michael Kelley > Applied to hyperv-fixes. Thanks.