Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbdINPXz (ORCPT ); Thu, 14 Sep 2017 11:23:55 -0400 Received: from mail-sn1nam01on0046.outbound.protection.outlook.com ([104.47.32.46]:12371 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751131AbdINPXw (ORCPT ); Thu, 14 Sep 2017 11:23:52 -0400 Subject: Re: [PATCH v2 3/3] KVM: SVM: Add irqchip_split() checks before enabling AVIC To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1505230962-86304-1-git-send-email-suravee.suthikulpanit@amd.com> <1505230962-86304-4-git-send-email-suravee.suthikulpanit@amd.com> <20170914152031.GA23415@flask> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, joro@8bytes.org From: Suravee Suthikulpanit Message-ID: <3603043c-964f-d10c-8cc0-fa3476e3bbb5@amd.com> Date: Thu, 14 Sep 2017 08:23:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170914152031.GA23415@flask> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [12.238.188.253] X-ClientProxiedBy: MWHPR10CA0021.namprd10.prod.outlook.com (10.172.48.31) To DM5PR12MB1737.namprd12.prod.outlook.com (10.175.89.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3d55d20-c2b4-4d87-38db-08d4fb8499a0 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM5PR12MB1737; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1737;3:JovF6mAuXT5rfNh9ayCP0bB9+k5MLKs82hMpG2h4m4PPlbu1RsSlIWhn0AZ2aFxZo4dkptJOfIb32wX3bmQ0KfAH2T5DIbPpNUNzbd43nexD23aleTfbHbL3CpglAnkYymqmpE0/4bKA1NhuCeZoSXeTb5rf94EYW8WLuDS7MraApbqD/3uRsDaBIqYSmmv37DSK8T9n5sw7fPlQNicylQnsRsckvo1LBbN1KVqjelWdPOiaK9qJnUMkV4F1WRFd;25:tRCSKPcuwPn5/JpVFOFRMdaNhQb6XU/YZh0dVRnUlAy+GvSWHOunKaiOIrsSMD+6cw9bzms0zI5aD/cHP4+rAPWkYNQK7D0FWQaew1+kiCIIxSma9ZuQL1nbjbtyYYOgE9PEGRziwwvP4wPdKx9tAKMmzNadgDWAka7UK2ouT5L/XG8DZZphrERREzE+wnt671r/IOsiQgioDoWGSVEGkYyNaynY779arBhPUEP9y/qGLQCs8Wm+uQ3jtQKSCe8ew1QH28bTqK+vbI4MF2GMHMt3ernHUE7XSk4deC7oN9kfcXyfQFGU2WxZ6tJ15nY+EIzncyNSVqWGkuXJVxBywA==;31:Y8M/IoBXomdacesPUV9Tw4q9Wd9x9pEdPNZUZE5g08ovAcctXJa5mm4OsSewd/qMHqtnKvVSlZLCFnVXxUb/m5g92nO0ScNRUvd1QDoAbtmcBwpm0KyF9sMNAks8NL/UBnPsCARIK6xiDqwTvkS4Fx4X+tkih23joHroGeBu9Um1LrNBf777ZNmkVmgq9LmEz3E1C8WBO7I2BfITXm6JwRyMcN28d4KGE9MkFySNLoQ= X-MS-TrafficTypeDiagnostic: DM5PR12MB1737: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1737;20:eVFrr5SRHSnBArnWEEItwYOjOmMj6vF2xtwurjkiX1rqUscm7Afv7X/m/jlAnxjKoyxRM+GTkFP2tZNOuCqnzF/pw8Uxjm9e15k9FPiyAVVwd+hRLwkfacP9osiajbsFhfrzSGibmUowpP5EY7xfZ4zKGU6v4sX+3Yl61fORYMwW/zHiB5fSjHM6ss/m2gWrO0Aiz5g932EUr5fB4k5aM8fSBRfHtXqPKo6nZg/LedSK9/OAB3eplFP9YalRK2/0Rt0dRx9tDqyvgzE6GpGgOhbH2z75O8+qczSAihOvaNGnrOsF1PwijQRrOONC6SjpKd3orqW3DeL8abyxzfbZ6J4nZIY0CbaNUizBLgpUwMCx0cjJ+KGDHRrwiPAwl1R0lUFYuQofPZinYRy6xmPbHSfWRr0FYi8DZo8IoOSro5CTQP9WY/8MdZSoPlgTSpLcYOE9RBwlOOyHBFOg5j9/ty4PV095CRnQCGbVD7FbCfcZuKyo1R9xmAiizKwdKmyo;4:kKiDlbDB2bWUnKmXezPo1kU8paEOzmElyjAf8AHh834RqcavA5fECRUD96MyfiH1YVAl/EI2AIm0LVActrpuYefCYaCKTCKfV2ZihF2V1HcC/umQfMN1QBCJisokxC9RBl1bvxb9y53bQCf4x8LBfF3ujkfE3QDwL1kBTt1YTMZWlMRhiEXD0fOpN83vsd8lmutPvPtpmXebcCrqEyt0Vm8TNXMyoYr5V1W4cJ91Q/Mdc98WrNdiXUaVmDcCOIL+ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR12MB1737;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR12MB1737; X-Forefront-PRVS: 0430FA5CB7 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(346002)(39860400002)(376002)(199003)(24454002)(189002)(110136004)(86362001)(50466002)(76176999)(50986999)(31696002)(6512007)(7736002)(23676002)(229853002)(305945005)(54356999)(8936002)(25786009)(81166006)(4326008)(81156014)(47776003)(68736007)(8676002)(31686004)(36756003)(16526017)(189998001)(2906002)(105586002)(4001350100001)(478600001)(6486002)(33646002)(53546010)(5660300001)(6506006)(65826007)(53936002)(106356001)(66066001)(65956001)(65806001)(2870700001)(97736004)(6246003)(6116002)(316002)(72206003)(64126003)(2950100002)(101416001)(6916009)(83506001)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1737;H:Suravees-MacBook-Pro.local;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxNzM3OzIzOlF6U0VhMjVCaUVwbEFDdkJlaHl2RjdWdlpF?= =?utf-8?B?QnNPdGRMOUQyNzdsbk41eXFLTUNWZXlYbFBPaHdJcXJYRU9sTi9Wa2dzQ3dp?= =?utf-8?B?ek11c3J1U0hsTkxyVWpDTzR2MmlkTW9nTm0vVFBFbXlLNTVPYkN5dTAyNExk?= =?utf-8?B?TXAwKzVUZDNUKzR3cUJ2YXQvajFLWWZIK3JmajN6cEZyczBtVWc0RFlqb24x?= =?utf-8?B?WjE4SWh3RlVTSnkwVnVZNFVaWGtjMUZWUFlqRzcwWTZFLzR1aFd1ZCtrbEhs?= =?utf-8?B?akp3eksrVG4zUzJpQUxqVjhJUHRqaFA2ZG5sSVVJRTlhUmp1YzRkR3kyZDFY?= =?utf-8?B?S1V1KzdaOGEwSUJmdTVrbWdPUCs4bTIvWXNwcGZqdFJkbEk2aDZBVkZGYm1C?= =?utf-8?B?eEFYL2UxbnJq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5zTiV9t8LJQ8a2kOdefo9foRyz4/x8HUlCzbIJGvdw06IMa1wNLplg/gelZwmK7Gj2uOBYibkC0Rhd5X7tIzKdeFvMXF6lQ2gkHujEUeOAt4qjEdglgg==;24:RPXHXxQ9tHpVtjkuLz3ZoLRIjJUKoIHUKm1KjGfAg/5z5zdZO4MDzdRgvFId6QrBvRSWIKAW10jrywfmDfz109rsTKxD2ii9hef7ynNIZ0M=;7:0ug+FRc85i8XxPYhvCvwEYZ2FWTIzrO3oi13cXqG6rL1Ewu/ytSaY8ZjIUaoGceQS/nj9BMc8U2WCHGgXkVGUumOj3SaudGwUZC3tnIOrvT08+ZXy6XnzyM2eppO9LXG+bN5T3vqSQHN0QStp19XCNVynCHLgyAuozpdOxUpwfTC2RvuW7x8sjkv+RdCE9bzdSPv8mLNBPavzMiMHavJXkiq+THymPAxsUw34yFLhBY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1737;20:0G8pbSQWp243axWBo2cPri/TDk7CAP5OBN039hklTP2Zu6sQ1ae6rBRz/R0qEOLlnb8dGJKe6Pc+izEy7xZPl22r5paSrJkzEZn+8OApN+KSULoOrMfcDk8CFu3r3YDuFkqz7vvwxh9DBo2kmKUDKBuHYPP4GWfHKqlSmKi/wFfQ1dKPPhwTCFYFE4s6/MZcsl8RS7yAQdFeCEmsia7ARMW/XCYScbby66p27y0vfj2U7iCtNAlL/Ly7xtUxfQjH X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 15:23:49.2751 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1737 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 949 Lines: 35 Radim, On 9/14/17 08:20, Radim Krčmář wrote: >> @@ -1594,6 +1593,12 @@ static int avic_init_vcpu(struct vcpu_svm *svm) >> if (!avic) >> return 0; >> >> + if (!kvm_vcpu_apicv_active(&svm->vcpu)) { >> + pr_debug("%s: Disable AVIC due to non-split irqchip.\n", >> + __func__); > We need to have an extra condition just because of this print ... > I removed the print altogether when applying -- I thought more about > that and it was aimed at people who wonder why AVIC was suddenly > disabled and it's unlikely that they will enable a debug message without > already knowing the reason, Make sense. Thanks. > > thanks. > >> @@ -4388,7 +4393,7 @@ static void svm_set_virtual_x2apic_mode(struct kvm_vcpu *vcpu, bool set) >> >> static bool svm_get_enable_apicv(struct kvm_vcpu *vcpu) >> { > A close contender was pr_info_once() here: > > if (avic && !irqchip_split(vcpu->kvm)) > pr_info_once(...) > Looks good. Thanks, Suravee