diff mbox series

[v4,2/7] x86/HVM: rename a variable in __hvm_copy()

Message ID ad9784af-8688-5713-eaa2-68f4c23b035c@suse.com (mailing list archive)
State Superseded
Headers show
Series x86/HVM: implement memory read caching | expand

Commit Message

Jan Beulich Jan. 31, 2020, 4:42 p.m. UTC
This is to reflect its actual purpose. Also use in a 2nd place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v4: New.

Comments

Andrew Cooper Feb. 3, 2020, 3:04 p.m. UTC | #1
On 31/01/2020 16:42, Jan Beulich wrote:
> 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>
diff mbox series

Patch

--- 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 )
         {