Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp515263imm; Tue, 9 Oct 2018 23:15:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62xOQbxxTTshZqh3NafceVvfqtAjsWtcTVUuHHGwtWMVuI7V/J/WUPSTCCrTuu9+Dkl+sOJ X-Received: by 2002:a63:2066:: with SMTP id r38-v6mr28443525pgm.289.1539152149619; Tue, 09 Oct 2018 23:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539152149; cv=none; d=google.com; s=arc-20160816; b=DG14vMJY8tKtQTgQJJpTiM9u13J4NZI3YJ+1+UV/Kr7CBYBajPo9cbbp/Brc2CIefq +VtPmHlKSCc2IiNQG7SsMLWNnic6HwrFQZcRrPwofkDwM8ksDlqDcDvT5T+bnA2Um9ZG lw8CwCU0zLkNXCtW3JO5EW3DLY8KDuFnnR4+9Zdfo6GHcx+yn5f/CnDk/n4KuMnhlWSL s2WfYBqudYMgFPCdyubPVDJJN+w/an8Bcqe2LG3DOVQyNHO3m4AY+19Ujt17LGPGmRZv /aufFzV4O6//U50wuEruq3/IFYHv4L9J6E5p/nZiseTo1a090b8n7giCp4448WCBBI5Z tKMQ== 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=F7XGn+m/LpADcQyQTLAtN1qq7GinBbJV8aGFVmMF58QK6mrj3vIFu2HY7exdFWdkld CWaiAjTF9srjrUbGfeHYpFt8kLw0q7d8euW3YQzJKLdbdFnTu1+Xsez1iI1R5w3o7pDP RxtLHqq1ol2rVy9Nm65sva765vZLBvzBsdn27xD4lxJxU7K1r+2pWPaCvQsNZzFEBaT9 lqHQbO7vAqhSzhe3gcaqGm1E4AKGhhTFWTu5BB5h+ggeNBcbcFXeJRC4FMCqetrwsHbh jhj2HcvLOIhYCFk3y55aD81qxxxvXG/YxCaq3D3MoVjjoUYHYr0fwcIntsAR8c5Gj48L B/2Q== 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 cd9-v6si26018193plb.222.2018.10.09.23.15.34; Tue, 09 Oct 2018 23:15:49 -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 S1727142AbeJJNfi (ORCPT + 99 others); Wed, 10 Oct 2018 09:35:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:47898 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726525AbeJJNfh (ORCPT ); Wed, 10 Oct 2018 09:35:37 -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 2B60AAF0D; Wed, 10 Oct 2018 06:15:00 +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 v5 1/3] x86/xen: fix boot loader version reported for pvh guests Date: Wed, 10 Oct 2018 08:14:54 +0200 Message-Id: <20181010061456.22238-2-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181010061456.22238-1-jgross@suse.com> References: <20181010061456.22238-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