[COMMIT master] KVM: Drop interrupt shadow when single stepping should be done only on VMX

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com 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 Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c

[COMMIT master] Update .gitignore

2009-05-20 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/.gitignore b/.gitignore dissimilarity index 95% index 22a8200..bdebd0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,66 +1,68 @@ -*.o -*.d -*~ -*.flat

[COMMIT master] Merge branch 'master' of git://git.sv.gnu.org/qemu

2009-05-20 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * 'master' of git://git.sv.gnu.org/qemu: (116 commits) kvm: add error message for when SMP is requested Remove initrd warning message initialize struct sigevent before timer_create Fix NULL alarm_timer pointer at exit keep initrd in below 4g area.

[COMMIT master] Update source link

2009-05-20 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/linux-2.6 b/linux-2.6 index f0fab32..56ec89d 16 --- a/linux-2.6 +++ b/linux-2.6 @@ -1 +1 @@ -Subproject commit f0fab324fa89c931801663bcc11698c857f2ebb1 +Subproject commit

[COMMIT master] configure: Don't use shell arrays

2009-05-20 Thread Avi Kivity
From: Avi Kivity a...@redhat.com dash doesn't support arrays. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/configure b/configure index fc58ace..dcb9ff9 100755 --- a/configure +++ b/configure @@ -1400,11 +1400,13 @@ fi if test -f kvm/kernel/configure; then kvm_kmod=yes -

[COMMIT master] KVM: MMU: Allow 4K ptes with bit 7 (PAT) set

2009-05-20 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Bit 7 is perfectly legal in the 4K page leve; it is used for the PAT. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 479e748..6880a4c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2157,7

[COMMIT master] KVM: Replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h

2009-05-20 Thread Avi Kivity
From: Jaswinder Singh Rajput jaswin...@kernel.org Use standard msr-index.h's MSR declaration. MSR_IA32_TSC is better than MSR_IA32_TIME_STAMP_COUNTER as it also solves 80 column issue. Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com

[COMMIT master] Use a bitmap for tracking used GSIs

2009-05-20 Thread Avi Kivity
From: Alex Williamson alex.william...@hp.com We're currently using a counter to track the most recent GSI we've handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device assignment with a driver that regularly toggles the MSI enable bit (such as Linux kernels 2.6.21-26). This can mean

[COMMIT master] Handle -no-shutdown correctly

2009-05-20 Thread Avi Kivity
From: Daniel Gollub gol...@b1-systems.de Plain QEMU has the parameter -no-shutdown. This avoids termination of the qemu process when VM got shutdown (e.g. to still use the QEMU-Monitor with stopped VM). This parameter has no effect on qemu-kvm, today. This patch introduces identical handling, as

[COMMIT master] KVM: fix cpuid E2BIG handling for extended request types

2009-05-20 Thread Avi Kivity
From: Mark McLoughlin mar...@redhat.com If we run out of cpuid entries for extended request types we should return -E2BIG, just like we do for the standard request types. Signed-off-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c

[COMMIT master] KVM: Add MCE support

2009-05-20 Thread Avi Kivity
From: Huang Ying ying.hu...@intel.com The related MSRs are emulated. MCE capability is exported via extension KVM_CAP_MCE and ioctl KVM_X86_GET_MCE_CAP_SUPPORTED. A new vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation such as the mcg_cap. MCE is injected via vcpu ioctl command

[COMMIT master] Work around supported cpuid ioctl() brokenness

2009-05-20 Thread Avi Kivity
From: Mark McLoughlin mar...@redhat.com KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG when it runs out of entries. Detect this by always trying again with a bigger table if the ioctl() fills the table. Signed-off-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Avi Kivity

[COMMIT master] KVM: Use MSR names in place of address

2009-05-20 Thread Avi Kivity
From: Jaswinder Singh Rajput jaswin...@kernel.org Replace 0xc0010010 with MSR_K8_SYSCFG and 0xc0010015 with MSR_K7_HWCR. Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

[COMMIT master] KVM: cleanup arch/x86/kvm/Makefile

2009-05-20 Thread Avi Kivity
From: Christoph Hellwig h...@infradead.org 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 Signed-off-by: Avi Kivity a...@redhat.com diff

