[COMMIT master] KVM: ia64: Fix iommu_flags build breakage

2009-05-18 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 589536f..5f43697 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h @@ -474,6 +474,7 @@ struct

[COMMIT master] Revert Increment version id for CPU save state

2009-05-18 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This reverts commit 7b2e5abac640770ffd15b71e4345114bf10191ab. Breaks live migration. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/target-i386/cpu.h b/target-i386/cpu.h index af0ee18..f054af1 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@

[COMMIT master] Fix ia64 build on kvm_arch_get_supported_cpuid()

2009-05-18 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com kvm_arch_get_supported_cpuid() doesn't belong in qemu-kvm.c as it is just an x86 specific build workaround. Signed-off-by: Jes Sorensen j...@sgi.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 8cb6faa..856b70c

[COMMIT master] Don't use a 32-bit bit type as offset argument for kvm dirty tracking

2009-05-18 Thread Avi Kivity
From: Glauber Costa glom...@redhat.com In the call path of kvm_get_dirty_pages_log_range(), its caller kvm_get_dirty_bitmap_cb() passes the target_phys_addr_t both as start_addr and the offset. So, using int will make dirty tracking over 4G fail completely. Signed-off-by: Glauber Costa

[COMMIT master] Add script to make a combined userspace/kernel release

2009-05-18 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kvm/scripts/make-combined-release b/kvm/scripts/make-combined-release new file mode 100755 index 000..adef8f6 --- /dev/null +++ b/kvm/scripts/make-combined-release @@ -0,0 +1,36 @@ +#!/usr/bin/python +

[COMMIT master] Move kvm headers from kvm/kernel to kvm/include

2009-05-18 Thread Avi Kivity
From: Avi Kivity a...@redhat.com So we can retire the kvm/kernel/ directory. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/configure b/configure index 4b2ab89..cc7f9f1 100755 --- a/configure +++ b/configure @@ -849,8 +849,8 @@ kvm_cflags= if test $kvm = yes ; then

[COMMIT master] device-assignment: Fix kvm_get_irq_route_gsi() return check

2009-05-18 Thread Avi Kivity
From: Alex Williamson alex.william...@hp.com Use 'r' for the return value since gsi is unsigned. Signed-off-by: Alex Williamson alex.william...@hp.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 0a5f850..853307b 100644 ---

[COMMIT master] Enable dirty logging for all regions during migration

2009-05-18 Thread Avi Kivity
From: Glauber de Oliveira Costa glom...@redhat.com In current calculations, we are not activating dirty logging for all regions, leading migration to fail. This problem was already raised by Yaniv Kamay a while ago. The proposed solution at the time (not merged), was a calculation to convert from

[COMMIT master] Adjust nr_cpu_ids check

2009-05-18 Thread Avi Kivity
From: Avi Kivity a...@redhat.com nr_cpu_ids was introduced in 2.6.21, not 2.6.28. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index e1e203c..f6975e0 100644 --- a/external-module-compat-comm.h +++

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-18 Thread Gleb Natapov
On Sun, May 17, 2009 at 12:47:03PM -0300, Glauber Costa wrote: I admitedly know almost nothing about windows, but one thing jumped to my eyes: By looking at the device manager, hidden devices, the working cpu seems to be cpu1, not cpu0. Maybe this is related to this problem? I think this is

KVM-Autotest: server problem

2009-05-18 Thread Michael Goldish
Hi Lucas, Since I consider you our Autotest reference I direct the following question to you. Currently our Autotest servers run tests in client mode using the same control file on all hosts. We want to move on to dispatching tests from the server, using a server control file, so that each

[ kvm-Bugs-2793225 ] Windows XP crashes on first boot after install on AMD64

2009-05-18 Thread SourceForge.net
Bugs item #2793225, was opened at 2009-05-18 10:04 Message generated for change (Tracker Item Submitted) made by alain_knaff You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2793225group_id=180599 Please note that this message will contain a full copy of

Re: [PATCH] kvm: discard masking checking when initial MSI-X entries

2009-05-18 Thread Avi Kivity
Sheng Yang wrote: This meant to be with commit: adcf3594f9580bdf9b5e71f271b6088b185e017e, otherwise QEmu only counts the MSI-X entries, but won't fill it... Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: Network hangs after some time

