Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp865843imm; Fri, 29 Jun 2018 07:39:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIV5a6XODUqJWTrZXVPOYedTvWDiuOEiwFou0r4xdOESMHMysdTvUHcWbgXugdrXhhtLp+9 X-Received: by 2002:a63:8648:: with SMTP id x69-v6mr12961627pgd.172.1530283185578; Fri, 29 Jun 2018 07:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530283185; cv=none; d=google.com; s=arc-20160816; b=cqgGiScHrQKsamZbulzEufnbX1yW/nJx+TPGyQUI7y2H8c7Hu8eHWUWN3H6dLygO91 ghF87L8uFJ8+d4ac1n1CD1vm+rgxZeT250CqHk2+sxvPBHVu9RW3PLaeLz2FsFL0Hlvv 2JXgE3+2hA3y74qY6ytfJaZMSSWEE9b8fW1KHly9df6x1ppqcbWa1ADvUtL5Z3N0lmwC x6CTzomD16Eihbm87O+0m2QuGbpK2tt5c1KfQFNziKdIz9AmU8Qbher921gIfFpQwMv3 NoMoiJ1C8VrB69jfhoTSy+gPTjaPdlDA7+GiDSfNbpeSR7EPbbnMqZJkCp9HwCvbHNEL 4uIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticoutput:user-agent :in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=dTg2bxmtUGIxdF5vzLWhcJj+4EJrB1o3wKzfijy5RKU=; b=UxYTYjPpa8HgCfL2WfcEcgpL5MChcmk/MAGWHj2dEd0+Z7L3s3g8UThckoDPj+K2lI MVefanT/zVGPs4zJvdRQyryi1XmbzwNla5BTK2nqmCaDNFwRtYdi/sie+gnXtj30CyFC /6GnvGMJ878GVGy4ACP1f53n3QR6Pup/ErrGjnNZnDjYiYoAP9Yp5cQVrQKo8pFZfZsh HyehSKGsVMs0TfRUcc5Op5y/pwjj+Vq9PIV+rmiOxWUt2pjXB/yBS4JKmNhIeurLZQ2W Ufw+y2LCxMwkuZSOCQgpboVMVZqsDF1V4tvIzuMoPk+oCLkQmqCEnwQffR6rkNMLpqou eLzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=GifF1fA+; 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=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14-v6si8945681pll.324.2018.06.29.07.39.31; Fri, 29 Jun 2018 07:39:45 -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=@virtuozzo.com header.s=selector1 header.b=GifF1fA+; 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=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936324AbeF2Och (ORCPT + 99 others); Fri, 29 Jun 2018 10:32:37 -0400 Received: from mail-he1eur02hn0213.outbound.protection.outlook.com ([104.47.5.213]:56000 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752883AbeF2Oce (ORCPT ); Fri, 29 Jun 2018 10:32:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dTg2bxmtUGIxdF5vzLWhcJj+4EJrB1o3wKzfijy5RKU=; b=GifF1fA+xp46X4seypcUkCgnDcn5/jZqwpmtEAPYHzTyiIM5pz6DPz8QS5C7qe0L9LlYoXb+cEndv6a72vN7YWK9n5KA3bkn6nKSEJO3AaDY4+kLQOFsR285Ap2CKGTnONNvTuhwT7JAD3CSfnsZ54EdiO3Lj6TPJvK6f9Y8qZk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; Received: from rkaganb.sw.ru (185.231.240.5) by HE1PR0801MB1980.eurprd08.prod.outlook.com (2603:10a6:3:4f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.24; Fri, 29 Jun 2018 14:32:19 +0000 Date: Fri, 29 Jun 2018 17:32:13 +0300 From: Roman Kagan To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, x86@kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Wanpeng Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/5] KVM: x86: hyperv: introduce vp_index_to_vcpu_idx mapping Message-ID: <20180629143212.GD15656@rkaganb.sw.ru> Mail-Followup-To: Roman Kagan , Vitaly Kuznetsov , kvm@vger.kernel.org, x86@kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Wanpeng Li , linux-kernel@vger.kernel.org References: <20180628135313.17468-1-vkuznets@redhat.com> <20180628135313.17468-3-vkuznets@redhat.com> <20180629101134.GA15656@rkaganb.sw.ru> <87y3exdh2o.fsf@vitty.brq.redhat.com> <20180629111227.GB15656@rkaganb.sw.ru> <87tvplddrr.fsf@vitty.brq.redhat.com> <20180629125216.GC15656@rkaganb.sw.ru> <87h8lld9hl.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h8lld9hl.fsf@vitty.brq.redhat.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR0202CA0034.eurprd02.prod.outlook.com (2603:10a6:803:14::47) To HE1PR0801MB1980.eurprd08.prod.outlook.com (2603:10a6:3:4f::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23b16cb0-04e7-41a0-b010-08d5ddcd1fa5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(2017052603328)(7153060)(7193020);SRVR:HE1PR0801MB1980; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1980;3:mfszbOXFHlKsA3yOk95A59Usnbp9Y3cF3hCa+8EBvvci/u9PESIi0eYVC/tn+G0pKXs+13xmqva0kaFRw/R3/YxG0yzJhpIF9LdmU73dIYfw9g9rVr9zSX6dtCZiqnXtnAWA8KXrrsPSzQIKLvAsyQU0FXq9R5Ne3EOK786zO4i3zVHPRKuNscL5fKkH5X71gE0mrnzEu/LqR1ty0G8mzQ8x0iMJ6JP8mMqoFMlh0u9mVBEhgGI/uzjZ2fe66pJu;25:FZl76JinbI60kvpwRkiytYCporUXf6SsjUARbY9EhVMl+sNBqGz+Dx7f0zGyOKMTWN2l/DYPLuMMAVDejJcTkMeRDncgGeY0uEkbUais4ZfZKJe2W4EBuSgX95Nfr97PWvHl2KpXi0IKZhWwO3j7ds1zVVp2N2Al56zYvAt0Vt2Um1uwhnrNXQI/1nbGPYpVm//gGabKEggmhiqLwPgqApDyi59s46LHarHBWzQsZF7NlLNsZqtg4K3s7/SnCmH+ZQgxu23H3YfLxBcDiMweid0oPU9LSM2X3SiJNcfUOm57GPsYA0Zk+MAgXbCKaRmvQVw67JHvKfeypgyP/7BebQ==;31:OML6Of6e0Vm6ffWb8LrEcf4hxah4kaOEJstVMBjLFtVTKpWxKLoMUf0S29+DaMlfBw7R8e3t2BeM0rrNPXdevwdMB94yh5CJjlkFJY1/AZBVD3twdF6ucP44HyORxGEpQBzVGV5369Som2k6RTIqMP66zAEMkHF8EsBIo4G09LRHyMW1W/K/dd5D+AMO795RqSRLp1vv8R9+KXwqb9ZJa5F58RPpkzjYgKp4KtuPXBE= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1980:|HE1PR0801MB1980: X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1980;20:FjkDfftfH9KSx253u3AEP1X6BaVk95gLjKQG+SK7xk3LOSLOxY/PImyA/N+uhZgTFxr7PYYRg3yqIvjWvG8JSe45hXeIKhkoilgVeAnRXJ+9fZy5br9N7nEoRu04JrXsjM2Ow/RcrKauaX5JZC86LZ+nKqSTnisHHeh8WZBeMoIFfXSkkaUNAG8JCKULPC9a/QqlovheTe+7tYWRYHP49gcCKhllkBUQROEGKHydFBGyqZlZa+0ucwuMMMOd894s8l8GoxDfIy2KzEtEShNm/vIZEsBFldjs1EWNj6uultvR0MKduU+9Bx/JcRRcrtjOroHISO2hjn8h7glcqLM60GLzDDlcJLzr1seMcXEFFsONRm8+YGf2t34XZHLrLtBo/6nE3MbFWsbeV/d+LByWiX28PTeA8S/XBNxI/+j2RHWNDa6Yo+1dpepMD/khEJHYEVgvkbIB9+g01tXRw7jXpOSjaeQ65zZl5lXlJlXOby98zUSUR4TfbCnRrBM71x1R;4:IfnCqo9edJwxSHDTyQhoC2DbpFyxC2TRy7dG7AMY6RN941qhgdM4KUkJcIIwmC8gzolQnJxh0XPMopMIhHypIcoY6J++8CyywaXZurZszaCvEagFxpzFbeQRrPyYhIeVtKGokYDs+UTLDAAKboEn4fscf/Dsz3uri4F1nQwf3m4FjA6H/EhzmFjsEk8fu4W79bHlvv8DVoTn9shrYd/5oaF8fdI6K69Yl6MSyLYSdmkgk5hh9AtHRSwCJLgueIgGHWGolo4FQDnrRrrYlgvzBA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:HE1PR0801MB1980;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB1980; X-Forefront-PRVS: 0718908305 X-Forefront-Antispam-Report: SFV:SPM;SFS:(10019020)(39850400004)(366004)(376002)(136003)(346002)(396003)(199004)(189003)(6246003)(6916009)(486006)(956004)(11346002)(6666003)(39060400002)(7736002)(66066001)(476003)(3846002)(6116002)(47776003)(446003)(55016002)(76176011)(7696005)(6506007)(52116002)(23726003)(386003)(33656002)(305945005)(69596002)(1076002)(229853002)(97736004)(26005)(105586002)(54906003)(16586007)(16526019)(106356001)(53936002)(7416002)(58126008)(68736007)(478600001)(8676002)(2906002)(5660300001)(36756003)(53416004)(186003)(14444005)(50466002)(8936002)(81166006)(4326008)(25786009)(316002)(81156014)(9686003)(93886005)(86362001)(30126002);DIR:OUT;SFP:1501;SCL:5;SRVR:HE1PR0801MB1980;H:rkaganb.sw.ru;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HE1PR0801MB1980;23:jIbHyP1WvrKju3fFzvekwGEM+WG4tVVE9JtuHvy?= =?us-ascii?Q?NRaPvVphsIO9ZpkcI1b8Vbi8v+RJ59bv7J9D6RC+RlxT74pUhXGzfUPdIAIW?= =?us-ascii?Q?OWao+u4yCKhNfo1FkV0Kf7Dx67j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W7BYZgX2IrQbfBXgA9mIf/JZikTN2baZtGUwJXroaOMjZy2HeUkHjLzAg834/RXQOAVEGZREfE+hxs/JRzIJAV2jLf9PPZ0QWCe1doPNwERmH7TBijACQ2coeL9ypkAw3qjaTvIpT0WtIRIH1pqyTb3e7VbozBQFcs9ajdAK1DHJbm8pf/7W/onaXQ85xh0JCy5xvkqysi/s8aY2DJtf8vzq;20:3hw6Gl2U3A7bLQy7TJM8NZcEBg+SwzFG8UdH5oq6Um1kxDiwNl0E1LNTKQsm6Mgt+S/jvvjKee5nC7EpHbYMKKMVcz4mWjqNPp4kv83Ig/MGz7/u9/5rVLR01CvrZQNI/Z9Y7qA9I2xRUUo+c/yxIIUwzXZ+56lN1m//0FqSjJQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2018 14:32:19.6310 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23b16cb0-04e7-41a0-b010-08d5ddcd1fa5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1980 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 03:10:14PM +0200, Vitaly Kuznetsov wrote: > Roman Kagan writes: > > > On Fri, Jun 29, 2018 at 01:37:44PM +0200, Vitaly Kuznetsov wrote: > >> The problem we're trying to solve here is: with PV TLB flush and IPI we > >> need to walk through the supplied list of VP_INDEXes and get VCPU > >> ids. Usually they match. But in case they don't [...] > > > > Why wouldn't they *in practice*? Only if the userspace wanted to be > > funny and assigned VP_INDEXes randomly? I'm not sure we need to > > optimize for this case. > > Can someone please remind me why we allow userspace to change it in the > first place? I can ;) We used not to, and reported KVM's vcpu index as the VP_INDEX. However, later we realized that VP_INDEX needed to be persistent across migrations and otherwise also known to userspace. Relying on the kernel to always initialize its indices in the same order was unacceptable, and we came up with no better way of synchronizing VP_INDEX between the userspace and the kernel than to let the former to set it explicitly. However, this is basically a future-proofing feature; in practice, both QEMU and KVM initialize their indices in the same order. Roman.