powerpc/kvm: Copy the pvr value after memset
Otherwise we would clear the pvr value Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
c8ae0ace10
commit
87916442bd
|
@ -680,13 +680,12 @@ static int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
|||
}
|
||||
|
||||
int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
|
||||
struct kvm_sregs *sregs)
|
||||
struct kvm_sregs *sregs)
|
||||
{
|
||||
int i;
|
||||
|
||||
sregs->pvr = vcpu->arch.pvr;
|
||||
|
||||
memset(sregs, 0, sizeof(struct kvm_sregs));
|
||||
sregs->pvr = vcpu->arch.pvr;
|
||||
for (i = 0; i < vcpu->arch.slb_max; i++) {
|
||||
sregs->u.s.ppc64.slb[i].slbe = vcpu->arch.slb[i].orige;
|
||||
sregs->u.s.ppc64.slb[i].slbv = vcpu->arch.slb[i].origv;
|
||||
|
@ -696,7 +695,7 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
|
|||
}
|
||||
|
||||
int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
|
||||
struct kvm_sregs *sregs)
|
||||
struct kvm_sregs *sregs)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
|
Loading…
Reference in New Issue