From patchwork Sat Apr 20 16:14:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10910379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6B49922 for ; Sat, 20 Apr 2019 16:16:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9918D286BD for ; Sat, 20 Apr 2019 16:16:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D3C228797; Sat, 20 Apr 2019 16:16:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 95A3E28774 for ; Sat, 20 Apr 2019 16:16:16 +0000 (UTC) Received: from localhost ([127.0.0.1]:43108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHsf1-0005tH-PC for patchwork-qemu-devel@patchwork.kernel.org; Sat, 20 Apr 2019 12:16:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHsdm-0004qD-2g for qemu-devel@nongnu.org; Sat, 20 Apr 2019 12:14:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHsdl-0001sT-9U for qemu-devel@nongnu.org; Sat, 20 Apr 2019 12:14:58 -0400 Received: from m12-13.163.com ([220.181.12.13]:43525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHsdj-0001pk-Qo for qemu-devel@nongnu.org; Sat, 20 Apr 2019 12:14:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=nto7dRdt8+6HlFMrTC L4RjigEIgC4k8QVhUb2RlYSSc=; b=H6VeRnKJG0WJgylteVj/2p0YduTNT3XSSK 3Z6Zu9QkpVQyJXgOZXToFbBGKhICWY2GuiI4WvnaLOFaSJgZaGG5SEoQFsKICJ0D qEnWEhIpdjMP9iVpiUoxv7XgiDj9O8fuNBxoiiy80UMUXGMNNf7KJ7uWJ4lBvfUS 6AL9880ao= Received: from localhost.localdomain (unknown [183.159.69.175]) by smtp9 (Coremail) with SMTP id DcCowAAXzKN4RbtcjaXHAg--.9660S4; Sun, 21 Apr 2019 00:14:52 +0800 (CST) From: Li Qiang To: jslaby@suse.cz, pbonzini@redhat.com Date: Sat, 20 Apr 2019 09:14:45 -0700 Message-Id: <20190420161446.2274-3-liq3ea@163.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190420161446.2274-1-liq3ea@163.com> References: <20190420161446.2274-1-liq3ea@163.com> X-CM-TRANSID: DcCowAAXzKN4RbtcjaXHAg--.9660S4 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUcj2NDUUUU X-Originating-IP: [183.159.69.175] X-CM-SenderInfo: 5oltjvrd6rljoofrz/xtbBLxycbVUMI5lrMAAAs6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 220.181.12.13 Subject: [Qemu-devel] [PATCH v2 2/3] edu: mmio: allow mmio read dispatch accept 8 bytes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang , liq3ea@gmail.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The edu spec said when address >= 0x80, the MMIO area can be accessed by 8 bytes. Signed-off-by: Li Qiang --- hw/misc/edu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 65fc32b928..4018dddcb8 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -189,6 +189,10 @@ static uint64_t edu_mmio_read(void *opaque, hwaddr addr, unsigned size) return val; } + if (addr >= 0x80 && size != 4 && size != 8) { + return val; + } + switch (addr) { case 0x00: val = 0x010000edu;