Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




+     * If the exit was due to a NPF we may already have a GPA.
+     * If the GPA is present, use it to avoid the GVA to GPA table walk.
+     * Note, this cannot be used on string operations since string
+     * operation using rep will only have the initial GPA from the NPF
+     * occurred.
+     */

I was wondering if it would make sense to get rid of gpa_available and
rather define a new function:

bool exception_gpa_valid(struct kvm_vcpu)
{
    // check if svm
    // check if exit code is NPF
    // check ctxt
}

No, this would be a layering violation.  The emulator ops don't know
about svm and exit codes (and in fact it's trivial to implement this
optimization for vmx, with a slightly different logic), so we need to
have gpa_available.

I was rather thinking about adding an vmx/svm independent callback, which would return false for vmx for now. I just saw the variable
and was wondering if it is really necessary.

--

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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux