Bug 618788 - device-assignment hangs with kvm_run: Bad address
Summary: device-assignment hangs with kvm_run: Bad address
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Virtualization Bugs
: 619989 (view as bug list)
Depends On:
Blocks: 611715
TreeView+ depends on / blocked
Reported: 2010-07-27 18:06 UTC by Alex Williamson
Modified: 2013-01-09 22:57 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 21:27:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Alex Williamson 2010-07-27 18:06:53 UTC
Description of problem:
Assigning a device with an option ROM on kernel 2.6.32-52.el6.x86_64 results in:

kvm_run: Bad address
kvm_run returned -14

and the guest stops

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. assign dev with option ROM
Actual results:

Expected results:

Additional info:

Comment 1 Dor Laor 2010-07-28 09:37:05 UTC
Alex, can you please provide the use case where this error is found?
I'm trying to better qualify it as a blocker, so use case of 'this specific nic device assignment failed' is desired.

Comment 2 Alex Williamson 2010-07-28 13:03:53 UTC
Dor, any device with an option rom will generate the bad address error and cause the guest to hang, whether the option rom is needed by the guest drivers or not.  This includes things like kawela and niantic physical functions, nearly any nic that supports pxe boot on the host, and various other cards.  Device assignment is nearly unusable without this change.  This change is only now necessary because the -52 kernel included this change from kvm.git:

commit b4f8c24994f8fd8fedb304dc6aa23557fdced21c
Author: Gleb Natapov <gleb@redhat.com>
Date:   Wed Jul 7 20:16:45 2010 +0300

    KVM: Return EFAULT from kvm ioctl when guest accesses bad area
    Currently if guest access address that belongs to memory slot but is not
    backed up by page or page is read only KVM treats it like MMIO access.
    Remove that capability. It was never part of the interface and should
    not be relied upon.
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>

Comment 5 Chris Wright 2010-07-31 17:54:46 UTC
*** Bug 619989 has been marked as a duplicate of this bug. ***

Comment 6 Shirley Zhou 2010-08-03 05:42:39 UTC
Reporduced on qemu-kvm-

Verified on qemu-kvm-

hw info :
28:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet Controller (Copper) (rev 06)

/usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name pci-6.64 -uuid 74b17311-f33f-8b6c-f1e5-f12f9fcd4909 -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/pci-6.64.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -no-reboot -boot c -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.S15PWj -initrd /var/lib/libvirt/boot/virtinst-initrd.img.j5yEXp -append method=http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL6.0-20100722.0/6.0/Server/x86_64/os -drive file=/home/images/pci-assignment.img,if=none,id=drive-virtio-disk0,boot=on,format=raw,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x5 -device pci-assign,host=28:00.0,id=hostdev0,configfd=18,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

The guest can install successfully. Change status to verified.

Comment 7 releng-rhel@redhat.com 2010-11-10 21:27:00 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.