From: Xiaojuan Yang <yangxiaojuan@loongson.cn>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Cc: yangxiaojuan <yangxiaojuan@loongson.cn>, qemu-devel@nongnu.org
Subject: [PATCH] fw_cfg: Set the max fw_cfg mem read size to 8 bytes
Date: Tue, 18 May 2021 20:43:14 +0800 [thread overview]
Message-ID: <1621341794-1041-1-git-send-email-yangxiaojuan@loongson.cn> (raw)
From: yangxiaojuan <yangxiaojuan@loongson.cn>
fw_cfg_data_read() func supports access widths from
1 to 8 bytes while the ops set the wrong read size.
Most arch use 8 bytes to send ram_size to bios.
Signed-off-by: yangxiaojuan <yangxiaojuan@loongson.cn>
---
hw/nvram/fw_cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 9b8dcca4ea..242614152c 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -540,7 +540,7 @@ static const MemoryRegionOps fw_cfg_data_mem_ops = {
.endianness = DEVICE_BIG_ENDIAN,
.valid = {
.min_access_size = 1,
- .max_access_size = 1,
+ .max_access_size = 8,
.accepts = fw_cfg_data_mem_valid,
},
};
--
2.27.0
next reply other threads:[~2021-05-18 12:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 12:43 Xiaojuan Yang [this message]
2021-05-18 15:49 ` [PATCH] fw_cfg: Set the max fw_cfg mem read size to 8 bytes Laszlo Ersek
2021-05-19 3:08 ` yangxiaojuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1621341794-1041-1-git-send-email-yangxiaojuan@loongson.cn \
--to=yangxiaojuan@loongson.cn \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).