From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH v6 17/29] xen/x86: allow disabling the emulated PIC Date: Fri, 25 Sep 2015 17:01:15 +0200 Message-ID: <560561BB.2030808@citrix.com> References: <1441368548-43465-1-git-send-email-roger.pau@citrix.com> <1441368548-43465-18-git-send-email-roger.pau@citrix.com> <5600319A02000078000A4183@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfUWW-0001ay-Ck for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 15:02:56 +0000 In-Reply-To: <5600319A02000078000A4183@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org El 21/09/15 a les 16.34, Jan Beulich ha escrit: >>>> On 04.09.15 at 14:08, wrote: >> @@ -425,6 +431,9 @@ void vpic_reset(struct domain *d) >> >> void vpic_init(struct domain *d) >> { >> + if ( !has_vpic(d) ) >> + return; > > vpic_reset() above this function as well as functions further down > in the source file aren't static, yet you aren't adding guards to them. > I think here and in other similar patches you should, in the commit > message, give reasons for any one not obviously being excluded > (e.g. because used only for handling intercepts which aren't getting > enabled) from the set needing such. I've gone through the patches and added appropriate guards or asserts to the public functions, depending on whether we are expecting them to be called or not. I've also fixed all the _load functions to return ENODEV if the device has been disabled (_save functions are just noops and return 0). Roger.