2009-05-18 Thread Nikola Ciprich
Hi, what kvm module/userspace versions are You using? n. On Sun, May 17, 2009 at 11:32:44PM -0300, Wagner Sartori Junior wrote: Hello, I'm needin' some help. The network in guests hangs(I can't ping from my house the guest) after some time(from 10 minutes to some hours) and stops in one

[PATCH] Drop interrupt shadow when single stepping should be done only on VMX.

2009-05-18 Thread Gleb Natapov
The problem exists only on VMX. Also currently we skip this step if there is pending exception. The patch fixes this too. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/vmx.c |8 arch/x86/kvm/x86.c |3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff

[PATCH] [APIC] Optimize searching for highest IRR

2009-05-18 Thread Gleb Natapov
Most of the time IRR is empty, so instead of scanning the whole IRR on each VM entry keep a variable that tells us if IRR is not empty. IRR will have to be scanned twice on each IRQ delivery, but this is much more rare than VM entry. Signed-off-by: Gleb Natapov g...@redhat.com ---

[PATCH] If interrupt injection is not possible do not scan IRR.

2009-05-18 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/i8259.c |5 + arch/x86/kvm/irq.c |1 - arch/x86/kvm/x86.c |9 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 1ccb50c..d32ceac 100644 ---

Re: [PATCH] If interrupt injection is not possible do not scan IRR.

2009-05-18 Thread Avi Kivity
Gleb Natapov wrote: @@ -3174,10 +3174,11 @@ static void inject_pending_irq(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) vcpu-arch.nmi_injected = true; kvm_x86_ops-set_nmi(vcpu); } - } else if (kvm_cpu_has_interrupt(vcpu))

[PATCH v2] Allow to override sync source

2009-05-18 Thread Jan Kiszka
Avi Kivity wrote: Jan Kiszka wrote: In order to allow sync'ing the kmod dir against arbitrary kernels trees, extend the sync script to accept alternative paths and adjust the Makefile accordingly. @@ -17,6 +17,7 @@ ORIGMODDIR = $(patsubst %/build,%/kernel,$(KERNELDIR)) rpmrelease =

Re: [PATCH 06/17] Use statfs to determine size of huge pages

2009-05-18 Thread Joerg Roedel
On Sun, May 17, 2009 at 08:00:40PM +0300, Avi Kivity wrote: Anthony Liguori wrote: From: Joerg Roedel joerg.roe...@amd.com The current method of finding out the size of huge pages does not work reliably anymore. Current Linux supports more than one huge page size but /proc/meminfo only show

Re: [PATCH] If interrupt injection is not possible do not scan IRR.

2009-05-18 Thread Gleb Natapov
On Mon, May 18, 2009 at 12:00:40PM +0300, Avi Kivity wrote: Gleb Natapov wrote: @@ -3174,10 +3174,11 @@ static void inject_pending_irq(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) vcpu-arch.nmi_injected = true; kvm_x86_ops-set_nmi(vcpu);

[PATCH 03/43] KVM: Split IOAPIC structure

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Prepared for reuse ioapic_redir_entry for MSI. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- include/linux/kvm_types.h | 17 + virt/kvm/ioapic.c |6 +++--- virt/kvm/ioapic.h

[PATCH 01/43] KVM: VMX: Don't use highmem pages for the msr and pio bitmaps

2009-05-18 Thread Avi Kivity
Highmem pages are a pain, and saving three lowmem pages on i386 isn't worth the extra code. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 59 ++-- 1 files changed, 25 insertions(+), 34 deletions(-) diff --git

[PATCH 04/43] KVM: Unify the delivery of IOAPIC and MSI interrupts

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- include/linux/kvm_host.h |3 + virt/kvm/ioapic.c| 91 --- virt/kvm/irq_comm.c | 95

[PATCH 02/43] KVM: VMX: Don't intercept MSR_KERNEL_GS_BASE

2009-05-18 Thread Avi Kivity
Windows 2008 accesses this MSR often on context switch intensive workloads; since we run in guest context with the guest MSR value loaded (so swapgs can work correctly), we can simply disable interception of rdmsr/wrmsr for this MSR. A complication occurs since in legacy mode, we run with the

