]> xenbits.xensource.com Git - people/pauldu/xen.git/commitdiff
VMX: don't ignore P2M setup error
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Feb 2019 10:54:57 +0000 (11:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Feb 2019 10:54:57 +0000 (11:54 +0100)
set_mmio_p2m_entry() may fail, in particular with -ENOMEM. Don't ignore
such an error, but instead cause domain creation to fail in such a case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/hvm/vmx/vmx.c

index 64af8bf943a8e1637d3e8a8ac09522ee35c2a0c4..24def93d5df6eb1e5cce69fc9033351a4345cf10 100644 (file)
@@ -2999,10 +2999,10 @@ static int vmx_alloc_vlapic_mapping(struct domain *d)
     clear_domain_page(mfn);
     share_xen_page_with_guest(pg, d, SHARE_rw);
     d->arch.hvm.vmx.apic_access_mfn = mfn_x(mfn);
-    set_mmio_p2m_entry(d, paddr_to_pfn(APIC_DEFAULT_PHYS_BASE), mfn,
-                       PAGE_ORDER_4K, p2m_get_hostp2m(d)->default_access);
 
-    return 0;
+    return set_mmio_p2m_entry(d, paddr_to_pfn(APIC_DEFAULT_PHYS_BASE), mfn,
+                              PAGE_ORDER_4K,
+                              p2m_get_hostp2m(d)->default_access);
 }
 
 static void vmx_free_vlapic_mapping(struct domain *d)