Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1004865imm; Wed, 26 Sep 2018 10:03:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ml/eOl2gEfhFWPTwp2ul+qUSThyFR8Lii9C7WiapxyO7ZNZVrHvccFDCkn3XiuOES8nHE X-Received: by 2002:a17:902:7244:: with SMTP id c4-v6mr6891006pll.339.1537981427247; Wed, 26 Sep 2018 10:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537981427; cv=none; d=google.com; s=arc-20160816; b=W6ZkpzHHxqhC5LFaB5RvdPDtnNNveoJAn1pOAwKlEwe/0vHybVfdjLjpIH1vj6YhH0 +yhsHmJ5cQtf0hJ7INFvGkl3tNxWqwoIl+Jm2V3ziaMox4Sw2sjEG/spWk1fjnd5jI5N A0n5q26Sl0/lQvFrpwY/uvtILO+/U+1wsm7a1tPkddoDHlDPSG6xW3MQDpGLnt6SbHHV xMKYNSM6pLR3tpltLEX9vzJZ+gMCB3lna7UsLoSEyoo5Wya2+Cd7ll9eW0pfvcWdlda6 nBUI2eUcDGQD3X9FYSSe1RjSHLr3Q2ZDUxcBWDHuNVHUuQlQQbvCDfvVmljji3S/FeZk UjuQ== 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=9NRVSVv5ca+sMVNSWRrdjYo4/xtanUtmi6pVMoFnUew=; b=cxpDFVL4VE3GYB4+Bg0lW5ZAdQtGDRap/AwP6MiLnG17yLu71U+T3GPZxNey1ljiIJ aCQwzoQoP2g/covj1Fz8/DxXVUwsxJPFmcqt+D765UcRTbm6HpspBNq5WcEzA04MdYol qbdjAn3zV5ohNu6HxGVRYN2plNoKZvo5yotnRvkMyAF/BEfdEnZfgIZ9AW1U5HU5NZsD 5aTEQkPHeYBSiz5J5oQItn0ufb7DTP5TAiMParmHk44ZTxnCi2TUNAUbms9Y0ev4tKCl IgGfzFhYn33UxP1uUbqG2lc4tlueA/NZRZSruT3hBgl7nsq+OE5Ux4BmTVao1VOgIO6Z XDYg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si5537251pga.77.2018.09.26.10.03.31; Wed, 26 Sep 2018 10:03:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728769AbeIZXRI (ORCPT + 99 others); Wed, 26 Sep 2018 19:17:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728645AbeIZXRH (ORCPT ); Wed, 26 Sep 2018 19:17:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 935983082A2C; Wed, 26 Sep 2018 17:03:14 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id D330260BE7; Wed, 26 Sep 2018 17:03:09 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Wanpeng Li , linux-kernel@vger.kernel.org Subject: [PATCH v6 3/7] KVM: x86: hyperv: consistently use 'hv_vcpu' for 'struct kvm_vcpu_hv' variables Date: Wed, 26 Sep 2018 19:02:55 +0200 Message-Id: <20180926170259.29796-4-vkuznets@redhat.com> In-Reply-To: <20180926170259.29796-1-vkuznets@redhat.com> References: <20180926170259.29796-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 26 Sep 2018 17:03:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename 'hv' to 'hv_vcpu' in kvm_hv_set_msr/kvm_hv_get_msr(); 'hv' is 'reserved' for 'struct kvm_hv' variables across the file. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index b45ce136be2f..c8764faf783b 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1042,20 +1042,20 @@ static u64 current_task_runtime_100ns(void) static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host) { - struct kvm_vcpu_hv *hv = &vcpu->arch.hyperv; + struct kvm_vcpu_hv *hv_vcpu = &vcpu->arch.hyperv; switch (msr) { case HV_X64_MSR_VP_INDEX: if (!host || (u32)data >= KVM_MAX_VCPUS) return 1; - hv->vp_index = (u32)data; + hv_vcpu->vp_index = (u32)data; break; case HV_X64_MSR_VP_ASSIST_PAGE: { u64 gfn; unsigned long addr; if (!(data & HV_X64_MSR_VP_ASSIST_PAGE_ENABLE)) { - hv->hv_vapic = data; + hv_vcpu->hv_vapic = data; if (kvm_lapic_enable_pv_eoi(vcpu, 0)) return 1; break; @@ -1066,7 +1066,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host) return 1; if (__clear_user((void __user *)addr, PAGE_SIZE)) return 1; - hv->hv_vapic = data; + hv_vcpu->hv_vapic = data; kvm_vcpu_mark_page_dirty(vcpu, gfn); if (kvm_lapic_enable_pv_eoi(vcpu, gfn_to_gpa(gfn) | KVM_MSR_ENABLED)) @@ -1082,7 +1082,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host) case HV_X64_MSR_VP_RUNTIME: if (!host) return 1; - hv->runtime_offset = data - current_task_runtime_100ns(); + hv_vcpu->runtime_offset = data - current_task_runtime_100ns(); break; case HV_X64_MSR_SCONTROL: case HV_X64_MSR_SVERSION: @@ -1174,11 +1174,11 @@ static int kvm_hv_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata, bool host) { u64 data = 0; - struct kvm_vcpu_hv *hv = &vcpu->arch.hyperv; + struct kvm_vcpu_hv *hv_vcpu = &vcpu->arch.hyperv; switch (msr) { case HV_X64_MSR_VP_INDEX: - data = hv->vp_index; + data = hv_vcpu->vp_index; break; case HV_X64_MSR_EOI: return kvm_hv_vapic_msr_read(vcpu, APIC_EOI, pdata); @@ -1187,10 +1187,10 @@ static int kvm_hv_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata, case HV_X64_MSR_TPR: return kvm_hv_vapic_msr_read(vcpu, APIC_TASKPRI, pdata); case HV_X64_MSR_VP_ASSIST_PAGE: - data = hv->hv_vapic; + data = hv_vcpu->hv_vapic; break; case HV_X64_MSR_VP_RUNTIME: - data = current_task_runtime_100ns() + hv->runtime_offset; + data = current_task_runtime_100ns() + hv_vcpu->runtime_offset; break; case HV_X64_MSR_SCONTROL: case HV_X64_MSR_SVERSION: -- 2.17.1