Re: [kvm-devel] [kvm-ppc-devel] [PATCH] RFC:Use CONFIG_HAS_IOPORTaround vcpu->pio_data
>It's a matter of perspective. :) > >The PowerPC architecture has no "IO" instructions; therefore all IO >accesses are MMIO. > >However, you can place devices with IO ports in a PowerPC system. In >this case, the bridges are configured to translate MMIO accesses coming >from the processor into IO port accesses on the bus. It is quite common >to find standard x86 ISA devices, such as a SuperIO chip, in PowerPC >systems. > That is exactly what IA64 architecture takes. I guess PIO is X86 historic issue when there as only 16 bits bus 20 years ago. And it is probably due to 8085 which is for embedded system. All other archs may support PIO due to plenty of X86 devices, but do emulating PIO in chipset/bridge like PPC/IA64. Of course except S390 which is really different and doesn't want to take "open" devices:( Eddie. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH][4/5] kvm: libkvm: Moving set and get shadow pages functions to arch x86
Zhang, Xiantao wrote: > From: Zhang Xiantao <[EMAIL PROTECTED]> > Date: Mon, 3 Dec 2007 22:06:04 +0800 > Subject: [PATCH] kvm: libkvm. Moving set and get shadow pages to x86 > arch. > Move kvm_set&get_shadow_pages to arch-x86 for libkvm > Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]> > Please put a blank line between the Subject: line and the rest; otherwise the git parser sometimes gets confused and omits parts of the message. -- error compiling committee.c: too many arguments to function - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH][0/5] kvm:libkvm : KVM/IA64 libkvmfor ia64
Zhang, Xiantao wrote: > Hi, Avi > These patches enable libkvm built successfully for ia64. This > is the preparation support for kvm/ia64. It will help us to reduce the > maintain effor once check-in. I will send the subsequent patches to > enable ia64 userspace support. > > [1/5] Update configure file to make it work for ia64. > [2/5] Add libkvm-ia64.c for libkvm support on ia64 > [3/5] Add the kvm-ia64.h for ia64 support. > [4/5] Moving kvm_set/kvm_get_shadow_pages to libkvm-x86.c > [5/5] Moving the delarations of kvm_set_cr8 and kvm_get_cr8 to > x86-specific area. > Applied all, thanks. -- error compiling committee.c: too many arguments to function - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 4/7] KVM: Use generalized exception queue for injecting #UD
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/svm.c | 12 ++-- drivers/kvm/vmx.c | 11 +-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index b896614..8b1cc60 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -207,13 +207,6 @@ static bool svm_exception_injected(struct kvm_vcpu *vcpu) return !(svm->vmcb->control.exit_int_info & SVM_EXITINTINFO_VALID); } -static void inject_ud(struct kvm_vcpu *vcpu) -{ - to_svm(vcpu)->vmcb->control.event_inj = SVM_EVTINJ_VALID | - SVM_EVTINJ_TYPE_EXEPT | - UD_VECTOR; -} - static int is_external_interrupt(u32 info) { info &= SVM_EVTINJ_TYPE_MASK | SVM_EVTINJ_VALID; @@ -948,8 +941,7 @@ static int ud_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) er = emulate_instruction(&svm->vcpu, kvm_run, 0, 0, 0); if (er != EMULATE_DONE) - inject_ud(&svm->vcpu); - + kvm_queue_exception(&svm->vcpu, UD_VECTOR); return 1; } @@ -1027,7 +1019,7 @@ static int vmmcall_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) static int invalid_op_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) { - inject_ud(&svm->vcpu); + kvm_queue_exception(&svm->vcpu, UD_VECTOR); return 1; } diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 92660db..aa6bf2b 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -613,14 +613,6 @@ static bool vmx_exception_injected(struct kvm_vcpu *vcpu) return !(vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK); } -static void vmx_inject_ud(struct kvm_vcpu *vcpu) -{ - vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, -UD_VECTOR | -INTR_TYPE_EXCEPTION | -INTR_INFO_VALID_MASK); -} - /* * Swap MSR entry in host/guest MSR entry array. */ @@ -1866,8 +1858,7 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) if (is_invalid_opcode(intr_info)) { er = emulate_instruction(vcpu, kvm_run, 0, 0, 0); if (er != EMULATE_DONE) - vmx_inject_ud(vcpu); - + kvm_queue_exception(vcpu, UD_VECTOR); return 1; } -- 1.5.3 - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] [0/10]Patches to split qemu-kvm.c
Zhang, Xiantao wrote: > Hi, Avi > This series of patches are introduced to split qemu-kvm.c, and make it > arch-independent. > In these patches, one file called qemu-kvm-x86.c is created. For > arch-specific stuff, I also use kvm_arch prefix to hold arch-specific > code. > Tested on x86 and x86_64 platform. > Applied and pushed all; thanks. -- error compiling committee.c: too many arguments to function - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 0/7] Rework irq injection infrastructure
The current irq and exception injection infrastructure is quite complex and has been the source of a number of bugs in the past. This patchset simplifies irq and exception injection: - Much more work is carried out in common code rather than vmx/svm specific code. Information is kept in C variables rather than hardware registers - Exception and interrupts are separated into two independent queues. This will allow later optimization on AMD where the hardware supports two queues, and also simplifies the Intel case as now we don't need to check the hardware whether an exception is pending when injecting and interrupt. - Interrupts are now only acked after they have been successfully injected, rather than when the injection is attempted. This significantly simplifies the case where we fail to inject an interrupt due to a shadow page fault. The patchset is also necessary for integrating the tpr optimization branch and for injecting interrupts in big real mode. drivers/kvm/i8259.c | 44 ++ drivers/kvm/irq.c | 40 ++--- drivers/kvm/irq.h | 17 +++- drivers/kvm/kvm_main.c|4 +- drivers/kvm/lapic.c | 33 +-- drivers/kvm/mmu.c |2 +- drivers/kvm/svm.c | 175 -- drivers/kvm/vmx.c | 207 - drivers/kvm/x86.c | 164 ++-- drivers/kvm/x86.h | 35 ++-- drivers/kvm/x86_emulate.c |4 +- 11 files changed, 291 insertions(+), 434 deletions(-) - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [PATCH 2/7] KVM: Replace page fault injection by the generalized exception queue
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/mmu.c |2 +- drivers/kvm/svm.c | 35 --- drivers/kvm/vmx.c | 32 drivers/kvm/x86.c | 17 - drivers/kvm/x86.h |4 ++-- 5 files changed, 19 insertions(+), 71 deletions(-) diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 9b9d1b6..62a7415 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -1081,7 +1081,7 @@ static void inject_page_fault(struct kvm_vcpu *vcpu, u64 addr, u32 err_code) { - kvm_x86_ops->inject_page_fault(vcpu, addr, err_code); + kvm_inject_page_fault(vcpu, addr, err_code); } static void paging_free(struct kvm_vcpu *vcpu) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index f4c61c8..ce77f15 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -225,12 +225,6 @@ static void inject_ud(struct kvm_vcpu *vcpu) UD_VECTOR; } -static int is_page_fault(uint32_t info) -{ - info &= SVM_EVTINJ_VEC_MASK | SVM_EVTINJ_TYPE_MASK | SVM_EVTINJ_VALID; - return info == (PF_VECTOR | SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_EXEPT); -} - static int is_external_interrupt(u32 info) { info &= SVM_EVTINJ_TYPE_MASK | SVM_EVTINJ_VALID; @@ -1624,34 +1618,6 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu, unsigned long root) } } -static void svm_inject_page_fault(struct kvm_vcpu *vcpu, - unsigned long addr, - uint32_t err_code) -{ - struct vcpu_svm *svm = to_svm(vcpu); - uint32_t exit_int_info = svm->vmcb->control.exit_int_info; - - ++vcpu->stat.pf_guest; - - if (is_page_fault(exit_int_info)) { - - svm->vmcb->control.event_inj_err = 0; - svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | - SVM_EVTINJ_VALID_ERR | - SVM_EVTINJ_TYPE_EXEPT | - DF_VECTOR; - return; - } - vcpu->cr2 = addr; - svm->vmcb->save.cr2 = addr; - svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | - SVM_EVTINJ_VALID_ERR | - SVM_EVTINJ_TYPE_EXEPT | - PF_VECTOR; - svm->vmcb->control.event_inj_err = err_code; -} - - static int is_disabled(void) { u64 vm_cr; @@ -1721,7 +1687,6 @@ static struct kvm_x86_ops svm_x86_ops = { .set_rflags = svm_set_rflags, .tlb_flush = svm_flush_tlb, - .inject_page_fault = svm_inject_page_fault, .inject_gp = svm_inject_gp, diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 1ec1c28..20e9dfc 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -2487,37 +2487,6 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) asm("int $2"); } -static void vmx_inject_page_fault(struct kvm_vcpu *vcpu, - unsigned long addr, - u32 err_code) -{ - struct vcpu_vmx *vmx = to_vmx(vcpu); - u32 vect_info = vmx->idt_vectoring_info; - - ++vcpu->stat.pf_guest; - - if (is_page_fault(vect_info)) { - printk(KERN_DEBUG "inject_page_fault: " - "double fault 0x%lx @ 0x%lx\n", - addr, vmcs_readl(GUEST_RIP)); - vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, 0); - vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, -DF_VECTOR | -INTR_TYPE_EXCEPTION | -INTR_INFO_DELIEVER_CODE_MASK | -INTR_INFO_VALID_MASK); - return; - } - vcpu->cr2 = addr; - vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, err_code); - vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, -PF_VECTOR | -INTR_TYPE_EXCEPTION | -INTR_INFO_DELIEVER_CODE_MASK | -INTR_INFO_VALID_MASK); - -} - static void vmx_free_vmcs(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); @@ -2649,7 +2618,6 @@ static struct kvm_x86_ops vmx_x86_ops = { .set_rflags = vmx_set_rflags, .tlb_flush = vmx_flush_tlb, - .inject_page_fault = vmx_inject_page_fault, .inject_gp = vmx_inject_gp, diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 11440d1..dc007a3 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -142,6 +142,21 @@ void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr) } EXPORT_SYMBOL_GPL(kvm_queue_exception); +void kvm_inject_page_fault(struct kvm_vcpu *vcpu, unsigned long addr, + u32 error_code) +{ + ++vcpu->stat.pf_guest; +
[kvm-devel] [PATCH 3/7] KVM: Replace #GP injection by the generalized exception queue
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/svm.c | 17 ++--- drivers/kvm/vmx.c | 18 ++ drivers/kvm/x86.c | 43 +++ drivers/kvm/x86.h |7 +-- drivers/kvm/x86_emulate.c |4 ++-- 5 files changed, 30 insertions(+), 59 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index ce77f15..b896614 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -207,17 +207,6 @@ static bool svm_exception_injected(struct kvm_vcpu *vcpu) return !(svm->vmcb->control.exit_int_info & SVM_EXITINTINFO_VALID); } -static void svm_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code) -{ - struct vcpu_svm *svm = to_svm(vcpu); - - svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | - SVM_EVTINJ_VALID_ERR | - SVM_EVTINJ_TYPE_EXEPT | - GP_VECTOR; - svm->vmcb->control.event_inj_err = error_code; -} - static void inject_ud(struct kvm_vcpu *vcpu) { to_svm(vcpu)->vmcb->control.event_inj = SVM_EVTINJ_VALID | @@ -1115,7 +1104,7 @@ static int rdmsr_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) u64 data; if (svm_get_msr(&svm->vcpu, ecx, &data)) - svm_inject_gp(&svm->vcpu, 0); + kvm_inject_gp(&svm->vcpu, 0); else { svm->vmcb->save.rax = data & 0x; svm->vcpu.regs[VCPU_REGS_RDX] = data >> 32; @@ -1176,7 +1165,7 @@ static int wrmsr_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | ((u64)(svm->vcpu.regs[VCPU_REGS_RDX] & -1u) << 32); svm->next_rip = svm->vmcb->save.rip + 2; if (svm_set_msr(&svm->vcpu, ecx, data)) - svm_inject_gp(&svm->vcpu, 0); + kvm_inject_gp(&svm->vcpu, 0); else skip_emulated_instruction(&svm->vcpu); return 1; @@ -1688,8 +1677,6 @@ static struct kvm_x86_ops svm_x86_ops = { .tlb_flush = svm_flush_tlb, - .inject_gp = svm_inject_gp, - .run = svm_vcpu_run, .handle_exit = handle_exit, .skip_emulated_instruction = skip_emulated_instruction, diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 20e9dfc..92660db 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -613,18 +613,6 @@ static bool vmx_exception_injected(struct kvm_vcpu *vcpu) return !(vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK); } -static void vmx_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code) -{ - printk(KERN_DEBUG "inject_general_protection: rip 0x%lx\n", - vmcs_readl(GUEST_RIP)); - vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, error_code); - vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, -GP_VECTOR | -INTR_TYPE_EXCEPTION | -INTR_INFO_DELIEVER_CODE_MASK | -INTR_INFO_VALID_MASK); -} - static void vmx_inject_ud(struct kvm_vcpu *vcpu) { vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, @@ -2083,7 +2071,7 @@ static int handle_rdmsr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) u64 data; if (vmx_get_msr(vcpu, ecx, &data)) { - vmx_inject_gp(vcpu, 0); + kvm_inject_gp(vcpu, 0); return 1; } @@ -2101,7 +2089,7 @@ static int handle_wrmsr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | ((u64)(vcpu->regs[VCPU_REGS_RDX] & -1u) << 32); if (vmx_set_msr(vcpu, ecx, data) != 0) { - vmx_inject_gp(vcpu, 0); + kvm_inject_gp(vcpu, 0); return 1; } @@ -2619,8 +2607,6 @@ static struct kvm_x86_ops vmx_x86_ops = { .tlb_flush = vmx_flush_tlb, - .inject_gp = vmx_inject_gp, - .run = vmx_vcpu_run, .handle_exit = kvm_handle_exit, .skip_emulated_instruction = skip_emulated_instruction, diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index dc007a3..6deb052 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -128,11 +128,6 @@ void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data) } EXPORT_SYMBOL_GPL(kvm_set_apic_base); -static void inject_gp(struct kvm_vcpu *vcpu) -{ - kvm_x86_ops->inject_gp(vcpu, 0); -} - void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr) { WARN_ON(vcpu->exception.pending); @@ -232,20 +227,20 @@ void set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) if (cr0 & CR0_RESERVED_BITS) { printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n", cr0, vcpu->cr0); - inject_gp(vcpu); + kvm_inject_gp(vcpu, 0); return; } if ((cr0 & X86_CR0_NW) && !(cr0 & X86_CR0_CD)) { printk(KERN_DEBUG "set_cr0: #GP, CD == 0 && NW == 1\n"); -
[kvm-devel] [PATCH 1/7] KVM: Generalize exception injection mechanism
Instead of each subarch doing its own thing, add an API for queuing an injection, and manage failed exception injection centerally (i.e., if an inject failed due to a shadow page fault, we need to requeue it). Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/svm.c | 21 + drivers/kvm/vmx.c | 20 drivers/kvm/x86.c | 33 - drivers/kvm/x86.h | 13 + 4 files changed, 86 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 04e6b39..f4c61c8 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -188,6 +188,25 @@ static void svm_set_efer(struct kvm_vcpu *vcpu, u64 efer) vcpu->shadow_efer = efer; } +static void svm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr, + bool has_error_code, u32 error_code) +{ + struct vcpu_svm *svm = to_svm(vcpu); + + svm->vmcb->control.event_inj = nr + | SVM_EVTINJ_VALID + | (has_error_code ? SVM_EVTINJ_VALID_ERR : 0) + | SVM_EVTINJ_TYPE_EXEPT; + svm->vmcb->control.event_inj_err = error_code; +} + +static bool svm_exception_injected(struct kvm_vcpu *vcpu) +{ + struct vcpu_svm *svm = to_svm(vcpu); + + return !(svm->vmcb->control.exit_int_info & SVM_EXITINTINFO_VALID); +} + static void svm_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code) { struct vcpu_svm *svm = to_svm(vcpu); @@ -1712,6 +1731,8 @@ static struct kvm_x86_ops svm_x86_ops = { .patch_hypercall = svm_patch_hypercall, .get_irq = svm_get_irq, .set_irq = svm_set_irq, + .queue_exception = svm_queue_exception, + .exception_injected = svm_exception_injected, .inject_pending_irq = svm_intr_assist, .inject_pending_vectors = do_interrupt_requests, diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 8e43feb..1ec1c28 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -595,6 +595,24 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) vcpu->interrupt_window_open = 1; } +static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr, + bool has_error_code, u32 error_code) +{ + vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, +nr | INTR_TYPE_EXCEPTION +| (has_error_code ? INTR_INFO_DELIEVER_CODE_MASK : 0) +| INTR_INFO_VALID_MASK); + if (has_error_code) + vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, error_code); +} + +static bool vmx_exception_injected(struct kvm_vcpu *vcpu) +{ + struct vcpu_vmx *vmx = to_vmx(vcpu); + + return !(vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK); +} + static void vmx_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code) { printk(KERN_DEBUG "inject_general_protection: rip 0x%lx\n", @@ -2641,6 +2659,8 @@ static struct kvm_x86_ops vmx_x86_ops = { .patch_hypercall = vmx_patch_hypercall, .get_irq = vmx_get_irq, .set_irq = vmx_inject_irq, + .queue_exception = vmx_queue_exception, + .exception_injected = vmx_exception_injected, .inject_pending_irq = vmx_intr_assist, .inject_pending_vectors = do_interrupt_requests, diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index c9e4b67..11440d1 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -133,6 +133,32 @@ static void inject_gp(struct kvm_vcpu *vcpu) kvm_x86_ops->inject_gp(vcpu, 0); } +void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr) +{ + WARN_ON(vcpu->exception.pending); + vcpu->exception.pending = true; + vcpu->exception.has_error_code = false; + vcpu->exception.nr = nr; +} +EXPORT_SYMBOL_GPL(kvm_queue_exception); + +void kvm_queue_exception_e(struct kvm_vcpu *vcpu, unsigned nr, u32 error_code) +{ + WARN_ON(vcpu->exception.pending); + vcpu->exception.pending = true; + vcpu->exception.has_error_code = true; + vcpu->exception.nr = nr; + vcpu->exception.error_code = error_code; +} +EXPORT_SYMBOL_GPL(kvm_queue_exception_e); + +static void __queue_exception(struct kvm_vcpu *vcpu) +{ + kvm_x86_ops->queue_exception(vcpu, vcpu->exception.nr, +vcpu->exception.has_error_code, +vcpu->exception.error_code); +} + /* * Load the pae pdptrs. Return true is they are all valid. */ @@ -2370,7 +2396,9 @@ again: goto out; } - if (irqchip_in_kernel(vcpu->kvm)) + if (vcpu->exception.pending) + __queue_exception(vcpu); + else if (irqchip_in_kernel(vcpu->kvm)) kvm_x86_ops->inject_pending_irq(vcpu); else kvm_x86_ops->inject_pending_vectors(vcpu, kvm_run); @@ -2409,6 +2437,9 @@ again: profile_hit(KVM_PROFILING, (void *)vcpu->rip); } + if (vcpu->exception.p
[kvm-devel] [PATCH 6/7] KVM: Move tpr threshold calculation into common code
This moves the tpr shadow processing into the local apic code from the vmx interrupt injection path. This will allow decoupling the irq injection path from normal execution (which needs to update the tpr threshold even when no irq is being injected). Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/irq.c |6 -- drivers/kvm/irq.h |8 +--- drivers/kvm/kvm_main.c |3 ++- drivers/kvm/lapic.c| 17 - drivers/kvm/svm.c |3 ++- drivers/kvm/vmx.c | 19 ++- 6 files changed, 31 insertions(+), 25 deletions(-) diff --git a/drivers/kvm/irq.c b/drivers/kvm/irq.c index 66d1a91..8a95eef 100644 --- a/drivers/kvm/irq.c +++ b/drivers/kvm/irq.c @@ -28,9 +28,11 @@ /* * Read pending interrupt vector and intack. */ -bool kvm_cpu_get_interrupt(struct kvm_vcpu *v, struct kvm_pending_irq *irq) +bool kvm_cpu_get_interrupt(struct kvm_vcpu *v, struct kvm_pending_irq *irq, + unsigned *tpr_threshold) { - if (kvm_get_apic_interrupt(v, irq)) + *tpr_threshold = 0; + if (kvm_get_apic_interrupt(v, irq, tpr_threshold)) return true; if (kvm_apic_accept_pic_intr(v)) return kvm_pic_read_irq(pic_irqchip(v->kvm), irq); diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h index 49af30b..c12734d 100644 --- a/drivers/kvm/irq.h +++ b/drivers/kvm/irq.h @@ -63,7 +63,8 @@ struct kvm_pic { struct kvm_pic *kvm_create_pic(struct kvm *kvm); void kvm_pic_set_irq(void *opaque, int irq, int level); bool kvm_pic_read_irq(struct kvm_pic *s, struct kvm_pending_irq *irq); -bool kvm_cpu_get_interrupt(struct kvm_vcpu *v, struct kvm_pending_irq *irq); +bool kvm_cpu_get_interrupt(struct kvm_vcpu *v, struct kvm_pending_irq *irq, + unsigned *tpr_threshold); void kvm_pic_update_irq(struct kvm_pic *s); #define IOAPIC_NUM_PINS KVM_IOAPIC_NUM_PINS @@ -147,9 +148,10 @@ do { \ #endif void kvm_vcpu_kick(struct kvm_vcpu *vcpu); -int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu); +int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu, unsigned *tpr_threshold); int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu); -bool kvm_get_apic_interrupt(struct kvm_vcpu *vcpu, struct kvm_pending_irq *irq); +bool kvm_get_apic_interrupt(struct kvm_vcpu *vcpu, struct kvm_pending_irq *irq, + unsigned *tpr_threshold); int kvm_create_lapic(struct kvm_vcpu *vcpu); void kvm_lapic_reset(struct kvm_vcpu *vcpu); void kvm_pic_reset(struct kvm_kpic_state *s); diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 41658d7..7cc4508 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -638,13 +638,14 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu) { DECLARE_WAITQUEUE(wait, current); struct kvm_pending_irq irq; + unsigned tpr_threshold; add_wait_queue(&vcpu->wq, &wait); /* * We will block until either an interrupt or a signal wakes us up */ - while (!kvm_cpu_get_interrupt(vcpu, &irq) + while (!kvm_cpu_get_interrupt(vcpu, &irq, &tpr_threshold) && !signal_pending(current) && vcpu->mp_state != VCPU_MP_STATE_RUNNABLE && vcpu->mp_state != VCPU_MP_STATE_SIPI_RECEIVED) { diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c index 804a177..f2168d4 100644 --- a/drivers/kvm/lapic.c +++ b/drivers/kvm/lapic.c @@ -992,19 +992,25 @@ nomem: } EXPORT_SYMBOL_GPL(kvm_create_lapic); -int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu) +int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu, unsigned *tpr_threshold) { struct kvm_lapic *apic = vcpu->apic; int highest_irr; + unsigned tpr; if (!apic || !apic_enabled(apic)) return -1; apic_update_ppr(apic); highest_irr = apic_find_highest_irr(apic); - if ((highest_irr == -1) || - ((highest_irr & 0xF0) <= apic_get_reg(apic, APIC_PROCPRI))) + if (highest_irr == -1) return -1; + if ((highest_irr & 0xF0) <= apic_get_reg(apic, APIC_PROCPRI)) { + tpr = apic_get_reg(apic, APIC_TASKPRI) & 0xff; + if ((highest_irr & 0xF0) < tpr) + *tpr_threshold = highest_irr & 0xF0; + return -1; + } return highest_irr; } @@ -1053,9 +1059,10 @@ static void kvm_apic_ack_interrupt(struct kvm_vcpu *vcpu, unsigned vector) apic_clear_irr(vector, apic); } -bool kvm_get_apic_interrupt(struct kvm_vcpu *vcpu, struct kvm_pending_irq *irq) +bool kvm_get_apic_interrupt(struct kvm_vcpu *vcpu, struct kvm_pending_irq *irq, + unsigned *tpr_threshold) { - int vector = kvm_apic_has_interrupt(vcpu); + int vector = kvm_apic_has_interrupt(vcpu, tpr_threshold); if (vector == -1) return false; diff --git a/drivers/k
[kvm-devel] [PATCH 7/7] KVM: Ack interrupts only after they have successfully been injected
Instead of acking an interrupt when we *think* the guest is ready for it, and then juggling it around in subarch-specific registers if it isn't (e.g. page fault while trying to inject the interrupt), separate the injection and ack. Subarh specific code now provides two hooks: ->queue_interrupt() will attempt to inject the interrupt, and ->interrupt_injected() will check whether this actually succeeded (upon which common code will ack the interrupt). This allows much simpler management of pending interrupts. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/svm.c | 113 drivers/kvm/vmx.c | 137 + drivers/kvm/x86.c | 79 ++- drivers/kvm/x86.h | 11 ++-- 4 files changed, 103 insertions(+), 237 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 10146a8..9fb9ee1 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -46,8 +46,6 @@ MODULE_LICENSE("GPL"); #define SVM_FEATURE_LBRV (1 << 1) #define SVM_DEATURE_SVML (1 << 2) -static void kvm_reput_irq(struct vcpu_svm *svm); - static inline struct vcpu_svm *to_svm(struct kvm_vcpu *vcpu) { return container_of(vcpu, struct vcpu_svm, vcpu); @@ -838,16 +836,6 @@ static int svm_guest_debug(struct kvm_vcpu *vcpu, struct kvm_debug_guest *dbg) return -EOPNOTSUPP; } -static int svm_get_irq(struct kvm_vcpu *vcpu) -{ - struct vcpu_svm *svm = to_svm(vcpu); - u32 exit_int_info = svm->vmcb->control.exit_int_info; - - if (is_external_interrupt(exit_int_info)) - return exit_int_info & SVM_EVTINJ_VEC_MASK; - return -1; -} - static void load_host_msrs(struct kvm_vcpu *vcpu) { #ifdef CONFIG_X86_64 @@ -1245,8 +1233,6 @@ static int handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) struct vcpu_svm *svm = to_svm(vcpu); u32 exit_code = svm->vmcb->control.exit_code; - kvm_reput_irq(svm); - if (svm->vmcb->control.exit_code == SVM_EXIT_ERR) { kvm_run->exit_reason = KVM_EXIT_FAIL_ENTRY; kvm_run->fail_entry.hardware_entry_failure_reason @@ -1304,102 +1290,43 @@ static inline void svm_inject_irq(struct vcpu_svm *svm, int irq) ((/*control->int_vector >> 4*/ 0xf) << V_INTR_PRIO_SHIFT); } -static void svm_set_irq(struct kvm_vcpu *vcpu, int irq) +static void svm_set_tpr_threshold(struct kvm_vcpu *vcpu) { - struct vcpu_svm *svm = to_svm(vcpu); - - svm_inject_irq(svm, irq); } -static void svm_intr_assist(struct kvm_vcpu *vcpu) +static bool svm_queue_interrupt(struct kvm_vcpu *vcpu, unsigned vector) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb *vmcb = svm->vmcb; - int intr_vector = -1; - struct kvm_pending_irq irq; - unsigned tpr_threshold; - - if ((vmcb->control.exit_int_info & SVM_EVTINJ_VALID) && - ((vmcb->control.exit_int_info & SVM_EVTINJ_TYPE_MASK) == 0)) { - intr_vector = vmcb->control.exit_int_info & - SVM_EVTINJ_VEC_MASK; - vmcb->control.exit_int_info = 0; - svm_inject_irq(svm, intr_vector); - return; - } if (vmcb->control.int_ctl & V_IRQ_MASK) - return; - - if (!kvm_cpu_get_interrupt(vcpu, &irq, &tpr_threshold)) - return; + return false; if (!(vmcb->save.rflags & X86_EFLAGS_IF) || (vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) || - (vmcb->control.event_inj & SVM_EVTINJ_VALID)) { + vcpu->exception.pending) { /* unable to deliver irq, set pending irq */ vmcb->control.intercept |= (1ULL << INTERCEPT_VINTR); svm_inject_irq(svm, 0x0); - return; - } - /* Okay, we can deliver the interrupt: grab it and update PIC state. */ - irq.ack(vcpu, irq.info); - intr_vector = irq.vector; - svm_inject_irq(svm, intr_vector); - kvm_timer_intr_post(vcpu, intr_vector); -} - -static void kvm_reput_irq(struct vcpu_svm *svm) -{ - struct vmcb_control_area *control = &svm->vmcb->control; - - if ((control->int_ctl & V_IRQ_MASK) - && !irqchip_in_kernel(svm->vcpu.kvm)) { - control->int_ctl &= ~V_IRQ_MASK; - push_irq(&svm->vcpu, control->int_vector); + return false; } - - svm->vcpu.interrupt_window_open = - !(control->int_state & SVM_INTERRUPT_SHADOW_MASK); -} - -static void svm_do_inject_vector(struct vcpu_svm *svm) -{ - struct kvm_vcpu *vcpu = &svm->vcpu; - int word_index = __ffs(vcpu->irq_summary); - int bit_index = __ffs(vcpu->irq_pending[word_index]); - int irq = word_index * BITS_PER_LONG + bit_index; - - clear_bit(bit_index, &vcpu->irq_pending[word_index]); - if (!vcpu->irq_pending[word_index]) -
[kvm-devel] [PATCH 5/7] KVM: Add explicit acks to interrupt controller model
The current interrupt controller emulation model supports two functions for pulling interrupts from the controller into the processor: kvm_cpu_has_interrupt(vcpu) - is an interrupt pending for the core kvm_cpu_get_interrupt(vcpu) - get pending interrupt and ack it This presents a problem when we try fail to inject an interrupt, since it has already been acked. Currently subarch specific code carries this acked interrupt around, but code is quite complex and difficult to follow. This patch changes the model to kvm_cpu_get_interrupt(vcpu, irq) - get pending interrupt, if any irq->ack() - acknowledge interrupt Which allows acking only after the core has accepted the interrupt. Currently we use the new model with the old semantics by calling ack() immediately after we see a pending interrupt. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/i8259.c| 44 +--- drivers/kvm/irq.c | 38 ++ drivers/kvm/irq.h | 13 + drivers/kvm/kvm_main.c |3 ++- drivers/kvm/lapic.c| 20 ++-- drivers/kvm/svm.c |6 -- drivers/kvm/vmx.c |6 -- 7 files changed, 64 insertions(+), 66 deletions(-) diff --git a/drivers/kvm/i8259.c b/drivers/kvm/i8259.c index f0dc2ee..dd933d7 100644 --- a/drivers/kvm/i8259.c +++ b/drivers/kvm/i8259.c @@ -27,6 +27,7 @@ */ #include #include "irq.h" +#include "x86.h" /* * set irq level. If an edge is detected, then the IRR is set to 1 @@ -149,36 +150,41 @@ static inline void pic_intack(struct kvm_kpic_state *s, int irq) s->irr &= ~(1 << irq); } -int kvm_pic_read_irq(struct kvm_pic *s) +static void kvm_pic_ack_irq(struct kvm_vcpu *vcpu, unsigned irq) +{ + struct kvm_pic *s; + + s = pic_irqchip(vcpu->kvm); + s->output = 0; + if (irq < 8) + pic_intack(&s->pics[0], irq); + else { + pic_intack(&s->pics[0], 2); + pic_intack(&s->pics[1], irq - 8); + } + pic_update_irq(s); +} + +bool kvm_pic_read_irq(struct kvm_pic *s, struct kvm_pending_irq *pirq) { int irq, irq2, intno; irq = pic_get_irq(&s->pics[0]); if (irq >= 0) { - pic_intack(&s->pics[0], irq); if (irq == 2) { irq2 = pic_get_irq(&s->pics[1]); - if (irq2 >= 0) - pic_intack(&s->pics[1], irq2); - else - /* -* spurious IRQ on slave controller -*/ - irq2 = 7; + if (irq2 < 0) + irq2 = 7; /* spurious */ intno = s->pics[1].irq_base + irq2; irq = irq2 + 8; } else intno = s->pics[0].irq_base + irq; - } else { - /* -* spurious IRQ on host controller -*/ - irq = 7; - intno = s->pics[0].irq_base + irq; - } - pic_update_irq(s); - - return intno; + pirq->vector = intno; + pirq->ack = kvm_pic_ack_irq; + pirq->info = irq; + return true; + } else + return false; } void kvm_pic_reset(struct kvm_kpic_state *s) diff --git a/drivers/kvm/irq.c b/drivers/kvm/irq.c index 59b47c5..66d1a91 100644 --- a/drivers/kvm/irq.c +++ b/drivers/kvm/irq.c @@ -26,41 +26,15 @@ #include "irq.h" /* - * check if there is pending interrupt without - * intack. - */ -int kvm_cpu_has_interrupt(struct kvm_vcpu *v) -{ - struct kvm_pic *s; - - if (kvm_apic_has_interrupt(v) == -1) { /* LAPIC */ - if (kvm_apic_accept_pic_intr(v)) { - s = pic_irqchip(v->kvm);/* PIC */ - return s->output; - } else - return 0; - } - return 1; -} -EXPORT_SYMBOL_GPL(kvm_cpu_has_interrupt); - -/* * Read pending interrupt vector and intack. */ -int kvm_cpu_get_interrupt(struct kvm_vcpu *v) +bool kvm_cpu_get_interrupt(struct kvm_vcpu *v, struct kvm_pending_irq *irq) { - struct kvm_pic *s; - int vector; - - vector = kvm_get_apic_interrupt(v); /* APIC */ - if (vector == -1) { - if (kvm_apic_accept_pic_intr(v)) { - s = pic_irqchip(v->kvm); - s->output = 0; /* PIC */ - vector = kvm_pic_read_irq(s); - } - } - return vector; + if (kvm_get_apic_interrupt(v, irq)) + return true; + if (kvm_apic_accept_pic_intr(v)) + return kvm_pic_read_irq(pic_irqchip(v->kvm), irq); + return false; } EXPORT_SYMBOL_GPL(kvm_cpu_get_interru
Re: [kvm-devel] [PATCH][4/5] kvm: libkvm: Moving set and get shadow pages functions to arch x86
Avi Kivity wrote: > Zhang, Xiantao wrote: >> From: Zhang Xiantao <[EMAIL PROTECTED]> >> Date: Mon, 3 Dec 2007 22:06:04 +0800 >> Subject: [PATCH] kvm: libkvm. Moving set and get shadow pages to x86 >> arch. Move kvm_set&get_shadow_pages to arch-x86 for libkvm >> Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]> >> > > Please put a blank line between the Subject: line and the rest; > otherwise the git parser sometimes gets confused and omits parts of > the message. Thanks, I will check it next time. Xiantao - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
Hollis Blanchard wrote: > Actually, (now that I try to build with it :) this doesn't work for > PowerPC, which defines (or rather, doesn't not define) > CONFIG_HAS_IOPORT. > > So I guess a callout to arch code will do. I'll send a patch sometime. > > We can also have a CONFIG_KVM_HAS_PIO and define/not define it as appropriate. -- error compiling committee.c: too many arguments to function - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] Test Result for KVM-55 RC1
Hi, all, We run a nightly testing for KVM-55 RC1. No new issue has been found. Old issues: 1. Crashme causes RHEL5 guest kernel panic The guest will kernel panic immediately after starting the test. https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1840711&group_id=180599 2. Timer of guest is inaccurate https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1826080&group_id=180599 3. Cannot install 64bit vista guests. https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1836905&group_id=180599 4. Fails to save/restore guests https://sourceforge.net/tracker/index.php?func=detail&aid=1824525&group_id=180599&atid=893831 5. xp and win2k3 guest crashes https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1819768&group_id=180599 6. xpsp2 with 2vpus may fail to boot "-no-kvm-irqchip" has the same issue. It exists on paxville,woodcrest and clowertown, but doesn't exist on weybridge and santarosa. https://sourceforge.net/tracker/index.php?func=detail&aid=1805017&group_id=180599&atid=893831 7. Cannot boot 32bit smp RHEL5.1 guest on 64bit host https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1812043&group_id=180599 Test environment Platform woodcrest CPU 4 Memory size 8G' Details PAE: 1. boot guest with 256M memory PASS 2. boot two windows xp guest PASS 3. boot 4 same guest in parallel PASS 4. boot linux and windows guest in parallel PASS 5. boot 4G linux guest PASS 6. boot guest with 1500M memory PASS 7. boot windows 2003 with ACPI enabled PASS 8. boot Windows xp with ACPI enabled PASS 9. boot Windows 2000 without ACPI PASS 10. kernel build on SMP linux guest PASS 11. LTP on SMP linux guest PASS 12. boot base kernel linux PASS 13. save/restore 32-bit HVM guests FAIL 14. live migration 32-bit HVM guests FAIL 15. boot SMP Windows xp with ACPI enabled FAIL 16. boot SMP windows 2003 with ACPI enabled FAIL 17. boot SMP Windows 2000 with ACPI enabled FAIL 18. Windows XP with HCT stress PASS 19. RHEL5 with Crashme stress FAIL IA32e: 1. boot four 32-bit guest in parallel PASS 2. boot four 64-bit guest in parallel PASS 3. boot 4G 64-bit guest PASS 4. boot 4G pae guest PASS 5. boot 32-bit linux and 32 bit windows guest in parallel PASS 6. boot 32-bit guest with 1500M memory PASS 7. boot 64-bit guest with 1500M memory PASS 8. boot 32-bit guest with 256M memory PASS 9. boot 64-bit guest with 256M memory PASS 10. boot two 32-bit windows xp in parallel PASS 11. boot four 32-bit different guest in para PASS 12. save/restore 64-bit linux guests FAIL 13. save/restore 32-bit linux guests FAIL 14. boot 32-bit SMP windows 2003 with ACPI enabled PASS 15. boot 32bit SMP Windows 2000 with ACPI enabled FAIL 16. boot 32-bit SMP Windows xp with ACPI enabled FAIL 17. boot 32-bit Windows 2000 without ACPI PASS 18. boot 64-bit Windows xp with ACPI enabled PASS 19. boot 32-bit Windows xp without ACPI PASS 20. boot 64-bit vista PASS 21. kernel build in 32-bit linux guest OS PASS 22. kernel build in 64-bit linux guest OS PASS 23. LTP on SMP 32-bit linux guest OS PASS 24. LTP on SMP 64-bit linux guest OS PASS 25. boot 64-bit guests with ACPI enabled PASS 26. boot 32-bit x-server PASS 27. boot 64-bit SMP windows XP with ACPI enabled FAIL 28. boot 64-bit SMP windows 2003 with ACPI enabled PASS 18. 32bit Windows XP with HCT stress PASS 19. 64bit RHEL5 with Crashme stress FAIL Report Summary on IA32-pae Summary Test Report of Last Session =
Re: [kvm-devel] [PATCH] RFC: Create kvm_arch_vcpu_runnable() function
Hollis Blanchard wrote: > Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Acked-by: Carsten Otte <[EMAIL PROTECTED]> We'll need this too on big iron. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 1 of 3] Move address types to their own header file
Hollis Blanchard wrote: > Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> These types work for us too. Acked-by: Carsten Otte <[EMAIL PROTECTED]> - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 3 of 3] Stop including x86-specific headers in kvm_main.c
Hollis Blanchard wrote: > Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Looks good. Acked-by: Carsten Otte <[EMAIL PROTECTED]> - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 2 of 3] Move IO device definitions to its own header file
Hollis Blanchard wrote: > diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c > --- a/drivers/kvm/kvm_main.c > +++ b/drivers/kvm/kvm_main.c > @@ -18,6 +18,7 @@ > #include "kvm.h" > #include "x86.h" > #include "irq.h" > +#include "iodev.h" > > #include > #include Why do we have that include in kvm_main? I will need to get rid of it for s390 later on. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [ANNOUNCE] kvm-55 release
The cr3 reload optimization in kvm-54 killed Solaris, so here is a fix. Changes from kvm-54: - remove old hypercall driver (Anthony Liguori) - disable dirty page logging for main memory (Izik Eidus) - fix incorrect page count calculation for dirty logging (Izik Eidus) - improve testsuite 'make clean' (Neo Jia) - compile fix (Sheng Yang) - reorganize x86 emulator main switch - don't bypass mmu on pae cr3 reload if pdptrs changed - fixes Solaris x86 - use common defines for EFER (Carlo Marcelo Arenas Belon) - portability (Xiantao Zhang) - fix kvm_init() error path (Xiantao Zhang) - ia64 iosapic support (Xiantao Zhang) Notes: If you use the modules bundled with kvm-55, you can use any version of Linux from 2.6.9 upwards. If you use the modules bundled with Linux 2.6.20, you need to use kvm-12. If you use the modules bundled with Linux 2.6.21, you need to use kvm-17. Modules from Linux 2.6.22 and up will work with any kvm version from kvm-22. Some features may only be available in newer releases. For best performance, use Linux 2.6.23-rc2 or later as the host. http://kvm.qumranet.com - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] RFC: Create kvm_arch_vcpu_runnable() function
Carsten Otte wrote: > Hollis Blanchard wrote: >> Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> > Acked-by: Carsten Otte <[EMAIL PROTECTED]> > > We'll need this too on big iron. What about merging kvm_cpu_has_interrupt() into _runnable()? My feeling is that we can keep it separated. -- error compiling committee.c: too many arguments to function - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [kvm-ppc-devel] [PATCH 2 of 3] Move IO device definitions to its own header file
On Tue, 2007-12-04 at 14:41 +0100, Carsten Otte wrote: > Hollis Blanchard wrote: > > diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c > > --- a/drivers/kvm/kvm_main.c > > +++ b/drivers/kvm/kvm_main.c > > @@ -18,6 +18,7 @@ > > #include "kvm.h" > > #include "x86.h" > > #include "irq.h" > > +#include "iodev.h" > > > > #include > > #include > Why do we have that include in kvm_main? I will need to get rid of it > for s390 later on. Just because of the call to kvm_iodevice_destructor(). I would be happy to see kvm_io_bus_* moved out to its own files as well, which would solve this issue. -- Hollis Blanchard IBM Linux Technology Center - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure
On Tue, Dec 04, 2007 at 11:44:07AM +0200, Avi Kivity wrote: > The patchset is also necessary for integrating the tpr optimization branch > and for injecting interrupts in big real mode. Interesting work. Do you have an updated tpr optimization patch which applys on top of these patches? Joerg -- | AMD Saxony Limited Liability Company & Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System| Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center| AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure
Joerg Roedel wrote: > On Tue, Dec 04, 2007 at 11:44:07AM +0200, Avi Kivity wrote: > >> The patchset is also necessary for integrating the tpr optimization branch >> and for injecting interrupts in big real mode. >> > > Interesting work. Do you have an updated tpr optimization patch which > applys on top of these patches? > No, but I plan to rebase it soon. -- error compiling committee.c: too many arguments to function - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] (no subject)
- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] kvm on hp nx6320 laptop
Hi all , Did someone tried kvm on this machine . I tried and got "kvm: disabled by bios" , but I did enable the virtulization option in BIOS . Can someone help me with this ? Thank you very much yushang - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm on hp nx6320 laptop
Le mercredi 05 décembre 2007 à 01:49 +0800, 余上 a écrit : > Hi all , > > Did someone tried kvm on this machine . I tried and got "kvm: disabled > by bios" , but I did enable the virtulization option in BIOS . Can > someone help me with this ? Some machines need a power-off/power-on cycle to really enable the option. Laurent -- - [EMAIL PROTECTED] -- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke signature.asc Description: Ceci est une partie de message numériquement signée - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] How to handle kvm-abi-10 case for other archs.
Zhang, Xiantao wrote: > Jeremy Katz wrote: > >> On Sat, 2007-12-01 at 12:10 +0200, Avi Kivity wrote: >> >>> Zhang, Xiantao wrote: >>> I think new archs for kvm doesn't need to care about kvm-abi case in their code, since current abi is bigger than 10. But in current libkvm.c, we can see that many abi-specific code in it. How to handle it ? Can we use __x86__ macro to make it sightless for other archs or other good methods ? > Glad to see that. I am working on enabling ia64. If it is removed, it > will be cleaner for us. > abi 10 support is now gone. -- Any sufficiently difficult bug is indistinguishable from a feature. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm on hp nx6320 laptop
Exactly as you said , it works , thank you ! 2007/12/5, Laurent Vivier <[EMAIL PROTECTED]>: > Le mercredi 05 décembre 2007 à 01:49 +0800, 余上 a écrit : > > Hi all , > > > > Did someone tried kvm on this machine . I tried and got "kvm: disabled > > by bios" , but I did enable the virtulization option in BIOS . Can > > someone help me with this ? > > Some machines need a power-off/power-on cycle to really enable the > option. > > Laurent > -- > - [EMAIL PROTECTED] -- >"Any sufficiently advanced technology is > indistinguishable from magic." - Arthur C. Clarke > > - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] How to handle kvm-abi-10 case for other archs.
On Sat, Dec 01, 2007 at 12:10:16PM +0200, Avi Kivity wrote: > Zhang, Xiantao wrote: > > Hi, Avi > > I think new archs for kvm doesn't need to care about kvm-abi > > case in their code, since current abi is bigger than 10. But in current > > libkvm.c, we can see that many abi-specific code in it. How to handle it > > ? Can we use __x86__ macro to make it sightless for other archs or > > other good methods ? > > > > #ifdef is okay for this. Actually we can probably remove abi 10 support > since the F7 kernel now supports the modern ABI (I don't think anybody > else uses abi 10, which is pre 2.6.22 when we announced ABI compatibility. ubuntu feisty uses kernel 2.6.20 and is packaging kvm-16 : http://packages.ubuntu.com/feisty/misc/kvm their last release (gutsy) uses 2.6.22 though. Carlo - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] KVM running on Mac?
hi, I have seen the Qemu is ported to OSX. Is there any plan for KVM? Just curious. Thanks, Neo -- I would remember that if researchers were not ambitious probably today we haven't the technology we are using! - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] KVM running on Mac?
On 12/4/07, Neo Jia <[EMAIL PROTECTED]> wrote: > I have seen the Qemu is ported to OSX. Is there any plan for KVM? Just > curious. similarily, there are OSX installs over VMWare, but haven't seen one on KVM... -- Javier - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] KVM running on Mac?
On Dec 4, 2007 11:03 AM, Javier Guerra <[EMAIL PROTECTED]> wrote: > On 12/4/07, Neo Jia <[EMAIL PROTECTED]> wrote: > > I have seen the Qemu is ported to OSX. Is there any plan for KVM? Just > > curious. > > similarily, there are OSX installs over VMWare, but haven't seen one on KVM... I have seen a post about this. They claim that it is because Mac is using different firmware. "And If you can run Mac OS X under regular qemu, then kvm should work too." Thanks, Neo > > -- > Javier > > - > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > ___ > kvm-devel mailing list > kvm-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/kvm-devel > -- I would remember that if researchers were not ambitious probably today we haven't the technology we are using! - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-55 release
Hi Avi, I'm having a problem with "unifdef" target in the kvm-userspace/kernel/Makefile: [EMAIL PROTECTED]:~/src/KVM/kvm-userspace$ make -C kernel sync LINUX=~/src/KVM/kvm make: Entering directory `/home/cam/src/KVM/kvm-userspace/kernel' rsync --exclude='*.mod.c' "/home/cam/src/KVM/kvm"/drivers/kvm/*.[ch] . rsync "/home/cam/src/KVM/kvm"/include/linux/kvm.h \ "/home/cam/src/KVM/kvm"/include/linux/kvm_para.h \ include/linux rsync "/home/cam/src/KVM/kvm"/include/asm-x86/kvm_para.h include/asm rsync "/home/cam/src/KVM/kvm"/include/asm-x86/kvm.h include/asm mv include/linux/kvm.h include/linux/kvm.h.orig && unifdef -DCONFIG_X86 include/linux/kvm.h.orig > include/linux/kvm.h; (( $? <= 1 )) && rm include/linux/kvm.h.orig /bin/sh: unifdef: not found /bin/sh: cannot open =: No such file /bin/sh: 127: not found make: *** [sync] Error 127 make: Leaving directory `/home/cam/src/KVM/kvm-userspace/kernel' Thanks, Cam Avi Kivity wrote: > The cr3 reload optimization in kvm-54 killed Solaris, so here is a fix. > > Changes from kvm-54: > - remove old hypercall driver (Anthony Liguori) > - disable dirty page logging for main memory (Izik Eidus) > - fix incorrect page count calculation for dirty logging (Izik Eidus) > - improve testsuite 'make clean' (Neo Jia) > - compile fix (Sheng Yang) > - reorganize x86 emulator main switch > - don't bypass mmu on pae cr3 reload if pdptrs changed >- fixes Solaris x86 > - use common defines for EFER (Carlo Marcelo Arenas Belon) > - portability (Xiantao Zhang) > - fix kvm_init() error path (Xiantao Zhang) > - ia64 iosapic support (Xiantao Zhang) > > Notes: > If you use the modules bundled with kvm-55, you can use any version > of Linux from 2.6.9 upwards. > If you use the modules bundled with Linux 2.6.20, you need to use > kvm-12. > If you use the modules bundled with Linux 2.6.21, you need to use > kvm-17. > Modules from Linux 2.6.22 and up will work with any kvm version from > kvm-22. Some features may only be available in newer releases. > For best performance, use Linux 2.6.23-rc2 or later as the host. > > http://kvm.qumranet.com > > > - > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > ___ > kvm-devel mailing list > kvm-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/kvm-devel - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [ANNOUNCE] kvm-55 release
* Cam Macdonell <[EMAIL PROTECTED]> [2007-12-04 13:08]: > > Hi Avi, > > I'm having a problem with "unifdef" target in the > kvm-userspace/kernel/Makefile: > > [EMAIL PROTECTED]:~/src/KVM/kvm-userspace$ make -C kernel sync > LINUX=~/src/KVM/kvm > make: Entering directory `/home/cam/src/KVM/kvm-userspace/kernel' > rsync --exclude='*.mod.c' "/home/cam/src/KVM/kvm"/drivers/kvm/*.[ch] . > rsync "/home/cam/src/KVM/kvm"/include/linux/kvm.h \ > "/home/cam/src/KVM/kvm"/include/linux/kvm_para.h \ > include/linux > rsync "/home/cam/src/KVM/kvm"/include/asm-x86/kvm_para.h include/asm > rsync "/home/cam/src/KVM/kvm"/include/asm-x86/kvm.h include/asm > mv include/linux/kvm.h include/linux/kvm.h.orig && unifdef > -DCONFIG_X86 include/linux/kvm.h.orig > include/linux/kvm.h; (( $? <= > 1 )) && rm include/linux/kvm.h.orig > /bin/sh: unifdef: not found > /bin/sh: cannot open =: No such file > /bin/sh: 127: not found > make: *** [sync] Error 127 > make: Leaving directory `/home/cam/src/KVM/kvm-userspace/kernel' I needed to install the unifdef binary (apt-get install unifdef) and then apply the attached patch to get make LINUX= sync working again. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 [EMAIL PROTECTED] diff --git a/kernel/Makefile b/kernel/Makefile index 22326b2..782685e 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -18,7 +18,7 @@ hack =mv $1 $1.orig && \ | sed 's/\blapic\b/l_apic/g' > $1 && rm $1.orig unifdef = mv $1 $1.orig && \ - unifdef -DCONFIG_X86 $1.orig > $1; (( $$? <= 1 )) && rm $1.orig + unifdef -DCONFIG_X86 $1.orig > $1; [ $$? -le 1 ] && rm $1.orig all:: $(MAKE) -C $(KERNELDIR) M=`pwd` "$$@" - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
On Sun, 02 Dec 2007 10:50:06 +0200, Avi Kivity wrote: > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 368864d..eded44e > 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -112,6 +112,9 @@ config GENERIC_TIME_VSYSCALL > bool > default X86_64 > > +config ARCH_SUPPORTS_KVM > + bool > + default y > > > > diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig index > 6569206..4086080 100644 > --- a/drivers/kvm/Kconfig > +++ b/drivers/kvm/Kconfig > @@ -3,7 +3,7 @@ > # > menuconfig VIRTUALIZATION > bool "Virtualization" > - depends on X86 > + depends on ARCH_SUPPORTS_KVM || X86 > default y > ---help--- > Say Y here to get to see options for using your Linux host to run > other I think this approach is fine, but don't forget that lguest was snuck into drivers/kvm/Kconfig. It might be a good idea to move CONFIG_VIRTUALIZATION into drivers/Kconfig at this point... maybe a task for Rusty. -- Hollis Blanchard IBM Linux Technology Center - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] Strange network behaviour
Hello, I already spoke to Izik Eidus. He told me to publish the results to the problem at the mailinglist. Some time ago I wrote to the kvm-devel mailinglist that I had a problem with my guests' networking dying. I got the hint to change the network card emulation. That worked. Now I noticed a strange behaviour. I have a gameserver running in a guest os. No problems on performance side, really fast. The only thing, when I make a ping test after unspecific time periods I get this: (this peaks are even there if the gameserver isn't running) Reply from 195.24.77.170: bytes=32 time=36ms TTL=57 Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 Reply from 195.24.77.170: bytes=32 time=123ms TTL=57 Reply from 195.24.77.170: bytes=32 time=98ms TTL=57 Reply from 195.24.77.170: bytes=32 time=116ms TTL=57 Reply from 195.24.77.170: bytes=32 time=241ms TTL=57 Reply from 195.24.77.170: bytes=32 time=72ms TTL=57 Reply from 195.24.77.170: bytes=32 time=382ms TTL=57 Reply from 195.24.77.170: bytes=32 time=135ms TTL=57 Reply from 195.24.77.170: bytes=32 time=397ms TTL=57 Reply from 195.24.77.170: bytes=32 time=647ms TTL=57 Reply from 195.24.77.170: bytes=32 time=857ms TTL=57 Reply from 195.24.77.170: bytes=32 time=1156ms TTL=57 Reply from 195.24.77.170: bytes=32 time=692ms TTL=57 Reply from 195.24.77.170: bytes=32 time=604ms TTL=57 Reply from 195.24.77.170: bytes=32 time=35ms TTL=57 Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 Reply from 195.24.77.170: bytes=32 time=35ms TTL=57 Reply from 195.24.77.170: bytes=32 time=188ms TTL=57 Reply from 195.24.77.170: bytes=32 time=39ms TTL=57 Reply from 195.24.77.170: bytes=32 time=46ms TTL=57 Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 Reply from 195.24.77.170: bytes=32 time=39ms TTL=57 This ping peaks are on *all* guests I'm currently running. I did a ping test the same time to the Host, with this result: Reply from 195.24.77.169: bytes=32 time=38ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=39ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=38ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 Reply from 195.24.77.169: bytes=32 time=40ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 Reply from 195.24.77.169: bytes=32 time=37ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 As you can see, no peaks. Example of start command from a guest: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01,model=rtl8139 -net tap -nographic -daemonize Here the pings from the guest started with the command line listed above: Reply from 195.24.77.171: bytes=32 time=37ms TTL=57 Reply from 195.24.77.171: bytes=32 time=37ms TTL=57 Reply from 195.24.77.171: bytes=32 time=97ms TTL=57 Reply from 195.24.77.171: bytes=32 time=60ms TTL=57 Reply from 195.24.77.171: bytes=32 time=186ms TTL=57 Reply from 195.24.77.171: bytes=32 time=363ms TTL=57 Reply from 195.24.77.171: bytes=32 time=368ms TTL=57 Reply from 195.24.77.171: bytes=32 time=972ms TTL=57 Reply from 195.24.77.171: bytes=32 time=673ms TTL=57 Reply from 195.24.77.171: bytes=32 time=1133ms TTL=57 Reply from 195.24.77.171: bytes=32 time=1198ms TTL=57 Reply from 195.24.77.171: bytes=32 time=1881ms TTL=57 Reply from 195.24.77.171: bytes=32 time=2341ms TTL=57 Reply from 195.24.77.171: bytes=32 time=2401ms TTL=57 Reply from 195.24.77.171: bytes=32 time=2006ms TTL=57 Reply from 195.24.77.171: bytes=32 time=2638ms TTL=57 Reply from 195.24.77.171: bytes=32 time=3590ms TTL=57 Reply from 195.24.77.171: bytes=32 time=383ms TTL=57 Reply from 195.24.77.171: bytes=32 time=35ms TTL=57 Reply from 195.24.77.171: bytes=32 time=35ms TTL=57 Reply from 195.24.77.171: bytes=32 time=34ms TTL=57 Reply from 195.24.77.171: bytes=32 time=35ms TTL=57 Reply from 195.24.77.171: bytes=32 time=34ms TTL=57 So I tried disabling kvm when starting a guest. and here the guest *with* -no-kvm in the com
Re: [kvm-devel] [ANNOUNCE] kvm-55 release
Ryan Harper wrote: > * Cam Macdonell <[EMAIL PROTECTED]> [2007-12-04 13:08]: >> Hi Avi, >> >> I'm having a problem with "unifdef" target in the >> kvm-userspace/kernel/Makefile: >> >> [EMAIL PROTECTED]:~/src/KVM/kvm-userspace$ make -C kernel sync >> LINUX=~/src/KVM/kvm >> make: Entering directory `/home/cam/src/KVM/kvm-userspace/kernel' >> rsync --exclude='*.mod.c' "/home/cam/src/KVM/kvm"/drivers/kvm/*.[ch] . >> rsync "/home/cam/src/KVM/kvm"/include/linux/kvm.h \ >> "/home/cam/src/KVM/kvm"/include/linux/kvm_para.h \ >> include/linux >> rsync "/home/cam/src/KVM/kvm"/include/asm-x86/kvm_para.h include/asm >> rsync "/home/cam/src/KVM/kvm"/include/asm-x86/kvm.h include/asm >> mv include/linux/kvm.h include/linux/kvm.h.orig && unifdef >> -DCONFIG_X86 include/linux/kvm.h.orig > include/linux/kvm.h; (( $? <= >> 1 )) && rm include/linux/kvm.h.orig >> /bin/sh: unifdef: not found >> /bin/sh: cannot open =: No such file >> /bin/sh: 127: not found >> make: *** [sync] Error 127 >> make: Leaving directory `/home/cam/src/KVM/kvm-userspace/kernel' > > I needed to install the unifdef binary (apt-get install unifdef) and > then apply the attached patch to get make LINUX= sync working again. > Ah, I didn't realize that it's a program. Thanks, Cam - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] How to handle kvm-abi-10 case for other archs.
Avi Kivity wrote: > Zhang, Xiantao wrote: >> Jeremy Katz wrote: >> >>> On Sat, 2007-12-01 at 12:10 +0200, Avi Kivity wrote: >>> Zhang, Xiantao wrote: > I think new archs for kvm doesn't need to care about kvm-abi > case in their code, since current abi is bigger than 10. But in > current libkvm.c, we can see that many abi-specific code in it. > How to handle it ? Can we use __x86__ macro to make it sightless > for other archs or other good methods ? > >> Glad to see that. I am working on enabling ia64. If it is removed, >> it will be cleaner for us. >> > > abi 10 support is now gone. Thank you. That absoulutely simplify our work. :) Xiantao - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] Fwd: Does KVM bios support DMI ?
Hi, guys, Where can I find the latest DMI status? Thanks/Walter -- Forwarded message -- From: walter tech <[EMAIL PROTECTED]> Date: Nov 21, 2007 4:56 PM Subject: Re: [kvm-devel] Does KVM bios support DMI ? To: Avi Kivity <[EMAIL PROTECTED]> Good news, I am looking forward to this. :) On Nov 21, 2007 2:53 PM, Avi Kivity <[EMAIL PROTECTED]> wrote: > > walter tech wrote: > > Hi, guys, > > > > My Thinkpad T60 came with an authentic windows xp, but the version is > > for IBM/lenovo only, the Windows XP need to read bios DMI to match the > > vendor name and manufacture Name to be activated. I dont want to buy > > another M$ window xp for KVM, just what to change the bios info to > > meet the check, is it possible? > > > > Currently, no. But we need DMI support in the BIOS anyway (so 32-bit > Linux guests can use ACPI), so watch this space. I expect support to be > added soon. > > -- > Any sufficiently difficult bug is indistinguishable from a feature. > > - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [patch 05/18] kvm: nopage
Convert KVM from nopage to fault. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Cc: kvm-devel@lists.sourceforge.net Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] --- drivers/kvm/kvm_main.c | 38 +- 1 file changed, 13 insertions(+), 25 deletions(-) Index: linux-2.6/drivers/kvm/kvm_main.c === --- linux-2.6.orig/drivers/kvm/kvm_main.c +++ linux-2.6/drivers/kvm/kvm_main.c @@ -2533,30 +2533,24 @@ static int kvm_vcpu_ioctl_debug_guest(st return r; } -static struct page *kvm_vcpu_nopage(struct vm_area_struct *vma, - unsigned long address, - int *type) +static int kvm_vcpu_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct kvm_vcpu *vcpu = vma->vm_file->private_data; - unsigned long pgoff; struct page *page; - pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; - if (pgoff == 0) + if (vmf->pgoff == 0) page = virt_to_page(vcpu->run); - else if (pgoff == KVM_PIO_PAGE_OFFSET) + else if (vmf->pgoff == KVM_PIO_PAGE_OFFSET) page = virt_to_page(vcpu->pio_data); else - return NOPAGE_SIGBUS; + return VM_FAULT_SIGBUS; get_page(page); - if (type != NULL) - *type = VM_FAULT_MINOR; - - return page; + vmf->page = page; + return 0; } static struct vm_operations_struct kvm_vcpu_vm_ops = { - .nopage = kvm_vcpu_nopage, + .fault = kvm_vcpu_fault, }; static int kvm_vcpu_mmap(struct file *file, struct vm_area_struct *vma) @@ -3111,27 +3105,21 @@ out: return r; } -static struct page *kvm_vm_nopage(struct vm_area_struct *vma, - unsigned long address, - int *type) +static int kvm_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct kvm *kvm = vma->vm_file->private_data; - unsigned long pgoff; struct page *page; - pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; - page = gfn_to_page(kvm, pgoff); + page = gfn_to_page(kvm, vmf->pgoff); if (!page) - return NOPAGE_SIGBUS; + return VM_FAULT_SIGBUS; get_page(page); - if (type != NULL) - *type = VM_FAULT_MINOR; - - return page; + vmf->page = page; + return 0; } static struct vm_operations_struct kvm_vm_vm_ops = { - .nopage = kvm_vm_nopage, + .fault = kvm_vm_fault, }; static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma) -- - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] KVM Test result, kernel efdeac0.. , userspace ac9b2c5..
Hi, all This is today's KVM test result against kvm.git efdeac066fbc73cbb4cc2d8c8975192454ea2a50 and kvm-userspace.git ac9b2c5584c67f7c97b6b6acb41a74891b4e6f7f. No new issue has been found. Old issues: 1. Crashme causes RHEL5 guest kernel panic The guest will kernel panic immediately after starting the test. https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1840711&group_id=180599 2. Timer of guest is inaccurate https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1826080&group_id=180599 3. Cannot install 64bit vista guests. https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1836905&group_id=180599 4. Fails to save/restore guests https://sourceforge.net/tracker/index.php?func=detail&aid=1824525&group_id=180599&atid=893831 5. xp and win2k3 guest crashes https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1819768&group_id=180599 6. xpsp2 with 2vpus may fail to boot https://sourceforge.net/tracker/index.php?func=detail&aid=1805017&group_id=180599&atid=893831 7. Cannot boot 32bit smp RHEL5.1 guest on 64bit host https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1812043&group_id=180599 Test environment Platform woodcrest CPU 4 Memory size 8G' Details PAE: 1. boot guest with 256M memory PASS 2. boot two windows xp guest PASS 3. boot 4 same guest in parallel PASS 4. boot linux and windows guest in parallel PASS 5. boot 4G linux guest PASS 6. boot guest with 1500M memory PASS 7. boot windows 2003 with ACPI enabled PASS 8. boot Windows xp with ACPI enabled PASS 9. boot Windows 2000 without ACPI PASS 10. kernel build on SMP linux guest PASS 11. LTP on SMP linux guest PASS 12. boot base kernel linux PASS 13. save/restore 32-bit HVM guests FAIL 14. live migration 32-bit HVM guests FAIL 15. boot SMP Windows xp with ACPI enabled FAIL 16. boot SMP windows 2003 with ACPI enabled FAIL 17. boot SMP Windows 2000 with ACPI enabled FAIL IA32e: 1. boot four 32-bit guest in parallel PASS 2. boot four 64-bit guest in parallel PASS 3. boot 4G 64-bit guest PASS 4. boot 4G pae guest PASS 5. boot 32-bit linux and 32 bit windows guest in parallel PASS 6. boot 32-bit guest with 1500M memory PASS 7. boot 64-bit guest with 1500M memory PASS 8. boot 32-bit guest with 256M memory PASS 9. boot 64-bit guest with 256M memory PASS 10. boot two 32-bit windows xp in parallel PASS 11. boot four 32-bit different guest in para PASS 12. save/restore 64-bit linux guests FAIL 13. save/restore 32-bit linux guests FAIL 14. boot 32-bit SMP windows 2003 with ACPI enabled PASS 15. boot 32bit SMP Windows 2000 with ACPI enabled FAIL 16. boot 32-bit SMP Windows xp with ACPI enabled FAIL 17. boot 32-bit Windows 2000 without ACPI PASS 18. boot 64-bit Windows xp with ACPI enabled PASS 19. boot 32-bit Windows xp without ACPI PASS 20. boot 64-bit vista PASS 21. kernel build in 32-bit linux guest OS PASS 22. kernel build in 64-bit linux guest OS PASS 23. LTP on SMP 32-bit linux guest OS PASS 24. LTP on SMP 64-bit linux guest OS PASS 25. boot 64-bit guests with ACPI enabled PASS 26. boot 32-bit x-server PASS 27. boot 64-bit SMP windows XP with ACPI enabled FAIL 28. boot 64-bit SMP windows 2003 with ACPI enabled FAIL Report Summary on IA32-pae Summary Test Report of Last Session = Total PassFailNoResult Crash = control_panel 8 5 3 00 Restart 2 2 0 00 gtest 14 12 2 0
Re: [kvm-devel] Strange network behaviour
Hi Mike, Glad to hear that your networks are up now, but what are you using to connect/bridge them? Those response times are horrible across the board! All my VMs are connected to my internal network via a bridge on the host through their tap interfaces and a few lucky machines share another bridge that is on my DMZ with static IPs. I think the network bridge method I use is based on some stuff I picked up a few years ago when working with the UML virtualization stuff. I see sub millisecond ping responses in both directions and to all VMs (usually I've got 3 or 4 active, soon to expand to a few more). My HOST config is similar though I've got a only 4GB of memory and I'm still running KVM-52 modules. My guests are Ubuntu 7.10, Fedora 8, and FreeBSD 6.2 at the moment with Mint4.0 and JeOS on the drawing board. Lynn Kerby San Martin, CA On Dec 4, 2007, at 2:44 PM, Mike wrote: > Hello, > I already spoke to Izik Eidus. He told me to publish the results to > the > problem at the mailinglist. > > Some time ago I wrote to the kvm-devel mailinglist that I had a > problem > with my guests' networking dying. > I got the hint to change the network card emulation. That worked. > > Now I noticed a strange behaviour. > I have a gameserver running in a guest os. No problems on performance > side, really fast. > The only thing, when I make a ping test after unspecific time > periods I > get this: (this peaks are even there if the gameserver isn't running) > >Reply from 195.24.77.170: bytes=32 time=36ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=123ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=98ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=116ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=241ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=72ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=382ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=135ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=397ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=647ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=857ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=1156ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=692ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=604ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=35ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=35ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=188ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=39ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=46ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.170: bytes=32 time=39ms TTL=57 > > This ping peaks are on *all* guests I'm currently running. > I did a ping test the same time to the Host, with this result: > >Reply from 195.24.77.169: bytes=32 time=38ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=39ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=38ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=40ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=37ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=35ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=34ms TTL=57 >Reply from 195.24.77.169: bytes=32 time=33ms TTL=57 > > As you can see, no peaks. > Example of start command from a guest: > kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net > nic,vlan=0,macaddr=00:16:3e:00:00:01,model=rtl8139 -net tap -nographic > -daemonize > > Here the pings from the guest started with the command line listed > above: > >Reply from 195.24.77.171: bytes=32 time=37ms TTL=57 >Reply from 195.24.77.171: bytes=32 time=37ms TTL=57 >Reply from 195.24.77.171: bytes=32 time=97ms TTL=57 >Reply from 195.24.77.171: bytes=32 time=60ms TTL=57 >Reply from 195.24.77.171: bytes=32 time=186ms TTL=57 >Reply from 195.24.