Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227982
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] kvm:x86:Fix incorrect error paths in the function process_smi |
| Date | 2015-09-18 17:00 +0200 |
| Message-ID | <qa5iQ-5JO-53@gated-at.bofh.it> (permalink) |
| References | <qa5iQ-5JO-55@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 18/09/2015 16:46, Nicholas Krause wrote: > This fixes the incorrect assumation that the function > kvm_vcpu_write_guest always runs successfully and > therefore checks if it fails by returning a error code > and if so return immediately to the caller of the function > process_smi as we cannot this work's intended work after > this failed call to kvm_vcpu_write_guest. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > arch/x86/kvm/x86.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index a60bdbc..4743a4b 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -6088,7 +6088,8 @@ static void process_smi(struct kvm_vcpu *vcpu) > else > process_smi_save_state_32(vcpu, buf); > > - kvm_vcpu_write_guest(vcpu, vcpu->arch.smbase + 0xfe00, buf, sizeof(buf)); > + if (kvm_vcpu_write_guest(vcpu, vcpu->arch.smbase + 0xfe00, buf, sizeof(buf))) > + return; > > if (kvm_x86_ops->get_nmi_mask(vcpu)) > vcpu->arch.hflags |= HF_SMM_INSIDE_NMI_MASK; > The SMI was requested by the guest. If the guest failed to set up SMM correctly, it's the guest's problem. Aborting the SMI does not match what a real processor does. Thanks, 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 linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] kvm:x86:Fix incorrect error paths in the function process_smi Paolo Bonzini <pbonzini@redhat.com> - 2015-09-18 17:00 +0200
csiph-web