Re: Installation of Windows 8 hangs with KVM

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 10:58:33PM +0100, Stefan Pietsch wrote: Hi all, when I run KVM with this command the Windows 8 installation stops with error code 0x005D: kvm -m 1024 -hda win8.img -cdrom windows_8_x86.iso After adding the option -cpu host the installation proceeds to a black

Re: [PATCH qom-cpu 01/11] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:02PM -0200, Eduardo Habkost wrote: This is a cleanup that tries to solve two small issues: - We don't need a separate kvm_pv_eoi_features variable just to keep a constant calculated at compile-time, and this style would require adding a separate variable

Re: [PATCH] KVM: PPC: Book3S HV: Fix compilation without CONFIG_PPC_POWERNV

2013-01-06 Thread Alexander Graf
On 22.12.2012, at 15:09, Andreas Schwab wrote: Fixes this build breakage: arch/powerpc/kvm/book3s_hv_ras.c: In function ‘kvmppc_realmode_mc_power7’: arch/powerpc/kvm/book3s_hv_ras.c:126:23: error: ‘struct paca_struct’ has no member named ‘opal_mc_evt’ Signed-off-by: Andreas Schwab

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Michael S. Tsirkin
On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when after the polling is failed. Solve this problem by: - checking the poll-wqh before trying to remove from

[PULL 3.8 0/2] ppc patch queue 2013-01-06 for 3.8

2013-01-06 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. It contains a compile fix for Book3S HV KVM. Please pull. Alex The following changes since commit 18eb54cf4a9cd4b74f926209be208366415edfa8: Gleb Natapov (1): Merge branch 'kvm-ppc-3.8' of

[PATCH 1/1] KVM: PPC: Book3S HV: Fix compilation without CONFIG_PPC_POWERNV

2013-01-06 Thread Alexander Graf
From: Andreas Schwab sch...@linux-m68k.org Fixes this build breakage: arch/powerpc/kvm/book3s_hv_ras.c: In function ‘kvmppc_realmode_mc_power7’: arch/powerpc/kvm/book3s_hv_ras.c:126:23: error: ‘struct paca_struct’ has no member named ‘opal_mc_evt’ Signed-off-by: Andreas Schwab

Re: [PATCH qom-cpu 02/11] target-i386: Disable kvm_mmu_op by default on pc-1.4

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:03PM -0200, Eduardo Habkost wrote: The kvm_mmu_op feature was removed from the kernel since v3.3 (released in March 2012), it was marked for removal since January 2011 and it's slower than shadow or hardware assisted paging (see kernel commit fb92045843). It

Re: [PATCH qom-cpu 03/11] target-i386: kvm: -cpu host: Use GET_SUPPORTED_CPUID for SVM features

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:04PM -0200, Eduardo Habkost wrote: The existing -cpu host code simply set every bit inside svm_features (initializing it to -1), and that makes it impossible to make the enforce/check options work properly when the user asks for SVM features explicitly in the

Re: [PATCH qom-cpu 04/11] target-i386: kvm: Enable all supported KVM features for -cpu host

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:05PM -0200, Eduardo Habkost wrote: When using -cpu host, we don't need to use the kvm_default_features variable, as the user is explicitly asking QEMU to enable all feature supported by the host. This changes the kvm_cpu_fill_host() code to use

Re: [PATCH qom-cpu 05/11] target-i386: check/enforce: Fix CPUID leaf numbers on error messages

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:06PM -0200, Eduardo Habkost wrote: The -cpu check/enforce warnings are printing incorrect information about the missing flags. There are no feature flags on CPUID leaves 0 and 0x8000, but there were references to 0 and 0x8000 in the table at

Re: [Qemu-devel] [PATCH qom-cpu 05/11] target-i386: check/enforce: Fix CPUID leaf numbers on error messages

2013-01-06 Thread Gleb Natapov
On Sun, Jan 06, 2013 at 04:12:54PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:06PM -0200, Eduardo Habkost wrote: The -cpu check/enforce warnings are printing incorrect information about the missing flags. There are no feature flags on CPUID leaves 0 and 0x8000, but

Re: [PATCH qom-cpu 06/11] target-i386: check/enforce: Do not ignore hypervisor flag

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:07PM -0200, Eduardo Habkost wrote: We don't need any hack to ignore CPUID_EXT_HYPERVISOR anymore, because kvm_arch_get_supported_cpuid() now set CPUID_EXT_HYPERVISOR properly. So, this shouldn't introduce any behavior change, but it makes the code simpler.

Re: [Qemu-devel] [PATCH qom-cpu 08/11] target-i386: check/enforce: Check SVM flag support as well

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:09PM -0200, Eduardo Habkost wrote: When nested SVM is supported, the kernel returns the SVM flag on GET_SUPPORTED_CPUID[1], so we can check the SVM flag safely on kvm_check_features_against_host(). I don't know why the original code ignored the SVM flag. Maybe

Re: [Qemu-devel] [PATCH qom-cpu 09/11] target-i386: check/enforce: Eliminate check_feat field

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:10PM -0200, Eduardo Habkost wrote: Now that all entries have check_feat=~0 on kvm_check_features_against_host(), we can eliminate check_feat entirely and make the code check all bits. This patch shouldn't introduce any behavior change, as check_feat is set to

