From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/4] KVM: nVMX: Require immediate-exit when event reinjected to L2 and L1 event pending Date: Sat, 11 Nov 2017 00:26:10 +0100 Message-ID: <1585ee8f-2783-028f-caee-f8116a080fcc@redhat.com> References: <1509890866-8736-1-git-send-email-liran.alon@oracle.com> <1509890866-8736-3-git-send-email-liran.alon@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: jmattson@google.com, idan.brown@oracle.com, Konrad Rzeszutek Wilk To: Liran Alon , rkrcmar@redhat.com, kvm@vger.kernel.org Return-path: Received: from mail-wr0-f182.google.com ([209.85.128.182]:48382 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbdKJX0O (ORCPT ); Fri, 10 Nov 2017 18:26:14 -0500 Received: by mail-wr0-f182.google.com with SMTP id 15so9845406wrb.5 for ; Fri, 10 Nov 2017 15:26:14 -0800 (PST) In-Reply-To: <1509890866-8736-3-git-send-email-liran.alon@oracle.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 05/11/2017 15:07, Liran Alon wrote: > + /* > + * If we reinjected a previous event, > + * don't consider a new pending event > + */ > + if (kvm_event_needs_reinjection(vcpu)) > + return 0; > + Could you end up with WARN_ON(vcpu->arch.exception.pending); in vcpu_enter_guest after returning 0 here? Maybe it would be safer to return a non-zero value so that the caller sets req_immediate_exit = true. But I haven't really thought through the consequences. Thanks, Paolo