From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Gleb Natapov <gleb@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org,
Thomas Huth <thuth@linux.vnet.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: [PULL 6/9] KVM: s390: Fix clock comparator field for STORE STATUS
Date: Thu, 28 Nov 2013 15:06:55 +0100 [thread overview]
Message-ID: <1385647618-15541-7-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1385647618-15541-1-git-send-email-cornelia.huck@de.ibm.com>
From: Thomas Huth <thuth@linux.vnet.ibm.com>
Only the most 7 significant bytes of the clock comparator must be
saved to the status area, and the byte at offset 304 has to be zero.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
arch/s390/kvm/kvm-s390.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 55eb8de..1bb1dda 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -877,6 +877,7 @@ int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long addr)
{
unsigned char archmode = 1;
int prefix;
+ u64 clkcomp;
if (addr == KVM_S390_STORE_STATUS_NOADDR) {
if (copy_to_guest_absolute(vcpu, 163ul, &archmode, 1))
@@ -920,8 +921,9 @@ int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long addr)
&vcpu->arch.sie_block->cputm, 8, prefix))
return -EFAULT;
+ clkcomp = vcpu->arch.sie_block->ckc >> 8;
if (__guestcopy(vcpu, addr + offsetof(struct save_area, clk_cmp),
- &vcpu->arch.sie_block->ckc, 8, prefix))
+ &clkcomp, 8, prefix))
return -EFAULT;
if (__guestcopy(vcpu, addr + offsetof(struct save_area, acc_regs),
--
1.7.9.5
next prev parent reply other threads:[~2013-11-28 14:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 14:06 [PULL 0/9] KVM: s390: some patches for kvm-next Cornelia Huck
2013-11-28 14:06 ` [PULL 1/9] KVM: s390: Removed SIE_INTERCEPT_UCONTROL Cornelia Huck
2013-11-28 14:06 ` [PULL 2/9] KVM: s390: Removed VIRTIODESCSPACE Cornelia Huck
2013-11-28 14:06 ` [PULL 3/9] KVM: s390: Fix access to CR6 in TPI handler Cornelia Huck
2013-11-28 14:06 ` [PULL 4/9] KVM: s390: Do not set CC3 for EQBS and SQBS Cornelia Huck
2013-11-28 14:06 ` [PULL 5/9] KVM: s390: Always store status during SIGP STOP_AND_STORE_STATUS Cornelia Huck
2013-11-28 14:06 ` Cornelia Huck [this message]
2013-11-28 14:06 ` [PULL 7/9] KVM: s390: fix diagnose code extraction Cornelia Huck
2013-11-28 14:06 ` [PULL 8/9] KVM: s390: Add SIGP store-status-at-address order Cornelia Huck
2013-11-28 14:06 ` [PULL 9/9] KVM: s390: Removed kvm_s390_inject_sigp_stop() Cornelia Huck
2013-11-28 14:31 ` [PULL 0/9] KVM: s390: some patches for kvm-next 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=1385647618-15541-7-git-send-email-cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=borntraeger@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).