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 16:11:55 -0700 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (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 AD0DEC057FA6 for ; Thu, 22 Aug 2019 23:11:54 +0000 (UTC) Received: by mail-wr1-f69.google.com with SMTP id o13so3890490wrx.20 for ; Thu, 22 Aug 2019 16:11:54 -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=tp6E29Xulh5T3HhK6UTKnmiv1JjHwZhKttMpdhCOSEY=; b=Uxj5ru2y5VUapCYLp5n3LgW/FKsHt9+Xax5my8u8IyYXCVKsyv1/UbeiQIFjNj1wUQ T6LA1NSoY9ECI4tVM3NopXwPj6bBMd+rmwBAEAvVOyku8sg/gQbVFl0OimnM63kRiAIq XOA+9WDo9lXrJVW7k+beRG9CbTXpyLa7/CWAIhBrP7U7/s7H9LmzpBZ+q+wXV7GLsysO tJOHkFPLVleQ89o63fAEcxVn2A6hjA/vPbw/dYytGzGEb8zszv4IUbuRUbnrHPEvOo/x vuWt6cyOO96MqcjNExKg1UZ+E9kzw+sxxfsKgUfB9ejQEfwWHqVc7glvCNc69IFQfn5P KciA== X-Gm-Message-State: APjAAAVWl6fXgz1vSV88xfGJGefqAK4ADMW0FOxY4V6M4a9QMUIXymOp 5mzd372lyxV1Jcettt5qH/MbrNWA7cgrvJT2L3+0q9cA+EpMPdekCVKlLATixer7WRB3XK9OCrG 2LbBYImTIIPqP8Q== X-Received: by 2002:a1c:a70d:: with SMTP id q13mr1425428wme.26.1566515513282; Thu, 22 Aug 2019 16:11:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+Z1R+9XFpfcAdpBHfczyr/Xb59z476Pium03ZfQiDMTnWGw0QMVb8AM+RuAnNMREgCHdJZg== X-Received: by 2002:a1c:a70d:: with SMTP id q13mr1425407wme.26.1566515512988; Thu, 22 Aug 2019 16:11:52 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:21b9:ff1f:a96c:9fb3? ([2001:b07:6468:f312:21b9:ff1f:a96c:9fb3]) by smtp.gmail.com with ESMTPSA id 7sm645799wmj.46.2019.08.22.16.11.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Aug 2019 16:11:52 -0700 (PDT) Subject: Re: [edk2-rfc] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF To: "Kinney, Michael D" , Laszlo Ersek , "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> <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> <2b4ba607-f0e3-efee-6712-6dcef129b310@redhat.com> <7f2d2f1e-2dd8-6914-c55e-61067e06b142@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <3661c0c5-3da4-1453-a66a-3e4d4022e876@redhat.com> Date: Fri, 23 Aug 2019 01:11:51 +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=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 23/08/19 00:32, Kinney, Michael D wrote: > Paolo, > > It is my understanding that real HW hot plug uses the SDM defined > methods. Meaning the initial SMI is to 3000:8000 and they rebase > to TSEG in the first SMI. They must have chipset specific methods > to protect 3000:8000 from DMA. It would be great if you could check. > Can we add a chipset feature to prevent DMA to 64KB range from > 0x30000-0x3FFFF and the UEFI Memory Map and ACPI content can be > updated so the Guest OS knows to not use that range for DMA? If real hardware does it at the chipset level, we will probably use Igor's suggestion of aliasing A-seg to 3000:0000. Before starting the new CPU, the SMI handler can prepare the SMBASE relocation trampoline at A000:8000 and the hot-plugged CPU will find it at 3000:8000 when it receives the initial SMI. Because this is backed by RAM at 0xA0000-0xAFFFF, DMA cannot access it and would still go through to RAM at 0x30000. Paolo