From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 01 of 27] Move kvm_context to kvmctl.h Date: Thu, 01 Nov 2007 00:33:55 +0200 Message-ID: <472902D3.5080502@qumranet.com> References: <19a7c6d2ddfd1383aeb8.1193850306@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jerone Young Return-path: In-Reply-To: <19a7c6d2ddfd1383aeb8.1193850306@thinkpad> 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 Jerone Young wrote: > Move kvm_context to kvmctl.h > > Description seems outdated? > This patch moves kvm_context from kvmctl.c to kvmctl.h. This is so > other files are able to see members of kvm_context. Also you should > allways declare stuff like this in a header anyway. Also moved are > delcrations MAX_VCPU & KVM_MAX_NUM_MEM_REGIONS to kvmctl-x86.h. As these > are closely associated with the architecture. > > diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h > --- a/libkvm/libkvm.h > +++ b/libkvm/libkvm.h > @@ -1,4 +1,4 @@ > -/** \file kvmctl.h > +/** \file libkvm.h > * libkvm API > */ > > @@ -26,6 +26,40 @@ struct kvm_context; > struct kvm_context; > > typedef struct kvm_context *kvm_context_t; > + > +/* Add info from arch specific header */ > +#if defined(__x86_64__) || defined(__i386__) > +#include "libkvm-x86.h" > +#endif > + > This won't compile. For bisectability, each patch in a patchset should compile (and run) after applying. > + > +/** > + * \brief The KVM context > + * > + * The verbose KVM context > + */ > + > +struct kvm_context { > Please move it to some private header file so users aren't tempted. Especially I'd like the size of the structure to be hidden as it's easy to break binary compatibility unintentionally if that's exposed. -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- 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/