[COMMIT master] Add distclean rule

2009-05-20 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Remove the configure output config.kbuild, config.mak and arch links via distclean. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/Makefile b/Makefile index a8e8e0b..038f512 100644 --- a/Makefile

[PATCH] qemu-kvm: fix warnings on 32 bit systems

2009-05-20 Thread Michael S. Tsirkin
size_t must be printed with %zd, not %ld. long constants are UL, not ULL. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- qemu-kvm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 5e4002b..ebd6272 100644 --- a/qemu-kvm.c +++

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

2009-05-20 Thread Christoph Hellwig
On Mon, May 18, 2009 at 11:00:41AM -0400, john cooper wrote: Christoph Hellwig wrote: 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. It is in the kvm and qemu-devel list

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-20 Thread Christian Bornträger
Am Mittwoch 20 Mai 2009 04:58:38 schrieb Rusty Russell: On Wed, 20 May 2009 02:21:08 am Cam Macdonell wrote: Avi Kivity wrote: Christian Bornträger wrote: To summarize, Anthony thinks it should use virtio, while I believe virtio is useful for exporting guest memory, not for importing

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-20 Thread Christian Bornträger
Am Dienstag 19 Mai 2009 20:39:24 schrieb Anthony Liguori: Perhaps something that maps closer to the current add_buf/get_buf API. Something like: struct iovec *(*map_buf)(struct virtqueue *vq, unsigned int *out_num, unsigned int *in_num); void (*unmap_buf)(struct virtqueue *vq, struct iovec

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

2009-05-20 Thread Gleb Natapov
On Wed, May 20, 2009 at 03:31:29AM -0400, Christoph Hellwig wrote: On Mon, May 18, 2009 at 11:00:41AM -0400, john cooper wrote: Christoph Hellwig wrote: 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]

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Ingo Molnar
* Mark Langsdorf mark.langsd...@amd.com wrote: diff --git a/include/linux/sched.h b/include/linux/sched.h index b4c38bc..683bc65 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2283,6 +2283,9 @@ static inline unsigned int task_cpu(const struct task_struct *p)

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Peter Zijlstra
On Tue, 2009-05-19 at 13:56 -0500, Mark Langsdorf wrote: @@ -1947,6 +1947,11 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd) return delta (s64)sysctl_sched_migration_cost; } +void set_task_delay(struct task_struct *p, unsigned int delay) +{ +

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-20 Thread François Diakhate
On Wed, May 20, 2009 at 4:58 AM, Rusty Russell ru...@rustcorp.com.au wrote: The only interesting idea I can think of is exposing it to userspace, and having that run some protocol across it for fast app - app comms. But if that's your plan, you still have a lot of code the write! So I guess

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Jan Kiszka
Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the latest qemu-kvm and 2.6.30-rc6 kernel i am not able to get the guest debugging with gdb. I get the following error. $gdb ./vmlinux GNU gdb 6.8-debian Copyright (C) 2008 Free Software

Re: [PATCH -tip] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h

2009-05-20 Thread Jaswinder Singh Rajput
Hello Avi, On Sun, 2009-05-17 at 21:48 +0300, Avi Kivity wrote: Jaswinder Singh Rajput wrote: If this patch looks sane to you can apply in kvm tree. Here is the updated patch based on kvm tree: [PATCH] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h

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

2009-05-20 Thread Ingo Molnar
* Eric W. Biederman ebied...@xmission.com wrote: Ingo Molnar mi...@elte.hu writes: * Weidong Han weidong@intel.com wrote: To support domain-isolation usages, the platform hardware must be capable of uniquely identifying the requestor (source-id) for each interrupt message.

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Avi Kivity
Peter Zijlstra wrote: That said, I still thoroughly dislike this whole approach. Can you explain why? We have a thread that has detected that it's spinning. Keeping on spinning is a waste of cpu time. Why not let something else use the cpu? -- error compiling committee.c: too many

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

2009-05-20 Thread Han, Weidong
Ingo Molnar wrote: * Eric W. Biederman ebied...@xmission.com wrote: Ingo Molnar mi...@elte.hu writes: * Weidong Han weidong@intel.com wrote: To support domain-isolation usages, the platform hardware must be capable of uniquely identifying the requestor (source-id) for each

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Aneesh Kumar K.V
On Wed, May 20, 2009 at 10:10:59AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the latest qemu-kvm and 2.6.30-rc6 kernel i am not able to get the guest debugging with gdb. I get the following error. $gdb

Re: KVM_ASSIGN_SET_MSIX_NR and KVM_ASSIGN_SET_MSIX_ENTRY should support MSI?

2009-05-20 Thread Sheng Yang
On Tuesday 05 May 2009 19:29:14 Gregory Haskins wrote: Michael S. Tsirkin wrote: The new KVM_ASSIGN_SET_MSIX_NR and KVM_ASSIGN_SET_MSIX_ENTRY ioctls have been merged for 2.6.30. However, I note that PCI spec allows devices to support multiple vectors with MSI as well (support will be in

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Avi Kivity
Peter Zijlstra wrote: That said, I still thoroughly dislike this whole approach. Can you explain why? We have a thread that has detected that it's spinning. Keeping on spinning is a waste of cpu time. Why not let something else use the cpu? Because its a polling interface.

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Peter Zijlstra
On Wed, 2009-05-20 at 11:49 +0300, Avi Kivity wrote: Peter Zijlstra wrote: That said, I still thoroughly dislike this whole approach. Can you explain why? We have a thread that has detected that it's spinning. Keeping on spinning is a waste of cpu time. Why not let

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Jan Kiszka
Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 10:10:59AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the latest qemu-kvm and 2.6.30-rc6 kernel i am not able to get the guest debugging with gdb. I get the

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

2009-05-20 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: Anthony Liguori wrote: I'd strongly recommend working these patches on qemu-devel and lkml. I suspect Avi may disagree with me, but in order for this to be eventually merged in either place, you're going to have additional requirements put on you.

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Aneesh Kumar K.V
On Wed, May 20, 2009 at 10:57:21AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 10:10:59AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the latest qemu-kvm and 2.6.30-rc6 kernel

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Avi Kivity
Peter Zijlstra wrote: It's a fully virtualized guest. There's no way to get this without patching the guest kernel. Yes there is.. virtualized monitor-wait stuff coupled with a monitor-wait based spinlock implementation. That only works if the guest uses monitor/mwait. Not all

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-20 Thread Christian Bornträger
Am Mittwoch 20 Mai 2009 10:45:50 schrieb Avi Kivity: Christian Bornträger wrote: o shared guest kernels: The CMS operating system is build as a bootable DCSS (called named-saved-segments NSS). All guests have the same host pages for the read-only parts of the CMS kernel. The local data is

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Peter Zijlstra
On Wed, 2009-05-20 at 12:04 +0300, Avi Kivity wrote: Peter Zijlstra wrote: It's a fully virtualized guest. There's no way to get this without patching the guest kernel. Yes there is.. virtualized monitor-wait stuff coupled with a monitor-wait based spinlock implementation.

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-20 Thread Avi Kivity
Christian Bornträger wrote: Am Mittwoch 20 Mai 2009 10:45:50 schrieb Avi Kivity: Christian Bornträger wrote: o shared guest kernels: The CMS operating system is build as a bootable DCSS (called named-saved-segments NSS). All guests have the same host pages for the read-only parts of

Re: [PATCH][KVM][retry 3] Add support for Pause Filtering to AMD SVM

2009-05-20 Thread Avi Kivity
Peter Zijlstra wrote: It's a fully virtualized guest. There's no way to get this without patching the guest kernel. Yes there is.. virtualized monitor-wait stuff coupled with a monitor-wait based spinlock implementation. That only works if the guest uses monitor/mwait.

Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts.

2009-05-20 Thread Christian Bornträger
Am Mittwoch 20 Mai 2009 11:11:57 schrieb Avi Kivity: Yes, KSM is easier and it even finds duplicate data pages. On the other hand it does only provide memory saving. It does not speedup application startup like execute-in-place (major page faults become minor page faults for text pages if

Re: kvm building issue

2009-05-20 Thread Avi Kivity
Nitin A Kamble wrote: Hi Avi, I am trying to build the kvm with changed repositories. I was trying to follow the instructions from here: http://www.linux-kvm.org/page/Code. Especially this section: building an external module with older kernels from that page. I find the kernel directory is

Re: kvm-autotest: The automation plans?

2009-05-20 Thread jason wang
sudhir kumar 写道: 2009/5/14 sudhir kumar smalik...@gmail.com: On Thu, May 14, 2009 at 12:22 PM, jason wang jasow...@redhat.com wrote: sudhir kumar 写道: Hi Uri/Lucas, Do you have any plans for enhancing kvm-autotest? I was looking mainly on the following 2 aspects: (1). we

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Jan Kiszka
Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 10:57:21AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 10:10:59AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the latest qemu-kvm and

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

2009-05-20 Thread Joerg Roedel
On Wed, May 20, 2009 at 10:21:14AM +0200, Ingo Molnar wrote: * Eric W. Biederman ebied...@xmission.com wrote: Being a major nitpick, I have to point out that the code is not structured to support other iommus, and I think AMD has one that can do this as well. (Joerg Cc:-ed) The AMD

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Jan Kiszka
Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 10:57:21AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 10:10:59AM +0200, Jan Kiszka wrote: Aneesh Kumar K.V wrote: On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote: Hi, With the

Guest OS cannot detect keystrokes/mouse clicks after system_reset

2009-05-20 Thread Sachin Sant
I used system_reset command from QEMU prompt with a SLES 11 Guest. After a reset the guest came up fine with the exception that neither key strokes nor mouse click worked. Host OS Info : CPU Model : Intel(R) Xeon(R) CPU X7350 @ 2.93GHz KVM Version : kvm-84 Host Kernel : uname

Re: Guest OS cannot detect keystrokes/mouse clicks after system_reset

2009-05-20 Thread Mark McLoughlin
On Wed, 2009-05-20 at 15:25 +0530, Sachin Sant wrote: I used system_reset command from QEMU prompt with a SLES 11 Guest. After a reset the guest came up fine with the exception that neither key strokes nor mouse click worked. Host OS Info : CPU Model : Intel(R) Xeon(R) CPU

RE: Network I/O performance

2009-05-20 Thread Fischer, Anna
Subject: Re: Network I/O performance Fischer, Anna wrote: Subject: Re: Network I/O performance Fischer, Anna wrote: I am running KVM with Fedora Core 8 on a 2.6.23 32-bit kernel. I use the tun/tap device model and the Linux bridge kernel module to connect my VM to the

RE: tun/tap and Vlans

2009-05-20 Thread Fischer, Anna
Subject: Re: tun/tap and Vlans Lukas Kolbe wrote: Right, I guess you'd see this with a real switch as well? Maybe have your guest send a packet out once in a while so the bridge can learn its MAC address (we do this after migration, for example). Does this mean that it is not

Re: Guest OS cannot detect keystrokes/mouse clicks after system_reset

2009-05-20 Thread Sachin Sant
Mark McLoughlin wrote: On Wed, 2009-05-20 at 15:25 +0530, Sachin Sant wrote: I used system_reset command from QEMU prompt with a SLES 11 Guest. After a reset the guest came up fine with the exception that neither key strokes nor mouse click worked. Host OS Info : CPU Model : Intel(R)

SLES 10 SP1 guest install fails with scsi drive

2009-05-20 Thread Pradeep K Surisetty
I tried to install SLES 10 SP1 Guest using qemu. Install halts in the early stages of installation when the interface drive is SCSi. But with IDE interface installation is successful. seems to be SCSI emulation issue.. Host OS Info : CPU Model : Dual-Core AMD Opteron(tm) Processor

qemu sles 11 guest failed to boot up after the guest install

2009-05-20 Thread Pradeep K Surisetty
I tried to install SLES 11 Guest using qemu. it doesn't boot it up after successful install and dropping to minimum shell . Seems to be not finding the disk . Host OS Info : CPU Model : Dual-Core AMD Opteron(tm) Processor 2218 Host OS: fedora11 rawhide Host Kernel : uname -a Linux

Re: kvm guest debug using gdb on x86

2009-05-20 Thread Avi Kivity
Jan Kiszka wrote: Sigh, confirmed, there is a regression in qemu-kvm. Will dig into this. Hmpf, the regression is also present in qemu upstream in kvm mode. We need gdb tests in kvm-autotest. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this

Re: qemu sles 11 guest failed to boot up after the guest install

2009-05-20 Thread Avi Kivity
Pradeep K Surisetty wrote: 4. After the guest install boot up from the image. qemu-kvm -boot c sles11.raw this command 4 fails to boot up the guest as mentioned above, dropping to minimum shell. Try qemu-kvm -drive file=sles11.raw,boot=on -- error compiling committee.c: too many

[PATCH 01/46] KVM: VMX: Make flexpriority module parameter reflect hardware capability

2009-05-20 Thread Avi Kivity
If the hardware does not support flexpriority, zero the module parameter. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index b9e06b0..37ae13d 100644 ---

[PATCH 03/46] KVM: MMU: Fix comment in page_fault()

2009-05-20 Thread Avi Kivity
From: Eddie Dong eddie.d...@intel.com The original one is for the code before refactoring. Signed-off-by: Yaozu (Eddie) Dong eddie.d...@intel.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/paging_tmpl.h |2 +- 1 files changed,

[PATCH 00/46] KVM updates for the 2.6.31 merge window (batch 2/3)

2009-05-20 Thread Avi Kivity
Second batch of the 2.6.31 merge window submission. Note there will only be three batches instead of four as advertised in the previous message due to a divide failure. Please review. Avi Kivity (3): KVM: VMX: Make flexpriority module parameter reflect hardware capability KVM: MMU: Use

[PATCH 04/46] KVM: ia64: enable external interrupt in vmm

2009-05-20 Thread Avi Kivity
From: Yang Zhang yang.zh...@intel.com Currently, the interrupt enable bit is cleared when in the vmm. This patch sets the bit and the external interrupts can be dealt with when in the vmm. This improves the I/O performance. Signed-off-by: Yang Zhang yang.zh...@intel.com Signed-off-by: Avi

[PATCH 02/46] KVM: VMX: Correct wrong vmcs field sizes

2009-05-20 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com EXIT_QUALIFICATION and GUEST_LINEAR_ADDRESS are natural width, not 64-bit. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 12 ++-- 1 files changed, 6 insertions(+), 6

[PATCH 32/46] KVM: Replace kvmclock open-coded get_cpu_var() with the real thing

2009-05-20 Thread Avi Kivity
Suggested by Ingo Molnar. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0c45df9..a7ea26e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@

[PATCH 41/46] KVM: Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com At the vector level, kernel and userspace irqchip are fairly similar. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/irq.c |7 +++ arch/x86/kvm/svm.c | 11 +++ arch/x86/kvm/vmx.c | 18

[PATCH 44/46] KVM: Use kvm_arch_interrupt_allowed() instead of checking interrupt_window_open directly

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com kvm_arch_interrupt_allowed() also checks IF so drop the check. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 39/46] KVM: ia64: ia64 vcpu_reset() do not call kmalloc() with irqs disabled

2009-05-20 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Restore local irq enabled state before calling kvm_arch_vcpu_init(), which calls kmalloc(GFP_KERNEL). Signed-off-by: Jes Sorensen j...@sgi.com Acked-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |

[PATCH 40/46] KVM: MMU: Fix auditing code

2009-05-20 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de Fix build breakage of hpa lookup in audit_mappings_page. Moreover, make this function robust against shadow_notrap_nonpresent_pte entries. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c |8

[PATCH 38/46] KVM: ia64: preserve int status through call to kvm_insert_vmm_mapping

2009-05-20 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Preserve interrupt status around call to kvm_insert_vmm_mappin() in kvm_vcpu_pre_transition(). Signed-off-by: Jes Sorensen j...@sgi.com Acked-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |7

[PATCH 22/46] KVM: x86 emulator: Add decoding of 16bit second immediate argument

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Such as segment number in lcall/ljmp Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c

[PATCH 42/46] KVM: VMX: Consolidate userspace and kernel interrupt injection for VMX

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Use the same callback to inject irq/nmi events no matter what irqchip is in use. Only from VMX for now. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/svm.c

[PATCH 45/46] KVM: SVM: Coalesce userspace/kernel irqchip interrupt injection logic

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Start to use interrupt/exception queues like VMX does. This also fix the bug that if exit was caused by a guest internal exception access to IDT the exception was not reinjected. Use EVENTINJ to inject interrupts. Use VINT only for detecting when IRQ windows

[PATCH 37/46] KVM: ia64: restore irq state before calling kvm_vcpu_init

2009-05-20 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Make sure to restore the psr after calling kvm_insert_vmm_mapping() which calls ia64_itr_entry() as it disables local interrupts and kvm_vcpu_init() may sleep. Avoids a warning from the lock debugging code. Signed-off-by: Jes Sorensen j...@sgi.com Acked-by :

[PATCH 43/46] KVM: VMX: Cleanup vmx_intr_assist()

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 55 --- 1 files changed, 30 insertions(+), 25 deletions(-) diff --git a/arch/x86/kvm/vmx.c

[PATCH 46/46] KVM: Remove exception_injected() callback.

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com It always return false for VMX/SVM now. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/svm.c |6 -- arch/x86/kvm/vmx.c |6

[PATCH 36/46] KVM: ia64: remove empty function vti_vcpu_load()

2009-05-20 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com vti_vcpu_load() doesn't do anything, so lets get rid of it. Signed-off-by: Jes Sorensen j...@sgi.com Acked-by : Xiantao Zhangxiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |5 - 1 files changed, 0

[PATCH 20/46] KVM: Make kvm header C++ friendly

2009-05-20 Thread Avi Kivity
From: nathan binkert n...@binkert.org Two things needed fixing: 1) g++ does not allow a named structure type within an anonymous union and 2) Avoid name clash between two padding fields within the same struct by giving them different names as is done elsewhere in the header. Signed-off-by:

