From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: Xen/pv_ops features/patches for 2.6.29? (updating wiki) Date: Fri, 13 Feb 2009 11:30:35 -0800 Message-ID: <4995CA5B.1070006@goop.org> References: <408866.52969.qm@web56103.mail.re3.yahoo.com> <4995BBB7.4040908@goop.org> <0B53E02A2965CE4F9ADB38B34501A3A16D974A73@orsmsx505.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0B53E02A2965CE4F9ADB38B34501A3A16D974A73@orsmsx505.amr.corp.intel.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: "Nakajima, Jun" Cc: "bderzhavets@yahoo.com" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Nakajima, Jun wrote: > I noticed that the changes like > if (xen_initial_domain()) > ... > > For example, > static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) > { > struct io_apic __iomem *io_apic; > > if (xen_initial_domain()) > return xen_io_apic_read(apic, reg); > > io_apic = io_apic_base(apic); > writel(reg, &io_apic->index); > return readl(&io_apic->data); > } > > > Do you think those need to be wrapped by pv_ops? Probably it's better to replace such functions (e.g. io_apic_read/write) with Xen-specific ones, rather than adding hooks. > That's been a point of contention. Originally I had some io_apic_ops to do that, but I got pushback. The current patch is more to make a point than something I'd expect to be upstreamed (but who knows?). It isn't actually too bad this way, because xen_initial_domain() compiles down to a constant 0 if CONFIG_XEN_DOM0 is disabled, and its just a test of a variable if its enabled. J