Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread zhangyanfei
于 2012年04月17日 18:59, Avi Kivity 写道: On 04/17/2012 01:51 PM, zhangyanfei wrote: 于 2012年04月17日 15:44, Avi Kivity 写道: On 04/11/2012 04:39 AM, zhangyanfei wrote: This patch set exports offsets of VMCS fields as note information for kdump. We call it VMCSINFO. The purpose of VMCSINFO is to

Re: [PATCH v3 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2012-04-18 Thread Gleb Natapov
On Tue, Apr 17, 2012 at 07:17:11PM +0300, Avi Kivity wrote: On 04/17/2012 07:15 PM, Jan Kiszka wrote: On 2012-04-17 14:06, Avi Kivity wrote: On 04/17/2012 03:03 PM, Gleb Natapov wrote: KVM_MAX_VCPUS. Ah, so you are worried about malicious guest configuring pit to broadcast to

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread Avi Kivity
On 04/18/2012 10:30 AM, zhangyanfei wrote: Okay. Do you expect it to help in debugging the crash? Did you have cases where it would help? Yes, I do expect it to help in debugging the crash. Looking into host machine's crash dump, if we figure out the fact that the crash had

Re: [PATCH v3 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2012-04-18 Thread Avi Kivity
On 04/18/2012 11:04 AM, Gleb Natapov wrote: mainline, are we okay with 254*IPIs? Maybe it's not so bad and I'm overinflating the problem. Isn't 254*IPIs can also happen if application changes memory mapping? It's not in irq context. -- error compiling committee.c: too many arguments

Re: [PATCH v3 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2012-04-18 Thread Gleb Natapov
On Wed, Apr 18, 2012 at 11:25:45AM +0300, Avi Kivity wrote: On 04/18/2012 11:04 AM, Gleb Natapov wrote: mainline, are we okay with 254*IPIs? Maybe it's not so bad and I'm overinflating the problem. Isn't 254*IPIs can also happen if application changes memory mapping? It's not in

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread zhangyanfei
于 2012年04月18日 16:24, Avi Kivity 写道: On 04/18/2012 10:30 AM, zhangyanfei wrote: Okay. Do you expect it to help in debugging the crash? Did you have cases where it would help? Yes, I do expect it to help in debugging the crash. Looking into host machine's crash dump, if we figure out the

Re: [PATCH v2 07/16] KVM: MMU: introduce for_each_pte_list_spte

2012-04-18 Thread Xiao Guangrong
On 04/17/2012 10:47 PM, Takuya Yoshikawa wrote: On Mon, 16 Apr 2012 11:36:25 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: I tested it with kernbench, no regression is found. Because kernbench is not at all good test for this. It is not a problem since the iter and spte

[PATCH] KVM: MMU: use page table level macro

2012-04-18 Thread Davidlohr Bueso
From: Davidlohr Bueso d...@gnu.org Its much cleaner to use PT_PAGE_TABLE_LEVEL than its numeric value. Signed-off-by: Davidlohr Bueso d...@gnu.org --- arch/x86/kvm/mmu.c |2 +- arch/x86/kvm/paging_tmpl.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [RFC PATCH 1/3] iommu: Introduce iommu_group

2012-04-18 Thread David Gibson
On Mon, Apr 02, 2012 at 03:14:40PM -0600, Alex Williamson wrote: IOMMUs often do not have visibility of individual devices in the system. Due to IOMMU design, bus topology, or device quirks, we can often only identify groups of devices. Examples include Intel VT-d AMD-Vi which often have

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread Avi Kivity
On 04/18/2012 12:49 PM, zhangyanfei wrote: What type of resource? Can you give an example? Sorry. No concrete example for now. We are developing this on a conservative policy and I have put the vmcs processing in a new module in patch set v2 as you required. The new module is

[PATCH 3.4-rc] KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context

2012-04-18 Thread Avi Kivity
kvm_set_shared_msr() may not be called in preemptible context, but vmx_set_msr() does so: BUG: using smp_processor_id() in preemptible [] code: qemu-kvm/22713 caller is kvm_set_shared_msr+0x32/0xa0 [kvm] Pid: 22713, comm: qemu-kvm Not tainted 3.4.0-rc3+ #39 Call Trace:

Re: [RFC PATCH 2/3] iommu: Create basic group infrastructure and update AMD-Vi Intel VT-d

2012-04-18 Thread David Gibson
On Mon, Apr 02, 2012 at 03:14:46PM -0600, Alex Williamson wrote: IOMMU groups define the minimum granularity of the IOMMU. We therefore create groups using a dma_dev which is the effective requestor ID for the entire group. Additional devices can be added to groups based on system topology,

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread Avi Kivity
On 04/17/2012 07:49 PM, Anthony Liguori wrote: On 04/17/2012 02:44 AM, Avi Kivity wrote: On 04/11/2012 04:39 AM, zhangyanfei wrote: This patch set exports offsets of VMCS fields as note information for kdump. We call it VMCSINFO. The purpose of VMCSINFO is to retrieve runtime state of guest

Re: [PATCH 00/13] KVM: MMU: fast page fault

2012-04-18 Thread Takuya Yoshikawa
On Tue, 17 Apr 2012 17:56:24 +0300 Avi Kivity a...@redhat.com wrote: For live migration, range-based control may be enough duo to the locality of WWS. What's WWS? IIRC it was mentioned in a usenix paper: Writable Working Set. May not be a commonly known concept. Kind of working set, but

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread Nadav Har'El
On Wed, Apr 18, 2012, Avi Kivity wrote about Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump: Right; they're also not required to be in memory at all - the processor can cache them, even for VMCSs that are not active at this time. Running VMXOFF at panic time can

[PATCH] virt: trans_hugepage_swapping: Fix test to use current APIs

2012-04-18 Thread Lucas Meneghel Rodrigues
Test was using a reference to an old API that no longer exists in virt_utils. Instead, let's use the current methods to grab a VM class (methods of the env object). Also, use up to date methods to get an ssh session to the vm. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com ---

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-18 Thread Avi Kivity
On 04/18/2012 04:47 PM, Nadav Har'El wrote: On Wed, Apr 18, 2012, Avi Kivity wrote about Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump: Right; they're also not required to be in memory at all - the processor can cache them, even for VMCSs that are not active at

[PATCH v4] KVM: PPC Use clockevent multiplier and shifter for decrementer

2012-04-18 Thread Bharat Bhushan
Time for which the hrtimer is started for decrementer emulation is calculated using tb_ticks_per_usec. While hrtimer uses the clockevent for DEC reprogramming (if needed) and which calculate timebase ticks using the multiplier and shifter mechanism implemented within clockevent layer. It was

Re: Question about host CPU usage/allocation by KVM

2012-04-18 Thread Avi Kivity
On 04/18/2012 12:54 AM, Alexander Lyakas wrote: Greetings everybody, Can anybody please point me to code/documentation regarding the following questions I have: - What does it actually mean using -smp N option, in terms of CPU sharing between the host and the guest? What does cpu sharing

virt: Support for indirect image_name definition

2012-04-18 Thread Lukas Doktor
Hi, this patch adds support for indirect image_name specification. The purpose is to set wildcard + offset instead of the exact name. I'm using it for testing devices I add in the test. Eg. I use pre_script = modprobe scsi_debug which adds new /dev/sg? device. I know it's the last device so I

[PATCH] virt: Support for indirect image_name definition

2012-04-18 Thread Lukas Doktor
This patch adds a support to specify the disk image by re + select instead of the image_name. Params: indirect_image_select: Index of the disk from list matching disks image_name: regular expression (ls $image_name) Usage: images += stg image_name_stg = /dev/sd*

[PATCH] kvm tests: Update cdrom test

2012-04-18 Thread Lukas Doktor
This patch adds the check for tray status and fixes some bugs. Also it changes the VM handling. The VM restart is now necessarily only when the test fails. * tray-open status subtest * change vm handling * absolute paths of cdrom locations * workaround locked cdrom * workaround eject time

[PATCH] KVM: Fix page-crossing MMIO

2012-04-18 Thread Avi Kivity
MMIO that are split across a page boundary are currently broken - the code does not expect to be aborted by the exit to userspace for the first MMIO fragment. This patch fixes the problem by generalizing the current code for handling 16-byte MMIOs to handle a number of fragments, and changes the

[PATCH 3.4] KVM: ia64: fix build due to typo

2012-04-18 Thread Avi Kivity
s/kcm/kvm/. Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 882ab21..bd77cb5 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++

[PATCH kvm-unit-tests 0/2] Crosspage mmio unit test

2012-04-18 Thread Avi Kivity
Test that MMIO that crosses a page boundary is handled correctly. Avi Kivity (2): vm: add alloc_vpages() emulator: test cross-page mmio lib/x86/vm.c |9 +++-- lib/x86/vm.h |1 + x86/emulator.c | 20 +++- 3 files changed, 27 insertions(+), 3 deletions(-) --

[PATCH kvm-unit-tests 2/2] emulator: test cross-page mmio

2012-04-18 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- x86/emulator.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/x86/emulator.c b/x86/emulator.c index 33820f4..969944a 100644 --- a/x86/emulator.c +++ b/x86/emulator.c @@ -694,6 +694,19 @@ static void

[PATCH kvm-unit-tests 1/2] vm: add alloc_vpages()

2012-04-18 Thread Avi Kivity
Allows allocating contiguous virtual address space. Signed-off-by: Avi Kivity a...@redhat.com --- lib/x86/vm.c |9 +++-- lib/x86/vm.h |1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/x86/vm.c b/lib/x86/vm.c index abbb0c9..550ec9b 100644 --- a/lib/x86/vm.c +++

Re: Question about host CPU usage/allocation by KVM

2012-04-18 Thread Stuart Yoder
On Tue, Apr 17, 2012 at 4:54 PM, Alexander Lyakas alex.bols...@gmail.com wrote: Greetings everybody, Can anybody please point me to code/documentation regarding the following questions I have: - What does it actually mean using -smp N option, in terms of CPU sharing between the host and the

Re: [RFC PATCH 1/3] iommu: Introduce iommu_group

2012-04-18 Thread Alex Williamson
On Wed, 2012-04-18 at 19:58 +1000, David Gibson wrote: On Mon, Apr 02, 2012 at 03:14:40PM -0600, Alex Williamson wrote: IOMMUs often do not have visibility of individual devices in the system. Due to IOMMU design, bus topology, or device quirks, we can often only identify groups of

Re: [RFC PATCH 2/3] iommu: Create basic group infrastructure and update AMD-Vi Intel VT-d

2012-04-18 Thread Alex Williamson
On Wed, 2012-04-18 at 21:55 +1000, David Gibson wrote: On Mon, Apr 02, 2012 at 03:14:46PM -0600, Alex Williamson wrote: IOMMU groups define the minimum granularity of the IOMMU. We therefore create groups using a dma_dev which is the effective requestor ID for the entire group. Additional

Re: Question about host CPU usage/allocation by KVM

2012-04-18 Thread Alexander Lyakas
Thanks Avi and Stuart! On Wed, Apr 18, 2012 at 8:24 PM, Stuart Yoder b08...@gmail.com wrote: On Tue, Apr 17, 2012 at 4:54 PM, Alexander Lyakas alex.bols...@gmail.com wrote: Greetings everybody, Can anybody please point me to code/documentation regarding the following questions I have: -

Re: [PATCHv4] device-assignment: don't touch pci command register

2012-04-18 Thread Marcelo Tosatti
On Tue, Apr 17, 2012 at 03:10:42PM +0300, Michael S. Tsirkin wrote: Real command register is under kernel control: it includes bits for triggering SERR, marking BARs as invalid and such which are all under host kernel control. While there's no known bug this triggers - since qemu does its

Re: [PATCH] kvm: lock slots_lock around device assignment

2012-04-18 Thread Marcelo Tosatti
On Tue, Apr 17, 2012 at 09:46:44PM -0600, Alex Williamson wrote: @@ -340,7 +343,11 @@ int kvm_iommu_unmap_guest(struct kvm *kvm) if (!domain) return 0; + mutex_lock(kvm-slots_lock); kvm_iommu_unmap_memslots(kvm); + kvm-arch.iommu_domain = NULL; +

Re: [PATCH 3.4-rc] KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context

2012-04-18 Thread Marcelo Tosatti
On Wed, Apr 18, 2012 at 03:03:04PM +0300, Avi Kivity wrote: kvm_set_shared_msr() may not be called in preemptible context, but vmx_set_msr() does so: BUG: using smp_processor_id() in preemptible [] code: qemu-kvm/22713 caller is kvm_set_shared_msr+0x32/0xa0 [kvm] Pid: 22713,

Re: [PATCH] KVM: MMU: use page table level macro

2012-04-18 Thread Marcelo Tosatti
On Wed, Apr 18, 2012 at 12:24:29PM +0200, Davidlohr Bueso wrote: From: Davidlohr Bueso d...@gnu.org Its much cleaner to use PT_PAGE_TABLE_LEVEL than its numeric value. Signed-off-by: Davidlohr Bueso d...@gnu.org --- arch/x86/kvm/mmu.c |2 +- arch/x86/kvm/paging_tmpl.h |2

Re: [PATCH] kvm: lock slots_lock around device assignment

2012-04-18 Thread Alex Williamson
On Wed, 2012-04-18 at 23:30 -0300, Marcelo Tosatti wrote: On Tue, Apr 17, 2012 at 09:46:44PM -0600, Alex Williamson wrote: @@ -340,7 +343,11 @@ int kvm_iommu_unmap_guest(struct kvm *kvm) if (!domain) return 0; + mutex_lock(kvm-slots_lock);

Networking performance on a KVM Host (with no guests)

2012-04-18 Thread Chegu Vinod
Hello, Perhaps this query was answered in the past. If yes kindly point me to the same. We noticed differences in networking performance (measured via netperf over a 10G NIC) on an X86_64 server between the following two configurations : 1) Server run as a KVM Host (but with no KVM guests

Re: Performance of 40-way guest running 2.6.32-220 (RHEL6.2) vs. 3.3.1 OS

2012-04-18 Thread Chegu Vinod
On 4/17/2012 6:25 AM, Chegu Vinod wrote: On 4/17/2012 2:49 AM, Gleb Natapov wrote: On Mon, Apr 16, 2012 at 07:44:39AM -0700, Chegu Vinod wrote: On 4/16/2012 5:18 AM, Gleb Natapov wrote: On Thu, Apr 12, 2012 at 02:21:06PM -0400, Rik van Riel wrote: On 04/11/2012 01:21 PM, Chegu Vinod wrote:

Re: Networking performance on a KVM Host (with no guests)

2012-04-18 Thread Gleb Natapov
On Thu, Apr 19, 2012 at 03:53:39AM +, Chegu Vinod wrote: Hello, Perhaps this query was answered in the past. If yes kindly point me to the same. We noticed differences in networking performance (measured via netperf over a 10G NIC) on an X86_64 server between the following two

Re: [PATCH 00/13] KVM: MMU: fast page fault

2012-04-18 Thread Takuya Yoshikawa
On Tue, 17 Apr 2012 17:56:24 +0300 Avi Kivity a...@redhat.com wrote: For live migration, range-based control may be enough duo to the locality of WWS. What's WWS? IIRC it was mentioned in a usenix paper: Writable Working Set. May not be a commonly known concept. Kind of working set, but

[PATCH v4] KVM: PPC Use clockevent multiplier and shifter for decrementer

2012-04-18 Thread Bharat Bhushan
Time for which the hrtimer is started for decrementer emulation is calculated using tb_ticks_per_usec. While hrtimer uses the clockevent for DEC reprogramming (if needed) and which calculate timebase ticks using the multiplier and shifter mechanism implemented within clockevent layer. It was