[PATCH 27/46] KVM: x86 emulator: Add unsigned byte immediate decode

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Extend Source operand type opcode description field to 4 bites to accommodate new option. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c | 17 +++-- 1 files changed, 11

[PATCH 18/46] KVM: ia64: make kvm depend on CONFIG_MODULES.

2009-05-20 Thread Avi Kivity
From: Zhang, Xiantao xiantao.zh...@intel.com Since kvm-intel modue can't be built-in, make kvm depend on CONFIG_MODULES. Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1

[PATCH 31/46] KVM: SVM: Skip instruction on a task switch only when appropriate

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com If a task switch was initiated because off a task gate in IDT and IDT was accessed because of an external even the instruction should not be skipped. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/svm.c |

[PATCH 35/46] KVM: ia64: Flush all TLBs once guest's memory mapping changes.

2009-05-20 Thread Avi Kivity
From: Xiantao Zhang xiantao.zh...@intel.com Flush all vcpu's TLB entries once changes guest's memory mapping. Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-)

[PATCH 26/46] KVM: x86 emulator: Complete decoding of call near in decode stage

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c | 15 ++- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c

[PATCH 21/46] KVM: MMU: remove global page optimization logic

2009-05-20 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Complexity to fix it not worthwhile the gains, as discussed in http://article.gmane.org/gmane.comp.emulators.kvm.devel/28649. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 34/46] KVM: x86: check for cr3 validity in ioctl_set_sregs

