Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4504194ybx; Mon, 4 Nov 2019 14:29:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwUXQ6zirZ9QGaiYzDv9ftPw96SqBlLTDjatuCNyfg44cBbyNk27uean/VGNy9MooWbUTd3 X-Received: by 2002:a17:906:6857:: with SMTP id a23mr17349648ejs.190.1572906587985; Mon, 04 Nov 2019 14:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572906587; cv=none; d=google.com; s=arc-20160816; b=jpvae9fEqf5ag/kd3p+VGlkr6sN7/XKC1uUeOInz4DdcZCUIs8hYOVKx6ZCYNhy511 bsKlGRCadqEISzAeg0+0RBivGlRDV/4WmgltBiY+38eInOpuqnZcVCvJGc886azTrK/Q DJeeYOXiz60WLUxhNypMBN+uu/yqpUXb/4Y4rQ9K2ol/01EHy7pQFSWu/CZeQoGh7IiB nCQIfOyENfEpCvOyOQQEbP16SncDr9ICJ0VJu5BOPKpFYxlJR31tlqxFUO9DiuK6ALhv zrTuPIpUllbAcssHQZnVDJw/AAu4js8ONQAGoMFx9MJQ8tZUsXG1TEDPIrupjwt4JJWS J07A== 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:openpgp:from:references:cc:to:subject; bh=W1pvkDm/bRbn3kdRoJ6Q6xczs+3XdUKsiWuExVkhMuM=; b=fo0EpRFDdzF9CiYxOf2PNWxS2zHYSDJzpuG8GovtSK6kiKEFL8yiYHtnF7TXvSG5K/ ZCBl+OluEHFZMgwWhhQCzmX7jpoX0ErY74hGAsNWiUNxTR4bBU5uBZ9hLwvzGeHu7/9a HOkMZYUwd/zGbBw+SCk0ApCfvhATLcCOsPOzAD8oU6t52+oSZyNkISKYJudrFBxl08JG p7LRMP+BQWbg3Ok7nYxRWMtOx78nWX/ydOn/AnMgR3naIoOrQtS6y5Z139FcuV9taND6 cp+xMLG3c5lcYqdSAIRhMUQ8y4TO79xdJbmRBpOT2glztu4VXNhl1NbXuVOK4lZLr36m mc5A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f31si8146910edf.75.2019.11.04.14.29.25; Mon, 04 Nov 2019 14:29:47 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387416AbfKDVt3 (ORCPT + 99 others); Mon, 4 Nov 2019 16:49:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18173 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387417AbfKDVt3 (ORCPT ); Mon, 4 Nov 2019 16:49:29 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60D4E368FF for ; Mon, 4 Nov 2019 21:49:28 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id b10so6689260wmh.6 for ; Mon, 04 Nov 2019 13:49:28 -0800 (PST) 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:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=W1pvkDm/bRbn3kdRoJ6Q6xczs+3XdUKsiWuExVkhMuM=; b=WRV77sePoBKhrHGQ8iUcYNPBw91ajmjWL/0eCPvMnkC6sVvjb2/JIBSPwLjqlMz2nm v5Hbbzzo+bMwoHVGebzybEAHs5IEmTU74QRLnjj3GzzvuCq76TCgKnd6PspAC+9aGKGT XfLu/hjeaYeSnByTKBekK+haK3f4SX1h722OZsDn4j7kCp0UhKwNw+xb4tS6BKdXowUH 7rX81JIra4XI0JAokSEMoT/g33Puy92s+y3h9bp+YlOXhJxRN8fLJqoN8KjDVpwYnMNQ wvZUZbyTdIN127/yjH7UPp1PaKnB6YZ2yuaSrdOMscotQCaQDLaQb+mTwH+Db2lNTGmo VmCw== X-Gm-Message-State: APjAAAX+ZEFtgrN0lfOxk9kkwQeByJtBnpeN9aACwb1V+ApGkaSGzfj1 YFVPIHYlveurNZEzpz/1Pg+JOfSbscRPmoSjHc3VRE3jGWBY7yBwSASlakISZhdVq6ae4Zy9V1C wbl5AoryTH8aIv4dtwvJMvKr1 X-Received: by 2002:a05:6000:14a:: with SMTP id r10mr24262369wrx.310.1572904166935; Mon, 04 Nov 2019 13:49:26 -0800 (PST) X-Received: by 2002:a05:6000:14a:: with SMTP id r10mr24262343wrx.310.1572904166588; Mon, 04 Nov 2019 13:49:26 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:4051:461:136e:3f74? ([2001:b07:6468:f312:4051:461:136e:3f74]) by smtp.gmail.com with ESMTPSA id p15sm15682395wmb.10.2019.11.04.13.49.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2019 13:49:26 -0800 (PST) Subject: Re: [PATCH v4 13/17] kvm: i8254: Deactivate APICv when using in-kernel PIT re-injection mode. To: "Suthikulpanit, Suravee" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" Cc: "rkrcmar@redhat.com" , "joro@8bytes.org" , "vkuznets@redhat.com" , "rkagan@virtuozzo.com" , "graf@amazon.com" , "jschoenh@amazon.de" , "karahmed@amazon.de" , "rimasluk@amazon.com" , "Grimm, Jon" References: <1572648072-84536-1-git-send-email-suravee.suthikulpanit@amd.com> <1572648072-84536-14-git-send-email-suravee.suthikulpanit@amd.com> <70fb2b49-2198-bde4-a38b-f37bc8bc9847@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <4e4bd2c3-50c4-b23e-2924-728a37a5f157@redhat.com> Date: Mon, 4 Nov 2019 22:49:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.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 04/11/19 19:54, Suthikulpanit, Suravee wrote: > I see you point. > >> We can work around it by adding a global mask of inhibit reasons that >> apply to the vendor, and initializing it as soon as possible in vmx.c/svm.c. >> >> Then kvm_request_apicv_update can ignore reasons that the vendor doesn't >> care about. > > What about we enhance the pre_update_apivc_exec_ctrl() to also return > success/fail. In here, the vendor specific code can decide to update > APICv state or not. That works for me, too. Something like return false for deactivate and true for activate. Paolo