> On 18 Jun 2019, at 12:07, Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx> wrote: > > * Liran Alon (liran.alon@xxxxxxxxxx) wrote: >> Kernel commit c4f55198c7c2 ("kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD") >> introduced a new KVM capability which allows userspace to correctly >> distinguish between pending and injected exceptions. >> >> This distinguish is important in case of nested virtualization scenarios >> because a L2 pending exception can still be intercepted by the L1 hypervisor >> while a L2 injected exception cannot. >> >> Furthermore, when an exception is attempted to be injected by QEMU, >> QEMU should specify the exception payload (CR2 in case of #PF or >> DR6 in case of #DB) instead of having the payload already delivered in >> the respective vCPU register. Because in case exception is injected to >> L2 guest and is intercepted by L1 hypervisor, then payload needs to be >> reported to L1 intercept (VMExit handler) while still preserving >> respective vCPU register unchanged. >> >> This commit adds support for QEMU to properly utilise this new KVM >> capability (KVM_CAP_EXCEPTION_PAYLOAD). > > Does this kvm capability become a requirement for the nested migration > then? If so, is it wired into the blockers? > > Dave > That’s a very good point. Yes this capability is required in order to correctly migrate VMs running nested hypervisors. I agree that I should add a migration blocker for nested in case it isn’t present. Nice catch. -Liran