public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <gkurz@linux.vnet.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: mihai.caraman@freescale.com, Paul Mackerras <paulus@samba.org>,
	kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] KVM: PPC: fix ONE_REG AltiVec support
Date: Mon, 4 Jan 2016 10:14:24 +0100	[thread overview]
Message-ID: <20160104101424.710aea23@bahia.local> (raw)
In-Reply-To: <20151216172133.9709.22769.stgit@bahia.huguette.org>

Happy new year !

On Wed, 16 Dec 2015 18:24:03 +0100
Greg Kurz <gkurz@linux.vnet.ibm.com> wrote:

> The get and set operations got exchanged by mistake when moving the
> code from book3s.c to powerpc.c.
> 
> Fixes: 3840edc8033ad5b86deee309c1c321ca54257452
> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> ---
> 

Ping ?

> It's been there for over a year but I guess we want that in 4.4, even
> if doesn't break the host kernel.
> 
>  arch/powerpc/kvm/powerpc.c |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 6fd2405c7f4a..a3b182dcb823 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -919,21 +919,17 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
>  				r = -ENXIO;
>  				break;
>  			}
> -			vcpu->arch.vr.vr[reg->id - KVM_REG_PPC_VR0] = val.vval;
> +			val.vval = vcpu->arch.vr.vr[reg->id - KVM_REG_PPC_VR0];
>  			break;
>  		case KVM_REG_PPC_VSCR:
>  			if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
>  				r = -ENXIO;
>  				break;
>  			}
> -			vcpu->arch.vr.vscr.u[3] = set_reg_val(reg->id, val);
> +			val = get_reg_val(reg->id, vcpu->arch.vr.vscr.u[3]);
>  			break;
>  		case KVM_REG_PPC_VRSAVE:
> -			if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
> -				r = -ENXIO;
> -				break;
> -			}
> -			vcpu->arch.vrsave = set_reg_val(reg->id, val);
> +			val = get_reg_val(reg->id, vcpu->arch.vrsave);
>  			break;
>  #endif /* CONFIG_ALTIVEC */
>  		default:
> @@ -974,17 +970,21 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
>  				r = -ENXIO;
>  				break;
>  			}
> -			val.vval = vcpu->arch.vr.vr[reg->id - KVM_REG_PPC_VR0];
> +			vcpu->arch.vr.vr[reg->id - KVM_REG_PPC_VR0] = val.vval;
>  			break;
>  		case KVM_REG_PPC_VSCR:
>  			if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
>  				r = -ENXIO;
>  				break;
>  			}
> -			val = get_reg_val(reg->id, vcpu->arch.vr.vscr.u[3]);
> +			vcpu->arch.vr.vscr.u[3] = set_reg_val(reg->id, val);
>  			break;
>  		case KVM_REG_PPC_VRSAVE:
> -			val = get_reg_val(reg->id, vcpu->arch.vrsave);
> +			if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
> +				r = -ENXIO;
> +				break;
> +			}
> +			vcpu->arch.vrsave = set_reg_val(reg->id, val);
>  			break;
>  #endif /* CONFIG_ALTIVEC */
>  		default:
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2016-01-04  9:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 17:24 [PATCH] KVM: PPC: fix ONE_REG AltiVec support Greg Kurz
2016-01-04  9:14 ` Greg Kurz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-01-13 17:28 Greg Kurz
2016-01-14  3:38 ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160104101424.710aea23@bahia.local \
    --to=gkurz@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mihai.caraman@freescale.com \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox