Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4357494ybi; Tue, 11 Jun 2019 05:27:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5ypFj/ZwgjMeZYcVcwWMq27s2hjfnqJeY0IJt6gJtCjbcmC3nCzkp8yHTpwoU2QkrzjWR X-Received: by 2002:a63:5961:: with SMTP id j33mr3827806pgm.89.1560256070215; Tue, 11 Jun 2019 05:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560256070; cv=none; d=google.com; s=arc-20160816; b=uPHEyKpl7fW8R2q+xadnVdvG+onK7f0Af9qMK2a5WYFTzqpL66ZHYWn/n30IE5lVNu X5IQErT0QEfYXeJ4BJ84YZlcDwXsLI6Dk8mzCSxw3ZQQl8P7Ryg03yFEnOfDow+8Qonc 2d/veDJNXke0LUnCEBvKMrkAPjDuwbAn6Gxw8TT9BhFhp9yxf9ZJz+SufSi+76UObWBG MlMBOmFFirGyBHE/nsGStBxqIoUwHpaGckdgDAh1qn9RxHFLMkwRprsmPdB+x9IfAHMr hVhU97I6ePdjSl01gxjeBTF1s+rlT+ezkYMLhZKBcxPlzf3UGdN/uXFNNlhN5k9Fd6uL 2WZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0EMixU0L4b0ZCFegtw+unlifhiqds/4ljlhVrZwVzq4=; b=FRj/uzqzKNUEC2cGykKS0ag1qG/s++t7rh9jgB7yfDt+3oYkhUPaD+mJgV+c1ODtIr WiwU+TWB6/g/vom5H6/1XwVp0nATPveErJSXj8gsKkIxrCim8mWyoKCpT3mGUjMXBnYm 7Vjtd4d6mdzN+WN2iPHU69zRM8CtFz23TQl0vVZaLihLhMvXAJj/inCrr60x0Ik87pZb v5sO53sU2jcR6/Ubh1WPW91q0V2wmSdAP4FnMcipvkvCrpC8vIYzsYTOsvkryrXXvHef tEUeWjT034pHyw5hWD+VnOzZNhcVC/iU+ft5JC9sX7Ni9VJkemx3C+eyDThq4pUvLC3v U/BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=olo+i1fv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si12055200pgp.232.2019.06.11.05.27.34; Tue, 11 Jun 2019 05:27:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=olo+i1fv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388362AbfFKMSK (ORCPT + 99 others); Tue, 11 Jun 2019 08:18:10 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:42468 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387780AbfFKMSJ (ORCPT ); Tue, 11 Jun 2019 08:18:09 -0400 Received: by mail-oi1-f195.google.com with SMTP id s184so8746199oie.9; Tue, 11 Jun 2019 05:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0EMixU0L4b0ZCFegtw+unlifhiqds/4ljlhVrZwVzq4=; b=olo+i1fvsbiRzte8WBg6b/XYI4OTLZjRNtelDmZCpC/ugvjSPtaGA+OROyLdIZ5XAM Y7hYZmkUaNvH7Cn+fvA2T5mlNSF5V78Pkr654NIle8cn2fGYYCBZb4AWad4pPeSixZdl nYiGEpF7V5RfHsZoS4OgCr3mgC9v1Z5l4YctKKRGjiN4ZCo9+XJKOLDPwNK79ybWW0z1 Uwgy+lI71VenOlzdOQ6uuH+RXpsRj86i9DVcb1nrwUBCujtYWDoeXigFQ3faJrli4T7s cV+i6iAKkri1gJHGSGgedONa98GFXZuw8TLVYZF9o29WUrp4oLWj4o9LKEqPA9fSXe0z Ygpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0EMixU0L4b0ZCFegtw+unlifhiqds/4ljlhVrZwVzq4=; b=PPj06HsKUVDVHoa9K6oN6WKWbIUBwMT1366IH6BGHMg6XlLMk8DRpaAYf5m3kqMBIB e3ei8goisdg8JiQy4/zTgW33oW9IvA4sWt97As5QhBTJ6yzlPAJ4D239/2xEVTP6I0J+ UozIshstniS9HFbFXwaGsacKRcMlDjHmMHtuylAXA4I0U2wCCvLhn8NAeNne8KhRQ4q9 v0fOu2/50Wmo0XX785D3YLGAjhXgLaLNx47Ps7J+ahhXrvpmYjNs1/WAF+L6KZBcKofR 7g1rGiCgVn2fofsp926FlagbxUI+cxXrdpLbC1gRRaBeAcTt676XlnMfZFslHn3+KVvw k4qQ== X-Gm-Message-State: APjAAAWruYSVFpwop6SfTQnZTwHPH6gfc+zelLIw80y7ndmyLaZz0ez3 XqKHJr242/5V90udMfbQz6qMFo6jCnsK+I/6pS4= X-Received: by 2002:aca:e0d6:: with SMTP id x205mr14784719oig.47.1560255489254; Tue, 11 Jun 2019 05:18:09 -0700 (PDT) MIME-Version: 1.0 References: <1559799086-13912-1-git-send-email-wanpengli@tencent.com> <1559799086-13912-3-git-send-email-wanpengli@tencent.com> In-Reply-To: From: Wanpeng Li Date: Tue, 11 Jun 2019 20:18:53 +0800 Message-ID: Subject: Re: [PATCH v2 2/3] KVM: LAPIC: lapic timer interrupt is injected by posted interrupt To: Paolo Bonzini Cc: LKML , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jun 2019 at 19:40, Paolo Bonzini wrote: > > On 06/06/19 07:31, Wanpeng Li wrote: > > +static inline bool can_posted_interrupt_inject_timer(struct kvm_vcpu *vcpu) > > +{ > > + return posted_interrupt_inject_timer_enabled(vcpu) && > > + !vcpu_halt_in_guest(vcpu); > > +} > > + > > I agree with Radim, what you want here is just use kvm_hlt_in_guest. Do it in v3. > > I'll post shortly a prerequisite patch to block APF artificial halt when > kvm_hlt_in_guest is true. Thanks Paolo! Regards, Wanpeng Li