Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation

2011-07-06 Thread Hannes Reinecke
On 07/05/2011 05:21 PM, Stefan Hajnoczi wrote: On Tue, Jul 5, 2011 at 12:03 PM, Hannes Reineckeh...@suse.de wrote: +static void megasas_unmap_sgl(struct megasas_cmd_t *cmd) +{ +uint16_t flags = le16_to_cpu(cmd-frame-header.flags); +int i, is_write = (flags MFI_FRAME_DIR_WRITE) ? 1 :

Re: [Qemu-devel] KVM call agenda for June 28

2011-07-06 Thread Kevin Wolf
Am 05.07.2011 20:18, schrieb Marcelo Tosatti: On Tue, Jul 05, 2011 at 04:37:08PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 5, 2011 at 3:32 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 05, 2011 at 04:39:06PM +0300, Dor Laor wrote: On 07/05/2011 03:58 PM, Marcelo Tosatti wrote: On

Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation

2011-07-06 Thread Paolo Bonzini
On 07/06/2011 08:20 AM, Hannes Reinecke wrote: We cannot map control structures from guest memory and treating them as valid request state later on. Yes, I've been working on that one already. What I'll be doing is to read in the sge count during 'map_sgl' and store this value internally (in

Resize Hard Disk of VM

2011-07-06 Thread Kaushal Shriyan
Hi, Is there a way to resize the Hard Disk of VM ? Regards Kaushal -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Fwd: [KVM TSC emulation 6/9] Allow adjust_tsc_offset to be in host or guest cycles

2011-07-06 Thread Joerg Roedel
On Tue, Jun 21, 2011 at 05:22:29AM -0700, Zachary Amsden wrote: -static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment) +static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment, bool host) { struct vcpu_svm *svm = to_svm(vcpu); +

Re: Resize Hard Disk of VM

2011-07-06 Thread Stefan Hajnoczi
On Wed, Jul 6, 2011 at 10:15 AM, Kaushal Shriyan kaushalshri...@gmail.com wrote: Is there a way to resize the Hard Disk of VM ? You can use qemu-img resize on a disk image that is currently not in use: qemu-img resize filename +10G Or you can use libguestfs to get a parted-style resize:

Re: KVM autotest tip of the week

2011-07-06 Thread Stefan Hajnoczi
On Wed, Jul 6, 2011 at 5:28 AM, Lucas Meneghel Rodrigues l...@redhat.com wrote: On an effort to make KVM autotest better and more useful for our target users (KVM developers), we are expanding documentation and writing articles on how to get some commonly asked test jobs running (I plan on

Re: Resize Hard Disk of VM

2011-07-06 Thread Kevin Wolf
Am 06.07.2011 12:39, schrieb Stefan Hajnoczi: On Wed, Jul 6, 2011 at 10:15 AM, Kaushal Shriyan kaushalshri...@gmail.com wrote: Is there a way to resize the Hard Disk of VM ? You can use qemu-img resize on a disk image that is currently not in use: qemu-img resize filename +10G For running

Re: [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE

2011-07-06 Thread Avi Kivity
On 07/06/2011 07:37 AM, Sasha Levin wrote: Instead of making these flags user configurable, they could be implicitly defined according to the choice of eventfd or socket, I couldn't decide which method was better so just went with the first one. Explicit is better than implicit, so I agree

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Michael S. Tsirkin
On Wed, Jul 06, 2011 at 07:37:58AM +0300, Sasha Levin wrote: The new flag allows passing a connected socket instead of an eventfd to be notified of writes or reads to the specified memory region. Instead of signaling an event, On write - the value written to the memory region is written to

[Bug 38672] KVM guest boot crashed

2011-07-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=38672 --- Comment #8 from Steve stefan.bo...@gmail.com 2011-07-06 11:45:19 --- Should someone commit fix from comment #6 solving reported bug ? Thank you for your time. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Avi Kivity
On 07/06/2011 07:37 AM, Sasha Levin wrote: The new flag allows passing a connected socket instead of an eventfd to be notified of writes or reads to the specified memory region. Instead of signaling an event, On write - the value written to the memory region is written to the pipe. On read - a

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Sasha Levin
On Wed, 2011-07-06 at 15:39 +0300, Avi Kivity wrote: On 07/06/2011 07:37 AM, Sasha Levin wrote: The new flag allows passing a connected socket instead of an eventfd to be notified of writes or reads to the specified memory region. Instead of signaling an event, On write - the value

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Avi Kivity
On 07/06/2011 07:37 AM, Sasha Levin wrote: The new flag allows passing a connected socket instead of an eventfd to be notified of writes or reads to the specified memory region. Instead of signaling an event, On write - the value written to the memory region is written to the pipe. On read - a

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Avi Kivity
On 07/06/2011 03:58 PM, Sasha Levin wrote: What about something as follows: This requires an addition of a mutex to struct ioeventfd. 1. When adding a new ioeventfd, scan exiting ioeventfds (we already do it anyway) and check whether another ioeventfd is using the socket already. 2. If the

Re: KVM autotest tip of the week

2011-07-06 Thread Lucas Meneghel Rodrigues
On Wed, Jul 6, 2011 at 7:43 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jul 6, 2011 at 5:28 AM, Lucas Meneghel Rodrigues l...@redhat.com wrote: On an effort to make KVM autotest better and more useful for our target users (KVM developers), we are expanding documentation and writing

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Sasha Levin
On Wed, 2011-07-06 at 14:42 +0300, Michael S. Tsirkin wrote: On Wed, Jul 06, 2011 at 07:37:58AM +0300, Sasha Levin wrote: The new flag allows passing a connected socket instead of an eventfd to be notified of writes or reads to the specified memory region. Instead of signaling an event,

Re: [PATCH v5 4/9] KVM-HV: KVM Steal time implementation

2011-07-06 Thread Rik van Riel
On 07/04/2011 11:32 AM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM, while the vcpu had meaningful work to do - halt time does not count. This information is acquired

Re: [PATCH v5 5/9] KVM-GST: Add a pv_ops stub for steal time

2011-07-06 Thread Rik van Riel
On 07/04/2011 11:32 AM, Glauber Costa wrote: This patch adds a function pointer in one of the many paravirt_ops structs, to allow guests to register a steal time function. Besides a steal time function, we also declare two jump_labels. They will be used to allow the steal time code to be easily

Re: [PATCH v5 6/9] add jump labels for ia64 paravirt

2011-07-06 Thread Rik van Riel
On 07/04/2011 11:32 AM, Glauber Costa wrote: Since in a later patch I intend to call jump labels inside CONFIG_PARAVIRT, IA64 would fail to compile if they are not provided. This patch provides those jump labels for the IA64 architecture. Signed-off-by: Glauber Costaglom...@redhat.com CC: Isaku

[Bug 38672] KVM guest boot crashed

2011-07-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=38672 --- Comment #9 from Avi Kivity a...@redhat.com 2011-07-06 16:39:39 --- Please post the fix on qemu-de...@nongnu.org, with a signed-off-by line. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are

Re: [PATCH v5 7/9] KVM-GST: KVM Steal time accounting

2011-07-06 Thread Rik van Riel
On 07/04/2011 11:32 AM, Glauber Costa wrote: This patch accounts steal time time in account_process_tick. If one or more tick is considered stolen in the current accounting cycle, user/system accounting is skipped. Idle is fine, since the hypervisor does not report steal time if the guest is

Re: [PATCH v3 11/19] KVM: MMU: filter out the mmio pfn from the fault pfn

2011-07-06 Thread Marcelo Tosatti
On Thu, Jun 30, 2011 at 04:24:06PM +0800, Xiao Guangrong wrote: If the page fault is caused by mmio, the gfn can not be found in memslots, and 'bad_pfn' is returned on gfn_to_hva path, so we can use 'bad_pfn' to identify the mmio page fault. And, to clarify the meaning of mmio pfn, we return

Re: [PATCH v3 05/19] KVM: MMU: optimize to handle dirty bit

2011-07-06 Thread Marcelo Tosatti
On Wed, Jul 06, 2011 at 09:22:28AM +0800, Xiao Guangrong wrote: On 07/06/2011 03:27 AM, Marcelo Tosatti wrote: On Thu, Jun 30, 2011 at 04:21:30PM +0800, Xiao Guangrong wrote: If dirty bit is not set, we can make the pte access read-only to avoid handing dirty bit everywhere

Re: [PATCH v3 14/19] KVM: MMU: clean up spte updating and clearing

2011-07-06 Thread Marcelo Tosatti
On Thu, Jun 30, 2011 at 04:25:34PM +0800, Xiao Guangrong wrote: Clean up the code between mmu_spte_clear_* and mmu_spte_update Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 75 +++- 1 files changed,

Re: [PATCH v5 8/9] KVM-GST: adjust scheduler cpu power

2011-07-06 Thread Rik van Riel
On 07/04/2011 11:32 AM, Glauber Costa wrote: This patch makes update_rq_clock() aware of steal time. The mechanism of operation is not different from irq_time, and follows the same principles. This lives in a CONFIG option itself, and can be compiled out independently of the rest of steal time

Re: [PATCH v5 9/9] KVM-GST: KVM Steal time registration

2011-07-06 Thread Rik van Riel
On 07/04/2011 11:32 AM, Glauber Costa wrote: This patch implements the kvm bits of the steal time infrastructure. The most important part of it, is the steal time clock. It is an continuous clock that shows the accumulated amount of steal time since vcpu creation. It is supposed to survive cpu

Re: [PATCH 5/5] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_SOCKET

2011-07-06 Thread Michael S. Tsirkin
On Wed, Jul 06, 2011 at 06:01:46PM +0300, Sasha Levin wrote: On Wed, 2011-07-06 at 14:42 +0300, Michael S. Tsirkin wrote: On Wed, Jul 06, 2011 at 07:37:58AM +0300, Sasha Levin wrote: The new flag allows passing a connected socket instead of an eventfd to be notified of writes or reads to

[Bug 38672] KVM guest boot crashed

2011-07-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=38672 Rafael J. Wysocki r...@sisk.pl changed: What|Removed |Added CC||flor...@mickler.org,

Re: [PATCH v3 16/19] KVM: MMU: lockless walking shadow page table

2011-07-06 Thread Marcelo Tosatti
On Thu, Jun 30, 2011 at 04:26:31PM +0800, Xiao Guangrong wrote: Use rcu to protect shadow pages table to be freed, so we can safely walk it, it should run fastly and is needed by mmio page fault Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h

Re: [PATCH v3 18/19] KVM: MMU: mmio page fault support

2011-07-06 Thread Marcelo Tosatti
On Thu, Jun 30, 2011 at 04:27:33PM +0800, Xiao Guangrong wrote: The idea is from Avi: | We could cache the result of a miss in an spte by using a reserved bit, and | checking the page fault error code (or seeing if we get an ept violation or | ept misconfiguration), so if we get repeated

Re: [PATCH v3 05/19] KVM: MMU: optimize to handle dirty bit

2011-07-06 Thread Xiao Guangrong
On 07/07/2011 12:51 AM, Marcelo Tosatti wrote: On Wed, Jul 06, 2011 at 09:22:28AM +0800, Xiao Guangrong wrote: On 07/06/2011 03:27 AM, Marcelo Tosatti wrote: On Thu, Jun 30, 2011 at 04:21:30PM +0800, Xiao Guangrong wrote: If dirty bit is not set, we can make the pte access read-only to avoid

Re: [PATCH v3 11/19] KVM: MMU: filter out the mmio pfn from the fault pfn

2011-07-06 Thread Xiao Guangrong
On 07/07/2011 01:17 AM, Marcelo Tosatti wrote: +int is_mmio_pfn(pfn_t pfn) +{ +return pfn == bad_pfn; +} +EXPORT_SYMBOL_GPL(is_mmio_pfn); Please use another name this conflicts with real mmio pfn, see kvm_is_mmio_pfn. noslot_pfn is meaningful to me. OK, will fix, thanks! -- To

Re: [PATCH v3 14/19] KVM: MMU: clean up spte updating and clearing

2011-07-06 Thread Xiao Guangrong
On 07/07/2011 01:39 AM, Marcelo Tosatti wrote: -static bool spte_is_bit_cleared(u64 old_spte, u64 new_spte, u64 bit_mask) +static void track_spte_bits(u64 old_spte, u64 keep_bits, bool always_track) { -return (old_spte bit_mask) !(new_spte bit_mask); +if (always_track || +

Re: [PATCH v3 16/19] KVM: MMU: lockless walking shadow page table

2011-07-06 Thread Xiao Guangrong
On 07/07/2011 02:08 AM, Marcelo Tosatti wrote: +static void free_pages_rcu(struct rcu_head *head) +{ +struct kvm_mmu_page *next, *sp; + +sp = container_of(head, struct kvm_mmu_page, rcu); +while (sp) { +if (!list_empty(sp-link)) +next =

Re: [PATCH V7 4/4 net-next] vhost: vhost TX zero-copy support

2011-07-06 Thread Shirley Ma
On Wed, 2011-06-29 at 12:13 +0300, Michael S. Tsirkin wrote: On Sat, May 28, 2011 at 12:34:27PM -0700, Shirley Ma wrote: Hello Michael, In order to use wait for completion in shutting down, seems to me another work thread is needed to call vhost_zerocopy_add_used, Hmm I don't see

Re: [PATCH v3 18/19] KVM: MMU: mmio page fault support

2011-07-06 Thread Xiao Guangrong
On 07/07/2011 02:52 AM, Marcelo Tosatti wrote: +/* + * If it is a real mmio page fault, return 1 and emulat the instruction + * directly, return 0 to let CPU fault again on the address, -1 is + * returned if bug is detected. + */ +int handle_mmio_page_fault_common(struct kvm_vcpu *vcpu, u64

[PATCH V8 0/4 net-next] macvtap/vhost TX zero-copy support

2011-07-06 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced about 50% CPU usage for single stream test on the host, while 4K message size BW has increased about 50%).

[PATCH V8 1/4 net-next] sock.h: Add a new sock zero-copy flag

2011-07-06 Thread Shirley Ma
Signed-off-by: Shirley Ma x...@us.ibm.com --- include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index ae56da6..396f735 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -563,6 +563,7 @@ enum sock_flags {

[PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers

2011-07-06 Thread Shirley Ma
This patch adds userspace buffers support in skb shared info. A new struct skb_ubuf_info is needed to maintain the userspace buffers argument and index, a callback is used to notify userspace to release the buffers once lower device has done DMA (Last reference to that skb has gone). If there is

[PATCH V8 3/4 net-next] macvtap: macvtapTX zero-copy support

2011-07-06 Thread Shirley Ma
Only 128 bytes is copied, the rest of data is DMA mapped directly from userspace. Signed-off-by: Shirley Ma x...@...ibm.com --- drivers/net/macvtap.c | 132 1 files changed, 121 insertions(+), 11 deletions(-) diff --git a/drivers/net/macvtap.c

[PATCH V8 4/4 net-next] vhost: vhost TX zero-copy support

2011-07-06 Thread Shirley Ma
This patch maintains the outstanding userspace buffers in the sequence it is delivered to vhost. The outstanding userspace buffers will be marked as done once the lower device buffers DMA has finished. This is monitored through last reference of kfree_skb callback. Two buffer index are used for

Re: [PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers

2011-07-06 Thread Shirley Ma
On Wed, 2011-07-06 at 17:01 -0600, Zan Lynx wrote: On 7/6/2011 4:22 PM, Shirley Ma wrote: This patch adds userspace buffers support in skb shared info. A new struct skb_ubuf_info is needed to maintain the userspace buffers argument and index, a callback is used to notify userspace to

Re: [PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers

2011-07-06 Thread Zan Lynx
On 7/6/2011 4:22 PM, Shirley Ma wrote: This patch adds userspace buffers support in skb shared info. A new struct skb_ubuf_info is needed to maintain the userspace buffers argument and index, a callback is used to notify userspace to release the buffers once lower device has done DMA (Last

Re: collect some information when qemu-kvm exit

2011-07-06 Thread lidong chen
Hi Kawai: I find that if set coredump_filter to 0x32, the core file can't gdb work correctly. because the value of anon_vma for stack or brk vma is also not NULL. in function vma_dump_size, stack and brk vma will not dump if FILTER(ANON_PRIVATE) is 0. if ( vma-anon_vma FILTER(ANON_PRIVATE) ) {

Re: [Autotest] [PATCH 1/3] KVM-Test: kickstart script: Add pre-installation script for dumping anaconda log

2011-07-06 Thread Qingtang Zhou
* On 2011-07-05 12:54:34 -0300, Lucas Meneghel Rodrigues (l...@redhat.com) wrote: On Tue, 2011-06-28 at 17:44 +0800, Qingtang Zhou wrote: Anaconda log will help us to analyse failure of installation. Hi Qingtang, I have verified the code, have a couple of comments on one of the patches. We