Re: [PATCH 6/6] KVM: x86: Emulator support for TF

Avi Kivity
2010-02-23T11:04:09Z

On 02/23/2010 01:00 PM, Gleb Natapov wrote:
>>>
>>> They will not trigger before that. They will be queued for the next
>>> entry and queuing another one will either overwrite the previous one,
>>> or will queue double fault (depending on what what the first exception).
>>>
>> The will not stack as the instruction failed, thus no singlestep will be
>> queued as well.
>>
> Instruction failed doesn't mean emulation failed, so lets see what
> happens when you single step over instruction that generates page fault.
> #PF is queued and x86_emulate_insn() returns 0 to emulate_instruction()
> no you call queue_singlestep() which calls kvm_queue_exception(vcpu, DB_VECTOR);
> and this cause #DF to be injected.
>

This looks like a test case btw.

We need to test, at least:

- unemulated single step
- emulated single step successful insn
- emulated single step faulting insn

and probably more.

--
error compiling committee.c: too many arguments to function