From 8d7b8cb9c22b7aa809050800a62e89f869054b35 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sat, 16 Aug 2014 13:55:37 +0800 Subject: iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps Add a bool variable is_write as a parameter to the translate function of MemoryRegionIOMMUOps to indicate the operation of the access. It can be used for correct fault reporting from within the callback. Change the interface of related functions. Signed-off-by: Le Tan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/alpha/typhoon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/alpha') diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index 67a1070..31947d9 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -660,7 +660,8 @@ static bool window_translate(TyphoonWindow *win, hwaddr addr, /* Handle PCI-to-system address translation. */ /* TODO: A translation failure here ought to set PCI error codes on the Pchip and generate a machine check interrupt. */ -static IOMMUTLBEntry typhoon_translate_iommu(MemoryRegion *iommu, hwaddr addr) +static IOMMUTLBEntry typhoon_translate_iommu(MemoryRegion *iommu, hwaddr addr, + bool is_write) { TyphoonPchip *pchip = container_of(iommu, TyphoonPchip, iommu); IOMMUTLBEntry ret; -- cgit v1.1