[RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation

2015-11-14 Thread Borislav Petkov
From: Borislav Petkov Add generic functions which calc family, model and stepping from the CPUID_1.EAX leaf and stick them into the library we have. No functionality change. Signed-off-by: Borislav Petkov --- arch/x86/include/asm/cpu.h| 3 +++

[RFC PATCH 3/3] x86/cpu/amd, kvm: Satisfy guest kernel reads of IC_CFG MSR

2015-11-14 Thread Borislav Petkov
From: Borislav Petkov The kernel accesses IC_CFG MSR (0xc0011021) on AMD because it checks whether the way access filter is enabled on some F15h models, and, if so, disables it. kvm doesn't handle that MSR access and complains about it, which can get really noisy in dmesg when one

[RFC PATCH 0/3] x86, kvm: Unify CPUID computation and fix MSR accessing

2015-11-14 Thread Borislav Petkov
From: Borislav Petkov Hi all, so this is something which should help fixing the MSR access to IC_CFG on AMD. The usefulness should come, however, from the unification and the additional family, model, stepping helpers in kvm in case one wants to know those of the guest CPU. Who

[RFC PATCH 2/3] kvm: Add accessors for guest CPU's family, model, stepping

2015-11-14 Thread Borislav Petkov
From: Borislav Petkov Those give the family, model and stepping of the guest vcpu. Signed-off-by: Borislav Petkov Cc: Paolo Bonzini --- arch/x86/kvm/cpuid.h | 34 ++ 1 file changed, 34 insertions(+) diff --git

Re: [PATCH 1/2] KVM: kvm_is_visible_gfn can be boolean

2015-11-14 Thread Amos Jianjun Kong
On Sat, Nov 14, 2015 at 11:21 AM, Yaowei Bai wrote: > This patch makes kvm_is_visible_gfn return bool due to this particular > function only using either one or zero as its return value. > > No functional change. > > Signed-off-by: Yaowei Bai

[PATCH 0/9] constify pci_error_handlers structures

2015-11-14 Thread Julia Lawall
Constify never-modified pci_error_handlers structures. --- drivers/crypto/qat/qat_common/adf_aer.c |2 +- drivers/misc/genwqe/card_base.c |2 +- drivers/net/ethernet/cavium/liquidio/lio_main.c |2 +- drivers/net/ethernet/sfc/efx.c |2 +-

[PATCH 9/9] vfio-pci: constify pci_error_handlers structures

2015-11-14 Thread Julia Lawall
This pci_error_handlers structure is never modified, like all the other pci_error_handlers structures, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- There are no dependencies between these patches. drivers/vfio/pci/vfio_pci.c

[PATCH v4 3/3] KVM/arm/arm64: enable enhanced armv8 fp/simd lazy switch

2015-11-14 Thread Mario Smarduch
This patch tracks armv7 and armv8 fp/simd hardware state with a vcpu lazy flag. On vcpu_load for 32 bit guests enable FP access, and later enable fp/simd trapping for 32 and 64 bit guests if lazy flag is not set. On first fp/simd access trap to handler to save host and restore guest context,

[PATCH v4 0/3] KVM/arm/arm64: enhance armv7/8 fp/simd lazy switch

2015-11-14 Thread Mario Smarduch
This patch series combines the previous armv7 and armv8 versions. For an FP and lmbench load it reduces fp/simd context switch from 30-50% down to 2%. Results will vary with load but is no worse then current approach. In summary current lazy vfp/simd implementation switches hardware context only

[PATCH v4 2/3] KVM/arm/arm64: enable enhanced armv7 fp/simd lazy switch

2015-11-14 Thread Mario Smarduch
This patch tracks armv7 fp/simd hardware state with a vcpu lazy flag. On vcpu_load saves host fpexc and enables FP access, and later enables fp/simd trapping if lazy flag is not set. On first fp/simd access trap to handler to save host and restore guest context, disable trapping and set vcpu lazy

[PATCH v4 1/3] KVM/arm/arm64: add hooks for armv7 fp/simd lazy switch support

2015-11-14 Thread Mario Smarduch
This patch adds vcpu fields to track lazy state, save host FPEXC, and offsets to fields. Signed-off-by: Mario Smarduch --- arch/arm/include/asm/kvm_host.h | 6 ++ arch/arm/kernel/asm-offsets.c | 2 ++ 2 files changed, 8 insertions(+) diff --git

Re: [PATCH 3/3] KVM/arm64: enable enhanced armv8 fp/simd lazy switch

2015-11-14 Thread Mario Smarduch
On 11/10/2015 3:18 AM, Christoffer Dall wrote: > On Mon, Nov 09, 2015 at 03:13:15PM -0800, Mario Smarduch wrote: >> >> >> On 11/5/2015 7:02 AM, Christoffer Dall wrote: >>> On Fri, Oct 30, 2015 at 02:56:33PM -0700, Mario Smarduch wrote: [] >> kern_hyp_va x0 >> add x2, x0, #VCPU_CONTEXT >> mrs