Re: [Qemu-devel] [PATCH qom-cpu 10/11] target-i386: Call kvm_check_features_against_host() only if CONFIG_KVM is set

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:11PM -0200, Eduardo Habkost wrote: This will be necessary once kvm_check_features_against_host() starts using KVM-specific definitions (so it won't compile anymore if CONFIG_KVM is not set). Signed-off-by: Eduardo Habkost ehabk...@redhat.com ---

Re: [PATCH qom-cpu 11/11] target-i386: check/enforce: Check all feature words

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:12PM -0200, Eduardo Habkost wrote: This adds the following feature words to the list of flags to be checked by kvm_check_features_against_host(): - cpuid_7_0_ebx_features - ext4_features - kvm_features - svm_features This will ensure the enforce flag

Re: [Qemu-devel] [PATCH qom-cpu 07/11] target-i386: check/enforce: Check all CPUID.80000001H.EDX bits

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:08PM -0200, Eduardo Habkost wrote: I have no idea why PPRO_FEATURES was being ignored on the check of the CPUID.8001H.EDX bits. I believe it was a mistake, and it was supposed to be ~(PPRO_FEATURES CPUID_EXT2_AMD_ALIASES) or just ~CPUID_EXT2_AMD_ALIASES,

Re: [PATCH KVM v2 0/4] fix KVM i8259 IRQ trailing-edge logic

2013-01-06 Thread Gleb Natapov
On Wed, Dec 26, 2012 at 10:39:52PM -0700, Matthew Ogilvie wrote: Changes since version 1 (from Sep 9): * Split off patch 1; this is the critical prerequisite to make the i8254 work with the fixed i8259. * Add patch 2, to make additional changes to the i8254 to make it

Re: Installation of Windows 8 hangs with KVM

2013-01-06 Thread Stefan Pietsch
* Gleb Natapov g...@redhat.com [2013-01-06 11:11]: On Fri, Jan 04, 2013 at 10:58:33PM +0100, Stefan Pietsch wrote: Hi all, when I run KVM with this command the Windows 8 installation stops with error code 0x005D: kvm -m 1024 -hda win8.img -cdrom windows_8_x86.iso After adding

[PATCH ppc-next v2 1/2] target-ppc: Slim conversion of model definitions to QOM subclasses

2013-01-06 Thread Andreas Färber
Since the model list is highly macrofied, keep ppc_def_t for now and save a pointer to it in PowerPCCPUClass. This results in a flat list of subclasses including aliases, to be refined later. Move cpu_ppc_init() to translate_init.c and drop helper.c. Long-term the idea is to turn translate_init.c

[PATCH ppc-next v2 2/2] target-ppc: Error out for -cpu host on unknown PVR

2013-01-06 Thread Andreas Färber
Previously we silently exited, with subclasses we got an opcode warning. Instead, explicitly tell the user what's wrong. An indication for this is -cpu ? showing host with an all-zero PVR. Signed-off-by: Andreas Färber afaer...@suse.de --- target-ppc/kvm.c |8 1 Datei geändert, 8

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-06 Thread Rusty Russell
Wanlong Gao gaowanl...@cn.fujitsu.com writes: On 01/02/2013 01:03 PM, Rusty Russell wrote: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-06 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 02/01/2013 06:03, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained

[PATCH v8 1/3] x86, apicv: add APICv register virtualization support

2013-01-06 Thread Yang Zhang
- APIC read doesn't cause VM-Exit - APIC write becomes trap-like Signed-off-by: Kevin Tian kevin.t...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/include/asm/vmx.h |2 ++ arch/x86/kvm/lapic.c | 15 +++ arch/x86/kvm/lapic.h |2 ++

[PATCH v8 3/3] x86, apicv: add virtual x2apic support

2013-01-06 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need clear MSR bitmap for corresponding x2apic MSRs when guest enabled x2apic: 0x800 - 0x8ff: no read intercept for apicv register virtualization TPR,EOI,SELF-IPI: no write intercept for virtual interrupt delivery

[PATCH v8 0/3] x86, apicv: Add APIC virtualization support

2013-01-06 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com APIC virtualization is a new feature which can eliminate most of VM exit when vcpu handle a interrupt: APIC register virtualization: APIC read access doesn't cause APIC-access VM exits. APIC write becomes trap-like. Virtual interrupt

[PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-06 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection path: - for pending interrupt, instead of direct injection, we may

[RESEND PATCH] pci-assign: Enable MSIX on device to match guest

2013-01-06 Thread Alex Williamson
When a guest enables MSIX on a device we evaluate the MSIX vector table, typically find no unmasked vectors and don't switch the device to MSIX mode. This generally works fine and the device will be switched once the guest enables and therefore unmasks a vector. Unfortunately some drivers enable

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Jason Wang
On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when after the polling is failed. Solve this problem by: - checking

Re: [PATCH v8 3/3] x86, apicv: add virtual x2apic support

2013-01-06 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:02:37AM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need clear MSR bitmap for corresponding x2apic MSRs when guest enabled x2apic: 0x800 - 0x8ff: no read intercept for apicv register virtualization

RE: [PATCH v8 3/3] x86, apicv: add virtual x2apic support

2013-01-06 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-07: On Mon, Jan 07, 2013 at 10:02:37AM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need clear MSR bitmap for corresponding x2apic MSRs when guest enabled x2apic: 0x800 - 0x8ff: no read intercept for

Re: [PATCH v8 3/3] x86, apicv: add virtual x2apic support

2013-01-06 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 06:58:15AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-07: On Mon, Jan 07, 2013 at 10:02:37AM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need clear MSR bitmap for corresponding x2apic MSRs

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-06 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:02:36AM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

Re: [PATCH] KVM: PPC: Book3S HV: Fix compilation without CONFIG_PPC_POWERNV

2013-01-06 Thread Alexander Graf
On 22.12.2012, at 15:09, Andreas Schwab wrote: Fixes this build breakage: arch/powerpc/kvm/book3s_hv_ras.c: In function ‘kvmppc_realmode_mc_power7’: arch/powerpc/kvm/book3s_hv_ras.c:126:23: error: ‘struct paca_struct’ has no member named ‘opal_mc_evt’ Signed-off-by: Andreas Schwab