From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Gleb Natapov <gleb@kernel.org>, KVM <kvm@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Thomas Huth <thuth@linux.vnet.ibm.com>
Subject: Re: [GIT PULL 1/6] KVM: s390: Handle MVPG partial execution interception
Date: Wed, 30 Apr 2014 10:07:09 +0200 [thread overview]
Message-ID: <20140430080709.GA7723@osiris> (raw)
In-Reply-To: <1398778608-3887-2-git-send-email-borntraeger@de.ibm.com>
On Tue, Apr 29, 2014 at 03:36:43PM +0200, Christian Borntraeger wrote:
> +static int handle_mvpg_pei(struct kvm_vcpu *vcpu)
> +{
> + unsigned long hostaddr, srcaddr, dstaddr;
> + psw_t *psw = &vcpu->arch.sie_block->gpsw;
> + struct mm_struct *mm = current->mm;
> + int reg1, reg2, rc;
> +
> + kvm_s390_get_regs_rre(vcpu, ®1, ®2);
> + srcaddr = kvm_s390_real_to_abs(vcpu, vcpu->run->s.regs.gprs[reg2]);
> + dstaddr = kvm_s390_real_to_abs(vcpu, vcpu->run->s.regs.gprs[reg1]);
> +
> + /* Make sure that the source is paged-in */
> + hostaddr = gmap_fault(srcaddr, vcpu->arch.gmap);
> + if (IS_ERR_VALUE(hostaddr))
> + return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
FWIW (and nothing that should keep this code from going upstream),
this is not entirely correct, since gmap_fault() may return -ENOMEM.
So a host out-of-memory situation will incorrectly result in a guest
addressing exception, which is most likely not what we want.
next prev parent reply other threads:[~2014-04-30 8:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 13:36 [GIT PULL 0/6] KVM: s390: Fixes and single VCPU speedup Christian Borntraeger
2014-04-29 13:36 ` [GIT PULL 1/6] KVM: s390: Handle MVPG partial execution interception Christian Borntraeger
2014-04-30 8:07 ` Heiko Carstens [this message]
2014-04-30 8:53 ` Thomas Huth
2014-04-30 10:07 ` Christian Borntraeger
2014-04-29 13:36 ` [GIT PULL 2/6] KVM: s390: Add a function for checking the low-address protection Christian Borntraeger
2014-04-29 13:36 ` [GIT PULL 3/6] KVM: s390: Fixes for PFMF Christian Borntraeger
2014-04-29 13:36 ` [GIT PULL 4/6] KVM: s390: Add low-address protection to TEST BLOCK Christian Borntraeger
2014-04-29 13:36 ` [GIT PULL 5/6] KVM: s390: introduce kvm_s390_vcpu_{start,stop} Christian Borntraeger
2014-04-29 13:36 ` [GIT PULL 6/6] KVM: s390: enable IBS for single running VCPUs Christian Borntraeger
2014-04-30 10:30 ` [GIT PULL 0/6] KVM: s390: Fixes and single VCPU speedup Paolo Bonzini
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=20140430080709.GA7723@osiris \
--to=heiko.carstens@de.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=thuth@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.