[PATCH] kvm: qemu: Fix wrong counting of MSI-X table size

2009-04-21 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com The PCI spec says... System software reads this field to determine the MSI-X Table Size *N*, which is encoded as *N-1*. For example, a returned value of “011” indicates a table size of 4. Signed-off-by: Sheng Yang sh...@linux.intel.com

[PATCH] kvm: libkvm: fix build with --with-patched-kernel on 2.6.29

2009-04-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Make libkvm build with --with-patched-kernel on 2.6.29. Reported-by: Michael S. Tsirkin m.s.tsir...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h index 70a95c2..96361e8 100644 --- a/libkvm/kvm-common.h

[PATCH] kvm: qemu: propagate errors on failed migration.

2009-04-21 Thread Avi Kivity
From: Glauber Costa glom...@redhat.com We're currently ignoring any errors if dirty logging fails. Set error on migration file if we're unable to put dirty logging on. Signed-off-by: Glauber Costa glom...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu/vl.c b/qemu/vl.c

[PATCH] KVM: Make kvm header C++ friendly

2009-04-21 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] KVM: x86 emulator: Add lcall decoding

2009-04-21 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 diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index c015063..71b4bee 100644 --- a/arch/x86/kvm/x86_emulate.c +++

[PATCH] KVM: x86 emulator: Complete ljmp decoding at decode stage

2009-04-21 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 diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 71b4bee..8779cf2 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -193,7

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

2009-04-21 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 diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 14b8ee2..4a9cd4c 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -192,7

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

2009-04-21 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 diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 8779cf2..14b8ee2 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -136,11

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

2009-04-21 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 diff --git

[PATCH] KVM: Fix overlapping check for memory slots

2009-04-21 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de When checking for overlapping slots on registration of a new one, kvm currently also considers zero-length (ie. deleted) slots and rejects requests incorrectly. This finally denies user space from joining slots. Fix the check by skipping deleted slots and

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

2009-04-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Suggested by Ingo Molnar. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 29a7fea..148cde2 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -627,16 +627,17 @@ static void kvm_write_guest_time(struct

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

2009-04-21 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 diff --git a/arch/ia64/kvm/kvm-ia64.c

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

2009-04-21 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 diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index

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

2009-04-21 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 diff --git

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

2009-04-21 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] KVM: ia64: preserve int status through call to kvm_insert_vmm_mapping

2009-04-21 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 diff --git a/arch/ia64/kvm/kvm-ia64.c

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

2009-04-21 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 diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index f3b2cd7..87c6c09

[PATCH] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2009-04-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Network Performance Issues

2009-04-21 Thread Sebastian Ries
Hi there We have running WinXP guests on kvm84 and did some network performance tests: I started iometer on the WinXP Guest and connected a dynamo running on a debian etch physical machine. The results don't really make me happy: Sending data into the Guest runs quite well at about 75 MB/s

[ kvm-Bugs-2768533 ] SCSI/VirtIO: VM unable to reboot from non-IDE controller

2009-04-21 Thread SourceForge.net
Bugs item #2768533, was opened at 2009-04-16 16:01 Message generated for change (Comment added) made by technologov You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2768533group_id=180599 Please note that this message will contain a full copy of the comment

Re: Xenner design and kvm msr handling

2009-04-21 Thread Avi Kivity
Gerd Hoffmann wrote: On 04/20/09 15:45, Avi Kivity wrote: Please elaborate. What hypercalls are so simple that an exit into the hypervisor is not necessary? Ok, that becomes a longer story. I try to keep it short though ... Thanks, this is very helpful. xenner pv-on-hvm

[ kvm-Bugs-2741742 ] debian-20090117-kfreebsd-i386 installation fails on kvm 80

2009-04-21 Thread SourceForge.net
Bugs item #2741742, was opened at 2009-04-07 22:37 Message generated for change (Comment added) made by scoof You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2741742group_id=180599 Please note that this message will contain a full copy of the comment

