From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgaOx-0002sj-C1 for qemu-devel@nongnu.org; Mon, 28 Sep 2015 11:31:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgaOt-0005mK-5J for qemu-devel@nongnu.org; Mon, 28 Sep 2015 11:31:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgaOt-0005mA-01 for qemu-devel@nongnu.org; Mon, 28 Sep 2015 11:31:35 -0400 Date: Mon, 28 Sep 2015 17:31:30 +0200 From: Andrew Jones Message-ID: <20150928153130.GA6823@hawk.localdomain> References: <1443017892-15567-1-git-send-email-drjones@redhat.com> <20150924101308.GA3486@hawk.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150924101308.GA3486@hawk.localdomain> Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Wei Huang , QEMU Developers On Thu, Sep 24, 2015 at 12:13:08PM +0200, Andrew Jones wrote: > On Wed, Sep 23, 2015 at 08:43:39AM -0700, Peter Maydell wrote: > > On 23 September 2015 at 07:18, Andrew Jones wrote: > > > ARM/AArch64 KVM guests don't have any way to identify > > > themselves as KVM guests (x86 guests use a CPUID leaf). Now, we > > > could discuss all sorts of reasons why guests shouldn't need to > > > know that, but then there's always some case where it'd be > > > nice... Anyway, now that we have SMBIOS tables in ARM guests, > > > it's easy for the guest to know that it's a QEMU instance. This > > > patch takes that one step further, also identifying KVM, when > > > appropriate. Again, we could debate why generally nothing > > > should care whether it's of type QEMU or QEMU/KVM, but again, > > > sometimes it's nice to know... > > > > This doesn't seem great to me, because it's ACPI/SMBIOS > > specific. A mechanism that worked whether the guest was > > booted via APCI or DT would seem preferable to me... > > SMBIOS is populated on both ACPI and devicetree boots. We already > have detection in virt-what and systemd-detect-virt for DT boots, > although it only detects QEMU (it can't determine if KVM is used). > That detection is DT-specific, and much more of a heuristic, it > checks for the presence of the fw-cfg node in the DT. Actually, I'd > like to patch those virt detection tools to try SMBIOS first (which, > with this patch, could also give KVM info), and then fall back to > trying the current DT-only, QEMU-only detection, before giving up. > Hi Peter, Anymore thoughts on this? Thanks, drew