On 08/24/12 21:14, Erlon Cruz wrote: > From: Fabiano FidĂȘncio <fabi...@fidencio.org> > > 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 to > 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) > > +/* > + * 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 QXLReleaseInfoExt > ext); > +int interface_get_cursor_command(QXLInstance *sin, struct QXLCommandExt > *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