Re: [x86] - technical questions about HV implementation on Intel VT

2009-04-21 Thread Eric Lacombe
Thanks a lot for your answer ;) Le lundi 20 avril 2009 20:22:21 Avi Kivity, vous avez écrit : Eric Lacombe wrote: [...] echo and pwd are part of bash, so they are probably in memory. I guess once you go to disk things fail. Try to boot the entire OS from initramfs (and keep it there). I

[ kvm-Bugs-2777286 ] Hard Disk: 1 TB images fail to get formatted

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

[ANNOUNCE] kvm-85 release

2009-04-21 Thread Avi Kivity
Again a long delayed release; I'll try to reduce the lag between releases. kvm-85 comes in two flavors: the traditional kernel+qemu package (kvm-85.tar.gz), as well as separate qemu (qemu-kvm-devel-85.tar.gz) and kernel module (kvm-kmod-devel-85.tar.gz). The separate packages can be used by

Xenner design and kvm msr handling

2009-04-21 Thread Gerd Hoffmann
On 04/20/09 15:45, Avi Kivity wrote: Please elaborate. What hypercalls are so simple that an exit into the hypervisor is not necessary? Ok, that becomes a longer story. I try to keep it short though ... xenner today (pure-pv only) === There is the xenner userspace

Re: Xenner design and kvm msr handling

2009-04-21 Thread Gerd Hoffmann
On 04/21/09 12:14, Avi Kivity wrote: Gerd Hoffmann wrote: xenner pv-on-hvm == Once we have all this in qemu it is just a small step to also support xenish pv-on-hvm drivers in qemu using the xenner emulation bits. Hypercalls are handled by a small pic binary loaded into the

Re: Xenner design and kvm msr handling

2009-04-21 Thread Avi Kivity
Gerd Hoffmann wrote: Can you explain the protocol used by this MSR? How does the guest know how many pages to load? How does the kernel know which type of page to put where? Sure. (1) cpuid 0x4000, check vmm signature (2) cpuid 0x4002 - returns # of pages (eax) and msr (ebx) (3)

Re: Xenner design and kvm msr handling

2009-04-21 Thread Gerd Hoffmann
On 04/21/09 14:27, Avi Kivity wrote: Gerd Hoffmann wrote: (1) cpuid 0x4000, check vmm signature (2) cpuid 0x4002 - returns # of pages (eax) and msr (ebx) (3) allocate pages (normal ram) (4) foreach page (wrmsr guest physical address | pageno) Xen uses msr 0x4000. Due to the msr

Re: Xenner design and kvm msr handling

2009-04-21 Thread Avi Kivity
Gerd Hoffmann wrote: Not sure, have to dig into the xen code to figure. Could be xen doesn't remember the page in the first place. They might let the illegal instruction fault handler patch the opcode. At least I vaguely remember some discussions about that. Could be there isn't a

Re: [PATCH 13/15] Add NMI injection support to SVM.