[PATCH 05/43] KVM: Change API of kvm_ioapic_get_delivery_bitmask

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com In order to use with bit ops. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- virt/kvm/ioapic.c | 17 - virt/kvm/ioapic.h |4 ++-- virt/kvm/irq_comm.c |5 +++-- 3 files changed, 13

[PATCH 07/43] KVM: bit ops for deliver_bitmap

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com It's also convenient when we extend KVM supported vcpu number in the future. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/lapic.c |7 --- virt/kvm/ioapic.c| 24

[PATCH 09/43] KVM: Add MSI-X interrupt injection logic

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com We have to handle more than one interrupt with one handler for MSI-X. Avi suggested to use a flag to indicate the pending. So here is it. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- include/linux/kvm_host.h

[PATCH 14/43] KVM: PIT: remove unused scheduled variable

2009-05-18 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Unused. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/i8254.c |1 - arch/x86/kvm/i8254.h |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/i8254.c

[PATCH 11/43] KVM: x86: silence preempt warning on kvm_write_guest_time

2009-05-18 Thread Avi Kivity
From: Matt T. Yourst you...@users.sourceforge.net This issue just appeared in kvm-84 when running on 2.6.28.7 (x86-64) with PREEMPT enabled. We're getting syslog warnings like this many (but not all) times qemu tells KVM to run the VCPU: BUG: using smp_processor_id() in preemptible []

[PATCH 08/43] KVM: Ioctls for init MSI-X entry

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Introduce KVM_SET_MSIX_NR and KVM_SET_MSIX_ENTRY two ioctls. This two ioctls are used by userspace to specific guest device MSI-X entry number and correlate MSI-X entry with GSI during the initialization stage. MSI-X should be well initialzed before

[PATCH 31/43] KVM: MMU: do not free active mmu pages in free_mmu_pages()

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com free_mmu_pages() should only undo what alloc_mmu_pages() does. Free mmu pages from the generic VM destruction function, kvm_destroy_vm(). Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c |8

[PATCH 17/43] KVM: ia64: fix compilation error in kvm_get_lowest_prio_vcpu

2009-05-18 Thread Avi Kivity
From: Yang Zhang yang.zh...@intel.com Modify the arg of kvm_get_lowest_prio_vcpu(). Make it consistent with its declaration. Signed-off-by: Yang Zhang yang.zh...@intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |2 +- 1 files changed, 1

[PATCH 12/43] KVM: x86: paravirt skip pit-through-ioapic boot check

2009-05-18 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Skip the test which checks if the PIT is properly routed when using the IOAPIC, aimed at buggy hardware. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kernel/kvm.c |4 1 files changed,

[PATCH 15/43] KVM: PIT: remove usage of count_load_time for channel 0

2009-05-18 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com We can infer elapsed time from hrtimer_expires_remaining. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/i8254.c | 37 +++-- 1 files changed, 31

[PATCH 16/43] KVM: unify part of generic timer handling

2009-05-18 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Hide the internals of vcpu awakening / injection from the in-kernel emulated timers. This makes future changes in this logic easier and decreases the distance to more generic timer handling. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[PATCH 06/43] KVM: Update intr delivery func to accept unsigned long* bitmap

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Would be used with bit ops, and would be easily extended if KVM_MAX_VCPUS is increased. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/lapic.c |8 virt/kvm/ioapic.h|2 +-

[PATCH 19/43] KVM: MMU: remove call to kvm_mmu_pte_write from walk_addr

2009-05-18 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com There is no reason to update the shadow pte here because the guest pte is only changed to dirty state. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- arch/x86/kvm/paging_tmpl.h |1 - 1 files

[PATCH 21/43] KVM: ioapic/msi interrupt delivery consolidation

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com ioapic_deliver() and kvm_set_msi() have code duplication. Move the code into ioapic_deliver_entry() function and call it from both places. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com ---

[PATCH 28/43] KVM: ia64: Drop in SN2 replacement of fast path ITC emulation fault handler

2009-05-18 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Copy in SN2 RTC based ITC emulation for fast exit. The two versions have the same size, so a dropin is simpler than patching the branch instruction to hit the SN2 version. Signed-off-by: Jes Sorensen j...@sgi.com Acked-by: Xiantao Zhang xiantao.zh...@intel.com

