From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5sSc-0001Ze-3f for qemu-devel@nongnu.org; Mon, 27 Aug 2012 02:06:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T5sSa-0002VM-Bp for qemu-devel@nongnu.org; Mon, 27 Aug 2012 02:06:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5sSa-0002VA-2E for qemu-devel@nongnu.org; Mon, 27 Aug 2012 02:06:04 -0400 Message-ID: <503B0E42.4080809@redhat.com> Date: Mon, 27 Aug 2012 08:05:54 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1345835677-23371-1-git-send-email-erlon.cruz@br.flextronics.com> <1345835677-23371-3-git-send-email-erlon.cruz@br.flextronics.com> In-Reply-To: <1345835677-23371-3-git-send-email-erlon.cruz@br.flextronics.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/4] qxl: split qxl functions in common and pci files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Erlon Cruz Cc: "Erlon R. Cruz" , =?UTF-8?B?RmFiaWFubyBGaWTDqm5jaW8=?= , =?UTF-8?B?RmFiaWFubyBGaWTDqm5jaW8=?= , "Rafael F. Santos" , qemu-devel@nongnu.org, alevy@redhat.com On 08/24/12 21:14, Erlon Cruz wrote: > From: Fabiano Fid=C3=AAncio >=20 > This commit splits qxl functions into common functions (located in > qxl.c) and pci-specific functions (located in qxl-pci.c). > All prototypes are being kept in qxl.h, as common MACROS and inline > functions. Moreover, this commit is exposing a lot of APIs, don't know > if it's the correct way to do it, but it was the only way that we saw t= o > do it. Try enabling rename detection for this one (git format-patch -M). > diff --git a/hw/qxl.h b/hw/qxl.h > index f25e341..516e7da 100644 > --- a/hw/qxl.h > +++ b/hw/qxl.h > @@ -143,6 +143,44 @@ typedef struct QXLDevice { > } = \ > } while (0) > =20 > +/* > + * NOTE: SPICE_RING_PROD_ITEM accesses memory on the pci bar and as > + * such can be changed by the guest, so to avoid a guest trigerrable > + * abort we just qxl_set_guest_bug and set the return to NULL. Still > + * it may happen as a result of emulator bug as well. > + */ Why these are here and not in qxl-pci.c? > +void init_qxl_rom(QXLDevice *d); > +void init_qxl_ram(QXLDevice *d); Same question. > +void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info); > +int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)= ; > +int interface_req_cmd_notification(QXLInstance *sin); > +void interface_release_resource(QXLInstance *sin, struct QXLReleaseInf= oExt ext); > +int interface_get_cursor_command(QXLInstance *sin, struct QXLCommandEx= t *ext); > +int interface_req_cursor_notification(QXLInstance *sin); > +void interface_notify_update(QXLInstance *sin, uint32_t update_id); > +int interface_flush_resources(QXLInstance *sin); > +void interface_update_area_complete(QXLInstance *sin, uint32_t surface= _id, QXLRect *dirty, uint32_t num_updated_rects); > +void interface_async_complete(QXLInstance *sin, uint64_t cookie_token)= ; > +ram_addr_t qxl_rom_size(void); Same question. I'd expect at least some of these having a virtio-specific implementation. interface_get_command() for example, which gets a qxl command from the ring ... cheers, Gerd