提交 7d777d78 编写于 作者: H Heiko Carstens 提交者: Christian Borntraeger

KVM: s390: convert handle_stidp()

Convert handle_stidp() to new guest access functions.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
上级 2d8bcaed
...@@ -428,7 +428,9 @@ static int handle_lpswe(struct kvm_vcpu *vcpu) ...@@ -428,7 +428,9 @@ static int handle_lpswe(struct kvm_vcpu *vcpu)
static int handle_stidp(struct kvm_vcpu *vcpu) static int handle_stidp(struct kvm_vcpu *vcpu)
{ {
u64 stidp_data = vcpu->arch.stidp_data;
u64 operand2; u64 operand2;
int rc;
vcpu->stat.instruction_stidp++; vcpu->stat.instruction_stidp++;
...@@ -440,8 +442,9 @@ static int handle_stidp(struct kvm_vcpu *vcpu) ...@@ -440,8 +442,9 @@ static int handle_stidp(struct kvm_vcpu *vcpu)
if (operand2 & 7) if (operand2 & 7)
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
if (put_guest(vcpu, vcpu->arch.stidp_data, (u64 __user *)operand2)) rc = write_guest(vcpu, operand2, &stidp_data, sizeof(stidp_data));
return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); if (rc)
return kvm_s390_inject_prog_cond(vcpu, rc);
VCPU_EVENT(vcpu, 5, "%s", "store cpu id"); VCPU_EVENT(vcpu, 5, "%s", "store cpu id");
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册