x86/HVM: rename a variable in __hvm_copy()
authorJan Beulich <jbeulich@suse.com>
Wed, 5 Feb 2020 12:51:56 +0000 (13:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Feb 2020 12:51:56 +0000 (13:51 +0100)
This is to reflect its actual purpose. Also use in a 2nd place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c

index 2fee569a5fe0c238170fd3cbd3f910e26249d01e..fc66d72eac661521837bcdbdef8d8f7b9b734205 100644 (file)
@@ -3255,9 +3255,9 @@ static enum hvm_translation_result __hvm_copy(
     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_copy(
             return HVMTRANS_need_retry;
         }
 
-        p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK);
+        p = __map_domain_page(page) + pgoff;
 
         if ( flags & HVMCOPY_to_guest )
         {