]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
SVM: fix build after "make nested page-fault tracing and logging consistent"
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2019 18:11:35 +0000 (18:11 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 12 Mar 2019 18:13:10 +0000 (18:13 +0000)
Some compiler versions don't recognize that "mfn" can't really be used
uninitialized in svm_do_nested_pgfault(). To be on the safe side, add an
initializer for p2mt as well.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/svm/svm.c

index fec9be3ae0b577408eecaf4cb03c1f4e21a58289..506258abdc513017906d3d80cd11f1416b161938 100644 (file)
@@ -1762,8 +1762,8 @@ static void svm_do_nested_pgfault(struct vcpu *v,
 {
     int ret;
     unsigned long gfn = gpa >> PAGE_SHIFT;
-    mfn_t mfn;
-    p2m_type_t p2mt;
+    mfn_t mfn = INVALID_MFN;
+    p2m_type_t p2mt = p2m_invalid;
     p2m_access_t p2ma;
     struct p2m_domain *p2m = NULL;