From patchwork Wed Feb 12 16:09:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11378695 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12686109A for ; Wed, 12 Feb 2020 16:10:43 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E361E2073C for ; Wed, 12 Feb 2020 16:10:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aFjNnTOs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E361E2073C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j1uZu-0003Mo-7G; Wed, 12 Feb 2020 16:09:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j1uZs-0003Mi-Cp for xen-devel@lists.xenproject.org; Wed, 12 Feb 2020 16:09:28 +0000 X-Inumbo-ID: 08b8acc4-4db2-11ea-ade5-bc764e2007e4 Received: from mail-wr1-x441.google.com (unknown [2a00:1450:4864:20::441]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 08b8acc4-4db2-11ea-ade5-bc764e2007e4; Wed, 12 Feb 2020 16:09:23 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id z3so3076546wru.3 for ; Wed, 12 Feb 2020 08:09:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w4/mKx/qtd0NynVOwfww2yoUw6w2UGTwgak3PQ9DLDE=; b=aFjNnTOsfQJbduTfX8S08F4A+E8kABjSFR3ZIs6lvMdExpd6s6mI67LE+0gZ2kNbau S4nu33b/QoLfi/IOUWQA3usfgsl1+/WOCZ4ZCUmrJqky7DoLNaGUj6jlvPx5QHhkx2gk 7z7J0bSQINA/CtnYPiHxNYBKibnrFaPUbLyuVNw3m/DmB4NptTPhgDL0weQiSt7fUcT7 7SDDVKh0BPTfTyji7gTvycZTi5ojKUl5abiyi+8PEFgajeOw0AZv0Fsw7QxDQvOYT9cv g2/OnGFe93+xOJjBM4euD1REqJ5RhPjQWeWgxZYKh0GdZp0ES+q7ebnzc1nH8xtcdM55 uwUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=w4/mKx/qtd0NynVOwfww2yoUw6w2UGTwgak3PQ9DLDE=; b=lb8KURgeyyidtHUhxhS/glaP6WwUhgC2xaVySwP0boh2KeLda48TMVSyJOUVUTC/T7 x/5B9/yLp+f3MZPwDWPXgPG3n3yPQlmD8pvGh0H4ZTx/uotpr5D1AYOuapXQPrwVfAqz PYshyYReG0J8/Qvk/E1XjczEBv/6pWa288WPwMqliR76NwyBm2fqDLpNbvIwiYaBj8Bd 8OM617qmjGnh3Dd3F85f9pNGKbvnRFykklB4pC/UdYeTtzqZxpMZYgDKC7Y6wENn0StC 5LepY/xZ9MNj4dQwolaEZ6RUlB95TqNvXl4zNOddfG24TBvZM0fAeZUZO1DiKgTaWL/F ik8g== X-Gm-Message-State: APjAAAU6TlkysoVjwpRmkzFZjxK+OQJUm1yFfJpjMu7XDhLz1PuaBdDF VKgJp2g/nSAn09K2U4ZqGivxj1xb X-Google-Smtp-Source: APXvYqxv6ZxvAJ8EBNiZ22MO7NLcpNYu3QGMUvJAs6bDhvDhiBz0CxVsfpR13SFygtSqm4pTJYi8DQ== X-Received: by 2002:a05:6000:10d1:: with SMTP id b17mr15768677wrx.298.1581523762841; Wed, 12 Feb 2020 08:09:22 -0800 (PST) Received: from localhost.localdomain (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id o4sm1142500wrx.25.2020.02.12.08.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 08:09:22 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Wed, 12 Feb 2020 16:09:15 +0000 Message-Id: <20200212160918.18470-2-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200212160918.18470-1-liuwe@microsoft.com> References: <20200212160918.18470-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 1/4] x86/hyperv: misc cleanup X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Andrew Cooper , Paul Durrant , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Change hv_vp_index to use uint32_t because that is what is defined in TLFS. Add "_addr" suffix to hv_do_rep_hypercall's parameters. Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monné Reviewed-by: Paul Durrant --- xen/arch/x86/guest/hyperv/hyperv.c | 2 +- xen/arch/x86/guest/hyperv/private.h | 2 +- xen/include/asm-x86/guest/hyperv-hcall.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/guest/hyperv/hyperv.c b/xen/arch/x86/guest/hyperv/hyperv.c index 70f4cd5ae0..b7044f7193 100644 --- a/xen/arch/x86/guest/hyperv/hyperv.c +++ b/xen/arch/x86/guest/hyperv/hyperv.c @@ -31,7 +31,7 @@ struct ms_hyperv_info __read_mostly ms_hyperv; DEFINE_PER_CPU_READ_MOSTLY(void *, hv_input_page); DEFINE_PER_CPU_READ_MOSTLY(void *, hv_vp_assist); -DEFINE_PER_CPU_READ_MOSTLY(unsigned int, hv_vp_index); +DEFINE_PER_CPU_READ_MOSTLY(uint32_t, hv_vp_index); static uint64_t generate_guest_id(void) { diff --git a/xen/arch/x86/guest/hyperv/private.h b/xen/arch/x86/guest/hyperv/private.h index 956eff831f..eb14ea43e5 100644 --- a/xen/arch/x86/guest/hyperv/private.h +++ b/xen/arch/x86/guest/hyperv/private.h @@ -26,6 +26,6 @@ DECLARE_PER_CPU(void *, hv_input_page); DECLARE_PER_CPU(void *, hv_vp_assist); -DECLARE_PER_CPU(unsigned int, hv_vp_index); +DECLARE_PER_CPU(uint32_t, hv_vp_index); #endif /* __XEN_HYPERV_PRIVIATE_H__ */ diff --git a/xen/include/asm-x86/guest/hyperv-hcall.h b/xen/include/asm-x86/guest/hyperv-hcall.h index 4d3b131b3a..3396caccdd 100644 --- a/xen/include/asm-x86/guest/hyperv-hcall.h +++ b/xen/include/asm-x86/guest/hyperv-hcall.h @@ -61,7 +61,8 @@ static inline uint64_t hv_do_fast_hypercall(uint16_t code, static inline uint64_t hv_do_rep_hypercall(uint16_t code, uint16_t rep_count, uint16_t varhead_size, - paddr_t input, paddr_t output) + paddr_t input_addr, + paddr_t output_addr) { uint64_t control = code; uint64_t status; @@ -71,7 +72,7 @@ static inline uint64_t hv_do_rep_hypercall(uint16_t code, uint16_t rep_count, control |= (uint64_t)rep_count << HV_HYPERCALL_REP_COMP_OFFSET; do { - status = hv_do_hypercall(control, input, output); + status = hv_do_hypercall(control, input_addr, output_addr); if ( (status & HV_HYPERCALL_RESULT_MASK) != HV_STATUS_SUCCESS ) break;