[PATCH 18/43] KVM: Merge kvm_ioapic_get_delivery_bitmask into kvm_get_intr_delivery_bitmask

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Gleb fixed bitmap ops usage in kvm_ioapic_get_delivery_bitmask. Sheng merged two functions, as well as fixed several issues in kvm_get_intr_delivery_bitmask 1. deliver_bitmask is a bitmap rather than a unsigned long intereger. 2. Lowest priority target

[PATCH 10/43] KVM: Enable MSI-X for KVM assigned device

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com This patch finally enable MSI-X. What we need for MSI-X: 1. Intercept one page in MMIO region of device. So that we can get guest desired MSI-X table and set up the real one. Now this have been done by guest, and transfer to kernel using ioctl

[PATCH 32/43] KVM: x86: Ignore reads to EVNTSEL MSRs

2009-05-18 Thread Avi Kivity
From: Amit Shah amit.s...@redhat.com We ignore writes to the performance counters and performance event selector registers already. Kaspersky antivirus reads the eventsel MSR causing it to crash with the current behaviour. Return 0 as data when the eventsel registers are read to stop the crash.

[PATCH 22/43] KVM: consolidate ioapic/ipi interrupt delivery logic

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Use kvm_apic_match_dest() in kvm_get_intr_delivery_bitmask() instead of duplicating the same code. Use kvm_get_intr_delivery_bitmask() in apic_send_ipi() to figure out ipi destination instead of reimplementing the logic. Signed-off-by: Gleb Natapov

[PATCH 20/43] KVM: APIC: kvm_apic_set_irq deliver all kinds of interrupts

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Get rid of ioapic_inj_irq() and ioapic_inj_nmi() functions. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- arch/ia64/include/asm/kvm_host.h |1 - arch/ia64/kvm/kvm-ia64.c |8 +++---

[PATCH 23/43] KVM: change the way how lowest priority vcpu is calculated

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com The new way does not require additional loop over vcpus to calculate the one with lowest priority as one is chosen during delivery bitmap construction. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com ---

[PATCH 43/43] KVM: Fix interrupt unhalting a vcpu when it shouldn't

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com kvm_vcpu_block() unhalts vpu on an interrupt/timer without checking if interrupt window is actually opened. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c|6 ++

[PATCH 40/43] KVM: VMX: Zero ept module parameter if ept is not present

2009-05-18 Thread Avi Kivity
Allows reading back hardware capability. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9b97c8e..2f65120 100644 --- a/arch/x86/kvm/vmx.c +++

[PATCH 42/43] KVM: Timer event should not unconditionally unhalt vcpu.

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Currently timer events are processed before entering guest mode. Move it to main vcpu event loop since timer events should be processed even while vcpu is halted. Timer may cause interrupt/nmi to be injected and only then vcpu will be unhalted. Signed-off-by:

[PATCH 24/43] KVM: APIC: get rid of deliver_bitmask

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Deliver interrupt during destination matching loop. Signed-off-by: Gleb Natapov g...@redhat.com Acked-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- arch/ia64/kvm/kvm-ia64.c | 33 -

[PATCH 39/43] KVM: VMX: Zero the vpid module parameter if vpid is not supported

2009-05-18 Thread Avi Kivity
This allows reading back how the hardware is configured. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f4b6c4b..9b97c8e 100644 --- a/arch/x86/kvm/vmx.c

[PATCH 37/43] KVM: VMX: Simplify module parameter names

2009-05-18 Thread Avi Kivity
Instead of 'enable_vpid=1', use a simple 'vpid=1'. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 85f4fd5..a69ba6b 100644 --- a/arch/x86/kvm/vmx.c +++

[PATCH 41/43] KVM: VMX: Fold vm_need_ept() into callers

2009-05-18 Thread Avi Kivity
Trivial. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 33 ++--- 1 files changed, 14 insertions(+), 19 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2f65120..da6461d 100644 --- a/arch/x86/kvm/vmx.c +++

[PATCH 35/43] KVM: VMX: Make module parameters readable

2009-05-18 Thread Avi Kivity
Useful to see how the module was loaded. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2c0a2ed..469787c 100644 --- a/arch/x86/kvm/vmx.c +++

