From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6470DC433DB for ; Mon, 4 Jan 2021 17:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2480820700 for ; Mon, 4 Jan 2021 17:52:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727799AbhADRwS (ORCPT ); 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-Google-Smtp-Source: ABdhPJzwhWcj4/2hOH3p5+AnFtCBEv1VKsACzYx5d2Pg+R8scgY1DHbRQL0PAgven2/ITKBXm+uRyw== 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