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

Re: [Xen-devel] SVM/VMX and Interrupt Shadows



>>> On 14.12.16 at 08:29, <kevin.tian@xxxxxxxxx> wrote:
>>  From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
>> Sent: Wednesday, December 14, 2016 3:25 AM
>> Executing a sti while singlestepping is active currently causes a
>> VMEntry failure, because the #DB is still intercepted, but on re-entry,
>> the sti interrupt shadow is still active and hardware complains about
>> invalid guest state.
> 
> Can you specify where above VMEntry failure condition is mentioned
> in SDM? The only words I found related to both STI and debug 
> exceptions are:
> 
> --
> <26.3.1.5 Checks on Guest Non-Register State>
> 
> The following checks are performed if any of the following holds: 
> (1) the interruptibility-state field indicates blocking by STI (bit 0 in 
> that field is 1); (2) the interruptibility-state field indicates blocking 
> by MOV SS (bit 1 in that field is 1); or (3) the activity-state field 
> indicates HLT:
> 
> ● Bit 14 (BS) must be 1 if the TF flag (bit 8) in the RFLAGS field is 
> 1 and the BTF flag (bit 1) in the IA32_DEBUGCTL field is 0.
> ● Bit 14 (BS) must be 0 if the TF flag (bit 8) in the RFLAGS field is 
> 0 or the BTF flag (bit 1) in the IA32_DEBUGCTL field is 1.
> --
> 
> Regardless of whether #DB is intercepted, shouldn't we always
> have BS set to 1 when singlestep is enabled with sti in vmentry? 
> Then what's the exact invalid guest state in your observation?

More fundamentally - how come GUEST_PENDING_DBG_EXCEPTIONS
isn't being written to anywhere at all ()?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.