[PATCH 30/43] KVM: Device assignment framework rework

2009-05-18 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com After discussion with Marcelo, we decided to rework device assignment framework together. The old problems are kernel logic is unnecessary complex. So Marcelo suggest to split it into a more elegant way: 1. Split host IRQ assign and guest IRQ assign. And

[PATCH 36/43] KVM: VMX: Rename kvm_handle_exit() to vmx_handle_exit()

2009-05-18 Thread Avi Kivity
It is a static vmx-specific function. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 469787c..85f4fd5 100644 --- a/arch/x86/kvm/vmx.c +++

[PATCH 29/43] KVM: make 'lapic_timer_ops' and 'kpit_ops' static

2009-05-18 Thread Avi Kivity
From: Hannes Eder han...@hanneseder.net Fix this sparse warnings: arch/x86/kvm/lapic.c:916:22: warning: symbol 'lapic_timer_ops' was not declared. Should it be static? arch/x86/kvm/i8254.c:268:22: warning: symbol 'kpit_ops' was not declared. Should it be static? Signed-off-by: Hannes Eder

[PATCH 27/43] KVM: ia64: SN2 adjust emulated ITC frequency to match RTC frequency

2009-05-18 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com On SN2 do not pass down the real ITC frequency, but rather patch the values to match the SN2 RTC frequency. Signed-off-by: Jes Sorensen j...@sgi.com Acked-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 33/43] KVM: SVM: Remove duplicate code in svm_do_inject_vector()

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com svm_do_inject_vector() reimplements pop_irq(). Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/svm.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/arch/x86/kvm/svm.c

[PATCH 00/43] KVM updates for the 2.6.31 merge window (batch 1/4)

2009-05-18 Thread Avi Kivity
Following is my queue for the 2.6.31 merge window that is now approaching. Please review. Amit Shah (1): KVM: x86: Ignore reads to EVNTSEL MSRs Avi Kivity (9): KVM: VMX: Don't use highmem pages for the msr and pio bitmaps KVM: VMX: Don't intercept MSR_KERNEL_GS_BASE KVM: VMX: Make module

[PATCH 38/43] KVM: VMX: Annotate module parameters as __read_mostly

2009-05-18 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a69ba6b..f4b6c4b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -38,19 +38,19 @@

[PATCH 34/43] KVM: reuse (pop|push)_irq from svm.c in vmx.c

2009-05-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com The prioritized bit vector manipulation functions are useful in both vmx and svm. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/svm.c | 25 - arch/x86/kvm/vmx.c | 17

[PATCH 26/43] KVM: ia64: Create inline function kvm_get_itc() to centralize ITC reading.

2009-05-18 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Move all reading of special register 'AR_ITC' into two functions, one in the kernel and one in the VMM module. When running on SN2, base the result on the RTC rather the system ITC, as the ITC isn't synchronized. Signed-off-by: Jes Sorensen j...@sgi.com Acked-by:

[PATCH 13/43] KVM: declare ioapic functions only on affected hardware

2009-05-18 Thread Avi Kivity
From: Christian Borntraeger borntrae...@de.ibm.com Since KVM: Unify the delivery of IOAPIC and MSI interrupts I get the following warnings: CC [M] arch/s390/kvm/kvm-s390.o In file included from arch/s390/kvm/kvm-s390.c:22: include/linux/kvm_host.h:357: warning: 'struct kvm_ioapic' declared

Re: virtio net regression

2009-05-18 Thread Avi Kivity
Antoine Martin wrote: Hi, Here is another one, any ideas? These oopses do look quite deep. Is it normal to end up in tcp_send_ack from pdflush?? I think it can happen anywhere, part of the net softirq. Cheers Antoine [929492.154634] pdflush: page allocation failure. order:0, mode:0x20

[PATCH] kvm: ia64: fix up compilation error

2009-05-18 Thread Zhang, Yang
add iommu_flags for struct kvm_arch in ia64 Signed-off-by: Yang Zhang yang.zh...@intel.com Signed-off-by: Xiantao Zhang xiaotao.zh...@intel.com diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 589536f..012aca0 100644 --- a/arch/ia64/include/asm/kvm_host.h

Re: kvm 84 update

