* [Qemu-devel] vhost broken?
@ 2012-01-05 11:05 Gerd Hoffmann
2012-01-05 11:16 ` Avi Kivity
0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2012-01-05 11:05 UTC (permalink / raw)
To: qemu-devel@nongnu.org, Avi Kivity
Hi,
current master seems to corrupt guest memory, I get guest errors like
this one:
swap_dup: Bad swap file entry 1999800080
BUG: Bad page map in process udevd pte:bec5f30054520100 pmd:1f6f4067
addr:00007fc464a02000 vm_flags:00100073 anon_vma:ffff88001f928ec0
mapping:(null) index:7fc464a02
Pid: 555, comm: udevd Not tainted 2.6.32-220.el6.x86_64 #1
bisecting points to this commit:
commit 04097f7c5957273c578f72b9bd603ba6b1d69e33
Author: Avi Kivity <avi@redhat.com>
Date: Sun Dec 18 14:06:05 2011 +0200
vhost: convert to MemoryListener API
cheers,
Gerd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] vhost broken?
2012-01-05 11:05 [Qemu-devel] vhost broken? Gerd Hoffmann
@ 2012-01-05 11:16 ` Avi Kivity
2012-01-05 11:33 ` Gerd Hoffmann
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Avi Kivity @ 2012-01-05 11:16 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel@nongnu.org, Michael S. Tsirkin
On 01/05/2012 01:05 PM, Gerd Hoffmann wrote:
> Hi,
>
> current master seems to corrupt guest memory, I get guest errors like
> this one:
>
> swap_dup: Bad swap file entry 1999800080
> BUG: Bad page map in process udevd pte:bec5f30054520100 pmd:1f6f4067
> addr:00007fc464a02000 vm_flags:00100073 anon_vma:ffff88001f928ec0
> mapping:(null) index:7fc464a02
> Pid: 555, comm: udevd Not tainted 2.6.32-220.el6.x86_64 #1
>
> bisecting points to this commit:
>
> commit 04097f7c5957273c578f72b9bd603ba6b1d69e33
> Author: Avi Kivity <avi@redhat.com>
> Date: Sun Dec 18 14:06:05 2011 +0200
>
> vhost: convert to MemoryListener API
>
Very likely. Michael, can you help?
I don't have a vhost setup, can you share your command line?
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] vhost broken?
2012-01-05 11:16 ` Avi Kivity
@ 2012-01-05 11:33 ` Gerd Hoffmann
2012-01-05 11:37 ` Daniel P. Berrange
2012-01-05 15:00 ` Michael S. Tsirkin
2 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2012-01-05 11:33 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel@nongnu.org, Michael S. Tsirkin
Hi,
> I don't have a vhost setup, can you share your command line?
Just use libvirt which enables it automagically if possible ;)
Command line from /var/log/libvirt/qemu/rhel6-org-scsi.lsi.log is below
(but probably doesn't buy you that much as it wouldn't work without the
vhost/tap fd setup libvirt is doing).
cheers,
Gerd
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=spice
/home/kraxel/bin/qemu-default -S -M pc-1.0 -enable-kvm -m 512 -smp
1,sockets=1,cores=1,threads=1 -name rhel6-org-scsi.lsi -uuid
d67eb0e9-6a0d-faa0-308e-898692f8700d -nodefconfig -nodefaults -device
sga -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel6-org-scsi.lsi.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-shutdown -boot order=c,menu=on -device
lsi,id=scsi0,bus=pci.0,addr=0x5 -device
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x9 -drive
file=/vmdisk/guests/rhel6.img,if=none,id=drive-scsi0-0-0,format=qcow2,cache=none,aio=threads
-device
scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0
-netdev tap,fd=26,id=hostnet0,vhost=on,vhostfd=27 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c4:31:86,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
spicevmc,id=charchannel0,name=vdagent -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
-usb -device usb-tablet,id=input0 -spice
port=5900,addr=127.0.0.1,disable-ticketing -vga qxl -global
qxl-vga.vram_size=67108864 -device
intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -bios
/home/kraxel/rhel6/seabios/out/bios.bin -readconfig
/home/kraxel/rhel6/qemu-kvm/docs/ich9-ehci-uhci.cfg -readconfig
/root/libvirt/all-usbdrives.cfg -readconfig /root/libvirt/rhel6.cfg
-trace events=/root/libvirt/usb-host.events -option-rom
romfile=/root/roms/8xx_64.rom,bootindex=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] vhost broken?
2012-01-05 11:16 ` Avi Kivity
2012-01-05 11:33 ` Gerd Hoffmann
@ 2012-01-05 11:37 ` Daniel P. Berrange
2012-01-05 15:00 ` Michael S. Tsirkin
2 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrange @ 2012-01-05 11:37 UTC (permalink / raw)
To: Avi Kivity; +Cc: Michael S. Tsirkin, Gerd Hoffmann, qemu-devel@nongnu.org
On Thu, Jan 05, 2012 at 01:16:22PM +0200, Avi Kivity wrote:
> On 01/05/2012 01:05 PM, Gerd Hoffmann wrote:
> > Hi,
> >
> > current master seems to corrupt guest memory, I get guest errors like
> > this one:
> >
> > swap_dup: Bad swap file entry 1999800080
> > BUG: Bad page map in process udevd pte:bec5f30054520100 pmd:1f6f4067
> > addr:00007fc464a02000 vm_flags:00100073 anon_vma:ffff88001f928ec0
> > mapping:(null) index:7fc464a02
> > Pid: 555, comm: udevd Not tainted 2.6.32-220.el6.x86_64 #1
> >
> > bisecting points to this commit:
> >
> > commit 04097f7c5957273c578f72b9bd603ba6b1d69e33
> > Author: Avi Kivity <avi@redhat.com>
> > Date: Sun Dec 18 14:06:05 2011 +0200
> >
> > vhost: convert to MemoryListener API
> >
>
> Very likely. Michael, can you help?
>
> I don't have a vhost setup, can you share your command line?
All you need to do is take your existing -netdev command line,
and add in the parameter:
vhost=on
Libvirt does some extra stuff like passing down a pre-opened vhost
file descriptor, but you can ignore that for just testing the core
functionality.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] vhost broken?
2012-01-05 11:16 ` Avi Kivity
2012-01-05 11:33 ` Gerd Hoffmann
2012-01-05 11:37 ` Daniel P. Berrange
@ 2012-01-05 15:00 ` Michael S. Tsirkin
2012-01-20 22:13 ` Lutz Vieweg
2 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2012-01-05 15:00 UTC (permalink / raw)
To: Avi Kivity; +Cc: Gerd Hoffmann, qemu-devel@nongnu.org
On Thu, Jan 05, 2012 at 01:16:22PM +0200, Avi Kivity wrote:
> On 01/05/2012 01:05 PM, Gerd Hoffmann wrote:
> > Hi,
> >
> > current master seems to corrupt guest memory, I get guest errors like
> > this one:
> >
> > swap_dup: Bad swap file entry 1999800080
> > BUG: Bad page map in process udevd pte:bec5f30054520100 pmd:1f6f4067
> > addr:00007fc464a02000 vm_flags:00100073 anon_vma:ffff88001f928ec0
> > mapping:(null) index:7fc464a02
> > Pid: 555, comm: udevd Not tainted 2.6.32-220.el6.x86_64 #1
> >
> > bisecting points to this commit:
> >
> > commit 04097f7c5957273c578f72b9bd603ba6b1d69e33
> > Author: Avi Kivity <avi@redhat.com>
> > Date: Sun Dec 18 14:06:05 2011 +0200
> >
> > vhost: convert to MemoryListener API
> >
>
> Very likely. Michael, can you help?
>
> I don't have a vhost setup, can you share your command line?
Just chmod /dev/vhost-net to allow access, then
add vhost=on to the tap device.
Example
-netdev
tap,id=foo,ifname=msttap0,script=/home/mst/ifup,downscript=no,vhost=on
-device virtio-net-pci,netdev=foo
> --
> error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] vhost broken?
2012-01-05 15:00 ` Michael S. Tsirkin
@ 2012-01-20 22:13 ` Lutz Vieweg
2012-01-21 10:06 ` Michael Tokarev
0 siblings, 1 reply; 7+ messages in thread
From: Lutz Vieweg @ 2012-01-20 22:13 UTC (permalink / raw)
To: qemu-devel
On 01/05/2012 04:00 PM, Michael S. Tsirkin wrote:
> Just chmod /dev/vhost-net to allow access
I wonder whether it's considered a security risk to allow non-root
users access to /dev/vhost-net?
(Or is there a way to have root prepare limited use of vhost for only
some users or some network devices?)
Regards,
Lutz Vieweg
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] vhost broken?
2012-01-20 22:13 ` Lutz Vieweg
@ 2012-01-21 10:06 ` Michael Tokarev
0 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2012-01-21 10:06 UTC (permalink / raw)
To: Lutz Vieweg; +Cc: qemu-devel
On 21.01.2012 02:13, Lutz Vieweg wrote:
> On 01/05/2012 04:00 PM, Michael S. Tsirkin wrote:
>> Just chmod /dev/vhost-net to allow access
>
> I wonder whether it's considered a security risk to allow non-root
> users access to /dev/vhost-net?
>
> (Or is there a way to have root prepare limited use of vhost for only
> some users or some network devices?)
Usual idiom is to create a dedicated group, chgrp
/dev/vhost-net to this group and add g+rw permission.
That lets you to add users to that group to grant them
access.
Initially it was believed that /dev/kvm poses no security
implications whatsoever and can be mode 0666. But later
on several security bugs has been discovered in this
subsystem, so it is a good idea to not grant extra
privileges by default.
/mjt
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-21 10:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-05 11:05 [Qemu-devel] vhost broken? Gerd Hoffmann
2012-01-05 11:16 ` Avi Kivity
2012-01-05 11:33 ` Gerd Hoffmann
2012-01-05 11:37 ` Daniel P. Berrange
2012-01-05 15:00 ` Michael S. Tsirkin
2012-01-20 22:13 ` Lutz Vieweg
2012-01-21 10:06 ` Michael Tokarev
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).