From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Date: Thu, 16 Apr 2009 14:53:13 +0000 Subject: [patch] preserve int status through call to kvm_insert_vmm_mapping Message-Id: <49E74659.7060002@sgi.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------000503090201020409040105" List-Id: To: kvm-ia64@vger.kernel.org This is a multi-part message in MIME format. --------------000503090201020409040105 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Here's another one, this one actually should be safe as it is, but with this change it's safe, even if the code is moved around later. Cheers, Jes --------------000503090201020409040105 Content-Type: text/x-patch; name="0005-kvm-ia64-pre-trans-save-psr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0005-kvm-ia64-pre-trans-save-psr.patch" Preserve interrupt status around call to kvm_insert_vmm_mappin() in kvm_vcpu_pre_transition(). Signed-off-by: Jes Sorensen --- arch/ia64/kvm/kvm-ia64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Index: linux-2.6.git/arch/ia64/kvm/kvm-ia64.c =================================================================== --- linux-2.6.git.orig/arch/ia64/kvm/kvm-ia64.c +++ linux-2.6.git/arch/ia64/kvm/kvm-ia64.c @@ -567,6 +567,8 @@ static int kvm_vcpu_pre_transition(struct kvm_vcpu *vcpu) { + unsigned long psr; + int r; int cpu = smp_processor_id(); if (vcpu->arch.last_run_cpu != cpu || @@ -578,7 +580,10 @@ vcpu->arch.host_rr6 = ia64_get_rr(RR6); vti_set_rr6(vcpu->arch.vmm_rr); - return kvm_insert_vmm_mapping(vcpu); + local_irq_save(psr); + r = kvm_insert_vmm_mapping(vcpu); + local_irq_restore(psr); + return r; } static void kvm_vcpu_post_transition(struct kvm_vcpu *vcpu) --------------000503090201020409040105--