From patchwork Fri Jan 31 16:42:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11360275 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 8113A139A for ; Fri, 31 Jan 2020 16:43:55 +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 67BB1206F0 for ; Fri, 31 Jan 2020 16:43:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67BB1206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com 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 1ixZNk-0008El-9Q; Fri, 31 Jan 2020 16:43:00 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ixZNi-0008Ea-M8 for xen-devel@lists.xenproject.org; Fri, 31 Jan 2020 16:42:58 +0000 X-Inumbo-ID: bc50be5c-4448-11ea-8bec-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id bc50be5c-4448-11ea-8bec-12813bfff9fa; Fri, 31 Jan 2020 16:42:58 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 57D92AF27; Fri, 31 Jan 2020 16:42:57 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: Message-ID: Date: Fri, 31 Jan 2020 17:42:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Subject: [Xen-devel] [PATCH v4 2/7] x86/HVM: rename a variable in __hvm_copy() 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: George Dunlap , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Paul Durrant Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is to reflect its actual purpose. Also use in a 2nd place. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- v4: New. --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3255,9 +3255,9 @@ static enum hvm_translation_result __hvm while ( todo > 0 ) { enum hvm_translation_result res; - paddr_t gpa = addr & ~PAGE_MASK; + unsigned int pgoff = addr & ~PAGE_MASK; - count = min_t(int, PAGE_SIZE - gpa, todo); + count = min_t(int, PAGE_SIZE - pgoff, todo); res = hvm_translate_get_page(v, addr, flags & HVMCOPY_linear, pfec, pfinfo, &page, &gfn, &p2mt); @@ -3279,7 +3279,7 @@ static enum hvm_translation_result __hvm return HVMTRANS_need_retry; } - p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK); + p = __map_domain_page(page) + pgoff; if ( flags & HVMCOPY_to_guest ) {