Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2399552rda; Wed, 25 Oct 2023 01:16:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNhmX/8G4ZfaTy9/MK/58nlLwl7lksgbrefKW+W3oKYAYYaoNGKmBdLHWGKe56eZXTsKuK X-Received: by 2002:a05:690c:f8d:b0:589:c065:b419 with SMTP id df13-20020a05690c0f8d00b00589c065b419mr18287531ywb.34.1698221773116; Wed, 25 Oct 2023 01:16:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698221773; cv=pass; d=google.com; s=arc-20160816; b=FCJSbq4kVUXCUZN1ZkkfGok8Honc2eo1YCeoPHRByI88riyA5kZ7y6HKpYowC6zRTk xPOFuvn87bymuX+4+M3R0ZZFXQLL0IArJXW0eE98q2E93DXPB8vmtiloO9oLU+8RHEdK i5pMwgRmiI9/MTrxLU4pcrTQPmiHVqmyhGJzDm363mU+RsqKlOlH5TF6iJqn9FSEWGuy vwAoHSs/11BGfYYm8vkDDtEWMhoKhRT61g5rgUH7cwnLkEpA7hSqawjmEfkm5Ahw5uz+ nbxyHqs3WsBHjV3ZiizXjXPRqLiCpXRBqY/Gz4ltL5FNXEA++qhHFI09bA1NldjMhOmc LkDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=+b0B7Seqfyl5vpzeNCdYTRKsfZk3Mtgi/w4fOS8CYLc=; fh=sbLFOiGmwjC1GQo3/USHlIH9w72FZxwrmGmAi9Xjeuk=; b=M/EXP34/rB/ipCJz0+6/XZQglc5hzqYpO/Qn0QxdX5WvMMbd9Qj7RDxEe8fhi0XCSB fhSpEuWM99fr0KI6jj8UwlAhU7b8+qbLQK6i7teSWwjLSHgjt8XbYni/apXuoy3vn8xq Y1jBKXULCWkzvSAk+Ok/2iGlWapOX+GSZf4amDJPzrSrKYXj3JTw8gx79lUVHdvp1uRa Ck6NGeQu2Jjj+lIF/dcUi4FPXxKKQJFa61Gkf1REmkN2R80QF3XR+yuuz/FQ6xqst0za A7ABfVA4sPp6AtCcBbNBdVLxb96LOSgpLxRamcH/aUtip8o5gdkLESanFKF39V5CSMAB rZpg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=BzX16RNG; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q67-20020a818046000000b0059be7cfde94si10785413ywf.219.2023.10.25.01.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 01:16:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=BzX16RNG; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 68083807502D; Wed, 25 Oct 2023 01:15:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233798AbjJYIP3 (ORCPT + 99 others); Wed, 25 Oct 2023 04:15:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232691AbjJYIP1 (ORCPT ); Wed, 25 Oct 2023 04:15:27 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2072.outbound.protection.outlook.com [40.107.21.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76830B0; Wed, 25 Oct 2023 01:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BrRHWhwH9yPESPu7dTXNMnUP18JmbOtRg/Jv5WCL26gGT7cjQ7l9L7R55qUus2ymDpjhZRE+gR9ORJMktvjdLIM7ozhuRxb2czOd4l1+xZiSdVBF9FbiPiHfnBAb5U/E3uJ6IpWdnE/qNQGlCfWuyrQz+4FIHNQJAXgzAYIJGe9paACDLJNOUcqCltygXyu58vObeisGbIPH18+Y+rnTwAZ/SFicyJ3F6ugDqHvSfHomdeie76UVN66+avYUBGxuIkHS8RSex7lBnHE+qgOl4T1PYFmjNThuQR9bYfgcXZ1TIwewoNx+igkWpOykVd8sRPK8Fm5nTEqgu4vSThdmnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+b0B7Seqfyl5vpzeNCdYTRKsfZk3Mtgi/w4fOS8CYLc=; b=hJF/9SPg0nzsEulymvOfG64N4fNdhBYOFRI5humeWI8cStp+uEMbaslNhJCbJXiOzFgKIpnEoACjt105X81sL53cDdX3BNPinGbkmwFN6fDyspAh16T8i/uNcHedeJSHNR1+iFuHWBGQ+lpe/EM2ugLH3dLNoViYLQAtn9ZLSFLvSNkfCFD1z/bqdg52DH7p4XDdAkBuvdwtxEAE5W2fLrr1AOUD6+BrslQOyWkqS9rSnAfkasjoeIiK5nT/IfN1YDAFT8WzwLQckNakL6wDcEdCgZ5yEjH0uPT+NVVkv3FU+TUXTSb4OHzUZl+EmoSeAvH7VtPWKiUinpM4Xj4kUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+b0B7Seqfyl5vpzeNCdYTRKsfZk3Mtgi/w4fOS8CYLc=; b=BzX16RNGUM41bDVGkWi1L4fnIvaQOUH+B6cdOxlWvUYZ7u+3qXeYcetpcRr8BnKy0j4Ihqz1poQtzdvUy6PLmGMSWHcLWSipUG9HrpvMXYanJr56M9shotlJiXs903g/XN7Fx2Q7opEH7gXnkaK6xAyLd5Wn7Dl2ozIcToH9RexaEEm6J3iuXc4heYv6zSQI9uQvgS+IEcb7K6QEcdTfqUDqTh13kNM+zOQXPAYqj7Dd+mhx65uXTDNIFRejXei0kegMYXlYeTn7VFoePnHwGY/LzKb+Cu5aTMyiCidoI5D/u381+FxcfZxTVM3YyHJOBKMf31E4TuhjDVu7wUKGCA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from PA4PR04MB7790.eurprd04.prod.outlook.com (2603:10a6:102:cc::8) by AM7PR04MB6856.eurprd04.prod.outlook.com (2603:10a6:20b:108::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.11; Wed, 25 Oct 2023 08:15:21 +0000 Received: from PA4PR04MB7790.eurprd04.prod.outlook.com ([fe80::6bbb:37c3:40c4:9780]) by PA4PR04MB7790.eurprd04.prod.outlook.com ([fe80::6bbb:37c3:40c4:9780%4]) with mapi id 15.20.6933.019; Wed, 25 Oct 2023 08:15:21 +0000 Message-ID: Date: Wed, 25 Oct 2023 11:15:15 +0300 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/6] KVM: VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH Content-Language: en-US To: Pawan Gupta , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Andy Lutomirski , Jonathan Corbet , Sean Christopherson , Paolo Bonzini , tony.luck@intel.com, ak@linux.intel.com, tim.c.chen@linux.intel.com Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Alyssa Milburn , Daniel Sneddon , antonio.gomez.iglesias@linux.intel.com References: <20231024-delay-verw-v2-0-f1881340c807@linux.intel.com> <20231024-delay-verw-v2-5-f1881340c807@linux.intel.com> From: Nikolay Borisov In-Reply-To: <20231024-delay-verw-v2-5-f1881340c807@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: ZR2P278CA0079.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::18) To PA4PR04MB7790.eurprd04.prod.outlook.com (2603:10a6:102:cc::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR04MB7790:EE_|AM7PR04MB6856:EE_ X-MS-Office365-Filtering-Correlation-Id: 83d0c1e3-752c-43cf-0667-08dbd5328803 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jfkkzH2+hCZJ3H7z62qLqIWczlX3ThgktjpqRNq4FnbPjVT5shATHxQRr0lJ0R/H0XI5JBD6BZKEnQzqNptfwuHiJ/nWTSgUXduwrX2tnhvVYqXRY7+5GsEDldPU67BlnOOkh3Kg35frOryi2AESLq7qxcCI4vvbDcZ1c7KFOSE/PEACb/3Acf4MwlTQfaNyktvw3KFVj11HZT79z8g4ITb2U3nGxiVFn7xDejKJz2+rfUsNddkYQuTb6nIYrCgArvqvLAcg8Q5Mux/op3XqqalCh1f+QWzcchqfD8a2rPME8gvuE3ic41w42BO6wYT/RKfPIV6G7U0J3V9Ab5oqaOwu6uWEfKBF74VXtV0Rfz4fpDkWgIpS8SHDNergf4reQnb6yRqLCXI89A7Lz92QnAsBG8iZjtJjqb0NQUz5DxhY3v8vWNpJFZ3KG2JvOx5CRaAKK1QnnBdhPlRFKPl2yQ2Bj++H8KmAWSsBBHH6Yt9gPvut4yb5i/5aTq2vnFmT32ygN6fu+Cfa0w/PqRbuZHNntB5I2jjJ5sQBaA1bCqBwtTKVeX9PDfarO9hUaVdVG9h8CQyuUFBpP/Zv9dP4Wl7KaCJeESCVuCRcEPglMlpMZwVhgExbW4k+PcAKb2ORelVfGXT+goAPYv+ckdk0u7ZNdVCTM4tlSwb434LsF6A= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR04MB7790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(376002)(396003)(366004)(39860400002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(66476007)(6512007)(6506007)(6666004)(2616005)(7416002)(2906002)(4326008)(8676002)(8936002)(6486002)(478600001)(41300700001)(4744005)(5660300002)(54906003)(66946007)(316002)(86362001)(66556008)(110136005)(31696002)(38100700002)(36756003)(921008)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bVVabWJlTUg1ZUZoUmtvdmtBd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-8?B?WnBIL2NXa0JxbDRnaTRZUE5MYmY4NllFbVB3Mld5RDZuZ0dleEtCREUyZExM?= =?utf-8?B?QzIycXdDT0xjVXVMMmhnTlFCUlAwcEs5eHFGcHgwS0pMck5zM0lWbG5WSjBw?= =?utf-8?B?RmR0UEpZMnF6d0ttOHBsWjNjQlJLS0xZYWxldnBXVHhPVmtkc1RZUHlvZUll?= =?utf-8?B?dlEzWjVickxyTjc2Z2lYM3JXMUZLWFFDejVFYzBzZjdTcjBVczdGNkU3TUY2?= =?utf-8?B?b3FDY1JQdlRkUmlscG9vZ1M3OVV0TkltdysrMDNQdlp2bGxkWTR4cC8xNXBN?= =?utf-8?B?ZDFVVmtjeUJNZmZucU9LWFV4NmY3ekVpSUtRR0lVVTdEY3lUUzQyUzdabkNO?= =?utf-8?Q?UH9aXA+URj2MDfUv0+WDzVMxKHQT87dE3WUT3zcFU821?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83d0c1e3-752c-43cf-0667-08dbd5328803 X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB7790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2023 08:15:21.2527 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3YPX/0FHnvGeHG+Iw4KLmUgU/GGgEd9kllqnHXINMFTwGjjEidzTClBUobN2YRVI7qC/gWWaUIXAzGIi1WXa0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6856 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 01:15:42 -0700 (PDT) On 24.10.23 г. 11:08 ч., Pawan Gupta wrote: > From: Sean Christopherson > > Use EFLAGS.CF instead of EFLAGS.ZF to track whether to use VMRESUME versus > VMLAUNCH. Freeing up EFLAGS.ZF will allow doing VERW, which clobbers ZF, > for MDS mitigations as late as possible without needing to duplicate VERW > for both paths. > > Signed-off-by: Sean Christopherson > Signed-off-by: Pawan Gupta Reviewed-by: Nikolay Borisov