From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F027E81E0C for ; Mon, 14 Nov 2016 03:09:44 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id a20so14314742wme.2 for ; Mon, 14 Nov 2016 03:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=yCempvx40Z85o7NqoosxyD+3KDi70/7gbrULZGAiVF0=; b=Lsd09D1sBwYp0qxNMxsnQGWjSPAFOwwxpoI0xqjWstA7Xzcvd6ujEwLdyGxT1G+SY4 EjlpNABpzmOMDKyNw3uOuQE1K24pS3omcSNPtY2eUdIsfz46G5cbfA2EhUtAvwU2p7mM B8MJjL4qj3Aa2xI+URNKC9gv2MekKyd66n9ReapKC7O9eF/Yn7j+vBv8HFN+BCCO3P4L 4U5WRsPxG7p6aq/mZBOEt4V/SAvlPfu8sC/0ke9nFyg+xm+n+SDDXebz6AYq/63DmWAy 25gO9F8fWAWFu+BuxuHDKM/TVxSYt1lnkkilIkO6J/5I+AuwHcYYFKvHximodgjYCfUk jJbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=yCempvx40Z85o7NqoosxyD+3KDi70/7gbrULZGAiVF0=; b=Ztz+9//mz2naxnFn/hr0NtuUwvPKNvjF9672Vb0g8RjMWxwtL9hwMeqCsAKvMboBKe 4PK0nH8nzM32ejLIqXp+M3V3o1TUF6Wlr7qDydqM0p0fJEQXv0OXOQARyGPmj1kEkC0q 8XzU0J1UPddGkIKjMmWuCiBnPIeJ3/qGJ/lDP0uikUPhFRIU2D1orxdin7rwELaawTNm t44sVv40DhnfOd7vSGTklF0Ksuy+gmgLFTh1dfYP0y0RS3VK9TaNwyPoH8fjsdDI7upn E0JwmQa62DcTyLP+lS+0fQaAANM9eNVtKr8AGIFUzmwFLcTels44jtwyyYqIZHVE5Aza Y9KA== X-Gm-Message-State: ABUngvfCnygznVQZ2DtrR75y8EYqY7neM5xtNjyzuaLUmMN+E51pl8fQHgH8eyB4SvuMOw== X-Received: by 10.28.214.133 with SMTP id n127mr11052425wmg.28.1479121788184; Mon, 14 Nov 2016 03:09:48 -0800 (PST) Received: from [192.168.10.165] (94-39-155-114.adsl-ull.clienti.tiscali.it. [94.39.155.114]) by smtp.googlemail.com with ESMTPSA id g197sm14508300wmd.15.2016.11.14.03.09.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 03:09:47 -0800 (PST) Sender: Paolo Bonzini To: Laszlo Ersek , "Fan, Jeff" References: <20161111054545.19616-1-jeff.fan@intel.com> <542CF652F8836A4AB8DBFAAD40ED192A4A2DB4F5@shsmsx102.ccr.corp.intel.com> <00b6828b-78c5-af4f-ab98-de4460b1b8ec@redhat.com> <4dc14e5c-9b43-4338-c7a5-9750e8a9547a@redhat.com> Cc: "edk2-devel@ml01.01.org" , "Yao, Jiewen" From: Paolo Bonzini Message-ID: Date: Mon, 14 Nov 2016 12:09:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 11:09:45 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On 14/11/2016 11:39, Laszlo Ersek wrote: > You've tried that: > > https://www.mail-archive.com/edk2-devel@lists.01.org/msg02840.html > https://www.mail-archive.com/edk2-devel@lists.01.org/msg02923.html Uh, right. :) > Do you suggest to make the LocalApicLib instances usable at runtime? > For that I think we'll need to cover the LAPIC address range with a > runtime-marked EfiMemoryMappedIO area. This can be done in > "OvmfPkg/SmmControl2Dxe". > > Also, we'll need a LocalApicLib instance that registers a callback for > SetVirtualAddressMap() and converts the LAPIC base address pointer. > > Currently BaseXApicX2ApicLib.c's GetLocalApicBaseAddress() function uses > the MSR_IA32_APIC_BASE register if it's available -- based on CPUID --, > and falls back to PcdCpuLocalApicBaseAddress otherwise. And only > PcdCpuLocalApicBaseAddress is what we could replace with the virtual > pointer. We can't accommodate a guest OS that reprograms the LAPIC base > address. > > Jeff, what do you think? > > Anyway, I believe KVM doesn't support moving the LAPIC window; is that > right? No, it doesn't. Let's add a backdoor in QEMU, where writing a given value to port 0xb2 would start generating SMIs to all CPUs. Then you can write this somewhere in the initialization code, and in the S3 boot script. Paolo