qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] qxl: split qxl functions in common and pci


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 2/4] qxl: split qxl functions in common and pci files
Date: Mon, 27 Aug 2012 08:05:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120714 Thunderbird/10.0.6

On 08/24/12 21:14, Erlon Cruz wrote:
> From: Fabiano FidĂȘncio <address@hidden>
> 
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]