From: Ian Campbell Subject: Re: Nested events in 64bit mini-OS Date: Mon, 19 Nov 2012 10:21:10 +0000 Message-ID: <1353320470.18229.20.camel@zakaz.uk.xensource.com> References: <50871D90.50606@gmail.com> <20121025205653.GW5925@type.chello.at> <5098A674.5090203@cs.uic.edu> <20121110135218.GA5436@type> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121110135218.GA5436@type> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Samuel Thibault Cc: Xu Zhang , "gm281@cam.ac.uk" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Sat, 2012-11-10 at 13:52 +0000, Samuel Thibault wrote: > > + .byte 0x78,0x78,0x78,0x78,0x78 # jmp hypercall_page + (__HYPERVISOR_iret * 32) > > Here we would also need a fixup table for the code at hypercall_page! > A nicer fix would be to inline the hypercall code here. That said, I > have to say I don't know any detail about the NMI flag, I don't see it > defined in the Intel manual, and I don't see it being set in the Xen > hypervisor. It's a "software defined" bit (i.e. stolen out of eflags :-() used in the classic-Xen Linux guest to indicate that return must go via HYPERVISOR_iret (rather than direct iret), I think in order to let the hypervisor implement the correct semantics wrt NMI masking. The hypervisor itself doesn't actually know anything about the bit and the guest could implement this some other way if it wanted (doesn't 64 bit minios *always* use HYPERVISOR_iret?). > Unless somebody knows more about it, I would assume that it > currently never happens, That's probably a pretty good assumption, you would expect NMIs only in dom0 (real NMIs getting forwarded) or in a guest which you explicitly sent an NMI to via the toolstack, which I doubt you would do to an unsuspecting mini-os domain (not in the expectation of anything good happening at least). Ian.