2009-04-21 Thread Gleb Natapov
On Mon, Apr 20, 2009 at 05:50:01PM +0200, Jan Kiszka wrote: +static int iret_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) +{ + svm-vmcb-control.intercept = ~(1UL INTERCEPT_IRET); + svm-vcpu.arch.hflags = ~HF_NMI_MASK; Two minor issues:

[PATCH v2 01/16] Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too.

2009-04-21 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/irq.c |7 +++ arch/x86/kvm/svm.c | 11 +++ arch/x86/kvm/vmx.c | 18 +- arch/x86/kvm/x86.c |4 ++-- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/arch/x86/kvm/irq.c

[PATCH v2 02/16] Consolidate userspace and kernel interrupt injection for VMX.

2009-04-21 Thread Gleb Natapov
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 --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/svm.c |2 +- arch/x86/kvm/vmx.c | 71

[PATCH v2 00/16] interrupt injection rework

2009-04-21 Thread Gleb Natapov
Hi, This patch series aims to consolidate IRQ injection code for in kernel IRQ chip and userspace one. Also to move IRQ injection logic from SVM/VMX specific code to x86.c. Changelog: v2: Fix SVM NMI injection. IRET intercept should be activated at NMI injection time. Update NMI injection

[PATCH v2 03/16] Cleanup vmx_intr_assist()

2009-04-21 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/vmx.c | 55 --- 1 files changed, 30 insertions(+), 25 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 06252f7..9eb518f 100644 --- a/arch/x86/kvm/vmx.c +++

[PATCH v2 11/16] Do not report TPR write to userspace if new value bigger or equal to a previous one.

2009-04-21 Thread Gleb Natapov
Saves many exits to userspace in a case of IRQ chip in userspace. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/svm.c |4 arch/x86/kvm/vmx.c | 19 --- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c

[PATCH v2 06/16] Use EVENTINJ to inject interrupts.

2009-04-21 Thread Gleb Natapov
Use VINT only for detecting when IRQ windows is open again. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/svm.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 053370d..3b4c00f 100644 ---

[PATCH v2 08/16] Remove inject_pending_vectors() callback.

2009-04-21 Thread Gleb Natapov
It is the same as inject_pending_irq() for VMX/SVM now. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |2 -- arch/x86/kvm/svm.c |1 - arch/x86/kvm/vmx.c |1 - arch/x86/kvm/x86.c |4 +--- 4 files changed, 1

[PATCH v2 07/16] Remove exception_injected() callback.

2009-04-21 Thread Gleb Natapov
It always return false for VMX/SVM now. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/svm.c |6 -- arch/x86/kvm/vmx.c |6 -- arch/x86/kvm/x86.c |2 -- 4 files changed, 0

[PATCH v2 09/16] kvm_push_irq() no longer used.

2009-04-21 Thread Gleb Natapov
Remove it. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/x86.h |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index 2ab6791..39350b2 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -30,11 +30,4 @@

[PATCH v2 12/16] Get rid of arch.interrupt_window_open arch.nmi_window_open

2009-04-21 Thread Gleb Natapov
They are recalculated before each use anyway. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |2 -- arch/x86/kvm/svm.c |6 +- arch/x86/kvm/vmx.c | 35 +++ 3 files changed, 12 insertions(+),

[PATCH v2 04/16] Use kvm_arch_interrupt_allowed() instead of checking interrupt_window_open directly

2009-04-21 Thread Gleb Natapov
kvm_arch_interrupt_allowed() also checks IF so drop the check. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/x86.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index dfcf358..f6aaa15 100644 ---

[PATCH v2 14/16] Move interrupt injection logic to x86.c

2009-04-21 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |7 +++- arch/x86/kvm/svm.c | 94 +++ arch/x86/kvm/vmx.c | 79 - arch/x86/kvm/x86.c | 71

[PATCH v2 16/16] Get rid of get_irq() callback.

2009-04-21 Thread Gleb Natapov
It just returns pending IRQ vector from the queue for VMX/SVM. Get IRQ directly from the queue before migration and put it back after. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/svm.c |8 arch/x86/kvm/vmx.c

[PATCH v2 15/16] Fix userspace IRQ chip migration.

2009-04-21 Thread Gleb Natapov
Re-put pending IRQ vector into interrupt_bitmap before migration. Otherwise it will be lost if migration happens in the wrong time. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/x86.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v2 13/16] Add NMI injection support to SVM.

2009-04-21 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/svm.c | 50 +- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h

[PATCH v2 05/16] Coalesce userspace/kernel irqchip interrupt injection logic.

2009-04-21 Thread Gleb Natapov
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. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/svm.c | 176

[PATCH v2 10/16] sync_lapic_to_cr8() should always sync cr8 to V_TPR.

2009-04-21 Thread Gleb Natapov
Even if IRQ chip is in userspace. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/svm.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index f8beddb..52bd999 100644 --- a/arch/x86/kvm/svm.c +++

