From: Keir Fraser Subject: Re: [RFC] Disable xen platform device when it is not needed. Date: Thu, 19 Feb 2009 09:53:54 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yuji Shimada , "xen-devel@lists.xensource.com" , James Harper , Kouya Shimura Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org On 19/02/2009 09:39, "Keir Fraser" wrote: >> I will create the patch to add "xen_platform_pci" option in guest >> config file to disable xen platform device. >> >> xen_platform_pci=0: Disable xen platform device. >> xen_platform_pci=1: Enable xen platform device. (default) > > I still might veto this. I don't really want the platform device I/O ports > scattered elsewhere for this rather frivolous reason. Actually it's okay, you can alias the 'platform_flags' byte of the ioport BAR to fixed byte port 0x10. There's a handler for that already in xen_platform.c (platform_fixed_ioport_{read,write}1). That's the only port that hvmloader/rombios cares about. Hvmloader/rombios can then always use fixed single-byte ioport 0x10. This is actually better since the code is simpler and also rombios accesses that port on S3 suspend/resume, at which point an OS could have relocated the xen_platform ioport BAR! Using a fixed port is therefore safer. Notice that I said you must *alias* this ioport byte. You cannot remove it from the xen_platform BAR as old saved guests will rely on it being there, and removing it will break their S3. We have to be backward compatible with the Xen-3.3 virtual hardware interface for saved guests. So, no veto after all! -- Keir