From: Andrew Melnychenko <andrew@daynix.com>
To: mst@redhat.com
Cc: qemu-devel@nongnu.org
Subject: [PATCH 0/3] virtio-pci: Checks for virtio device presence on the bus.
Date: Wed, 9 Jun 2021 12:58:40 +0300 [thread overview]
Message-ID: <20210609095843.141378-1-andrew@daynix.com> (raw)
At some point, after unplugging virtio-pci the virtio device may be unrealised,
but the memory regions may be present in flatview. So, it's a possible situation
when memory region's callbacks are called for "unplugged" device.
In patches were added checks for virtio device presence on virtio-bus.
Added checks in PCI config callbacks. Also changed return values in memory
regions read if virtio not present.
BZ link https://bugzilla.redhat.com/show_bug.cgi?id=1938042
The issue similar to https://bugzilla.redhat.com/show_bug.cgi?id=1743098
Backtrace:
at ../hw/virtio/virtio-pci.c:1271
proxy = 0x560b535f8bf0
vdev = 0x0
(mr=<optimized out>, addr=<optimized out>, value=<optimized out>, size=<optimized out>, shift=<optimized out>, mask=<optimized out>, attrs=...) at ../softmmu/memory.c:491
tmp = <optimized out>
(addr=addr@entry=22, value=value@entry=0x7fd743dfe518, size=size@entry=2, access_size_min=<optimized out>, access_size_max=<optimized out>, access_fn=0x560b513fc500 <memory_region_write_accessor>, mr=0x560b535f95d0, attrs=...) at ../softmmu/memory.c:552
access_mask = 65535
access_size = 2
i = <optimized out>
r = 0
(mr=mr@entry=0x560b535f95d0, addr=22, data=<optimized out>, op=<optimized out>, attrs=attrs@entry=...) at ../softmmu/memory.c:1501
size = 2
(fv=fv@entry=0x7fd6f005d3b0, addr=addr@entry=4246716438, attrs=..., ptr=ptr@entry=0x7fe69b2b0028, len=len@entry=2, addr1=<optimized out>, l=<optimized out>, mr=0x560b535f95d0)
at /usr/src/debug/qemu-kvm-5.2.0-11.module+el8.4.0+10268+62bcbbed.x86_64/include/qemu/host-utils.h:164
ram_ptr = <optimized out>
val = <optimized out>
result = 0
release_lock = true
buf = 0x7fe69b2b0028 ""
at ../softmmu/physmem.c:2799
l = 2
addr1 = 22
mr = <optimized out>
result = 0
_rcu_read_auto = 0x1
result = 0
fv = <optimized out>
attrs = {unspecified = 0, secure = 0, user = 0, requester_id = 0, byte_swap = 0, target_tlb_bit0 = 0, target_tlb_bit1 = 0, target_tlb_bit2 = 0}
run = <optimized out>
ret = <optimized out>
run_ret = 0
cpu = 0x560b522738d0
r = <optimized out>
__clframe = {__cancel_routine = <optimized out>, __cancel_arg = 0x0, __do_it = 1, __cancel_type = <optimized out>}
qemu_thread_args = 0x560b5229a6f0
start_routine = 0x560b513faeb0 <kvm_vcpu_thread_fn>
arg = 0x560b522738d0
r = <optimized out>
Andrew Melnychenko (3):
virtio-pci: Added check for virtio device presence in mm callbacks.
virtio-pci: Added check for virtio device in PCI config cbs.
virtio-pci: Changed return values for "notify", "device" and "isr"
read.
hw/virtio/virtio-pci.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
--
2.31.1
next reply other threads:[~2021-06-09 10:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 9:58 Andrew Melnychenko [this message]
2021-06-09 9:58 ` [PATCH 1/3] virtio-pci: Added check for virtio device presence in mm callbacks Andrew Melnychenko
2021-06-09 9:58 ` [PATCH 2/3] virtio-pci: Added check for virtio device in PCI config cbs Andrew Melnychenko
2021-06-09 9:58 ` [PATCH 3/3] virtio-pci: Changed return values for "notify", "device" and "isr" read Andrew Melnychenko
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=20210609095843.141378-1-andrew@daynix.com \
--to=andrew@daynix.com \
--cc=mst@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).