From patchwork Tue Sep 3 16:08:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172837 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp71045ily; Tue, 3 Sep 2019 09:21:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4GGo+fWFvuZkyo2kCBJCCARRlOjo0U3VR58x+IEGvj56O5QaKkxUXXmsKojJla7kOeXSE X-Received: by 2002:a37:a943:: with SMTP id s64mr21514257qke.404.1567527703804; Tue, 03 Sep 2019 09:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567527703; cv=none; d=google.com; s=arc-20160816; b=lTD5a3GcDax9u9zvrmZNd9/K4jEAlo6CSM6IyaUI/owltlSHDImbkQrruI+LgggHpK KKa758xVyt58wlyIcFFQQCG86MjhSvLrtkrVceki8q9GyZzfXsG/DzAEGHgVhFDFOkUd JJgRvExwhZ/pveZtfoUkiHCax8H23cbeNo8P/ekItOPI4ol/GQvdPIW6POAaBWatp4+6 IcARAtkJ7Hdf83Za3rvs4e4Pmf8aEI+RqPuwxKFRxJy51uB+QsOz5TY8nZt+t5LnQALI qFDFUkd7RAa8089Xg3ZDQxsepAeWff/lG5hIRlCnAQwgL/BUAR3gxOuLuIi7uLk1SOn3 pO1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=yA2tCG225nmRvmvSYliNTgGqIpVngsbzb4LG/KhgDa8=; b=yJ/+Ehn3wX6iVyluGYNfUXLuoAZUU/Ub1Vz+c1o9y36j+IN+EsMmu+qL/mJ7BH3IEA WdLa18leAb2hx/QsrDfuvfSwZIo/q/bAl+JUJJ6sW8GnZuGJOdMWJK24wS8s3+wFGr4f WTxjGZZpLO3/BQb6PEJEefB6XRRbuOqI/ERr7aktBf4NQq4YFltHT4GwH8KRX9EUHF6x Q59MiGdsXMo7UFR45RWgYwEFYaoe0BoPY+24mtK3KnreGN4PqlJvOiCIUw9IwDe7yFCQ A7L5GEcIpNOBsPVv/6m5xizHJ89drRUCWALrhK1OrNl7359N3DQbgABwTy8jMjg3akqm Sehw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ke3SGaZp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 13si9048327qtt.174.2019.09.03.09.21.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Sep 2019 09:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ke3SGaZp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BYs-00050f-Um for patch@linaro.org; Tue, 03 Sep 2019 12:21:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37139) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BMp-00012v-P4 for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5BMo-0003hK-JA for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:15 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:35890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5BMm-0003fQ-Ir for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:12 -0400 Received: by mail-pf1-x444.google.com with SMTP id y22so5434946pfr.3 for ; Tue, 03 Sep 2019 09:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yA2tCG225nmRvmvSYliNTgGqIpVngsbzb4LG/KhgDa8=; b=ke3SGaZpp583Zt3nK84PL3TxAgya2rEu4q+EQN3uHtNLp3nRHwYz0e5gBtN8JkrY5Y dMZrYv5i+NPUw/p9WEUT7OwPkdBqizYxvhR0nCFOKkLquI8AXUOGTLyOTbtouszyNJXz wybF1c9vqP12tHK2EbnMzNVezx3l8kUQH1bhRuhxVJ5NBuWU8CLxJAv9kePoFdwcIP9L 2Dth9InO/hDKuB7Wr6ayF3wmiCLqVGWaBD98d8azSODwtjxbNE7mLcWcBzTW/p7veSTT Ue6YUeay/2IAgCWz3BNILjPlD2UtrRzL4mKCnMl3Z68Zo7U/sqJ8nr83gRX8lKMOAZaQ XFcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yA2tCG225nmRvmvSYliNTgGqIpVngsbzb4LG/KhgDa8=; b=bdHBqEAJhMytkApa+MaK5CWfHODmn8mVYxwLkohpsSTBYZRdaLe8GmpauIC1j0tLic 2Dmflq5lut8ZrKV0x+/t9NhVTnta5v0HKHYCvgctRsXAs72vL2MiJb+p8HmgvNnHEYDf z8iqziSnIIF4xQyoGQfigV1sCxu0JxQrf+tykEVuQQqNm40b6a3Vo86rmWyMWejygbwJ Z6aCfh0rH1j3BFocTxeFpEMitGMQIYKB/FyMOiq/ajAtMEgajKRcuRcVUBRRVXHmahC9 qpPYdozO7FKso9Qy+kBE2okj5ya8LvX1ExEX4M115fh/w/9AiazIuqJ8KdsE7VtIxmH4 a9eQ== X-Gm-Message-State: APjAAAVc7cXrMY2d9zvtFvq5noK352F75xg0qKcroE2ZBtI95ESIH/Zd JYE6cukhTB4UjW7Zl4jJT98NhevWUw4= X-Received: by 2002:a63:f118:: with SMTP id f24mr31782828pgi.322.1567526949600; Tue, 03 Sep 2019 09:09:09 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 127sm28089711pfy.56.2019.09.03.09.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:09:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 09:08:29 -0700 Message-Id: <20190903160858.5296-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903160858.5296-1-richard.henderson@linaro.org> References: <20190903160858.5296-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH 07/36] hw/vfio: Access MemoryRegion with MemOp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Tony Nguyen Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Tony Nguyen The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be converted into a "MemOp op". As size_memop is a no-op, this patch does not change any behaviour. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Message-Id: Signed-off-by: Richard Henderson --- hw/vfio/pci-quirks.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index f71aace156..a4e1d2abb5 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -11,6 +11,7 @@ */ #include "qemu/osdep.h" +#include "exec/memop.h" #include "qemu/units.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" @@ -1073,7 +1074,7 @@ static void vfio_rtl8168_quirk_address_write(void *opaque, hwaddr addr, /* Write to the proper guest MSI-X table instead */ memory_region_dispatch_write(&vdev->pdev.msix_table_mmio, - offset, val, size, + offset, val, size_memop(size), MEMTXATTRS_UNSPECIFIED); } return; /* Do not write guest MSI-X data to hardware */ @@ -1104,7 +1105,8 @@ static uint64_t vfio_rtl8168_quirk_data_read(void *opaque, if (rtl->enabled && (vdev->pdev.cap_present & QEMU_PCI_CAP_MSIX)) { hwaddr offset = rtl->addr & 0xfff; memory_region_dispatch_read(&vdev->pdev.msix_table_mmio, offset, - &data, size, MEMTXATTRS_UNSPECIFIED); + &data, size_memop(size), + MEMTXATTRS_UNSPECIFIED); trace_vfio_quirk_rtl8168_msix_read(vdev->vbasedev.name, offset, data); }