Re: [Bug 103321] New: NPT page attribute support causes extreme slowdown
> do you get normal speed? Nope, still slow... I somehow missed that svm_set_msr() calls svm_set_guest_pat() as well, it does seem to properly change g_pat. The only thing that catches my eyes is that later on all WT entries in g_pat are replaced by WC (0x0007040600070406 -> 0x0007010600070106), but that doesn't seem to make a difference. If it wasn't for some frustrating and badly timed libvirt update breaking my old VM config some days ago I would have noticed that earlier :/ -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bug 103321] New: NPT page attribute support causes extreme slowdown
I inserted some printk() lines into init_vmcb() around the call of svm_set_guest_pat() to print out the g_pat value as well as svm->vcpu.vcpu_id and noticed that something was off: Initially, the PATs of all VCPUs are set to 0x0606060606060606. However, after attaching some devices (vfio-pci enabling device and vfio_ecap_init lines are being printed) init_vmcb() is only called again for vcpu_id > 0. Unless g_pat is changed somewhere else, VCPU #0 remains set to 0x0606060606060606 (according to comments in svm_set_guest_pat() this is bad for assigned devices) while all other VCPUs use 0x0007040600070406. I'd guess that could explain the slowdown. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bug 103321] New: NPT page attribute support causes extreme slowdown
Please try this: Still no difference I guess the trace_kvm_cr_write() call in that patch was supposed to trigger kvm_cr entries while tracing? I couldn't find any, though, the only entries containing cr within the output of trace-cmd report were kvm_exit ones that looked quite similar to the previous dump. If you still think it's worth it I'll send you the whole ~10MB compressed trace. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html