Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4037104ybz; Mon, 20 Apr 2020 14:22:16 -0700 (PDT) X-Google-Smtp-Source: APiQypKD4J21V7m4J9gHOoGBDvKlvF/FNciKLZ05bqznXKpj5h7KXBuOYlGnmwlT7ps+OngCni7E X-Received: by 2002:a17:907:2107:: with SMTP id qn7mr18257388ejb.316.1587417736013; Mon, 20 Apr 2020 14:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587417736; cv=none; d=google.com; s=arc-20160816; b=f+lu2f2FEZioBfOs2sMMjkPBzAspFlBZSMYxcxOJZUHv+oJmqH5R00lu0/5WbDf0Y6 xIT1/guaL9C0otrpVLTp7ZggnmlTuXIm4wom8/t5D5pYky5NRl1uDYn8WFKUCaBOkga8 iN6u4HxslXJ9I8ZNJidkK3yfhWqb4MWNone7EIVMnAMHMpO/2/zDgm4Qw132qQXc+3by m6ht7PXMKhaor679yWsAGiJfeh1eF4nZ2fnArQJAuHHmkNrHly5a/ZITxoxU1gknyETy hZnbhkMkaTZ1n5gMObgAmQF52qy9vWQGpuhYb5Ot6iP+5E3NCxwKD5M/EdKAsK64HnWy 0K3A== 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=pMEo8IzhJo5r/g49jS9dMArCoyOrINpa+pWa++ryG9Y=; b=qDpSByit3mh2Pv71wSSLRF9rFjR8Yvpdg4Xd02CRPr6ExCmAwOMVPhxSzBvQLnQhSN blaujYySjVH20bGptHYkyJdNa80WCfnYUcHNJMG1F3lx1f/Z9EcvqKF6KYs1e++lBIAS YuwIBmnFX7FHjYZ7w3Gs9srQYzJUPaTwu5VM4dKAschiDTORblLj567E5eJaiaj23Lsx kY2yJxppvMCWo7N/tlJqkW8utABJst0cabbQfU4un+ksaufx6pwXwZsE9q4HejORBauH JZGC+2JGRvIQ00Uvb7tviBzIremDUXaEdE6W3AneZfjA91w2wi9OO1MzTStNhVcsgyht IJhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ae7uMN5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 13si444082edw.369.2020.04.20.14.21.51; Mon, 20 Apr 2020 14:22:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ae7uMN5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgDTVUs (ORCPT + 99 others); Mon, 20 Apr 2020 17:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726021AbgDTVUr (ORCPT ); Mon, 20 Apr 2020 17:20:47 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929ADC061A0C for ; Mon, 20 Apr 2020 14:20:47 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id s10so10661597iln.11 for ; Mon, 20 Apr 2020 14:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pMEo8IzhJo5r/g49jS9dMArCoyOrINpa+pWa++ryG9Y=; b=Ae7uMN5F5HzPJjZt/wpRzu64bJAInmuWePBtwGqdOSrvTqVuQpFpkHrX62DMUsctvD ICQm9swQ9rOIUD1QUSUpMrGuL9EZzs1qJdfht7Mo1u0pq0jMn7Mf6Er2aJc/Qqox5V+z ca3ZQp7epoHA/l4Qp3QVn/2Ud7L3o7WwnfXqr+w3EJgQTy1HE4JfxJTQNFscexXCzRyO duWNhUaj6nkzSC11XBsz0uK9W67Kjg4P8RW2hEf+PfBxjWvgTDh7MMxVAPzwlGkoC+c6 1QkjD6gQXxIBbZiKuIsD15Je9m0BKCplmMjDtb5PAc25xIZSyfHtsDekOCzasCQ+671s 69zQ== 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=pMEo8IzhJo5r/g49jS9dMArCoyOrINpa+pWa++ryG9Y=; b=eq4jUdv/H1WTRsyTSLWFKtTd4Vt8rmdTlqSiJNfFWV+06A0hFAQ5BBAJmHwteQor6Z cYCoXdg/kRLrzzyap/xQfBbBv+UAAXKGFsw9Z5HJDsRzsCj7xIrN/2pBLQezfUTIfMaq DTeqR962KV8vAZ2X7eljFfF/MMZCkIK61MJWFSdNNyp8i6dBhhtTpiurEX3miZYeMyWt geInKJ/J7CL7dXxRlQ64AvUmtCCZxJW9Yzk4CsMLtYWisY88DB0R01Gc4stj79zmQVTF J36TXOurG9k5g3NXsXmcoqiQLRWRwV6mVwKwSgcvIDrqJpiEDnkOk9Q0P8yxbP42tDMG lB1g== X-Gm-Message-State: AGi0PuZKth/FAbwJ5y897N850kB22Kx0L23yvxWu0G4cQIlYBBaQywm0 EcZbBbAN/i3bAVrcM/LmtzRJil+r7COEJna2BWGV7g== X-Received: by 2002:a05:6e02:c65:: with SMTP id f5mr8205254ilj.44.1587417646632; Mon, 20 Apr 2020 14:20:46 -0700 (PDT) MIME-Version: 1.0 References: <20200417221446.108733-1-jcargill@google.com> <87d083td9f.fsf@vitty.brq.redhat.com> <02039a7b-01b4-ea5c-bd73-100ea753bf5e@redhat.com> In-Reply-To: <02039a7b-01b4-ea5c-bd73-100ea753bf5e@redhat.com> From: Jon Cargille Date: Mon, 20 Apr 2020 14:20:34 -0700 Message-ID: Subject: Re: [PATCH] kvm: add capability for halt polling To: Paolo Bonzini Cc: Vitaly Kuznetsov , David Matlack , Sean Christopherson , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org 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 Mon, Apr 20, 2020 at 2:10 PM Paolo Bonzini wrote: > > On 20/04/20 20:47, Jon Cargille wrote: > >> Is it safe to allow any value from userspace here or would it maybe make > >> sense to only allow [0, global halt_poll_ns]? > > I believe that any value is safe; a very large value effectively disables > > halt-polling, which is equivalent to setting a value of zero to explicitly > > disable it, which is legal. > > Doesn't a large value make KVM poll all the time? But you could do that > just by running "for (;;)" so there's no reason to limit the parameter. Yes, I mis-spoke; apologies. A large number will cause KVM to poll for a long time; as long as the thread can be preempted, we don't see any problem with that. Thanks, Jon > > Paolo >