From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH V2 23/23] kvm tools: Create arch-specific kvm_cpu__emulate_{mm}io() Date: Fri, 09 Dec 2011 09:53:35 +0200 Message-ID: <1323417215.32487.15.camel@lappy> References: <4EE1B100.3070909@ozlabs.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, penberg@kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com To: Matt Evans Return-path: In-Reply-To: <4EE1B100.3070909@ozlabs.org> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, 2011-12-09 at 17:56 +1100, Matt Evans wrote: > @@ -30,4 +31,18 @@ struct kvm_cpu { > struct kvm_coalesced_mmio_ring *ring; > }; > > +/* > + * As these are such simple wrappers, let's have them in the header so they'll > + * be cheaper to call: > + */ > +static inline bool kvm_cpu__emulate_io(struct kvm *kvm, u16 port, void *data, int direction, int size, u32 count) > +{ > + return kvm__emulate_io(kvm, port, data, direction, size, count); > +} > + > +static inline bool kvm_cpu__emulate_mmio(struct kvm *kvm, u64 phys_addr, u8 *data, u32 len, u8 is_write) > +{ > + return kvm_cpu__emulate_mmio(kvm, phys_addr, data, len, is_write); This is probably wrong. kvm_cpu__emulate_mmio just calls itself over and over. > +} > + > #endif /* KVM__KVM_CPU_ARCH_H */ -- Sasha.