From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: RFC/patch: a very trivial patch towards portability Date: Wed, 10 Oct 2007 10:28:28 +0200 Message-ID: <470C8D2C.5030807@de.ibm.com> References: <1191946167.7292.3.camel@cotte.boeblingen.de.ibm.com> <470BA98A.8090900@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: <470BA98A.8090900-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: > Small, reviewable, posted patches are definitely the best way forward. Very well, will go that direction. > >> - 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: >> - r = 1; >> - break; >> - default: >> - r = 0; >> - break; >> - } >> - break; >> - } >> > > CHECK_EXTENSION is hopefully a generic mechanism (even if the some of > the actual extensions are not). So there should be a switch in common > code for the common extensions, and the default: target should call > kvm_arch_check_extension() for further processing. Agreed, the call itself should be generic. But the result is arch dependent. Will fix it. > >> - case KVM_GET_VCPU_MMAP_SIZE: >> - r = -EINVAL; >> - if (arg) >> - goto out; >> - r = 2 * PAGE_SIZE; >> - break; >> > > I would think this is generic too? Isn't s390 interested in passing > information to userspace via a mmap()ed region? Yes, same as above: call is generic - result value not. Will fix this too. > Note that mmio data is passed via that region. Yes, I've seen that. Thanks for the heads-up. ------------------------------------------------------------------------- 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/