From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Salva Peiró" <speirofr@gmail.com>
Subject: [Qemu-devel] [PULL 3/4] megasas: Add write function to handle write access to PCI BAR 3
Date: Tue, 28 Jul 2015 10:04:54 +0200 [thread overview]
Message-ID: <1438070695-24889-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1438070695-24889-1-git-send-email-pbonzini@redhat.com>
From: Salva Peiró <speirofr@gmail.com>
This patch fixes a QEMU SEGFAULT when a write operation is performed on
the memory region of the PCI BAR 3 (base address space).
When a writeb(0xe0000000) is performed the .write function is invoked to
handle the write access, however, since the .write is not initialised,
the call to 0, causes QEMU to SEGFAULT.
Signed-off-by: Salva Peiró <speirofr@gmail.com>
Acked-by: Hannes Reinecke <hare@suse.com>
Message-Id: <1437987112-24744-1-git-send-email-speirofr@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/megasas.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 51ba9e0..a04369c 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2202,8 +2202,15 @@ static uint64_t megasas_queue_read(void *opaque, hwaddr addr,
return 0;
}
+static void megasas_queue_write(void *opaque, hwaddr addr,
+ uint64_t val, unsigned size)
+{
+ return;
+}
+
static const MemoryRegionOps megasas_queue_ops = {
.read = megasas_queue_read,
+ .write = megasas_queue_write,
.endianness = DEVICE_LITTLE_ENDIAN,
.impl = {
.min_access_size = 8,
--
2.4.3
next prev parent reply other threads:[~2015-07-28 8:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 8:04 [Qemu-devel] [PULL 0/4] Fixes for 2.4.0-rc3 Paolo Bonzini
2015-07-28 8:04 ` [Qemu-devel] [PULL 1/4] crypto: fix built-in AES decrypt function Paolo Bonzini
2015-07-28 8:04 ` [Qemu-devel] [PULL 2/4] crypto: extend unit tests to cover decryption too Paolo Bonzini
2015-07-28 8:04 ` Paolo Bonzini [this message]
2015-07-28 8:04 ` [Qemu-devel] [PULL 4/4] memory: do not add a reference to the owner of aliased regions Paolo Bonzini
2015-07-28 14:24 ` [Qemu-devel] [PULL 0/4] Fixes for 2.4.0-rc3 Peter Maydell
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=1438070695-24889-4-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=speirofr@gmail.com \
/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).