From: "Jan Beulich" Subject: Re: [v3 13/15] vmx: Properly handle notification event when vCPU is running Date: Fri, 10 Jul 2015 15:40:09 +0100 Message-ID: <559FF569020000780008F93D@mail.emea.novell.com> References: <1435123109-10481-1-git-send-email-feng.wu@intel.com> <1435123109-10481-14-git-send-email-feng.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435123109-10481-14-git-send-email-feng.wu@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Feng Wu Cc: kevin.tian@intel.com, keir@xen.org, george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com, xen-devel@lists.xen.org, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 24.06.15 at 07:18, wrote: > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -1896,6 +1896,59 @@ static void pi_wakeup_interrupt(struct cpu_user_regs *regs) > this_cpu(irq_count)++; > } > > +/* > + * Handle VT-d posted-interrupt when VCPU is running. > + */ > + > +static void pi_notification_interrupt(struct cpu_user_regs *regs) Stray blank line and improper multi-line comment. > +{ > + /* > + * We get here when a vCPU is running in root-mode > + * (such as via hypercall, or any other reasons which > + * can result in VM-Exit), and before vCPU is back to > + * non-root, external interrupts from an assigned > + * device happen and a notification event is delivered > + * to this logical CPU. > + * > + * we need to set VCPU_KICK_SOFTIRQ for the current > + * cpu, just like __vmx_deliver_posted_interrupt(). > + * > + * So the pending interrupt in PIRR will be synced to > + * vIRR before VM-Exit in time. Please make better use of the 80 characters per line, making the textual description better stand out from the following quoted code. Jan