Re: [PATCH] qemu: fix pci_enable_capabilities to set the CAP feature in pci::status

2009-04-21 Thread Avi Kivity
Gregory Haskins wrote: (Applies to kvm-userspace.git:a1075de527f309850df278484f2ef4127827c6f4) The PCI spec requires bit 4 of the config-space STATUS register to be set in order to indicate that the capabilities pointer and capabilities area are valid. We have a pci_enable_capabilities()

Re: [PATCH] kvm: x86: Drop request_nmi from stats

2009-04-21 Thread Avi Kivity
Jan Kiszka wrote: The stats entry request_nmi is no longer used as the related user space interface was dropped. So clean it up. Will apply after Gleb's megapatchset goes in, don't want to risk gratuitous conflicts. -- error compiling committee.c: too many arguments to function -- To

KVM failover

2009-04-21 Thread Anders Häggström
Hello list! I have searched for a while now and have not found a solution to my problem yet. So I ask here in hope that someone can answer or point me to some good documentation. I have two identical servers and that run as a cluster for KVM virtualization with a 1Gbit/s Ethernet PHY that

problem with kvm-85 release

2009-04-21 Thread Ingmar Schraub
Hello, I have a problem with this release version (qemu-kvm-devel-85) when running ./configure It shows me a problem with KVM support. Last version I tried was 85-rc3 and I haven't had this problem. Please see below: ing...@nexoc:~/downloads/KVM/qemu-kvm-devel-85 ./configure --disable-bluez

Re: Xenner design and kvm msr handling

2009-04-21 Thread Gerd Hoffmann
On 04/21/09 15:33, Avi Kivity wrote: Gerd Hoffmann wrote: Not sure, have to dig into the xen code to figure. Could be xen doesn't remember the page in the first place. They might let the illegal instruction fault handler patch the opcode. At least I vaguely remember some discussions about

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Huang Ying wrote: 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

Re: [PATCH] Add MCE support to KVM

2009-04-21 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Avi Kivity wrote: Then we would need to tell which read-only MSRs are setup writeable and which aren't... I'm okay with an ioctl to setup MCE, but just make sure userspace has all the information to know what the kernel can do rather than the

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Huang Ying wrote: 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

Re: Xenner design and kvm msr handling

2009-04-21 Thread Avi Kivity
Gerd Hoffmann wrote: On 04/21/09 15:33, Avi Kivity wrote: Gerd Hoffmann wrote: Not sure, have to dig into the xen code to figure. Could be xen doesn't remember the page in the first place. They might let the illegal instruction fault handler patch the opcode. At least I vaguely remember some

Re: [PATCH] Add MCE support to KVM

2009-04-21 Thread Avi Kivity
Anthony Liguori wrote: Right now everything in the vcpu is emulated in the kernel. Everything else is emulated either in the kernel (irqchip) or in userspace. This makes things easier to understand, and is more future friendly if more cpu features become virtualized by hardware. Except

