From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm: qemu: framebuffer: build fix for target-arm Date: Tue, 28 Apr 2009 12:34:09 +0300 Message-ID: <49F6CD91.9010602@redhat.com> References: <1240842918-24649-1-git-send-email-markmc@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Mark McLoughlin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60337 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752334AbZD1JeI (ORCPT ); Tue, 28 Apr 2009 05:34:08 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3S9Y8ca029892 for ; Tue, 28 Apr 2009 05:34:08 -0400 In-Reply-To: <1240842918-24649-1-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Mark McLoughlin wrote: > Include qemu-kvm.h for non-KVM_UPSTREAM building and surround the > kvm code with USE_KVM guards. > > Fixes target-arm: > > qemu/hw/framebuffer.c: In function 'framebuffer_update_display': > qemu/hw/framebuffer.c:53: warning: implicit declaration of function 'kvm_enabled' > qemu/hw/framebuffer.c:54: warning: implicit declaration of function 'kvm_physical_sync_dirty_bitmap' > > diff --git a/hw/framebuffer.c b/hw/framebuffer.c > index 1086ba9..e2d7604 100644 > --- a/hw/framebuffer.c > +++ b/hw/framebuffer.c > @@ -18,6 +18,7 @@ > #include "console.h" > #include "framebuffer.h" > #include "kvm.h" > +#include "qemu-kvm.h" > Maybe we should have kvm.h include qemu-kvm.h, to avoid more divergence (even if it is trivial). > > /* Render an image from a shared memory framebuffer. */ > > @@ -50,9 +51,11 @@ void framebuffer_update_display( > *first_row = -1; > src_len = src_width * rows; > > +#ifdef USE_KVM > if (kvm_enabled()) { > kvm_physical_sync_dirty_bitmap(base, src_len); > } > +#endif Similarly, provide null definitions for kvm_enabled() and kvm_physical_blah() to avoid the ifdefs. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.