From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: RFC/patch: a very trivial patch towards portability V2.1 Date: Wed, 10 Oct 2007 15:59:45 +0200 Message-ID: <470CDAD1.3020102@de.ibm.com> References: <1191946167.7292.3.camel@cotte.boeblingen.de.ibm.com> <1192019827.17745.9.camel@cotte.boeblingen.de.ibm.com> <1192020355.17877.4.camel@cotte.boeblingen.de.ibm.com> <470CD1F7.1030400@qumranet.com> Reply-To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" To: Avi Kivity Return-path: In-Reply-To: <470CD1F7.1030400-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Argument names in prototypes please. Will do that. >> case KVM_CHECK_EXTENSION: { >> int ext = (long)argp; >> >> - switch (ext) { >> - case KVM_CAP_IRQCHIP: >> - case KVM_CAP_HLT: >> - case KVM_CAP_MMU_SHADOW_CACHE_CONTROL: >> - case KVM_CAP_USER_MEMORY: >> - r = 1; >> - break; >> - default: >> - r = 0; >> - break; >> - } >> + r = kvm_arch_check_extension(ext); >> break; >> >> > > > Reflecting some more, do we want different API availablility for > different archs? We can make this generic, and ignore arch-specific > extensions. > > But on the other hand, things like KVM_CAP_IRQCHIP _are_ applicable to > powerpc, but may not be implemented from day 1... should we do > > case KVM_CAP_IRQCHIP: > return KVM_ARCH_HAS_IRQCHIP; > > ? Will do that too. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/