2009-05-18 Thread Avi Kivity
Brent A Nelson wrote: Well, I just tried disabling smp on my guest, and live migration worked fine. I see that there are already SMP complaints with live migration in KVM:84 in the bug database, so I guess this is just another, Me, too. Is this expected to be fixed in the

RE: [PATCH 2/2] Intel-IOMMU, intr-remap: source-id checking

2009-05-18 Thread Han, Weidong
Ingo Molnar wrote: * Han, Weidong weidong@intel.com wrote: Siddha, Suresh B wrote: On Wed, 2009-05-06 at 23:16 -0700, Han, Weidong wrote: @@ -634,6 +694,44 @@ static int ir_parse_ioapic_scope(struct acpi_dmar_header *header, 0x%Lx\n,

Re: [PATCH] kvm: ia64: fix up compilation error

2009-05-18 Thread Avi Kivity
Zhang, Yang wrote: add iommu_flags for struct kvm_arch in ia64 Thanks, I already fixed it (in the same way). -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

Re: [PATCHv6 4/4] virtio_pci: optional MSI-X support

2009-05-18 Thread Michael S. Tsirkin
On Mon, May 18, 2009 at 12:30:49AM +0300, Avi Kivity wrote: Michael S. Tsirkin wrote: This implements optional MSI-X support in virtio_pci. MSI-X is used whenever the host supports at least 2 MSI-X vectors: 1 for configuration changes and 1 for virtqueues. Per-virtqueue vectors are allocated

Re: [PATCH v2] Shared memory device with interrupt support

2009-05-18 Thread Gregory Haskins
Avi Kivity wrote: Cam Macdonell wrote: If my understanding is correct both the VM's who wants to communicate would gives this path in the command line with one of them specifying as server. Exactly, the one with the server in the parameter list will wait for a connection before booting.

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-18 Thread Michael S. Tsirkin
On Sun, May 17, 2009 at 11:47:53PM +0300, Avi Kivity wrote: Alex Williamson wrote: On Wed, 2009-05-13 at 08:33 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 08:15 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 16:55 +0300, Michael S. Tsirkin wrote: Very

Re: [PATCH] If interrupt injection is not possible do not scan IRR.

2009-05-18 Thread Gleb Natapov
Forget to remove debug output before submitting. Resending. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 1ccb50c..d32ceac 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -218,6 +218,11 @@ int kvm_pic_read_irq(struct kvm

RE: KVM_HYPERCALL

2009-05-18 Thread Kumar, Venkat
Hi Avi - Yes the control is not coming to neither kvm_handle_exit nor handle_vmcall after the hypercall is made from the guest. If I am not wrong, the KVM_HYPERCALL instruction is expected to work, isn't it? Thx, Venkat -Original Message- From: Avi Kivity [mailto:a...@redhat.com]

Re: KVM_HYPERCALL

2009-05-18 Thread Avi Kivity
Kumar, Venkat wrote: Hi Avi - Yes the control is not coming to neither kvm_handle_exit nor handle_vmcall after the hypercall is made from the guest. If I am not wrong, the KVM_HYPERCALL instruction is expected to work, isn't it? Yes, it should. Are you sure the guest is executing this

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-18 Thread Glauber Costa
On Mon, May 18, 2009 at 08:53:58AM +0300, Gleb Natapov wrote: On Mon, May 18, 2009 at 08:44:54AM +0300, Avi Kivity wrote: Gleb Natapov wrote: On Sun, May 17, 2009 at 11:07:31PM +0300, Avi Kivity wrote: Gleb Natapov wrote: Theoretically we can provide different values for

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-18 Thread Avi Kivity
Michael S. Tsirkin wrote: On Sun, May 17, 2009 at 11:47:53PM +0300, Avi Kivity wrote: Alex Williamson wrote: On Wed, 2009-05-13 at 08:33 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 08:15 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 16:55 +0300,

Re: [PATCH v2] Shared memory device with interrupt support

2009-05-18 Thread Avi Kivity
Gregory Haskins wrote: I'll just add that you could tie the irqfd to an iosignalfd to eliminate the involvement of qemu on either side as well. I'm not sure if that really works with the design of this particular device (e.g. perhaps qemu is needed for other reasons besides signaling), but it

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-18 Thread Gleb Natapov
On Mon, May 18, 2009 at 08:39:43AM -0300, Glauber Costa wrote: Now I recall something on LKML about this. Well, in this case Linux shouldn't have used ACPI to invent its own way to do cpu hot-plug. It didn't. History shows that this method is what is used in some unisys machines, which

Re: [PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-18 Thread Alexander Graf
On 17.05.2009, at 08:48, Gleb Natapov wrote: On Fri, May 15, 2009 at 10:22:20AM +0200, Alexander Graf wrote: static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) { struct vcpu_svm *svm = to_svm(vcpu); - nested_svm_intr(svm); + if(!(svm-vcpu.arch.hflags HF_GIF_MASK)) +

Re: KVM-Autotest: server problem

2009-05-18 Thread Lucas Meneghel Rodrigues
On Mon, 2009-05-18 at 04:01 -0400, Michael Goldish wrote: Hi Lucas, Since I consider you our Autotest reference I direct the following question to you. Currently our Autotest servers run tests in client mode using the same control file on all hosts. We want to move on to dispatching

Re: KVM_HYPERCALL

2009-05-18 Thread Gregory Haskins
Kumar, Venkat wrote: Hi Avi - Yes the control is not coming to neither kvm_handle_exit nor handle_vmcall after the hypercall is made from the guest. If I am not wrong, the KVM_HYPERCALL instruction is expected to work, isn't it? Hi Venkat, I have used this method of IO many times,

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-18 Thread Christoph Hellwig
On Mon, May 11, 2009 at 01:29:06PM -0500, Anthony Liguori wrote: It don't think we realistically can. Maybe two fds? One open in O_SYNC and one not. Is such a thing sane? O_SYNC and O_DIRECT currently behave exactly in the same way. In none of the filesystem I've looked at there is an

Re: [PATCH, RFC] virtio_blk: add cache flush command

2009-05-18 Thread Christoph Hellwig
On Tue, May 12, 2009 at 11:35:23AM +0300, Avi Kivity wrote: The cache size on disks is constantly growing, and if you lose cache it doesn't really matter how much you lose but what you lose. Software errors won't cause data loss on a real disk (firmware bugs will, but the firmware is

RE: [PATCH v2] Shared memory device with interrupt support

2009-05-18 Thread Kumar, Venkat
Cam - I got your patch to work but without notifications. I could share memory using the patch but notifications aren't working. I bring up two VM's with option -ivshmem shrmem,1024,/dev/shm/shrmem,server and -ivshmem shrmem,1024,/dev/shm/shrmem respectively. When I make an ioctl from one of

Re: [PATCH 0/2] Add serial number support for virtio_blk, V2

2009-05-18 Thread Christoph Hellwig
On Wed, May 13, 2009 at 01:06:57PM -0400, john cooper wrote: [Resend of earlier patch: 1/2 rebased to qemu-kvm, 2/2 minor tweak] patch 1/2 seems to be missing. Equivalent functionality currently exists for IDE and SCSI, however it is not yet implemented for virtio. So why can't we re-use

[PATCH] cleanup arch/x86/kvm/Makefile

2009-05-18 Thread Christoph Hellwig
Use proper foo-y style list additions to cleanup all the conditionals, move module selection after compound object selection and remove the superflous comment. Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/arch/x86/kvm/Makefile

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-18 Thread Michael S. Tsirkin
On Mon, May 18, 2009 at 02:36:41PM +0300, Avi Kivity wrote: Michael S. Tsirkin wrote: On Sun, May 17, 2009 at 11:47:53PM +0300, Avi Kivity wrote: Alex Williamson wrote: On Wed, 2009-05-13 at 08:33 -0600, Alex Williamson wrote: On Wed, 2009-05-13 at 08:15 -0600, Alex

RE: KVM_HYPERCALL

2009-05-18 Thread Kumar, Venkat
Ok. With KVM-85 it works. I was using KVM-84 earlier. Thx, Venkat -Original Message- From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, May 18, 2009 5:03 PM To: Kumar, Venkat Cc: kvm@vger.kernel.org Subject: Re: KVM_HYPERCALL Kumar, Venkat wrote: Hi Avi - Yes the control is not

Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs

2009-05-18 Thread Avi Kivity
Michael S. Tsirkin wrote: On the other hand, in MSI-X mask bit is mandatory, not optional so we'll have to support it for assigned devices at some point. If we are worried about speed of masking/unmasking MSI-X interrupts for assigned devices (older kernels used to mask them, recent kernels

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-18 Thread Glauber Costa
On Mon, May 18, 2009 at 02:40:18PM +0300, Gleb Natapov wrote: On Mon, May 18, 2009 at 08:39:43AM -0300, Glauber Costa wrote: Now I recall something on LKML about this. Well, in this case Linux shouldn't have used ACPI to invent its own way to do cpu hot-plug. It didn't. History shows

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-18 Thread Gleb Natapov
On Mon, May 18, 2009 at 09:40:03AM -0300, Glauber Costa wrote: On Mon, May 18, 2009 at 02:40:18PM +0300, Gleb Natapov wrote: On Mon, May 18, 2009 at 08:39:43AM -0300, Glauber Costa wrote: Now I recall something on LKML about this. Well, in this case Linux shouldn't have used ACPI to

Re: [PATCH 0/6] Add rudimentary Hyper-V guest support

2009-05-18 Thread Alexander Graf
On 17.05.2009, at 23:08, Avi Kivity wrote: Alexander Graf wrote: In order to find out why things were slow with nested SVM I hacked intercept reporting into debugfs in my local tree and found pretty interesting results (using NPT): [...] So apparently the most intercepts come from the

Re: [PATCH] Set bit 1 in disabled processor's _STA

2009-05-18 Thread Glauber Costa
On Mon, May 18, 2009 at 03:42:10PM +0300, Gleb Natapov wrote: On Mon, May 18, 2009 at 09:40:03AM -0300, Glauber Costa wrote: On Mon, May 18, 2009 at 02:40:18PM +0300, Gleb Natapov wrote: On Mon, May 18, 2009 at 08:39:43AM -0300, Glauber Costa wrote: Now I recall something on LKML about

Re: [PATCH 3/6] Emulator: Inject #PF when page was not found

2009-05-18 Thread Alexander Graf
On 17.05.2009, at 22:58, Avi Kivity wrote: Alexander Graf wrote: I can't think why it was done for writes. Normally, a guest page fault would be trapped and reflected a long time before emulation, in FNAME(page_fault)(), after walk_addr(). Can you give some details on the situation?

Re: [PATCH 5/6] Nested SVM: Implement INVLPGA

2009-05-18 Thread Alexander Graf
On 15.05.2009, at 15:43, Joerg Roedel wrote: On Fri, May 15, 2009 at 10:22:19AM +0200, Alexander Graf wrote: SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu

Re: [PATCH 06/17] Use statfs to determine size of huge pages

2009-05-18 Thread Anthony Liguori
Joerg Roedel wrote: On Sun, May 17, 2009 at 08:00:40PM +0300, Avi Kivity wrote: Anthony Liguori wrote: From: Joerg Roedel joerg.roe...@amd.com The current method of finding out the size of huge pages does not work reliably anymore. Current Linux supports more than one huge page size

virtio-net zero-copy

2009-05-18 Thread Raju Srivastava
Greetings, Could someone let me know if current virtio-net supports zero-copy? I see some discussion here: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/28061/ (copyless virtio net thoughts) and it looks like the copyless virtio-net is not supported by KVM yet. If this is true, then is

Re: [PATCH 06/17] Use statfs to determine size of huge pages

2009-05-18 Thread Joerg Roedel
On Mon, May 18, 2009 at 08:10:28AM -0500, Anthony Liguori wrote: Joerg Roedel wrote: On Sun, May 17, 2009 at 08:00:40PM +0300, Avi Kivity wrote: Anthony Liguori wrote: From: Joerg Roedel joerg.roe...@amd.com The current method of finding out the size of huge pages does not work

Re: [PATCH 0/6] Add rudimentary Hyper-V guest support

2009-05-18 Thread Avi Kivity
Alexander Graf wrote: There's only a limited potential here (a factor of three, reducing 6 exits to 2, less the emulation overhead). There's a lot more to be gained from nested npt, since you'll avoid most of the original exits in the first place. I think the reversed is the case. Look at

  1   2   >