From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: pbonzini@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 22 Aug 2019 11:43:31 -0700 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A985356CE for ; Thu, 22 Aug 2019 18:43:30 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id a17so3624949wrw.3 for ; Thu, 22 Aug 2019 11:43:30 -0700 (PDT) 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:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=P+iZ7eff/mtxbw5SeFKvX0vAId/eNH1mdIuXWMYiyvs=; b=n2UZ6arC6IUqj9JkF3vVm2z+r32Gx5VMEw74LgI84kbZ9L/uXl/zy7R9gO5HKWZoe+ QcX9QvQWgLfuBt4oka+khajzBSPd4WcX8QfdlHoKzhvtiBmNnhEqsdDRFZMeA4R4+67d G5RrVKp4uLs/6vafA3clElpiQkLnTsxhEgpk7h8Ic9FySpurmikIuenKbiRzwgWopzL0 gS468cRLaQEmFvwrKmE4HMHatyUFiAbkLG2zkJVFljysvm5gDXBPqsafFb+K+IITzk8m wbqEvH6mtG3Oqe2Q085MI/BFPz7+nAAAGU1KyVW3d6bgTBxoBOZR983OdEoyiH7tI3KG dcTg== X-Gm-Message-State: APjAAAWNqEGow+ykjJNnDutb1vsruu5QEFpOMwOVpibYyw+rT8mw0JxI PFmq7dYiV1FROJ7ZSOgK7w9yYq+ToJ7OYfqjNHgCUx8B9aZUppAQ0eIC1ZwX2qokMfMjlrDJps7 fDqW6LBpfMPHJug== X-Received: by 2002:a7b:c632:: with SMTP id p18mr558793wmk.114.1566499409094; Thu, 22 Aug 2019 11:43:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY//0n+OyqaS9jehP4Z7m/rrqvZlbbBa2mENX4WQfuwPEqhY/3CSABhoecKbKBME9DdlYJUA== X-Received: by 2002:a7b:c632:: with SMTP id p18mr558760wmk.114.1566499408786; Thu, 22 Aug 2019 11:43:28 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id w13sm974366wre.44.2019.08.22.11.43.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Aug 2019 11:43:28 -0700 (PDT) Subject: Re: [edk2-rfc] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF To: Laszlo Ersek , "Kinney, Michael D" , "rfc@edk2.groups.io" , "Yao, Jiewen" Cc: Alex Williamson , "devel@edk2.groups.io" , qemu devel list , Igor Mammedov , "Chen, Yingwen" , "Nakajima, Jun" , Boris Ostrovsky , Joao Marcal Lemos Martins , Phillip Goerl References: <8091f6e8-b1ec-f017-1430-00b0255729f4@redhat.com> <74D8A39837DF1E4DA445A8C0B3885C503F75B680@shsmsx102.ccr.corp.intel.com> <047801f8-624a-2300-3cf7-1daa1395ce59@redhat.com> <99219f81-33a3-f447-95f8-f10341d70084@redhat.com> <6f8b9507-58d0-5fbd-b827-c7194b3b2948@redhat.com> <74D8A39837DF1E4DA445A8C0B3885C503F75FAD3@shsmsx102.ccr.corp.intel.com> <7cb458ea-956e-c1df-33f7-025e4f0f22df@redhat.com> <74D8A39837DF1E4DA445A8C0B3885C503F7600B9@shsmsx102.ccr.corp.intel.com> <20190816161933.7d30a881@x1.home> <74D8A39837DF1E4DA445A8C0B3885C503F761B96@shsmsx102.ccr.corp.intel.com> <35396800-32d2-c25f-b0d0-2d7cd8438687@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <2b4ba607-f0e3-efee-6712-6dcef129b310@redhat.com> Date: Thu, 22 Aug 2019 20:43:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-2022-jp Content-Language: en-US Content-Transfer-Encoding: 7bit On 22/08/19 19:59, Laszlo Ersek wrote: > The firmware and QEMU could agree on a formula, which would compute the > CPU-specific SMBASE from a value pre-programmed by the firmware, and the > initial APIC ID of the hot-added CPU. > > Yes, it would duplicate code -- the calculation -- between QEMU and > edk2. While that's not optimal, it wouldn't be a first. No, that would be unmaintainable. The best solution to me seems to be to make SMBASE programmable from non-SMM code if some special conditions hold. Michael, would it be possible to get in contact with the Intel architects? Paolo