Re: [RFC PATCH 02/17] KVM: PPC64: booke: Add EPCR support in mtspr/mfspr emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25.06.2012, at 14:26, Mihai Caraman wrote:

> Add EPCR support in booke mtspr/mfspr emulation. EPCR register is defined
> only for 64-bit and HV categories, so it shoud be available only on 64-bit
> virtual processors. Undefine the support for 32-bit builds.
> Define a reusable setter function for vcpu's EPCR.
> 
> Signed-off-by: Mihai Caraman <mihai.caraman@xxxxxxxxxxxxx>
> ---
> arch/powerpc/kvm/booke.c         |   12 +++++++++++-
> arch/powerpc/kvm/booke.h         |    6 ++++++
> arch/powerpc/kvm/booke_emulate.c |   13 ++++++++++++-
> 3 files changed, 29 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 72f13f4..f9fa260 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -13,7 +13,7 @@
>  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
>  *
>  * Copyright IBM Corp. 2007
> - * Copyright 2010-2011 Freescale Semiconductor, Inc.
> + * Copyright 2010-2012 Freescale Semiconductor, Inc.
>  *
>  * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
>  *          Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
> @@ -1243,6 +1243,16 @@ void kvmppc_core_commit_memory_region(struct kvm *kvm,
> {
> }
> 
> +#ifdef CONFIG_64BIT
> +void kvmppc_set_epcr(struct kvm_vcpu *vcpu, u32 new_epcr)
> +{
> +	vcpu->arch.epcr = new_epcr;
> +	vcpu->arch.shadow_epcr &= ~SPRN_EPCR_GICM;
> +	if (vcpu->arch.epcr  & SPRN_EPCR_ICM)
> +		vcpu->arch.shadow_epcr |= SPRN_EPCR_GICM;

Why would the setter be #ifdef CONFIG_64BIT? EPCR exists on e500mc too, no? Please only #ifdef the GICM bits out.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux