Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1200839 > unrolled thread
| Started by | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| First post | 2015-08-05 17:00 +0200 |
| Last post | 2015-08-05 17:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] x86:kvm:Fix error handling in the function kvm_lapic_sync_from_vapic Paolo Bonzini <pbonzini@redhat.com> - 2015-08-05 17:00 +0200
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2015-08-05 17:00 +0200 |
| Subject | Re: [PATCH] x86:kvm:Fix error handling in the function kvm_lapic_sync_from_vapic |
| Message-ID | <pU8kF-4v7-5@gated-at.bofh.it> |
On 05/08/2015 16:44, Nicholas Krause wrote: > This fixes error handling in the function kvm_lapic_sync_from_vapic > by checking if the call to kvm_read_guest_cached has returned a > error code to signal to its caller the call to this function has > failed and due to this we must immediately return to the caller > of kvm_lapic_sync_from_vapic to avoid incorrectly call apic_set_tpc > if a error has occurred here. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > arch/x86/kvm/lapic.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > index 2a5ca97..9a3e342 100644 > --- a/arch/x86/kvm/lapic.c > +++ b/arch/x86/kvm/lapic.c > @@ -1900,8 +1900,9 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) > if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention)) > return; > > - kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, > - sizeof(u32)); > + if (kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, > + sizeof(u32))) > + return; > > apic_set_tpr(vcpu->arch.apic, data & 0xff); > } > Congratulations, this patch is good! :) I'm applying it to kvm.git's queue branch. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web