Re: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus

2010-05-30 Thread Avi Kivity
On 05/12/2010 09:11 PM, Stefano Stabellini wrote: On Wed, 12 May 2010, Jamie Lokier wrote: Stefano Stabellini wrote: On Wed, 12 May 2010, Avi Kivity wrote: It's useful if you have a one-line horizontal pattern you want to propagate all over. It might be useful

Re: Info on Unix Domain Socket Device

2010-05-30 Thread Avi Kivity
On 05/29/2010 08:11 PM, Narendra Prasad Madanapalli wrote: Hi, There is a small scale TODO task in kvm, 'Add a Unix domain socket device. With this, the guest can talk to a pci device which is connected to a Unix domain socket on the host.'. I would like to park on this and contribute a patch.

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-30 Thread Avi Kivity
On 05/27/2010 07:02 PM, Glauber Costa wrote: + +Custom MSR list + + +The current supported Custom MSR list is: + +MSR_KVM_WALL_CLOCK: 0x11 + + data: physical address of a memory area. Which must be in guest RAM (i.e., don't point it somewhere random and expect the

Re: KVM: MMU: always invalidate and flush on spte page size change

2010-05-30 Thread Avi Kivity
On 05/28/2010 03:44 PM, Marcelo Tosatti wrote: Always invalidate spte and flush TLBs when changing page size, to make sure different sized translations for the same address are never cached in a CPU's TLB. The first case where this occurs is when a non-leaf spte pointer is overwritten by a

Re: [PATCHv2-RFC 0/2] virtio: put last seen used index into ring itself

2010-05-30 Thread Michael S. Tsirkin
On Fri, May 28, 2010 at 11:56:54AM +0200, Jes Sorensen wrote: On 05/26/10 21:50, Michael S. Tsirkin wrote: Here's a rewrite of the original patch with a new layout. I haven't tested it yet so no idea how this performs, but I think this addresses the cache bounce issue raised by Avi.

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-30 Thread Michael S. Tsirkin
On Fri, May 28, 2010 at 05:54:42PM +0200, Tejun Heo wrote: Hello, On 05/28/2010 05:08 PM, Michael S. Tsirkin wrote: Well, we have create_singlethread_workqueue, right? This is not very different ... is it? Just copying structures and code from workqueue.c, adding vhost_ in front of

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-05-30 Thread Avi Kivity
On 05/30/2010 03:19 PM, Michael S. Tsirkin wrote: On Fri, May 28, 2010 at 04:07:38PM -0700, Tom Lyon wrote: The VFIO driver is used to allow privileged AND non-privileged processes to implement user-level device drivers for any well-behaved PCI, PCI-X, and PCIe devices.

[PATCH 1/5] KVM: MMU: introduce some macros to cleanup hlist traverseing

2010-05-30 Thread Xiao Guangrong
Introduce for_each_gfn_sp(), for_each_gfn_indirect_sp() and for_each_gfn_indirect_valid_sp() to cleanup hlist traverseing Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 129 ++-- 1 files changed, 54

[PATCH 2/5] KVM: MMU: split the operations of kvm_mmu_zap_page()

2010-05-30 Thread Xiao Guangrong
Using kvm_mmu_prepare_zap_page() and kvm_mmu_commit_zap_page() to split kvm_mmu_zap_page() function, then we can: - traverse hlist safely - easily to gather remote tlb flush which occurs during page zapped Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

[PATCH 3/5] KVM: MMU: gather remote tlb flush which occurs during page zapped

2010-05-30 Thread Xiao Guangrong
Using kvm_mmu_prepare_zap_page() and kvm_mmu_zap_page() instead of kvm_mmu_zap_page() that can reduce remote tlb flush IPI Have tested with xp/vista64, fedora12 32/64 guests, and it not broken Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 75

[PATCH 4/5] KVM: MMU: traverse sp hlish safely

2010-05-30 Thread Xiao Guangrong
Now, we can safely to traverse sp hlish Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 53 +++ 1 files changed, 24 insertions(+), 29 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[PATCH 5/5] KVM: MMU: reduce remote tlb flush in kvm_mmu_pte_write()

2010-05-30 Thread Xiao Guangrong
collect remote tlb flush in kvm_mmu_pte_write() path Have tested with xp/vista64, fedora12 32/64 guests, and it not broken Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2010 at 03:27:05PM +0300, Avi Kivity wrote: On 05/30/2010 03:19 PM, Michael S. Tsirkin wrote: On Fri, May 28, 2010 at 04:07:38PM -0700, Tom Lyon wrote: The VFIO driver is used to allow privileged AND non-privileged processes to implement user-level device drivers for any

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-05-30 Thread Avi Kivity
On 05/29/2010 02:07 AM, Tom Lyon wrote: The VFIO driver is used to allow privileged AND non-privileged processes to implement user-level device drivers for any well-behaved PCI, PCI-X, and PCIe devices. + +Why is this interesting? Some applications, especially in the high performance

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2010 at 04:01:53PM +0300, Avi Kivity wrote: On 05/30/2010 03:49 PM, Michael S. Tsirkin wrote: On Sun, May 30, 2010 at 03:27:05PM +0300, Avi Kivity wrote: On 05/30/2010 03:19 PM, Michael S. Tsirkin wrote: On Fri, May 28, 2010 at 04:07:38PM -0700, Tom Lyon wrote:

Re: [PATCH 1/5] KVM: MMU: introduce some macros to cleanup hlist traverseing

2010-05-30 Thread Avi Kivity
On 05/30/2010 03:36 PM, Xiao Guangrong wrote: Introduce for_each_gfn_sp(), for_each_gfn_indirect_sp() and for_each_gfn_indirect_valid_sp() to cleanup hlist traverseing Signed-off-by: Xiao Guangrongxiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 129

Re: Perf trace event parse errors for KVM events

2010-05-30 Thread Steven Rostedt
On Sun, 2010-05-30 at 11:10 +0300, Avi Kivity wrote: On 05/29/2010 04:19 PM, Steven Rostedt wrote: The pretty printing from the kernel handles this fine. But there's pressure to pass the format to userspace in binary and have the tool parse it. Currently it uses the print fmt to

Re: Perf trace event parse errors for KVM events

2010-05-30 Thread Avi Kivity
On 05/30/2010 05:03 PM, Steven Rostedt wrote: Right. The tools can fall back to %x/%s based on the structure descriptor if they can't parse the format string. trace-cmd has plugin support to override how to read the format and print it out. It now has the ability to write those

Re: KVM: MMU: always invalidate and flush on spte page size change

2010-05-30 Thread Marcelo Tosatti
On Sun, May 30, 2010 at 01:28:19PM +0300, Avi Kivity wrote: On 05/28/2010 03:44 PM, Marcelo Tosatti wrote: Always invalidate spte and flush TLBs when changing page size, to make sure different sized translations for the same address are never cached in a CPU's TLB. The first case where this

Re: Perf trace event parse errors for KVM events

2010-05-30 Thread Steven Rostedt
On Sun, 2010-05-30 at 17:07 +0300, Avi Kivity wrote: On 05/30/2010 05:03 PM, Steven Rostedt wrote: Right. The tools can fall back to %x/%s based on the structure descriptor if they can't parse the format string. trace-cmd has plugin support to override how to read the format

[PATCH 2/3] cgroups: Add an API to attach a task to current task's cgroup

2010-05-30 Thread Tejun Heo
From: Sridhar Samudrala samudrala.srid...@gmail.com Add a new kernel API to attach a task to current task's cgroup in all the active hierarchies. Signed-off-by: Sridhar Samudrala s...@us.ibm.com --- include/linux/cgroup.h |1 + kernel/cgroup.c| 23 +++ 2 files

[PATCH 3/3] vhost: apply cpumask and cgroup to vhost pollers

2010-05-30 Thread Tejun Heo
Apply the cpumask and cgroup of the initializing task to the created vhost poller. Based on Sridhar Samudrala's patch. Cc: Michael S. Tsirkin m...@redhat.com Cc: Sridhar Samudrala samudrala.srid...@gmail.com --- drivers/vhost/vhost.c | 36 +++- 1 file changed,

[PATCH 3/3] arch/s390/kvm: Use GFP_ATOMIC when a lock is held

2010-05-30 Thread Julia Lawall
From: Julia Lawall ju...@diku.dk The containing function is called from several places. At one of them, in the function __sigp_stop, the spin lock fi-lock is held. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // smpl @gfp exists@ identifier fn; position

About offload function of Virtio Nic

2010-05-30 Thread Amos Kong
Hello all, Can I ask some question of the offloading function with Virtio-NIC? I'm interested in KVM virtualization. The virtual NIC is different from real hardward. And there is also a big distance between Virtio-NIC and E1000-NIC. The offloading function of Virtio-NIC close related with the

Re: About offload function of Virtio Nic

2010-05-30 Thread Amos Kong
On Mon, May 31, 2010 at 7:44 AM, Amos Kong kongjian...@gmail.com wrote: Hello all, Can I ask some question of the offloading function with Virtio-NIC? I'm interested in KVM virtualization. The virtual NIC is different from real hardward. And there is also a big distance between Virtio-NIC

Re: [PATCH 2/3] cgroups: Add an API to attach a task to current task's cgroup

2010-05-30 Thread Li Zefan
04:24, Tejun Heo wrote: From: Sridhar Samudrala samudrala.srid...@gmail.com Add a new kernel API to attach a task to current task's cgroup in all the active hierarchies. Signed-off-by: Sridhar Samudrala s...@us.ibm.com Acked-by: Li Zefan l...@cn.fujitsu.com btw: you lost the reviewed-by

Issues with getting PCI pass-through to work

2010-05-30 Thread Adhyas Avasthi
I have a PCI WLAN controller that I wish to pass-through to the standard linux-img VM (downloaded from qemu website). When I try qemu-kvm -pcidevice host=0c:00.0,name=abcd linux-0.2.img The VM does boot up but does not see the device. On the command prompt, I see the following message: Failed to

[PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT

2010-05-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Greetings Gerd, Kevin and Co, Attached are two patches to add the necesary CDB parsing to determine SCSIRequest-cmd.xfer (length) and SCSIRequest-cmd.mode (direction) for Persistent Reservation IN/OUT CDBs and for Maintenance IN/OUT CDBs used for

[PATCH 1/2] [scsi-bus]: Add PR-OUT and PR-IN case for SCSIRequest xfer and xfer_mode setup

2010-05-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates hw/scsi-bus.c to add PERSISTENT_RESERVE_OUT and PERSISTENT_RESERVE_IN case in scsi_req_length() to extra the incoming buffer length into SCSIRequest-cmd.xfer, and adds a second PERSISTENT_RESERVE_OUT case in scsi_req_xfer_mode()

[PATCH 2/2] [scsi-bus]: Add MAINTENANCE_IN and MAINTENANCE_OUT case for SCSIRequest xfer and xfer_mode setup

2010-05-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates hw/scsi-bus.c to add MAINTENANCE_IN and MAINTENANCE_OUT case in scsi_req_length() to extra the incoming buffer length into SCSIRequest-cmd.xfer, and adds a second MAINTENANCE_OUT case in scsi_req_xfer_mode() in order to properly

Re: [PATCH 1/5] KVM: MMU: introduce some macros to cleanup hlist traverseing

2010-05-30 Thread Xiao Guangrong
Avi Kivity wrote: On 05/30/2010 03:36 PM, Xiao Guangrong wrote: Introduce for_each_gfn_sp(), for_each_gfn_indirect_sp() and for_each_gfn_indirect_valid_sp() to cleanup hlist traverseing Signed-off-by: Xiao Guangrongxiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 129

Re: [PATCH 2/5] KVM: MMU: split the operations of kvm_mmu_zap_page()

2010-05-30 Thread Xiao Guangrong
Avi Kivity wrote: On 05/30/2010 03:37 PM, Xiao Guangrong wrote: Using kvm_mmu_prepare_zap_page() and kvm_mmu_commit_zap_page() to split kvm_mmu_zap_page() function, then we can: - traverse hlist safely - easily to gather remote tlb flush which occurs during page zapped +static int