Received: by 10.192.165.148 with SMTP id m20csp5365786imm; Wed, 9 May 2018 04:00:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpcQ9bt0230xxVDk1Ww3PCezbqoVthQOB40OPPBbse0qapGzNz5oaF3PEDNwG5c19fspDGF X-Received: by 2002:a17:902:7582:: with SMTP id j2-v6mr27225361pll.65.1525863629604; Wed, 09 May 2018 04:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525863629; cv=none; d=google.com; s=arc-20160816; b=OykIKqB07w4URTkG7StgN6oKx0oy8KirBVatoebXp+Sc/VOCRS9l8L0sgBiJv00QHY beCieje8BFf9Yt40Zg3k+ah30m/8OwljnCIqK08DanjwlkI5HJ4nQ+IhIO/56JkhM0m4 kSixsXeOyLJ6ePyQCEbWQyHkH1uxYyjYBU9w4zqc4SW34aW2HcM3W9c6GCfRvgdUrQD/ l16PF/krtC9LD4Da+etoDk5kZHnyPhNnaGqLsL4osu5O5EegR7FLkcrY/vHz4FlCpXke nSvWhb0ECSBxeWIpbu5C5D44gq4WEiCcmelU7IRcQkSxf0jeeXqFLDJLd9YGHiaEN2he 6U6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=hZvG4EbPE2gO0x1ldDJVhSLebSt49QBC+85hh8zHk80=; b=ABlgXZGnPH1dfiOY5VJx28L4YlbISif7pRN91yjWCQvOWzBtut+H08mIc7FwhQNtfK 44fysPMlMtcgr+jWtJ6CxuLUQeikPkFR5EcmOJVhrpY963ogd9j2Q4ECUxYnGdzlF/NW ctmc9i/RXKf+SIgy7kl3/KGHNoCXXAbBNtWPOdpCOc5i/bGUNjcsK1a8A2qPrcnuej06 1fLhU3POQ1p0qR9Ffo41h0ld2HP5Z1pYnz2/iBoabQZ7OYYeurTKGZN62e9aNVcJ4se1 7u8gohnPXfyT2dQC/VSHQTQl3TyeUYI4CxzpEN9MvqyfklnnDCRML0MXJ+JruzqigZy5 ANHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22-v6si1219941pgo.686.2018.05.09.04.00.14; Wed, 09 May 2018 04:00:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933830AbeEIK4o (ORCPT + 99 others); Wed, 9 May 2018 06:56:44 -0400 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:46145 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767AbeEIK4n (ORCPT ); Wed, 9 May 2018 06:56:43 -0400 X-IronPort-AV: E=Sophos;i="5.49,381,1520899200"; d="scan'208";a="72822053" Subject: Re: [Xen-devel] [PATCH v2 1/3] xen/pvh: enable and set default MTRR type To: Roger Pau Monne , CC: Juergen Gross , , Boris Ostrovsky References: <20180509102129.14832-1-roger.pau@citrix.com> <20180509102129.14832-2-roger.pau@citrix.com> From: Andrew Cooper Openpgp: preference=signencrypt Message-ID: Date: Wed, 9 May 2018 11:56:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180509102129.14832-2-roger.pau@citrix.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/05/18 11:21, Roger Pau Monne wrote: > On PVH MTRR is not initialized by the firmware (because there's no > firmware), so the kernel is started with MTRR disabled which means all > memory accesses are UC. > > So far there have been no issues (ie: slowdowns) caused by this > because PVH only supported DomU mode without passed-through devices, > so Xen was using WB as the default memory type instead of UC. > > Fix this by enabling MTRR and setting the default type to WB. Linux > will use PAT to set the actual memory cache attributes. > > Signed-off-by: Boris Ostrovsky > Signed-off-by: Roger Pau Monné I'd argue that this is a bug in PVH starting state. Do you know what mechanism is used to bodge things to WB in the first place?  I'm not sure that setting the default MTRR type is going to be a clever idea in hindsight when we come to doing PCI Passthrough support. ~Andrew