qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/3] virtio-pci: Checks for virtio device presence on the bus.


From: Andrew Melnychenko
Subject: [PATCH 0/3] virtio-pci: Checks for virtio device presence on the bus.
Date: Wed, 9 Jun 2021 12:58:40 +0300

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]