From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web11.6263.1598480504812664815 for ; Wed, 26 Aug 2020 15:21:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dCmQMf30; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598480503; 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=/HT2SM4yAuxSZIwWMGZ0PKi+qU0i/p9xg+5xv116xQE=; b=dCmQMf30tp5aBaX0y4Cf79HfNmYT08OD0+SdIS4RChPOC1iLB9CRRQYtXPQv290+yVbIXn UCdjtApiHoaf4NHReLH5q7ttWDH0+cQ47iDnARxbbdP4Q8YzQ4WrztWAsivHfd7UTRMvO2 yMJD1sb/OubYbZk7dsMFqOvG8Ke1eD4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-420-OITkDpJrNyu9COQbstSraw-1; Wed, 26 Aug 2020 18:21:37 -0400 X-MC-Unique: OITkDpJrNyu9COQbstSraw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81786E75F; Wed, 26 Aug 2020 22:21:36 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-182.ams2.redhat.com [10.36.114.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C5325C1A3; Wed, 26 Aug 2020 22:21:35 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Igor Mammedov , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] OvmfPkg/CpuHotplugSmm: fix CPU hotplug race just after SMI broadcast Date: Thu, 27 Aug 2020 00:21:29 +0200 Message-Id: <20200826222129.25798-3-lersek@redhat.com> In-Reply-To: <20200826222129.25798-1-lersek@redhat.com> References: <20200826222129.25798-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 VGhlICJ2aXJzaCBzZXR2Y3B1cyIgKHBsdXJhbCkgY29tbWFuZCBtYXkgaG90LXBsdWcgc2V2ZXJh bCBWQ1BVcyBpbiBxdWljawpzdWNjZXNzaW9uIC0tIGl0IG1lYW5zIGEgc2VyaWVzIG9mICJkZXZp Y2VfYWRkIiBRRU1VIG1vbml0b3IgY29tbWFuZHMsCmJhY2stdG8tYmFjay4KCklmIGEgImRldmlj ZV9hZGQiIG9jY3VycyAqanVzdCBhZnRlciogQUNQSSByYWlzZXMgdGhlIGJyb2FkY2FzdCBTTUks IHRoZW46CgotIHRoZSBDUFVfRk9SRUFDSCgpIGxvb3AgaW4gUUVNVSdzIGljaDlfYXBtX2N0cmxf Y2hhbmdlZCgpIGNhbm5vdCBtYWtlIHRoZQogIFNNSSBwZW5kaW5nIGZvciB0aGUgbmV3IENQVSAt LSBhdCB0aGF0IHRpbWUsIHRoZSBuZXcgQ1BVIGRvZXNuJ3QgZXZlbgogIGV4aXN0IHlldCwKCi0g T1ZNRiB3aWxsIGZpbmQgdGhlIG5ldyBDUFUgaG93ZXZlciAoaW4gdGhlIENQVSBob3RwbHVnIHJl Z2l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