Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146593
b: refs/heads/master
c: 3edbcff
h: refs/heads/master
i:
  146591: ddb9ee6
v: v3
  • Loading branch information
Carsten Otte authored and Avi Kivity committed Jun 10, 2009
1 parent 98abf93 commit e71ba93
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abf4a71ed95ff29d696bf04633958b2068ed2e0b
refs/heads/master: 3edbcff9bfe2ed632e518b3cfe807d062cee8269
28 changes: 18 additions & 10 deletions trunk/arch/s390/kvm/intercept.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,25 @@ static int handle_stop(struct kvm_vcpu *vcpu)
static int handle_validity(struct kvm_vcpu *vcpu)
{
int viwhy = vcpu->arch.sie_block->ipb >> 16;
int rc;

vcpu->stat.exit_validity++;
if (viwhy == 0x37) {
fault_in_pages_writeable((char __user *)
vcpu->kvm->arch.guest_origin +
vcpu->arch.sie_block->prefix,
PAGE_SIZE);
return 0;
}
VCPU_EVENT(vcpu, 2, "unhandled validity intercept code %d",
viwhy);
return -ENOTSUPP;
if ((viwhy == 0x37) && (vcpu->arch.sie_block->prefix
<= vcpu->kvm->arch.guest_memsize - 2*PAGE_SIZE)){
rc = fault_in_pages_writeable((char __user *)
vcpu->kvm->arch.guest_origin +
vcpu->arch.sie_block->prefix,
2*PAGE_SIZE);
if (rc)
/* user will receive sigsegv, exit to user */
rc = -ENOTSUPP;
} else
rc = -ENOTSUPP;

if (rc)
VCPU_EVENT(vcpu, 2, "unhandled validity intercept code %d",
viwhy);
return rc;
}

static int handle_instruction(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit e71ba93

Please sign in to comment.