Re: [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64

2009-04-21 Thread Hollis Blanchard
On Tue, 2009-04-21 at 10:08 +, Avi Kivity wrote: From: Xiantao Zhang xiantao.zh...@intel.com ia64 depends on platform provides synced idcache after DMA operation. For virtual dma operations in qemu, it also need to provide similar machanism. Signed-off-by: Xiantao Zhang

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Avi Kivity
Anthony Liguori wrote: You also need to inject the MCE. KVM_SET_EXCEPTION, instead of adding something MCE specific? That's of dubious use... exceptions are cpu-internal things. It's also problematic to implement - what do you do if an exception is already pending? For MCE you know it's

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Avi Kivity
Anthony Liguori wrote: Regardless of the KVM interface for this, to go upstream to QEMU, this needs a TCG implementation which means the logic must be duplicated in userspace. In particular, this is because a user-visible command is being introduced in the monitor. Definitely. So Avi,

Re: [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64

2009-04-21 Thread Avi Kivity
Hollis Blanchard wrote: On Tue, 2009-04-21 at 10:08 +, Avi Kivity wrote: From: Xiantao Zhang xiantao.zh...@intel.com ia64 depends on platform provides synced idcache after DMA operation. For virtual dma operations in qemu, it also need to provide similar machanism. Signed-off-by:

[RFC PATCH v3 00/17] virtual-bus

2009-04-21 Thread Gregory Haskins
RFC: Virtual-Bus (applies to v2.6.30-rc2) -- Virtual-Bus is a Linux-kernel based virtual IO resource container technology. It allows you to declare virtualized device models directly within a host kernel that can be uniformly accessed from a variety of environments, such as

[RFC PATCH v3 01/17] shm-signal: shared-memory signals

2009-04-21 Thread Gregory Haskins
This interface provides a bidirectional shared-memory based signaling mechanism. It can be used by any entities which desire efficient communication via shared memory. The implementation details of the signaling are abstracted so that they may transcend a wide variety of locale boundaries (e.g.

[RFC PATCH v3 04/17] vbus: add bus-registration notifiers

2009-04-21 Thread Gregory Haskins
We need to get hotswap events in environments which cannot use existing facilities (e.g. inotify). So we add a notifier-chain to allow client callbacks whenever an interface is {un}registered. Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/vbus.h | 15 +

[RFC PATCH v3 03/17] vbus: add connection-client helper infrastructure

2009-04-21 Thread Gregory Haskins
We expect to have various types of connection-clients (e.g. userspace, kvm, etc), each of which is likely to have common access patterns and marshalling duties. Therefore we create a client API to simplify client development by helping with mundane tasks such as handle-2-pointer translation, etc.

[RFC PATCH v3 05/17] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-04-21 Thread Gregory Haskins
This will generally be used for hypervisors to publish any host-side virtual devices up to a guest. The guest will have the opportunity to consume any devices present on the vbus-proxy as if they were platform devices, similar to existing buses like PCI. Signed-off-by: Gregory Haskins

[RFC PATCH v3 06/17] ioq: Add basic definitions for a shared-memory, lockless queue

2009-04-21 Thread Gregory Haskins
We can map these over VBUS shared memory (or really any shared-memory architecture if it supports shm-signals) to allow asynchronous communication between two end-points. Memory is synchronized using pure barriers (i.e. lockless), so IOQs are friendly in many contexts, even if the memory is

[RFC PATCH v3 07/17] ioq: add vbus helpers

2009-04-21 Thread Gregory Haskins
It will be common to map an IOQ over the VBUS shared-memory interfaces, so lets generalize their setup so we can reuse the pattern. Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/vbus_device.h |7 +++ include/linux/vbus_driver.h |7 +++ kernel/vbus/Kconfig

[RFC PATCH v3 08/17] venet: add the ABI definitions for an 802.x packet interface

2009-04-21 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/venet.h | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) create mode 100644 include/linux/venet.h diff --git a/include/linux/venet.h b/include/linux/venet.h new file

[RFC PATCH v3 15/17] kvm: Add guest-side support for VBUS

2009-04-21 Thread Gregory Haskins
This adds a driver to interface between the host VBUS support, and the guest-vbus bus model. Signed-off-by: Gregory Haskins ghask...@novell.com --- arch/x86/Kconfig|9 + drivers/Makefile|1 drivers/vbus/proxy/Makefile |2 drivers/vbus/proxy/kvm.c| 751

[RFC PATCH v3 11/17] venet-tap: add the ability to set the client's mac address via sysfs

2009-04-21 Thread Gregory Haskins
From: Patrick Mullaney pmulla...@novell.com Signed-off-by: Patrick Mullaney pmulla...@novell.com Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/vbus/devices/venet-tap.c | 35 ++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git

[RFC PATCH v3 12/17] venet: add scatter-gather support

2009-04-21 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/net/vbus-enet.c | 248 +-- include/linux/venet.h | 39 +++ 2 files changed, 274 insertions(+), 13 deletions(-) diff --git a/drivers/net/vbus-enet.c b/drivers/net/vbus-enet.c index

[RFC PATCH v3 09/17] net: Add vbus_enet driver

2009-04-21 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/net/Kconfig | 13 + drivers/net/Makefile|1 drivers/net/vbus-enet.c | 672 +++ 3 files changed, 686 insertions(+), 0 deletions(-) create mode 100644 drivers/net/vbus-enet.c

[RFC PATCH v3 16/17] vbus: add a userspace connector

2009-04-21 Thread Gregory Haskins
This allows userspace applications to access vbus devices Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/vbus.h |4 include/linux/vbus_client.h|2 include/linux/vbus_userspace.h | 48 kernel/vbus/Kconfig| 10 +

[RFC PATCH v3 17/17] virtio: add a vbus transport

2009-04-21 Thread Gregory Haskins
We add a new virtio transport for accessing backends located on vbus. This complements the existing transports for virtio-pci, virtio-s390, and virtio-lguest that already exist. Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/virtio/Kconfig | 15 +

[RFC PATCH v3 14/17] kvm: Add VBUS support to the host

2009-04-21 Thread Gregory Haskins
This patch adds support for guest access to a VBUS assigned to the same context as the VM. It utilizes a IOQ+IRQ to move events from host-guest, and provides a hypercall interface to move events guest-host. Special thanks to Alex Tsariounov for submitting patches for cleaning up some sloppy

[RFC PATCH v3 10/17] venet-tap: Adds a venet compatible tap device to VBUS

2009-04-21 Thread Gregory Haskins
This module is similar in concept to a tuntap. A tuntap module provides a netif() interface on one side, and a char-dev interface on the other. Packets that ingress on one interface, egress on the other (and vice versa). This module offers a similar concept, except that it substitues the

[RFC PATCH v3 13/17] venettap: add scatter-gather support

2009-04-21 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/vbus/devices/venet-tap.c | 235 +- 1 files changed, 228 insertions(+), 7 deletions(-) diff --git a/drivers/vbus/devices/venet-tap.c b/drivers/vbus/devices/venet-tap.c index 33ede4c..8788c05

[PATCH] qemu: add vbus pci-device

2009-04-21 Thread Gregory Haskins
Add support for shiming a userspace PCI object in qemu-kvm to represent the VBUS object located in the kernel. This presents a PCI bridge to the system using standard PCI mechanisms such as MSI interrupt routing. A guest may then optionally install a PCI driver for this bridge to gain access to

Re: [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64

2009-04-21 Thread Hollis Blanchard
On Tue, 2009-04-21 at 20:21 +0300, Avi Kivity wrote: Hollis Blanchard wrote: On Tue, 2009-04-21 at 10:08 +, Avi Kivity wrote: From: Xiantao Zhang xiantao.zh...@intel.com ia64 depends on platform provides synced idcache after DMA operation. For virtual dma operations in qemu, it

[ kvm-Bugs-2776577 ] Call trace after live migration of 32 bit guest under load

2009-04-21 Thread SourceForge.net
Bugs item #2776577, was opened at 2009-04-20 13:23 Message generated for change (Comment added) made by tljohnsn You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2776577group_id=180599 Please note that this message will contain a full copy of the comment

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Anthony Liguori
Avi Kivity wrote: So Avi, regardless of what interface is chosen for KVM, can you hold off applying these patches until there is a TCG implementation? Otherwise, we'll be playing catchup between kvm-userspace and upstream QEMU forever. I have a feeling we will anyway, Not if we avoid

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: So Avi, regardless of what interface is chosen for KVM, can you hold off applying these patches until there is a TCG implementation? Otherwise, we'll be playing catchup between kvm-userspace and upstream QEMU forever. I have a feeling we will

Re: [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64

2009-04-21 Thread Avi Kivity
Hollis Blanchard wrote: So I can release kvm-85. I don't like it either. You don't need to commit it: 1. KVM on ia64 has made it for this long without that patch. Apparently, this was triggered by recent changes to the dma-api? Xiantao? 2. The ia64 guys didn't even

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Anthony Liguori
Avi Kivity wrote: No argument. But some kernel features will require major rework in qemu before we can support them properly. We'll still want to bring them to users quickly so users can enjoy them (and we can enjoy users testing them). Waiting for a qemu rework may take a while, and we'll

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: No argument. But some kernel features will require major rework in qemu before we can support them properly. We'll still want to bring them to users quickly so users can enjoy them (and we can enjoy users testing them). Waiting for a qemu rework may

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Anthony Liguori
Avi Kivity wrote: Example: SMP. There was no KVM support in QEMU at the time when SMP was introduced. Had there been, I see no reason not to do it in upstream QEMU. Example: vlan API. You'll have to be more specific. Do you mean the up coming vlan API refactoring? That absolutely

Re: [ kvm-Bugs-2761920 ] 64-bit smp RHEL5.3 call trace after Live Migration

2009-04-21 Thread Gerrit Slomma
Gerrit Slomma roadrunner_gs at web.de writes: (...) I reported this issue before here: http://article.gmane.org/gmane.comp.emulators.kvm.devel/29833 and opened a bug-report here: https://bugzilla.redhat.com/show_bug.cgi?id=492688 The problem still persists with kvm-85 released

[ kvm-Bugs-2778112 ] Guest hangs on restart with directly loaded kernel

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

Re: [PATCH -tip 3/6 V4.1] x86: instruction decorder API

2009-04-21 Thread Masami Hiramatsu
H. Peter Anvin wrote: Jim Keniston wrote: It looks like AT2(Ev,Gv) would yield the same bits as AT2(Gv,Ev). It'd be nice not to lose the operand-order information. And we'd have to make clear whether which notation we're using -- src,dest as in the gnu assembler, or dest,src as in the AMD

RE: [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64

2009-04-21 Thread Zhang, Xiantao
Hollis Blanchard wrote: On Tue, 2009-04-21 at 20:21 +0300, Avi Kivity wrote: Hollis Blanchard wrote: On Tue, 2009-04-21 at 10:08 +, Avi Kivity wrote: From: Xiantao Zhang xiantao.zh...@intel.com ia64 depends on platform provides synced idcache after DMA operation. For virtual dma

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Huang Ying
On Wed, 2009-04-22 at 00:21 +0800, Avi Kivity wrote: Anthony Liguori wrote: Regardless of the KVM interface for this, to go upstream to QEMU, this needs a TCG implementation which means the logic must be duplicated in userspace. In particular, this is because a user-visible command is

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Gregory Haskins
Kyle Moffett wrote: On Sun, Apr 19, 2009 at 9:19 PM, Huang Ying ying.hu...@intel.com wrote: On Sat, 2009-04-18 at 23:54 +0800, Anthony Liguori wrote: Huang Ying wrote: The related MSRs are emulated. MCE capability is exported via extension KVM_CAP_MCE and ioctl

RE: problem with kvm-85 release

2009-04-21 Thread Zhang, Xiantao
Avi should have a fix in upstream, but don't know why it is missing in kvm-85. For solving the issue, you need to create a soft link in the directory include and include-compat under kernel before configure. ln -sf asm-x86 asm. Xiantao -Original Message- From:

[ kvm-Bugs-2778366 ] kvm-84 pci passthrough errors

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

Re: [PATCH -v2] Add MCE support to KVM

2009-04-21 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: Example: SMP. There was no KVM support in QEMU at the time when SMP was introduced. Had there been, I see no reason not to do it in upstream QEMU. Marcelo's been working on getting iothread (needed for smp) into qemu for a while. It will take