Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755177AbZDUQMa (ORCPT ); Tue, 21 Apr 2009 12:12:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754537AbZDUQMO (ORCPT ); Tue, 21 Apr 2009 12:12:14 -0400 Received: from wa-out-1112.google.com ([209.85.146.180]:1198 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbZDUQMM (ORCPT ); Tue, 21 Apr 2009 12:12:12 -0400 Message-ID: <49EDF057.9060501@codemonkey.ws> Date: Tue, 21 Apr 2009 11:12:07 -0500 From: Anthony Liguori User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Avi Kivity CC: Huang Ying , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH -v2] Add MCE support to KVM References: <1239953345.6842.3.camel@yhuang-dev.sh.intel.com> <49E9F7BE.4090904@codemonkey.ws> <49EAE334.9020803@redhat.com> In-Reply-To: <49EAE334.9020803@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1503 Lines: 37 Avi Kivity wrote: > Anthony Liguori wrote: >> Huang Ying wrote: >>> The related MSRs are emulated. MCE capability is exported via >>> extension KVM_CAP_MCE and ioctl KVM_X86_GET_MCE_CAP_SUPPORTED. A new >>> vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation >>> such as the mcg_cap. MCE is injected via vcpu ioctl command >>> KVM_X86_SET_MCE. Extended machine-check state (MCG_EXT_P) and CMCI are >>> not simulated. >>> >> >> Maybe I'm missing something, but couldn't this be implemented >> entirely within userspace? There's nothing VT/SVM specific about >> this. If the issue is setting these MSRs from userspace via >> KVM_SET_MSRS isn't enough, perhaps we should add userspace MSR handling. >> > > You also need to inject the MCE. Regardless of the KVM interface for this, to go upstream to QEMU, this needs a TCG implementation which means the logic must be duplicated in userspace. In particular, this is because a user-visible command is being introduced in the monitor. So Avi, regardless of what interface is chosen for KVM, can you hold off applying these patches until there is a TCG implementation? Otherwise, we'll be playing catchup between kvm-userspace and upstream QEMU forever. Regards, Anthony Liguori -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/