From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Evans Subject: Re: [PATCH V2 23/23] kvm tools: Create arch-specific kvm_cpu__emulate_{mm}io() Date: Mon, 12 Dec 2011 12:08:27 +1100 Message-ID: <4EE5540B.9080109@ozlabs.org> References: <4EE1B100.3070909@ozlabs.org> <1323417215.32487.15.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 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: Sasha Levin Return-path: In-Reply-To: <1323417215.32487.15.camel@lappy> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/12/11 18:53, Sasha Levin wrote: > 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. Urgh, not just probably -- C&P strikes again. Consider it fixed. Thanks! Matt