From nobody Sat Apr 5 01:11:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1567528849; cv=none; d=zoho.com; s=zohoarc; b=BRmfePqe2Sb32Vlj0gSGKxdmQlo0VawtmEK25ih13BsQQFkXtoY3ln910964ActfhRjTefCA9a+kuKqFvf8R6NvgZJX3oSzdArx6T6RpeRxb4fNV5G7gLiUnD6jr5tS8DfWJUWWN/raWj/xwvrH6J95h9zxJtkVTVs/ZN4W6TZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567528849; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=IUucvckgBKMbyf9pJkZMtE+2aTYnMo7TXpA6BtThwRg=; b=GS/2DLFgRdJl/xfvC820IQIdSuIL6peJDMNSeOiUsKQvlBZ46BkhEJHvO9l95eS6mzCbik5hGdaH+tPyTfCS7ZKvsxn1YRbvSKHE8Hpe0LpkUlzmHEKhqpq5b/PWbiUY0I+xRbhY46IH51EwSvtOYP/+bDO09ZlCTFQ+uzsi020= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567528849387631.0533389547672; Tue, 3 Sep 2019 09:40:49 -0700 (PDT) Received: from localhost ([::1]:49148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BrL-0002JH-V8 for importer@patchew.org; Tue, 03 Sep 2019 12:40:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BMm-000107-LJ for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5BMk-0003fe-LB for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:12 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:44927) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5BMk-0003eb-FU for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:10 -0400 Received: by mail-pg1-x543.google.com with SMTP id i18so9386937pgl.11 for ; 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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:09:07 -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=IUucvckgBKMbyf9pJkZMtE+2aTYnMo7TXpA6BtThwRg=; b=wQimXJm+NV1QEGqk24MjKUH5S6jbhOLcLSkMtn7F6olyxzfjZTSQUZmMgb/HqOu4dR OHHrEXz9BJf0fdinYZuzipPEVP6HN6Q29VB2akyjxyn7nJfBJuDYUDVJBbkyl/dZy9O7 ed1OAUyg5COtl/6+E1qjdawBzTI9Z19ywGU1RpBbkrlqqM/KPOcQ1cd25O7k9iLBkbA+ cE+SMYmGtUzrj+nsj0Q1wr9hUrIT8nTMusB8ckeIguhs4b6G77dkB2YmiqhJGk45pDUP FvnQAfUN7tD6QtxyGOV4iF13gM/foWI1uN/09baIX1xzsuJ/un4WoZIeC/MEL4uczIRq x5HA== 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=IUucvckgBKMbyf9pJkZMtE+2aTYnMo7TXpA6BtThwRg=; b=GixH0yHYjdQUkvjgu3XJVaVXFRrRdfhSjuHM7DGrfBP4+KqbSSb/N3VDse488/wOb6 7hD+2C5kFaoGHAfCEhm6U8KmRM/pwhwAs+MGGyx/mcqtakKSlK+QHfk0WxkDL6hL24YK fShjhwVWGzJyx29tdBv9oZ/hVc5eypJx8QwaGy2clQCeu0R7o8j1TTHUZ+g/IndXVNdu jTC5TofuB7Xn5AY/bnBQJJhvWf/0XBuIpT2zaHXq6jdUgKn5LWP2jVsv5XfOs08whIY3 vLz1QB8jK6nhxk8D5v+kKb4UCCdCyViaVPPs07dn2PBgCw1nWaYjJnwmQABNtwClRfWw kl/g== X-Gm-Message-State: APjAAAW3/07cF/wZoORSOKD8hFehAoG0zUTXOiUAtJsmruLNMaY2Ibst Ye5G6GgqnfF1d7qzDzajn7QE1YedBIc= X-Google-Smtp-Source: APXvYqylbN2OZp4U0Xt1FAk/P5teYyYaq1fUOs/5WZPP/WV8An+sKTu/JmuyUKhdINYI9vyrCvzL1w== X-Received: by 2002:a63:3805:: with SMTP id f5mr30721138pga.272.1567526948336; Tue, 03 Sep 2019 09:09:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 09:08:28 -0700 Message-Id: <20190903160858.5296-7-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::543 Subject: [Qemu-devel] [PATCH 06/36] hw/virtio: 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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/virtio/virtio-pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 8babd92e59..82c5e87a44 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -17,6 +17,7 @@ =20 #include "qemu/osdep.h" =20 +#include "exec/memop.h" #include "standard-headers/linux/virtio_pci.h" #include "hw/virtio/virtio.h" #include "migration/qemu-file-types.h" @@ -552,7 +553,8 @@ void virtio_address_space_write(VirtIOPCIProxy *proxy, = hwaddr addr, /* As length is under guest control, handle illegal values. */ return; } - memory_region_dispatch_write(mr, addr, val, len, MEMTXATTRS_UNSPECIFIE= D); + memory_region_dispatch_write(mr, addr, val, size_memop(len), + MEMTXATTRS_UNSPECIFIED); } =20 static void @@ -575,7 +577,8 @@ virtio_address_space_read(VirtIOPCIProxy *proxy, hwaddr= addr, /* Make sure caller aligned buf properly */ assert(!(((uintptr_t)buf) & (len - 1))); =20 - memory_region_dispatch_read(mr, addr, &val, len, MEMTXATTRS_UNSPECIFIE= D); + memory_region_dispatch_read(mr, addr, &val, size_memop(len), + MEMTXATTRS_UNSPECIFIED); switch (len) { case 1: pci_set_byte(buf, val); --=20 2.17.1