Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1800605ybz; Thu, 23 Apr 2020 06:13:23 -0700 (PDT) X-Google-Smtp-Source: APiQypK8eufvRs0HCBEdnw+mxUWhwm/2z+L8K675S7kdcCVO8NzYFWSaAV4TROrTVgW+1M193Dxx X-Received: by 2002:a05:6402:1a46:: with SMTP id bf6mr2541449edb.44.1587647602827; Thu, 23 Apr 2020 06:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587647602; cv=none; d=google.com; s=arc-20160816; b=KFwlndbUnBsKvhgkLpNfeAb82nhtehFO4m78DzW2B5gx1iQXr3EOV1/RaN8YZ8/vDu whLMVNJQa7TwBxVbnV3jcdFyTIgbKRd0n3lnyBcwnNmNCXNJyczzp/Cr38LGgdSHBwgb hEKqXemCUmrQRfkSfyAdj9hnKpMh4BUVQEalM0wsylBtXI+S2V/JzcwL1K3RSpXJ5IU1 n+47tv8BG/mWMrMI5LwJ3c6qWae311zhDhJFj2/DBzU2DwTK1Qjkno9n7W6a8nnUj88q ZattrLXmYL9L2qmmgPJDEIga6toDXsiEdtnf7l53LPrMKwtamTEukCOWxy4ft4p2EOxU dfqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=IdinXCqJfRCZgVfA06mXMGWP27voGlnnDgqPkPUuXHQ=; b=RYNgpP4tNgWMw1RVD0C7b/NBrAgvyXqpx8KuZUADGk58vauRFK51DuGKDcUuQNOCWY v5bLCLbMYrfGr8xf0cI1tDKwgodTEOLwcOFEZ1kIOwearmlxIiwI53Jr3FAsfigLyoQN O7zLRtlq0om0kdM369IHRbqLcGFLTmr02g9QUwJ6LhSEbuuAElFeKIFOg5kw6XgZ1rC2 XmHmLyYk0AvzANyicaNlHQ08mHntikkqEETiOHglV/SqMrsiZ0N6htd3oYxMVjOF2Nse UnDCNCYiux45mt8HfmEdjYs76Q8+l23XMvlRKZmdoxgOAYBfVFKAMDHuacQKLSNrdsPL iGdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DHc+TqrB; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr23si1191601ejb.316.2020.04.23.06.12.49; Thu, 23 Apr 2020 06:13:22 -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=@redhat.com header.s=mimecast20190719 header.b=DHc+TqrB; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbgDWNKD (ORCPT + 99 others); Thu, 23 Apr 2020 09:10:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:37414 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726532AbgDWNKC (ORCPT ); Thu, 23 Apr 2020 09:10:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587647401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IdinXCqJfRCZgVfA06mXMGWP27voGlnnDgqPkPUuXHQ=; b=DHc+TqrBUIGUybURESc1mn54oEBt26bhOfuAi46bgd4Kv6xMiwMScyGZTmpRk49Unt5Wa8 HsEwzllC/yQ8Vj4AGnrqZ9oUmbq+AT36P74tU6fEGDf6ErpR2C8YYO7BeUw/VScFiTeOx2 Gzkna3bvL7zsRUKyM6BPyc/8Q75Taic= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-153-GgPj_zu9MBmovQ5BTvMKYA-1; Thu, 23 Apr 2020 09:09:54 -0400 X-MC-Unique: GgPj_zu9MBmovQ5BTvMKYA-1 Received: by mail-wm1-f70.google.com with SMTP id l21so1990576wmh.2 for ; Thu, 23 Apr 2020 06:09:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IdinXCqJfRCZgVfA06mXMGWP27voGlnnDgqPkPUuXHQ=; b=SQrPBDieMfqb6ciApJoIwwTGU5tqRsue+Img2J7qtpA8YWn6jP4exXetJcJaUI5EBC 36A4ltsgPTuF8lJQWKVBC2i7cqZRuuIc+o6kxQ9jHOXHIlDLo8FXdrR0emhKo8U9qw26 Xxyljc5veJdc5eQqVRrtrADn3BOVce8jfo62RSIFZmiCE1gdZkIjs4fspOgBU7Xh+2W/ VAGQjs5h/NQFlL1X2Z5que+cOIow2Rrns6sMap3AMJ0ZadzE1n5mJYCX0+F5uYNqFchZ 2ci5+HoU0ibvV8Ve1+mFWburgIbeQ8TgJyyZ59tPQFPxwYG554SirA8nC3fMRxgKUY2F EQIw== X-Gm-Message-State: AGi0PubBPusLjTangNnTbcp4Y1NvQqN411dhRX0okSo+1jjJHJrYBMpf CHiUPJl3og0tYQP1jXfOCXSiEzHh4nqBe3UI+j7Gc6tVMuDHEywViirIh/lFF+Z6mWm+2NdprwL DOrsVFHtv6dp9WHzII6are81S X-Received: by 2002:a5d:420d:: with SMTP id n13mr5326769wrq.204.1587647392802; Thu, 23 Apr 2020 06:09:52 -0700 (PDT) X-Received: by 2002:a5d:420d:: with SMTP id n13mr5326746wrq.204.1587647392575; Thu, 23 Apr 2020 06:09:52 -0700 (PDT) Received: from [192.168.10.150] ([93.56.170.5]) by smtp.gmail.com with ESMTPSA id b22sm11920460wmj.1.2020.04.23.06.09.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Apr 2020 06:09:51 -0700 (PDT) Subject: Re: [PATCH] kvm: add capability for halt polling To: Jim Mattson , Vitaly Kuznetsov Cc: Jon Cargille , David Matlack , Sean Christopherson , Wanpeng Li , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , the arch/x86 maintainers , kvm list , LKML References: <20200417221446.108733-1-jcargill@google.com> <87d083td9f.fsf@vitty.brq.redhat.com> From: Paolo Bonzini Message-ID: Date: Thu, 23 Apr 2020 15:09:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/04/20 23:36, Jim Mattson wrote: >>> + case KVM_CAP_HALT_POLL: { >>> + if (cap->flags || cap->args[0] != (unsigned int)cap->args[0]) >>> + return -EINVAL; >>> + >>> + kvm->max_halt_poll_ns = cap->args[0]; >> Is it safe to allow any value from userspace here or would it maybe make >> sense to only allow [0, global halt_poll_ns]? > Would that restriction help to get this change accepted? > No, in the sense that I'm applying it already. Paolo