From patchwork Mon Feb 15 11:57:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 8313951 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 54A4F9F372 for ; Mon, 15 Feb 2016 12:00:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65C6220483 for ; Mon, 15 Feb 2016 12:00:18 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41A8A20481 for ; Mon, 15 Feb 2016 12:00:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVHmr-0007y2-GS; Mon, 15 Feb 2016 11:57:53 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVHmq-0007x0-B2 for xen-devel@lists.xenproject.org; Mon, 15 Feb 2016 11:57:52 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id BC/60-07651-F3DB1C65; Mon, 15 Feb 2016 11:57:51 +0000 X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1455537469!21897040!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41374 invoked from network); 15 Feb 2016 11:57:50 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-11.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Feb 2016 11:57:50 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Mon, 15 Feb 2016 04:57:48 -0700 Message-Id: <56C1CB4902000078000D20DB@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Mon, 15 Feb 2016 04:57:45 -0700 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Cc: Andrew Cooper , Keir Fraser Subject: [Xen-devel] [PATCH] x86emul: MSR indexes are only 32 bits wide X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ... and hence the respective {read,write}_msr() hook parameter doesn't need to be "unsigned long". Signed-off-by: Jan Beulich x86emul: MSR indexes are only 32 bits wide ... and hence the respective {read,write}_msr() hook parameter doesn't need to be "unsigned long". Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -966,7 +966,7 @@ static int hvmemul_write_io_discard( } static int hvmemul_write_msr_discard( - unsigned long reg, + unsigned int reg, uint64_t val, struct x86_emulate_ctxt *ctxt) { @@ -1439,7 +1439,7 @@ static int hvmemul_write_cr( } static int hvmemul_read_msr( - unsigned long reg, + unsigned int reg, uint64_t *val, struct x86_emulate_ctxt *ctxt) { @@ -1447,7 +1447,7 @@ static int hvmemul_read_msr( } static int hvmemul_write_msr( - unsigned long reg, + unsigned int reg, uint64_t val, struct x86_emulate_ctxt *ctxt) { --- a/xen/arch/x86/x86_emulate/x86_emulate.h +++ b/xen/arch/x86/x86_emulate/x86_emulate.h @@ -334,7 +334,7 @@ struct x86_emulate_ops * @reg: [IN ] Register to read. */ int (*read_msr)( - unsigned long reg, + unsigned int reg, uint64_t *val, struct x86_emulate_ctxt *ctxt); @@ -343,7 +343,7 @@ struct x86_emulate_ops * @reg: [IN ] Register to write. */ int (*write_msr)( - unsigned long reg, + unsigned int reg, uint64_t val, struct x86_emulate_ctxt *ctxt); --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -966,7 +966,7 @@ static int hvmemul_write_io_discard( } static int hvmemul_write_msr_discard( - unsigned long reg, + unsigned int reg, uint64_t val, struct x86_emulate_ctxt *ctxt) { @@ -1439,7 +1439,7 @@ static int hvmemul_write_cr( } static int hvmemul_read_msr( - unsigned long reg, + unsigned int reg, uint64_t *val, struct x86_emulate_ctxt *ctxt) { @@ -1447,7 +1447,7 @@ static int hvmemul_read_msr( } static int hvmemul_write_msr( - unsigned long reg, + unsigned int reg, uint64_t val, struct x86_emulate_ctxt *ctxt) { --- a/xen/arch/x86/x86_emulate/x86_emulate.h +++ b/xen/arch/x86/x86_emulate/x86_emulate.h @@ -334,7 +334,7 @@ struct x86_emulate_ops * @reg: [IN ] Register to read. */ int (*read_msr)( - unsigned long reg, + unsigned int reg, uint64_t *val, struct x86_emulate_ctxt *ctxt); @@ -343,7 +343,7 @@ struct x86_emulate_ops * @reg: [IN ] Register to write. */ int (*write_msr)( - unsigned long reg, + unsigned int reg, uint64_t val, struct x86_emulate_ctxt *ctxt);