2009-05-20 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace

[PATCH 28/46] KVM: x86 emulator: Completely decode in/out at decoding stage

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index

[PATCH 33/46] KVM: ia64: Don't hold slots_lock in guest mode

2009-05-20 Thread Avi Kivity
From: Jes Sorensen j...@sgi.com Reorder locking to avoid holding the slots_lock when entering the guest. Signed-off-by: Jes Sorensen j...@sgi.com Acked-by : Xiantao Zhangxiantao.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/ia64/kvm/kvm-ia64.c | 64

[PATCH 16/46] KVM: MMU: Discard reserved bits checking on PDE bit 7-8

2009-05-20 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com 1. It's related to a Linux kernel bug which fixed by Ingo on 07a66d7c53a538e1a9759954a82bb6c07365eff9. The original code exists for quite a long time, and it would convert a PDE for large page into a normal PDE. But it fail to fit normal PDE well. With the

[PATCH 23/46] KVM: x86 emulator: Add lcall decoding

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com No emulation yet. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c

[PATCH 19/46] KVM: PIT: fix count read and mode 0 handling

2009-05-20 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Commit 46ee278652f4cbd51013471b64c7897ba9bcd1b1 causes Solaris 10 to hang on boot. Assuming that PIT counter reads should return 0 for an expired timer is wrong: when it is active, the counter never stops (see comment on __kpit_elapsed). Also arm a one

