From: Keir Fraser Subject: Re: anomaly in irq check in fixup_page_fault() Date: Fri, 22 Jul 2011 07:22:16 +0100 Message-ID: References: <20110721122846.0f33776d@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110721122846.0f33776d@mantra.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mukesh Rathor Cc: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 21/07/2011 20:28, "Mukesh Rathor" wrote: > On Thu, 21 Jul 2011 07:35:00 +0100 > Keir Fraser wrote: > >> On 21/07/2011 02:30, "Mukesh Rathor" wrote: >> >> >> A PV guest never has EF.IF=0, so the early exit should never be >> triggered by a guest fault. >> >> Your best bet is to fake this out in your HVM container wrapper. Just >> write an EFLAGS into the saved regs that has EF.IF=1, as would always >> be the case for a normal PV guest. Rather that than fragile >> eis_hvm_pv() checks scattered around. > > Ok. In my prototype, i've the check, but I'll do the wrapper. I realize > now the above check is more for hyp not taking fault disabled than the > guest doing so. > >> The setting of EF.IF shouldn't matter much for your guest as you'll >> be doing PV event delivery anyway, but I wonder how it ends up with >> EF.IF=0 -- is that deliberate? > > Yeah, I change IF=0 initially to make sure events are not delivered > until the guest is ready and does irq enable. For PV, the vcpu-mask=1 > assures this. Unlike PV, the hybrid changes IF in > enable/disable to make "interrupt window exiting" work, BTW. I hope this can be an optional extension in the final version. -- Keir > > thanks, > Mukesh