From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNJAx-0002sp-6Z for qemu-devel@nongnu.org; Fri, 29 Aug 2014 06:13:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNJAd-0001l1-FV for qemu-devel@nongnu.org; Fri, 29 Aug 2014 06:12:59 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:50931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNJAc-0001hu-Qd for qemu-devel@nongnu.org; Fri, 29 Aug 2014 06:12:39 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Aug 2014 20:12:37 +1000 From: Alexey Kardashevskiy Date: Fri, 29 Aug 2014 20:12:14 +1000 Message-Id: <1409307142-2600-11-git-send-email-aik@ozlabs.ru> In-Reply-To: <1409307142-2600-1-git-send-email-aik@ozlabs.ru> References: <1409307142-2600-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [RFC PATCH v3 10/18] spapr_pci: Define DDW callbacks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Alex Williamson , qemu-ppc@nongnu.org, Alexander Graf , David Gibson This adds callbacks definitions which PHB needs to implement in order to support dynamic DMA windows (DDW). Will be squashed later. Signed-off-by: Alexey Kardashevskiy --- include/hw/pci-host/spapr.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h index 3892f1a..6658b9c 100644 --- a/include/hw/pci-host/spapr.h +++ b/include/hw/pci-host/spapr.h @@ -49,6 +49,24 @@ struct sPAPRPHBClass { PCIHostBridgeClass parent_class; void (*finish_realize)(sPAPRPHBState *sphb, Error **errp); + +/* sPAPR spec defined pagesize mask values */ +#define DDW_PGSIZE_4K 0x01 +#define DDW_PGSIZE_64K 0x02 +#define DDW_PGSIZE_16M 0x04 +#define DDW_PGSIZE_32M 0x08 +#define DDW_PGSIZE_64M 0x10 +#define DDW_PGSIZE_128M 0x20 +#define DDW_PGSIZE_256M 0x40 +#define DDW_PGSIZE_16G 0x80 + + int (*ddw_query)(sPAPRPHBState *sphb, uint32_t *windows_available, + uint32_t *page_size_mask); + int (*ddw_create)(sPAPRPHBState *sphb, uint32_t page_shift, + uint32_t window_shift, uint32_t liobn, + sPAPRTCETable **ptcet); + int (*ddw_remove)(sPAPRPHBState *sphb, sPAPRTCETable *tcet); + int (*ddw_reset)(sPAPRPHBState *sphb); }; typedef struct spapr_pci_msi { -- 2.0.0