[PATCH 25/46] KVM: x86 emulator: Complete short/near jcc decoding in decode stage

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c | 42 ++ 1 files changed, 10 insertions(+), 32 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c

[PATCH 29/46] KVM: x86 emulator: Decode soft interrupt instructions

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Do not emulate them yet. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c

[PATCH 30/46] KVM: x86 emulator: Add new mode of instruction emulation: skip

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com In the new mode instruction is decoded, but not executed. The EIP is moved to point after the instruction. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/x86.c

[PATCH 15/46] KVM: Fix unneeded instruction skipping during task switching.

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com There is no need to skip instruction if the reason for a task switch is a task gate in IDT and access to it is caused by an external even. The problem is currently solved only for VMX since there is no reliable way to skip an instruction in SVM. We should

[PATCH 17/46] KVM: x86 emulator: fix call near emulation

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com The length of pushed on to the stack return address depends on operand size not address size. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86_emulate.c |1 - 1 files changed, 0 insertions(+), 1

[PATCH 07/46] KVM: remove pointless conditional before kfree() in lapic initialization

2009-05-20 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Remove pointless conditional before kfree(). Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c

[PATCH 10/46] KVM: Use rsvd_bits_mask in load_pdptrs()

2009-05-20 Thread Avi Kivity
From: Dong, Eddie eddie.d...@intel.com Also remove bit 5-6 from rsvd_bits_mask per latest SDM. Signed-off-by: Eddie Dong eddie.d...@intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c |8 +++- arch/x86/kvm/mmu.h |5 + arch/x86/kvm/x86.c |3 ++- 3 files

