What's with all of the hardcoded instruction lengths in svm.c?

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

 



Take the following code in rdmsr_interception, for example.

svm->next_rip = kvm_rip_read(&svm->vcpu) + 2;

Yes, the canonical rdmsr instruction is two bytes. However, there is
nothing in the architectural specification prohibiting useless or
redundant prefixes. So, for instance, 65 66 67 67 67 0f 32 is a
perfectly valid 7-byte rdmsr instruction.

It looks like this code was checked in with commit 6aa8b732ca01c
("kvm: userspace interface"), with nary a word of explanation.



[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