From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Split kvm_vcpu to support new archs. Date: Thu, 18 Oct 2007 16:22:33 +0200 Message-ID: <47176C29.1000300@qumranet.com> References: <42DFA526FC41B1429CE7279EF83C6BDC809A6A@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Zhang, Xiantao" Return-path: In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC809A6A-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@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 Zhang, Xiantao wrote: > Hi Avi, > According to your and community's suggestions, I changed the kvm_vcpu > structure to two parts. To avoid the much intrusive into current code, > one is common part which is defined as a macro, and the other one is > arch-specific part. > In addition, I have a suggestion to re-organize the head files, such as > kvm.h and x86.h. IMO, kvm.h is changed to kvm_comm.h, and only includes > common code for all archs.Then x86.h will be changed to kvm-x86.h, and > linked as kvm.h at compile time. So, other archs also defines its > kvm-xx.h to accommodate its arch-specific structures. What's your ideas > ?(This idea doesn't include in this patch.) > Let's not hurry with file layout, but split off x86 first. > >From 34cebd3a3fc0afba4df511219912bc3277e2a8c7 Mon Sep 17 00:00:00 2001 > From: Zhang Xiantao > Date: Thu, 18 Oct 2007 12:51:02 +0800 > Subject: [PATCH] First step to split kvm_vcpu. Currently, we just use an > macro to define the common fields in kvm_vcpu for all archs, and all > archs need to define its own kvm_vcpu struct. > Signed-off-by: Zhang Xiantao > Patch is good, but your mailer wordwrapped it. Use git-send-email, or another mailer, or attach. > +#define KVM_VCPU_COMM \ > KVM_VCPU_COMMON. > + struct kvm *kvm; \ > + struct preempt_notifier preempt_notifier;\ > + int vcpu_id;\ > + struct mutex mutex;\ > + int cpu;\ > + struct kvm_run *run;\ > + int guest_mode;\ > + unsigned long requests;\ > + struct kvm_guest_debug guest_debug;\ > + int fpu_active; \ > + int guest_fpu_loaded;\ > + wait_queue_head_t wq;\ > + int sigset_active;\ > + sigset_t sigset;\ > + struct kvm_stat stat;\ > + KVM_VCPU_MMIO > > Put some spaces between ';' and '\'. > > -static inline int memslot_id(struct kvm *kvm, struct kvm_memory_slot > *slot) > -{ > - return slot - kvm->memslots; > -} > - > This baby is not x86 specific. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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/