From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjZqJ-0000e9-4z for qemu-devel@nongnu.org; Wed, 20 Jul 2011 12:41:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjZq9-0003Fc-Fi for qemu-devel@nongnu.org; Wed, 20 Jul 2011 12:41:47 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:53179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjZq6-0003DH-Ol for qemu-devel@nongnu.org; Wed, 20 Jul 2011 12:41:39 -0400 Message-ID: <4E27053B.7080804@mail.berlios.de> Date: Wed, 20 Jul 2011 18:41:31 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1311044012-24288-1-git-send-email-agraf@suse.de> <1311044012-24288-3-git-send-email-agraf@suse.de> In-Reply-To: <1311044012-24288-3-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] xen: add mapcache stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Anthony Liguori , QEMU-devel Developers , Avi Kivity Am 19.07.2011 04:53, schrieb Alexander Graf: > During the transition to get rid of CONFIG_XEN_MAPCACHE we lost the > mapcache > stubs along the way. Nobody realized it because the commands were > guarded by > if (xen_enabled()) clauses that made gcc optimize out the respective > calls. > > This patch adds the stubs again - this time in the generic xen-stubs.c > > Signed-off-by: Alexander Graf > --- > xen-stub.c | 26 ++++++++++++++++++++++++++ > 1 files changed, 26 insertions(+), 0 deletions(-) > > diff --git a/xen-stub.c b/xen-stub.c > index efe2ab5..76d80e9 100644 > --- a/xen-stub.c > +++ b/xen-stub.c > @@ -8,6 +8,7 @@ > > #include "qemu-common.h" > #include "hw/xen.h" > +#include "xen-mapcache.h" > > void xenstore_store_pv_console_info(int i, CharDriverState *chr) > { > @@ -43,3 +44,28 @@ int xen_init(void) > { > return -ENOSYS; > } > + > +/******* mapcache stubs *******/ > + > +void xen_map_cache_init(void) > +{ > +} > + > +uint8_t *xen_map_cache(target_phys_addr_t phys_addr, > target_phys_addr_t size, > + uint8_t lock) > +{ > + return qemu_get_ram_ptr(phys_addr); > +} > + > +ram_addr_t xen_ram_addr_from_mapcache(void *ptr) > +{ > + return -1; > +} > + > +void xen_invalidate_map_cache(void) > +{ > +} > + > +void xen_invalidate_map_cache_entry(uint8_t *buffer) > +{ > +} The patch fixes a build problem, and the sooner we fix it, the better it is. Do we really need a return value other than NULL in xen_map_cache()? Do we need the stubs for xen_map_cache_init() and xen_invalidate_map_cache()? As discussed in another thread, static inline stub function might be better. Regards, Stefan W.