From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: kvm smm mode support? Date: Mon, 28 Apr 2014 16:22:34 +0200 Message-ID: <535E642A.7040806@redhat.com> References: <1398411554.12369.28.camel@nilsson.home.kraxel.org> <535B7F00.5080803@redhat.com> <535B9252.7010406@redhat.com> <1398692971.5290.17.camel@nilsson.home.kraxel.org> <20140428140102.GA7576@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel , Laszlo Ersek To: "Kevin O'Connor" , Gerd Hoffmann Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44350 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbaD1OWi (ORCPT ); Mon, 28 Apr 2014 10:22:38 -0400 In-Reply-To: <20140428140102.GA7576@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: Il 28/04/2014 16:01, Kevin O'Connor ha scritto: >> > OVMF probably wants set aside some ram which can't be accessed by the >> > OS, for secure boot emulation which is actually secure. Guess we'll >> > just go map/unmap some slot in the smm enter/leave vmexits? Or there >> > are better ways to do it? > Normally, the memory at 0xa0000-0xc0000 is only mapped when in SMM. Yes, and there's also a configuration space bit that lets you show/hide SMRAM at 0xa0000-0xc0000. Another a configuration space bit that lets you lock the first bit. QEMU doesn't implement the lock, but it should not be hard. For OVMF, we would certainly lock SMRAM out. For SeaBIOS, if we can avoid that it would help writing testcases... SeaBIOS is not doing anything security-sensitive in SMM anyway. > And, as I understand it, in a multi-cpu system only the core handling > the SMI can access that ram. (All other cores would continue to > access IO space at 0xa0000-0xc0000.) QEMU just grew per-CPU address spaces, but not KVM. I don't think we need it. For SeaBIOS's callbacks we can assume single processor, SeaBIOS is not thread-safe anyway. And the only interaction would be with legacy VGA VRAM, so no big deal. Paolo