Marcelo Tosatti wrote:
Subject says it all.

Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>

Index: kvm-vmx-checks/arch/x86/kvm/x86.c
===================================================================
--- kvm-vmx-checks.orig/arch/x86/kvm/x86.c
+++ kvm-vmx-checks/arch/x86/kvm/x86.c
@@ -3253,6 +3253,8 @@ static int load_guest_segment_descriptor
                return 1;
        }
        gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, dtable.base);
+       if (gpa == UNMAPPED_GVA)
+               return 1;
        gpa += index * 8;
        return kvm_read_guest(vcpu->kvm, gpa, seg_desc, 8);
 }

This is wrong; if the descriptor table is long enough, the first page could be unmapped but the page(s) containing the segment could be mapped (and nothing guarantees the mapping is contiguous).

We need to translate dtable.base + index * 8.

What we really need is kvm_read_guest_virt() to take care of all of these things. The emulator callbacks come fairly close.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to