public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: ehrhardt@linux.vnet.ibm.com
To: kvm@vger.kernel.org, avi@redhat.com
Cc: ehrhardt@linux.vnet.ibm.com, borntraeger@de.ibm.com,
	cotte@de.ibm.com, heiko.carstens@de.ibm.com,
	schwidefsky@de.ibm.com, mtosatti@redhat.com
Subject: [PATCH 3/5] kvm-s390: update vcpu->cpu
Date: Fri, 29 May 2009 10:21:52 +0200	[thread overview]
Message-ID: <1243585314-13734-4-git-send-email-ehrhardt@linux.vnet.ibm.com> (raw)
In-Reply-To: <1243585314-13734-1-git-send-email-ehrhardt@linux.vnet.ibm.com>

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

kvm on s390 formerly ignored vcpu->cpu.
This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow
further architecture unification e.g. let generic code not find -1 on
currently scheduled vcpus.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 kvm-s390.c |    2 ++
 1 file changed, 2 insertions(+)

[diff]
Index: kvm/arch/s390/kvm/kvm-s390.c
===================================================================
--- kvm.orig/arch/s390/kvm/kvm-s390.c
+++ kvm/arch/s390/kvm/kvm-s390.c
@@ -243,6 +243,7 @@ void kvm_arch_vcpu_uninit(struct kvm_vcp
 
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 {
+	vcpu->cpu = cpu;
 	save_fp_regs(&vcpu->arch.host_fpregs);
 	save_access_regs(vcpu->arch.host_acrs);
 	vcpu->arch.guest_fpregs.fpc &= FPC_VALID_MASK;
@@ -252,6 +253,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu 
 
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 {
+	vcpu->cpu = -1;
 	save_fp_regs(&vcpu->arch.guest_fpregs);
 	save_access_regs(vcpu->arch.guest_acrs);
 	restore_fp_regs(&vcpu->arch.host_fpregs);

  parent reply	other threads:[~2009-05-29  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29  8:21 [PATCH 0/5] kvm-s390: revised version of kvm-s390 guest memory handling - v5 ehrhardt
2009-05-29  8:21 ` [PATCH 1/5] kvm-s390: infrastructure to kick vcpus out of guest state - v3 ehrhardt
2009-05-29  8:21 ` [PATCH 2/5] kvm-s390: fix interruption casued by signal - v2 ehrhardt
2009-05-29  8:21 ` ehrhardt [this message]
2009-05-29  8:21 ` [PATCH 4/5] kvm: remove redundant declarations ehrhardt
2009-05-29  8:21 ` [PATCH 5/5] kvm-s390: streamline memslot handling - v5 ehrhardt
  -- strict thread matches above, loose matches on Subject: below --
2009-05-28 15:43 [PATCH 0/5] kvm-s390: revised version of kvm-s390 guest memory handling - v4 ehrhardt
2009-05-28 15:43 ` [PATCH 3/5] kvm-s390: update vcpu->cpu ehrhardt

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=1243585314-13734-4-git-send-email-ehrhardt@linux.vnet.ibm.com \
    --to=ehrhardt@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=schwidefsky@de.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