Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4695021imm; Tue, 9 Oct 2018 03:56:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV61+tppPij3CJa+jfOq8vx9uWjQgrQtgd44yiwm8gWn/Coen1Hr7AumAfvkwI6m8TB5mrk2O X-Received: by 2002:a63:6203:: with SMTP id w3-v6mr24894737pgb.53.1539082586160; Tue, 09 Oct 2018 03:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539082586; cv=none; d=google.com; s=arc-20160816; b=qGa3RuOl53JMToxJKOxX9P+sclj+s7FXqHeFFB8GHhtN64YTVUNAf2kT3aLEQgNu2Y QTwBV3z+x7fH99IUwdr2nmR4GtV9f75KeTZNgBEU1cUhKIuMenpxYQJ9/MhMu5JMJlo1 pNBpc6o1k4ROFg6J81WhSkZwr7HJrqInuH3Hk9FrZHmSTRz+CdvTgx2A9xE37bII6Lmj wKpufOP488WAx2AtvM+R04XlKcbYq7RXHNm61QYxGJWTV4T/m0PwDTxk0OyEVSn8Ra40 IbCvNnQAffF7JTOiGVnuLsC3buKEMeq+yT9ygw8p336ucmX3/HkwiYflPOLs9DRBG8YD YSUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=mYC3YiTLilum05eD7QmnW3KVGr6dEENoyASl+ZIfa9o=; b=a15repeZAb0PNQ6WJmFCbk2BPIvoqJ71DUv9lCU/MrDwNETJ5pJRv0Cqej7e7gAnLj yTZQStnPKBGVPoGpBuUyaRqlpA0V8echiMTeH5mS3mmx7Q9d10NqIob3X48wbB0EdWcy uM2Q0nueMJQcFIs3CscZMyTHjUCpCwruM/lOK+a58TifTrPf2snf8l0VBNOSFM7+74dc mUjpB2yWTxzv/al/7Iqw/soVQP1tTbq5K4KA+sT3MU2/27NkZAVKQzqiTxfB0pFGFOzj h48fQsW9lUUm1MzS9ZMmmqWarHUc5tOkV4EKorimX8X2SgICSH+4otbfuSD+n+RdzhdG MuiQ== 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 ca4-v6si23479098plb.406.2018.10.09.03.56.11; Tue, 09 Oct 2018 03:56:26 -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 S1726923AbeJISLW (ORCPT + 99 others); Tue, 9 Oct 2018 14:11:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:44020 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726721AbeJISLD (ORCPT ); Tue, 9 Oct 2018 14:11:03 -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 001CBAE41; Tue, 9 Oct 2018 10:54:40 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org, linux-doc@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, corbet@lwn.net, boris.ostrovsky@oracle.com, Juergen Gross , stable@vger.kernel.org Subject: [PATCH v4 1/3] x86/xen: fix boot loader version reported for pvh guests Date: Tue, 9 Oct 2018 12:54:35 +0200 Message-Id: <20181009105437.5471-2-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181009105437.5471-1-jgross@suse.com> References: <20181009105437.5471-1-jgross@suse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The boot loader version reported via sysfs is wrong in case of the kernel being booted via the Xen PVH boot entry. it should be 2.12 (0x020c), but it is reported to be 2.18 (0x0212). As the current way to set the version is error prone use the more readable variant (2 << 8) | 12. Cc: # 4.12 Signed-off-by: Juergen Gross --- arch/x86/xen/enlighten_pvh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c index c85d1a88f476..f7f77023288a 100644 --- a/arch/x86/xen/enlighten_pvh.c +++ b/arch/x86/xen/enlighten_pvh.c @@ -75,7 +75,7 @@ static void __init init_pvh_bootparams(void) * Version 2.12 supports Xen entry point but we will use default x86/PC * environment (i.e. hardware_subarch 0). */ - pvh_bootparams.hdr.version = 0x212; + pvh_bootparams.hdr.version = (2 << 8) | 12; pvh_bootparams.hdr.type_of_loader = (9 << 4) | 0; /* Xen loader */ x86_init.acpi.get_root_pointer = pvh_get_root_pointer; -- 2.16.4