Re: FreeBSD guest with VTD NIC not passing traffic

2012-01-14 Thread Shashidhar Patil
Hi Alex,Jan, I forgot mention that in case of MSI-X failure I do not see any interrupts being allocated by the Host (kvm module). grep kvm /proc/interrupts is empty. -Shashidhar On Sat, Jan 14, 2012 at 12:16 PM, Shashidhar Patil wrote: > Hi Alex,Jan, >       I collected logs of pci updates p

[PATCH] kvm: remove dependence on delay-accounting

2012-01-14 Thread Konstantin Khlebnikov
KVM selects delay-accounting only to get sched-info for steal-time accounting. Meanwhile delay-accounting can be disabled by boot option. This is ridiculous. This patch adds internal boolean option CONFIG_TASK_SCHED_INFO to enable only task->sched_info and its collecting inside scheduler. Signed-

[PATCH v2] kvm: remove dependence on delay-accounting

2012-01-14 Thread Konstantin Khlebnikov
KVM selects delay-accounting only to get sched-info for steal-time accounting. Meanwhile delay-accounting can be disabled by boot option. This is ridiculous. This patch adds internal boolean option CONFIG_TASK_SCHED_INFO to enable only task->sched_info and its collecting inside scheduler. v2: * s

[PATCH RFC V4 2/5] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2012-01-14 Thread Raghavendra K T
Add a hypercall to KVM hypervisor to support pv-ticketlocks KVM_HC_KICK_CPU allows the calling vcpu to kick another vcpu out of halt state. The presence of these hypercalls is indicated to guest via KVM_FEATURE_PVLOCK_KICK/KVM_CAP_PVLOCK_KICK. Qemu needs a corresponding patch to pass up the

[PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests

2012-01-14 Thread Raghavendra K T
The 5-patch series to follow this email extends KVM-hypervisor and Linux guest running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's implementation. One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick another vcpu out of halt state. The blocking of vcpu is

[PATCH RFC V4 1/5] debugfs: Add support to print u32 array in debugfs

2012-01-14 Thread Raghavendra K T
Add debugfs support to print u32-arrays in debugfs. Move the code from Xen to debugfs to make the code common for other users as well. Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Suzuki Poulose Signed-off-by: Raghavendra K T Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/arch/x86/

[PATCH RFC V4 3/5] kvm guest : Added configuration support to enable debug information for KVM Guests

2012-01-14 Thread Raghavendra K T
Added configuration support to enable debug information for KVM Guests in debugfs Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Suzuki Poulose Signed-off-by: Raghavendra K T --- diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 72e8b64..344a7db 100644 --- a/arch/x86/Kconfig +++ b/ar

[PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor

2012-01-14 Thread Raghavendra K T
Extends Linux guest running on KVM hypervisor to support pv-ticketlocks. During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has required feature (KVM_FEATURE_PVLOCK_KICK) to support pv-ticketlocks. If so, support for pv-ticketlocks is registered via pv_lock_ops. Use KVM_HC

[PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-14 Thread Raghavendra K T
Add Documentation on CPUID, KVM_CAP_PVLOCK_KICK, and Hypercalls supported. KVM_HC_KICK_CPU hypercall added to wakeup halted vcpu in paravirtual spinlock enabled guest. KVM_FEATURE_PVLOCK_KICK enables guest to check whether pv spinlock can be enabled in guest. support in host is queried via ioctl

Re: [PATCH 2/2] KVM: Fix writeback on page boundary that propagate changes in spite of #PF

2012-01-14 Thread Nadav Amit
On Jan 12, 2012, at 12:27 PM, Gleb Natapov wrote: > On Thu, Jan 12, 2012 at 12:21:00PM +0200, Avi Kivity wrote: >> On 01/12/2012 12:12 PM, Gleb Natapov wrote: >>> On Wed, Jan 11, 2012 at 06:53:31PM +0200, Nadav Amit wrote: Consider the case in which an instruction emulation writeback is perf

[PATCH] KVM: Fix MOVSX emulation

2012-01-14 Thread Nadav Amit
The destination register of MOVSX should be decoded similarily to MOVZX. Signed-off-by: Nadav Amit --- arch/x86/kvm/emulate.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 05a562b..7644a83 100644 --- a/arch/x86/kv

Re: FreeBSD guest with VTD NIC not passing traffic

2012-01-14 Thread Shashidhar Patil
Hi Alex,Jan, I put the hack of calling asssign_dev_msix_update() in mmio_msix_writel() when the last verctor of msix is updated. Now msix interrupt allocation happens as expected in the Host (Linux). But this is a ugly hack of hardcoding an address since we don't know how many msix vectors are

Re: __direct_map() questions

2012-01-14 Thread Nick H
On Wed, Jan 11, 2012 at 11:13 AM, Marcelo Tosatti wrote: > Hi, > > See Documentation/virtual/kvm/mmu.txt in the kernel source tree. > Thanks for pointing me in the right direction. Based on some basic debugging and past kvm forum presentations, shadow page tables fold the gva->gpa->hpa lookup ins

[PATCH 0/3 kvm-unit-tests] Dirty logging performance test

2012-01-14 Thread Takuya Yoshikawa
My 32 bit host running on an intel core i3 box said: $ ./api/dirty-log-perf dirty-log-perf: 262144 slot pages / 262144 mem pages rip 804a74a rip 804a74a get dirty log: 51571 ns for 1 dirty pages rip 804a74a get dirty log: 81190 ns for 2 dirty pages rip 8

[PATCH v2 1/3 kvm-unit-tests] Add dirty logging performance test

2012-01-14 Thread Takuya Yoshikawa
Can be used to check how long it takes to get dirty log according to the number of dirty pages as follows: $ ./api/dirty-log-perf rip 804a3fa rip 804a3fa get dirty log: 80824 ns for 1 dirty pages rip 804a3fa get dirty log: 60077 ns for 2 dirty pages rip 80

[PATCH 2/3 kvm-unit-tests] dirty-log-perf: Split guest memory into two slots

2012-01-14 Thread Takuya Yoshikawa
VGA frame buffer logging may be affected by other large slots like RAM, so make it possible to test such cases. E.g. 8K pages for the logged slot and 256K pages for the entire memory space can be considered as 32MB framebuffer in 1GB memory space. Signed-off-by: Takuya Yoshikawa --- api/dirty-l

[PATCH 3/3 kvm-unit-tests] dirty-log-perf: Take slot size from command line

2012-01-14 Thread Takuya Yoshikawa
Dirty logging is used both for VGA, small slot, and live migration, large slot, so make the slot size changeable as follows: $ ./api/dirty-log-perf -n 8K dirty-log-perf: 8192 slot pages / 262144 mem pages Note: though we can also change the size of the entire memory space, by using -m, we obs