All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Dong, Eddie" <eddie.dong@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: event injection MACROs
Date: Thu, 14 May 2009 12:27:57 +0300	[thread overview]
Message-ID: <4A0BE41D.3060809@redhat.com> (raw)
In-Reply-To: <9832F13BD22FB94A829F798DA4A8280501B24E5C3A@pdsmsx503.ccr.corp.intel.com>

Dong, Eddie wrote:
> OK.
> Also back to Gleb's question, the reason I want to do that is to simplify event
> generation mechanism in current KVM.
>
> Today KVM use additional layer of exception/nmi/interrupt such as
> vcpu.arch.exception.pending, vcpu->arch.interrupt.pending & vcpu->arch.nmi_injected.
> All those additional layer is due to compete of VM_ENTRY_INTR_INFO_FIELD
> write to inject the event. Both SVM & VMX has only one resource to inject the virtual event
> but KVM generates 3 catagory of events in parallel which further requires additional
> logic to dictate among them. 

I thought of using a queue to hold all pending events (in a common 
format), sort it by priority, and inject the head.

> One example is that exception has higher priority
> than NMI/IRQ injection in current code which is not true in reality. 
>   

I don't think it matters in practice, since the guest will see it as a 
timing issue.  NMIs and IRQs are asynchronous (even those generated by 
the guest through the local APIC).

> Another issue is that an failed event from previous injection say IRQ or NMI may be 
> discarded if an virtual exception happens in the EXIT handling now. With the patch of 
> generic double fault handling, this case should be handled as normally.
>   

Discarding an exception is usually okay as it will be regenerated.  I 
don't think we discard interrupts or NMIs.

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


  reply	other threads:[~2009-05-14  9:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30  7:24 Implement generic double fault generation mechanism Dong, Eddie
2009-05-03 10:53 ` Gleb Natapov
2009-05-08  8:27   ` Dong, Eddie
2009-05-08  9:53     ` Gleb Natapov
2009-05-08 10:39       ` Dong, Eddie
2009-05-08 10:46         ` Dong, Eddie
2009-05-08 12:23           ` Gleb Natapov
2009-05-08 15:00             ` Dong, Eddie
2009-05-08 18:44               ` Gleb Natapov
2009-05-11  1:04                 ` Dong, Eddie
2009-05-11  6:02                   ` Gleb Natapov
2009-05-12  5:35                     ` Dong, Eddie
2009-05-12  7:01                       ` Gleb Natapov
2009-05-12 15:06                         ` Enable IRQ windows after exception injection if there are pending virq Dong, Eddie
2009-05-12 15:27                           ` Gleb Natapov
2009-05-13  7:45                             ` Dong, Eddie
2009-05-13 10:29                               ` Gleb Natapov
2009-05-13 14:05                         ` Implement generic double fault generation mechanism Dong, Eddie
2009-05-11  6:17                   ` Avi Kivity
2009-05-12  7:38                     ` event injection MACROs Dong, Eddie
2009-05-12  8:49                       ` Gleb Natapov
2009-05-13  9:49                       ` Avi Kivity
2009-05-13 14:20                         ` Dong, Eddie
2009-05-14  9:27                           ` Avi Kivity [this message]
2009-05-14 13:43                             ` Dong, Eddie
2009-05-14 14:16                               ` Gleb Natapov
2009-05-14 14:34                                 ` Dong, Eddie
2009-05-14 15:44                                   ` Gleb Natapov
2009-05-15  7:57                                     ` Dong, Eddie
2009-05-17  9:44                                       ` Gleb Natapov
2009-05-08 12:16         ` Implement generic double fault generation mechanism Gleb Natapov
2009-05-08  8:19 ` Dong, Eddie
2009-05-08  8:28   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A0BE41D.3060809@redhat.com \
    --to=avi@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.