x86/pvh-dom0: Remove unnecessary function pointer call from modify_identity_mmio()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Dec 2018 17:23:32 +0000 (17:23 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 23 Jan 2019 18:29:11 +0000 (18:29 +0000)
Function pointer calls are far more expensive in a post-Spectre world, and
this one doesn't need to be.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/hvm/dom0_build.c

index 303c44b5d9b36c04c7dfa37535d76a02bf9f439c..51cf490811632a7e0542163393829f77b2476c63 100644 (file)
@@ -79,8 +79,8 @@ static int __init modify_identity_mmio(struct domain *d, unsigned long pfn,
 
     for ( ; ; )
     {
-        rc = (map ? map_mmio_regions : unmap_mmio_regions)
-             (d, _gfn(pfn), nr_pages, _mfn(pfn));
+        rc = map ?   map_mmio_regions(d, _gfn(pfn), nr_pages, _mfn(pfn))
+                 : unmap_mmio_regions(d, _gfn(pfn), nr_pages, _mfn(pfn));
         if ( rc == 0 )
             break;
         if ( rc < 0 )