It is not a small change, I still need to study the whole patch :(
If I can get some question clarified earlier, that helps a lot.


>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of 
>Avi Kivity
>Sent: 2007年12月4日 17:44
>To: kvm-devel@lists.sourceforge.net
>Subject: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure
>
>The current irq and exception injection infrastructure is 
>quite complex and
>has been the source of a number of bugs in the past.  This 
>patchset simplifies
>irq and exception injection:
>
>- Much more work is carried out in common code rather than 
>vmx/svm specific
>  code.  Information is kept in C variables rather than 
>hardware registers
>
>- Exception and interrupts are separated into two independent 
>queues.  This
>  will allow later optimization on AMD where the hardware 
>supports two queues,
>  and also simplifies the Intel case as now we don't need to 
>check the hardware
>  whether an exception is pending when injecting and interrupt.
>
>- Interrupts are now only acked after they have been 
>successfully injected,

Mmm, how can you know if it is injected successfully?
>From the patch, it looks like you know this by checking
IDT_Vectoring in next VM Exit. That means the virtual 
interrupt controller state in memory is incorrect temply.

If the injection success & we can get VM Exit before 
next access to those virtual interrupt controller state,
that will be OK, but that means we eliminate future HW
optimization opportunity.  I think we just pay too much
for coding style reason to narrow HW optimization space.

If the injection fails, the previous logic will inject it back 
immediately; current logic will do normal irq inject path.
The potential differences are:
        1: If a new higher interrupt arrives, we inject new vector.
that is probably OK.
        2: If the fault VM Exit is due to nested exception, the
previous logic will probably inject double fault with the original
interrupt consumed (acked); the new logic will probably inject
double fault too, but keep the IRQ not consumed. I don't have
direct case, but worry about those kind of deviation from native
behavor.

thx,eddie

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to