[PATCH 12/46] KVM: VMX: Rewrite vmx_complete_interrupt()'s twisted maze of if() statements

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com ...with a more straightforward switch(). Also fix a bug when NMI could be dropped on exit. Although this should never happen in practice, since NMIs can only be injected, never triggered internally by the guest like exceptions. Signed-off-by: Gleb Natapov

[PATCH 08/46] KVM: VMX: Clean up Flex Priority related

2009-05-20 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com And clean paranthes on returns. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 47 ++- 1 files changed, 30 insertions(+), 17 deletions(-)

[PATCH 09/46] KVM: VMX: Fix feature testing

2009-05-20 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com The testing of feature is too early now, before vmcs_config complete initialization. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 18 +- 1 files changed, 9

[PATCH 11/46] KVM: VMX: Fix handling of a fault during NMI unblocked due to IRET

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Bit 12 is undefined in any of the following cases: If the VM exit sets the valid bit in the IDT-vectoring information field. If the VM exit is due to a double fault. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 13/46] KVM: VMX: Do not zero idt_vectoring_info in vmx_complete_interrupts().

2009-05-20 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com We will need it later in task_switch(). Code in handle_exception() is dead. is_external_interrupt(vect_info) will always be false since idt_vectoring_info is zeroed in vmx_complete_interrupts(). Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi

[PATCH 05/46] KVM: MMU: Emulate #PF error code of reserved bits violation

2009-05-20 Thread Avi Kivity
From: Dong, Eddie eddie.d...@intel.com Detect, indicate, and propagate page faults where reserved bits are set. Take care to handle the different paging modes, each of which has different sets of reserved bits. [avi: fix pte reserved bits for efer.nxe=0] Signed-off-by: Eddie Dong

Re: [PATCH -tip] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h

2009-05-20 Thread Avi Kivity
Jaswinder Singh Rajput wrote: BTW, where you applied this patch. git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git is still showing old data. Sometimes things find their way into the queue branch. -- error compiling committee.c: too many arguments to function -- To unsubscribe

  1   2   >