aboutsummaryrefslogtreecommitdiff
path: root/qemu-ga.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2012-04-28 23:49:36 +1000
committerPaolo Bonzini <pbonzini@redhat.com>2012-05-04 10:39:52 +0200
commit381b634c275ca1a2806e97392527bbfc01bcb333 (patch)
tree47809b32d6aba27552b899ca3b794602b7d14d9f /qemu-ga.c
parenta5ee9085627eaeb501db31e3758df4e18500be71 (diff)
downloadqemu-381b634c275ca1a2806e97392527bbfc01bcb333.zip
qemu-381b634c275ca1a2806e97392527bbfc01bcb333.tar.gz
qemu-381b634c275ca1a2806e97392527bbfc01bcb333.tar.bz2
scsi: Specify the xfer direction for UNMAP and ATA_PASSTHROUGH commands
scsi_cmd_xfer_mode() is used to specify the xfer direction for SCSI commands that come in from the guest. If the direction is set incorrectly this will eventually cause QEMU to kernel-panic the guest. Add UNMAP and ATAPASSTHROUGH as commands that send data to the device. Without this change, recent kernels will send both UNMAP as well as ATAPASSTHROUGH commands to any /dev/sg* device, which due to the incorrect xfer direction very quickly causes the guest kernel to crash. Example causing a crash without the patch applied: ./x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cdrom linuxmint-12-gnome-dvd-64bit.iso -drive file=/dev/sg4,if=scsi,bus=0,unit=6 Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-ga.c')
0 files changed, 0 insertions, 0 deletions