A pointer mismatch has been reported when compiling with the compiler goto-gcc of the bounded model checker CBMC. To keep trace entry size independent of the compiler implementation, use the available p2mt variable for the access, and update the trace record independenly.
Fixes: 9a779e4f (Implement SVM specific part for Nested Virtualization) Signed-off-by: Norbert Manthey <[email protected]> --- Notes: v2: keep type, use local variable in function call and xen/arch/x86/hvm/svm/svm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1800,8 +1800,9 @@ static void svm_do_nested_pgfault(struct vcpu *v, p2m = p2m_get_p2m(v); _d.gpa = gpa; _d.qualification = 0; - mfn = __get_gfn_type_access(p2m, gfn, &_d.p2mt, &p2ma, 0, NULL, 0); + mfn = __get_gfn_type_access(p2m, gfn, &p2mt, &p2ma, 0, NULL, 0); _d.mfn = mfn_x(mfn); + _d.p2mt = p2mt; __trace_var(TRC_HVM_NPF, 0, sizeof(_d), &_d); } -- 2.7.4 Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich Ust-ID: DE 289 237 879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
