From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v4 16/17] x86/VPMU: Suport for PVH guests Date: Tue, 04 Feb 2014 11:44:40 -0500 Message-ID: <52F118F8.6040202@oracle.com> References: <1390331342-3967-1-git-send-email-boris.ostrovsky@oracle.com> <1390331342-3967-17-git-send-email-boris.ostrovsky@oracle.com> <52F0E2570200007800118FA5@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52F0E2570200007800118FA5@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org On 02/04/2014 06:51 AM, Jan Beulich wrote: >>>> On 21.01.14 at 20:09, Boris Ostrovsky wrote: >> + if ( is_pvh_domain(current->domain) && !(vpmu_mode & XENPMU_MODE_PRIV) ) >> + if ( !vpmu->arch_vpmu_ops->do_interrupt(regs) ) >> + return 0; > Please fold chained if()s like this one. > >> @@ -237,7 +242,7 @@ int vpmu_do_interrupt(struct cpu_user_regs *regs) >> else if ( !is_control_domain(current->domain) && >> !is_idle_vcpu(current) ) >> { >> - /* PV guest */ >> + /* PV(H) guest */ > I would have expected PVH guests to use the HVM paths here, not > the PV ones. Can you clarify why you do it the other way around? I could go either way but because PVH uses event channels for interrupts I went with PV path. To use HVM route I'd need to send NMIs to the guest and that is currently not quite working. -boris