From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) by mx.groups.io with SMTP id smtpd.web12.2331.1612407884999741432 for ; Wed, 03 Feb 2021 19:04:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=NBgyhYcU; spf=pass (domain: oracle.com, ip: 141.146.126.79, mailfrom: ankur.a.arora@oracle.com) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1142uktw057182; Thu, 4 Feb 2021 03:04:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=YdymAhyy4o6l6tj/fR+hMyyr4JW6L5mat/wLYMem3KA=; b=NBgyhYcUhyq/8DGHt8uybCg6seAp+wntevH0mfBxpX4/AgfD6oXunVWvCKo0Lth9TOiu 0D7PJahTgEyiNmOlYFgxM0tPSq5/xyNTS81jTEl3XOk83Hk7xWMAGE/0C4RCdQ/CXHP4 50CdGzSjYrhtiXlKLSC3k3GP35O3hzPRP/gcs+i2h3h4z4vUaMqzdmfN2DUGad4AhFj9 w3KAuUdhMpQNvbKFEQ+gpwSOrSLsJZpr0/vLj6dw9p0ilF6M8ZWQVvFHOChB+AErTs3D /Oly+pzNTF4XOyj5HjLrDBASj1cpVo6maRGKrjLASaiFZIYesfPmj3assq8unt1W2ysE vA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 36cvyb3bv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Feb 2021 03:04:41 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1142tdd0143491; Thu, 4 Feb 2021 03:04:40 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2058.outbound.protection.outlook.com [104.47.36.58]) by aserp3030.oracle.com with ESMTP id 36dh1rugn7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Feb 2021 03:04:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BQyHuJ7dPlBOwPXzXHIsvihuiH4tXPqMtF6Z4lm58T9fC3FRha7NCDdTAgpdH8MdJ6Oo449vt3oYxHIutGZVonk22jt9/BElmXrtW1SeK3qaNYrZsUt7fcDvoZjxlZYGKk5UZip50pBub9YBRH1gROftDN/yWTkS834Onmprs5DOhjIlpazWLmSHi4c6QNoslZK+pPrpWfgk6adA0QzksZOVzg9gAP/ccl6/8w1wvv1Ym5gM8EAIRFgM6gZlJce9ZdW2qAPyRORqJCYIiAoJNlgAX9KL76T1bXpSMSLRKJZQVe9PbTfdmXwLCLHddV6aHGYswXjSF8MIBEAfE/lK2Q== 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-SenderADCheck; bh=YdymAhyy4o6l6tj/fR+hMyyr4JW6L5mat/wLYMem3KA=; b=lmB9TYKzVhkEpjXZK0uHK3mNGG/OTZvrS59W9YAX0s4dsrUkHYinUWP81u1HtGO+J0HXNkRoxkVaEH8OS1U4ITxtCvCMNjZ2q1d9NkBuB8+/gsYeThd0UGOVkrZH5V0zmeFA/T9gN4Uu4dLyjBJUlZx9XB4WF9WoVeEiQq4cu6x6ysVFgeMVDXTFgMX0hXXZXIS8Xtv90WtFtwVW2n7DCJNlejpFNcuGQBhKvs5PNaYLjPEp3U8clDJ43Kvff7Q9ZL/WD0rvSiPBqyUYPXH8xKmY9+pqQJhlu96M1oChWJvhf7J+n5GGgLX/qSHFMGyoTinkQ5fSj2cVuSVziS0RiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YdymAhyy4o6l6tj/fR+hMyyr4JW6L5mat/wLYMem3KA=; b=NVGUXpbiOvgVbunHov6nP1CAx3qFAgwOeEDramxIAXiAVdsHecPJNxbCscy+DLuNSyLvTYxhFQT778CHKp3FQJONSIL2SxEvjlauRNRaYtEA93X44MXSmU3mgU8kjRC1QotJNAvP8g/mQ1pLide+e+ZOTbfIhIEgEx3jcMgoahc= Received: from SJ0PR10MB4605.namprd10.prod.outlook.com (2603:10b6:a03:2d9::24) by BYAPR10MB3607.namprd10.prod.outlook.com (2603:10b6:a03:121::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.24; Thu, 4 Feb 2021 03:04:38 +0000 Received: from SJ0PR10MB4605.namprd10.prod.outlook.com ([fe80::b1e9:811d:aa8e:f62a]) by SJ0PR10MB4605.namprd10.prod.outlook.com ([fe80::b1e9:811d:aa8e:f62a%6]) with mapi id 15.20.3805.028; Thu, 4 Feb 2021 03:04:38 +0000 Subject: Re: [PATCH v6 9/9] OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug To: Laszlo Ersek , devel@edk2.groups.io Cc: imammedo@redhat.com, boris.ostrovsky@oracle.com, Jordan Justen , Ard Biesheuvel , Aaron Young References: <20210129005950.467638-1-ankur.a.arora@oracle.com> <20210129005950.467638-10-ankur.a.arora@oracle.com> <92a29bb5-fc0e-c11f-2702-07c7729a11b4@redhat.com> <90fcd0ff-8065-9575-c5ec-820176a4e713@oracle.com> From: "Ankur Arora" Message-ID: <16956b08-c45d-fdf6-5283-c66130713781@oracle.com> Date: Wed, 3 Feb 2021 19:04:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 In-Reply-To: X-Originating-IP: [148.87.23.5] X-ClientProxiedBy: MWHPR21CA0042.namprd21.prod.outlook.com (2603:10b6:300:129::28) To SJ0PR10MB4605.namprd10.prod.outlook.com (2603:10b6:a03:2d9::24) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.108] (148.87.23.5) by MWHPR21CA0042.namprd21.prod.outlook.com (2603:10b6:300:129::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.9 via Frontend Transport; Thu, 4 Feb 2021 03:04:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ad99e2c-7aff-43d7-31f8-08d8c8b99c06 X-MS-TrafficTypeDiagnostic: BYAPR10MB3607: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tyKpnVJ5mmDE1LDk2ImO/fSOBcbQ/9tX0MtYxEGoPYedbF0/3yiD0SPe0K+e229oxcV6CLZToN/CDjRTeVfyGNbRlu4Otqumfa4p4963M18pDFPJwVeuao13upqeHTeCip9fFxK5CHSFyDrjM2r2JM+FsTJcaD2jxFtMvq2bJ0/NU1bdltkxpvR76Cqsj6yLS6v1ArmtZ/Jb2MTYdq1uNa2AiNZIMspgEiR9mBPotWH0/pEpFvtpaJSoLLEWgkXjFo+yUrpdUQjPW3I3BAwqnpt0GRUTSFXxxmzMVkol0meW54qpcDw2PEAcBP13U8+u+CJETv91CgIS3itcAl268rOouYGXmMq6gis7qfKd/GL4E7ljy/lDXmmN9ESh+TDIf/ghVYxwrBAb7Ly7sN/VZb6sbulHtNTR5fQk5CGFQOV5TCECgts7NsybqHMLKiUqtQ2v+7NLaA3E5sr3UWx4JSSNqZrWTS8sTbA0Gbl0KQkoUMSZEuj0Lmg1icPQU4EyTO0DNfkdoRHUIFElk8bnrFlRRrPdR7FI1Gwq1ckkmoNtFTp5eM2iVW9922y75DNYdLWSJRNUMPs/SU3u4UYmFsmriS++u6vmLOP00z4z4hg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB4605.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(396003)(376002)(346002)(39860400002)(366004)(107886003)(31696002)(6486002)(2616005)(956004)(54906003)(16576012)(2906002)(31686004)(316002)(8936002)(66556008)(66476007)(66946007)(26005)(186003)(16526019)(8676002)(53546011)(86362001)(5660300002)(36756003)(4326008)(478600001)(83380400001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?U3U4cHVFcFd6Rm53NzJodUZvSmVWdFBpWnkwU1diSkNYNjRvNkdNN0c3Ujdm?= =?utf-8?B?RmJrcVowWVVXc203d2JnRGUvNHZPNi9JNElCWTZOSnJjR25STWhDSnBPendX?= =?utf-8?B?OHIxUXFVU1hHbFBsYkFiY2ZsbVB1ci9yRlNaSk02RWZ1QlBUc3k0akdHT3hV?= =?utf-8?B?UkRLVEFJMnJOR3dxRUt5Qmd0QXBTR0ZTZmpnTTAxRXJRckxyMCs0dnF6Mm9P?= =?utf-8?B?eGI2emh1M3FzMVBQd1VNWklKaGNZNDBBdytRS1dITUFxTFJQREJoM2xzZG1x?= =?utf-8?B?U3N2a015aW42aW9nL0IvM1ZDTTNuMk9MZVhSeHZjOFZqSVVLUkM5UkRBZ1Fw?= =?utf-8?B?bjRFSVIxN292L2hTZG1Ydk14UXAxYXZYcWNOMHhGaGRxc2ErUWZnTkhROU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amFpbFd2cDlLbDBU?= =?utf-8?B?WU15NkZoUUV6OTlCSG9jTDBCdUpEUlRTbGRDNjNjSFUvM2p2a2ZVTmdLUzZX?= =?utf-8?B?SDJtejQ4RVUrVy9aZ3J6c1FyRzRMMXFCUyttNEJLMzhsS2s0Nis0akpNYTNG?= =?utf-8?Q?HXZx/Pn/?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ad99e2c-7aff-43d7-31f8-08d8c8b99c06 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4605.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Feb 2021 03:04:38.6973 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TQsq0477349mMZuHCapTBzCuYmNvkUnIqOyH88O4+6PogA3QuAShYMDZLMvzEN3ogJ9xBkqHymM6USzupa2r2Jeehe86+w2OWU7xcueQXXA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3607 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9884 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102040018 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9884 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102040018 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 2021-02-03 12:45 p.m., Laszlo Ersek wrote: > On 02/03/21 06:46, Ankur Arora wrote: >> On 2021-02-01 9:37 a.m., Laszlo Ersek wrote: > >>> (6) Please drop this hunk. We don't try to be smarter than QEMU, in >>> general, whenever we perform feature negotiation. >> >> Also, AFAICS, we will do the hotplug (and now hot-unplug) even if it wasn't >> negotiated? > > Yes, totally. We don't try to "evict" CpuHotplugSmm in case the related > features are not supported/offered by QEMU, we'll just leave > CpuHotplugSmm unused. > > Here's why: the SMI feature negotiation interface is locked down at a > certain point; the negotiation of all of the feature bits needs to > happen centrally, in a common spot; and it would require a really quirky > solution in the firmware to let independent drivers negotiate *subsets* > of the features. Right, I see your point. Firmware doesn't really get to stand on ceremony when HW asks it to do stuff. Thanks Ankur > > You have correctly determined that SmmControl2Dxe, the runtime DXE > driver that produces EFI_SMM_CONTROL2_PROTOCOL, has nothing much to do > with CPU hot-(un)plug. It's just that this is the driver that first > used, and therefore now *owns*, the SMI feature negotiation. (See commit > 5ba203b54e59 ("OvmfPkg/SmmControl2Dxe: negotiate > ICH9_LPC_SMI_F_CPU_HOTPLUG", 2020-08-24).) > > So, to reformulate your question/statement: the firmware will retain the > ability to do hot-(un)plug even if QEMU doesn't contain (or enable) > those particular features. > > Thanks > Laszlo >