Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13992242pxu; Mon, 4 Jan 2021 09:54:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcbIasVMRvrQLdLjwNqxdpDJ2BK2P7RmfyWlMq2neAjfdDwiCcyjIRL4kDocOigmlSJ8F6 X-Received: by 2002:aa7:cd15:: with SMTP id b21mr65909844edw.114.1609782882797; Mon, 04 Jan 2021 09:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609782882; cv=none; d=google.com; s=arc-20160816; b=fTxO5nAaNpFDHFjQfUnG55aRPVQOxpglLyoce2fLthAifbtRjsrHkYp1bfnDPeap+w Zq4hbAuNgyh0CJpWltgv9CQGmZi56kp3oI4ndwrb1mStWKKhqrTOaOHtvIO66RDHfRyb 0WF4AqalmN5fnANycXNJVXQVsUzFW9XsUEk7mQU9ZIiURif+qnPi+ToAXcaUTBee9wJF FzXb1oekaI3G1CGj6d+Zglm4H3tmKa0lvNuCuOg2ZzDbIZ7dThK8kT8n0g8qfn1HXciA YSSVbq2uT5qQhQ4CTkn8Ps5Le9C8vKbw8jW7Sc/5MYSRvYZMiOa0mVdxZR1uKq1b0D36 b0fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=EyPd+qpzU+/10OSeEC3y3BOPpK2qGL3ApwiEekrWJOI=; b=Vf48TS++G/3AHr3zII+106dU8Q9P+uPwGVJW1qm9G9URcO/yL2H8hEXyJSc54bOXTk BXry5tbhzRMWxxGvJ+GbnEzBZdboZuaz9Klh8BSB4EZ/nUog1ccyGEDrZOATSu5FpMlE 3Lx0/pnWJWbnalrtYwtd5e29c+VA4BZ55fGNPkQl8rPmGRVRaoxp8BVPjq6/Zj1oF8fj uTGMcdhSUyKTXn9ZV8tp3wpV0Cg+fLAA3OqCKnxCE2HHcXr6BupiLjblqkwjOoqhYShg LjMjP2JgfusOLTHrxXlHNOwgigRjVl7sbcD51T72SGkuNh8xt+ApBHv0+HW/H0FhM9tW j68Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ItvWawdp; 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 z7si31976961edx.473.2021.01.04.09.54.19; Mon, 04 Jan 2021 09:54:42 -0800 (PST) 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=ItvWawdp; 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 S1727780AbhADRwS (ORCPT + 99 others); Mon, 4 Jan 2021 12:52:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42096 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727696AbhADRwS (ORCPT ); Mon, 4 Jan 2021 12:52:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609782652; 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=EyPd+qpzU+/10OSeEC3y3BOPpK2qGL3ApwiEekrWJOI=; b=ItvWawdpsJBHolSGIhmfeeSJbjiKG2gteUH3n30hD8B9Cfkds0pXYH0QegZyGB7nbO1RfV 2pFDtwdksFAB0b823GRYzun59s/7Sb0TIL8wdYYSnfoj/CNyaqZlg19f1PyJjVpexkzQ1F ZGj5TSqUb6brSEbNXDR5BnJFgIF9CKY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-232-uXiYbQ41N5Sy3IKL4rtQGQ-1; Mon, 04 Jan 2021 12:50:50 -0500 X-MC-Unique: uXiYbQ41N5Sy3IKL4rtQGQ-1 Received: by mail-wm1-f72.google.com with SMTP id r5so10960467wma.2 for ; Mon, 04 Jan 2021 09:50:50 -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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EyPd+qpzU+/10OSeEC3y3BOPpK2qGL3ApwiEekrWJOI=; b=GoybyMSlO1Xa4JLsDpdsz7mPCROefo+Mk/808clL1aWYRHkuR/HuwCSk0mv4UDy5ZL wvkRUVnBQGuSAFZt8Ma740/3BdFacZ+3y2XNDi0+nHholXFC85Fp47p2kYTLv0fXAnYn B1TuHn8uftFY0CEmmUuio+4wzWh/lePX/3c0EoIvyJNYkEDuRcvAxIwwYWmtzExGMhqU d1Pmbdium8xBRkOo4wuJfQIk4+Fy3CIzXTjX+TqLUx0/+WBfg8noA9h9LFmJrp0gK2hN 7QByzMJY1EOqSZp7n6GpjZjLq/6Wc7SehWsTldSmyGLwV9Aisfb47Be1hiyYBtVh2v7I asxg== X-Gm-Message-State: AOAM532NDUhD0DojCn83hOmp1AC5/1umBL6+I2hyJPpr8i2/hsxml9K7 FXNfqbndSWtcdoNmvrqY3KnVKLR0ZcXbupYgDYqrM0xgCRaWZACZBKsxF86Dnpga1O28Xa68zy+ UfvthWRMNRhxgZ5ibgy+70Urp X-Received: by 2002:a5d:4112:: with SMTP id l18mr80442658wrp.116.1609782649358; Mon, 04 Jan 2021 09:50:49 -0800 (PST) X-Received: by 2002:a5d:4112:: with SMTP id l18mr80442648wrp.116.1609782649205; Mon, 04 Jan 2021 09:50:49 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id u205sm28871wme.42.2021.01.04.09.50.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jan 2021 09:50:48 -0800 (PST) Subject: Re: [PATCH v5 27/34] KVM: SVM: Add support for booting APs for an SEV-ES guest To: Tom Lendacky , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org Cc: Jim Mattson , Joerg Roedel , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Borislav Petkov , Ingo Molnar , Thomas Gleixner , Brijesh Singh References: <47d11ed1c1a48ab71858fc3cde766bf67a4612d1.1607620209.git.thomas.lendacky@amd.com> <8ed48a0f-d490-d74d-d10a-968b561a4f2e@redhat.com> <2fd11067-a04c-7ce6-3fe1-79a4658bdfe7@amd.com> <620a7760-2c4b-c8b9-51e1-8008bf29221d@amd.com> From: Paolo Bonzini Message-ID: <1433c219-ef19-aa19-7f5c-e872beff7356@redhat.com> Date: Mon, 4 Jan 2021 18:50:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/01/21 18:38, Tom Lendacky wrote: >> >> Paolo, is this something along the lines of what you were thinking, or am >> I off base? I created kvm_emulate_ap_reset_hold() to keep the code >> consolidated and remove the duplication, but can easily make those >> changes >> local to sev.c. I'd also like to rename SVM_VMGEXIT_AP_HLT_LOOP to >> SVM_VMGEXIT_AP_RESET_HOLD to more closely match the GHBC document, but >> that can be done later (if possible, since it is already part of the uapi >> include file). > > Paolo, a quick ping after the holidays as to whether this is the > approach you were thinking. I think there are a couple of places in > x86.c to update (vcpu_block() and kvm_arch_vcpu_ioctl_get_mpstate()), also. Yes, this is the basic idea. Paolo