From: Andi Kleen Subject: Re: [RFC PATCH 16/35] subarch support for interrupt and exception gates Date: Tue, 9 May 2006 13:09:49 +0200 Message-ID: <200605091309.49631.ak@suse.de> References: <20060509084945.373541000@sous-sol.org> <20060509085154.441800000@sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060509085154.441800000@sous-sol.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: virtualization@lists.osdl.org Cc: Chris Wright , Ian Pratt , xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org List-Id: xen-devel@lists.xenproject.org > +/* > + * This needs to use 'idt_table' rather than 'idt', and > + * thus use the _nonmapped_ version of the IDT, as the > + * Pentium F0 0F bugfix can have resulted in the mapped > + * IDT being write-protected. > + */ > +void set_intr_gate(unsigned int n, void *addr) > +{ > + _set_gate(idt_table+n,14,0,addr,__KERNEL_CS); > +} No need to duplicate the various set_*_gate functions into the subarchs. > +static void __init set_task_gate(unsigned int n, unsigned int gdt_entry) > +{ > + /* _set_gate(n, 5, 0, 0, (gdt_entry<<3)); */ > +} Looks weird, but can be handled in the low level function. -Andi