Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3646888imm; Mon, 2 Jul 2018 03:02:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKziQ8uiOBPBrqfxGtspnJUQW8dBzdpaEhH1BoNkjIxZ/bTUmBj1Qplp56z3GhJf00TeOeC X-Received: by 2002:a63:842:: with SMTP id 63-v6mr21857632pgi.406.1530525773253; Mon, 02 Jul 2018 03:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530525773; cv=none; d=google.com; s=arc-20160816; b=RuOCh/b0gm/xGDde7MNVkk6KBgyYxsUfd4f8E9fWqOYNsFdmwyXe/3AP5eTvgaGzp4 lTA38ROALqOnkdgwrYHmpeUPtiGorP9PqX/6x0tKTA7JAm48W6guvGvzSccCwahF1Kp0 AO3iP4HZG6PcSjjH/sqjuDW5dMZgTAU4A7nWvP4xl/9LqWkVIDubS1hC+js8FB5NJEYu RGXSlJJ0+zlGiCGcJMMBWI5FS4Iae84bHRldKzeVcMqUy1xOlg/ySu+FYDbPh08v+hSW 4jBBu7Kp69y3FmWN8mdIS/HQSFdv0Mi5ZggwPUJGKSziT0LsL5kV4W8mt5suQgX6cy2l Qt2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YGFe+XfLtYxDKqZF4jlGbcOGdin83+hOzj3F9a9eTDc=; b=hjCwcbz0MbtHyVSEYOeE01S/PEPJ16AiJvr8gVBfHV7v/yrBrlSCIqadbV2ru6NW9X 8iWeE+I1BUaIB1Gz3qoS1KTr1w/tcCE6XYLZ9CNVt1Isai2oTHAOR2Imp6xJ+0Z7zgDL FpWkT5s7altH2xoAJ/BsE5ls1he1wIgI3wUpsJIr1Ewwo/pj9+JxRlZyEDMf6PpUtcMp BGlDR0cpIUfyb+Y7i9p6klenctKz/Z4jhuE7OUyv2uNX3hZAyoOMm9piaA6SuqZ60cAR d3wcUAdmpJXktLn3s3CKC6iNjNgbf+SkL+6hi+iBVQvql9MoZgQ52MW0SEaUwPaKZA7n tAyQ== 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 t69-v6si13964092pgd.271.2018.07.02.03.02.37; Mon, 02 Jul 2018 03:02:53 -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 S933798AbeGBKAY (ORCPT + 99 others); Mon, 2 Jul 2018 06:00:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:34430 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932105AbeGBKAW (ORCPT ); Mon, 2 Jul 2018 06:00:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8B924AED7; Mon, 2 Jul 2018 10:00:21 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: boris.ostrovsky@oracle.com, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, Juergen Gross , stable@vger.kernel.org Subject: [PATCH] xen: remove global bit from __default_kernel_pte_mask for pv guests Date: Mon, 2 Jul 2018 12:00:18 +0200 Message-Id: <20180702100018.26279-1-jgross@suse.com> X-Mailer: git-send-email 2.13.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When removing the global bit from __supported_pte_mask do the same for __default_kernel_pte_mask in order to avoid the WARN_ONCE() in check_pgprot() when setting a kernel pte before having called init_mem_mapping(). Cc: # 4.17 Reported-by: Michael Young Signed-off-by: Juergen Gross --- arch/x86/xen/enlighten_pv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 0f4cd9e5bed4..cf7b13d3e911 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1230,6 +1230,7 @@ asmlinkage __visible void __init xen_start_kernel(void) /* Prevent unwanted bits from being set in PTEs. */ __supported_pte_mask &= ~_PAGE_GLOBAL; + __default_kernel_pte_mask &= ~_PAGE_GLOBAL; /* * Prevent page tables from being allocated in highmem, even -- 2.13.7