Re: [PATCH] KVM: nVMX: Fix exception injection

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

 



On 23/07/2017 03:11, Jim Mattson wrote:
>>> In the situation you describe, the #PF causes a synthesized VM-exit
>>> from L2 to L1 directly, not indirectly. From the SDM:
>>>
>>>    An exception causes a VM exit directly if the bit corresponding to
>>> that exception is set in the exception bitmap.
>>>
>>> Hence, CR2 should not be set yet.
>>
>> Any idea how to synthesize exit qualification for page fault and debug
>> exception?
>
> I think the ancillary data for #DB and #PF should be added to
> kvm_queued_exception and plumbed through to where it's needed. Vector
> number and error code are not sufficient to describe a #DB or #PF.

It's more complicated than that, because you'd have to copy it out to
userspace in KVM_GET_VCPU_EVENTS.  But I agree it's the way to go: CR2
and DR6 should be only by inject_pending_event.

Paolo



[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