>>> On Mon, May 7, 2007 at 5:42 AM, in message <[EMAIL PROTECTED]>,
Avi Kivity <[EMAIL PROTECTED]> wrote:
>
>> +static void do_interrupt_requests(struct kvm_vcpu *vcpu,
>> + struct kvm_run *kvm_run)
>> +{
>> + int pending = __kvm_vcpu_irq_all_pending(vcpu);
>> + int handled = 0;
>> +
>> + while (pending && !handled) {
>> + kvm_irqpin_t pin = __fls(pending);
>> +
>> + switch (pin) {
>> + case kvm_irqpin_localint:
>> + case kvm_irqpin_extint:
>> + case kvm_irqpin_nmi:
>> + handled = do_intr_requests(vcpu, kvm_run, pin);
>> + break;
>> + case kvm_irqpin_smi:
>> + /* ignored (for now) */
>> + printk(KERN_WARNING
>> + "KVM: dropping unhandled SMI\n");
>> + __clear_bit(pin, &vcpu- >irq.pending);
>> + break;
>> + case kvm_irqpin_invalid:
>> + /* drop */
>> + break;
>> + default:
>> + panic("KVM: unknown interrupt pin raised: %d\n", pin);
>> + break;
>> + }
>> +
>> + __clear_bit(pin, &pending);
>> + }
>> }
>>
>
> This code can be shared with the svm function of the same name and moved
> to kvm_main, no? You'll need a new arch op for do_inter_requests().
>
Originally I was going to do exactly what you are proposing, but later (as you
will see with my refresh coming shortly) they start to diverge between VMX and
SVN. I will still be on the lookout for places where we can centralize,
however.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel