From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: Userspace MSR handling Date: Mon, 25 May 2009 13:16:22 +0200 Message-ID: <4A1A7E06.9080702@redhat.com> References: <9ae48b020905221311h1859d5a1v3653404721d5208b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Ed Swierk Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44216 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbZEYLQZ (ORCPT ); Mon, 25 May 2009 07:16:25 -0400 In-Reply-To: <9ae48b020905221311h1859d5a1v3653404721d5208b@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/22/09 22:11, Ed Swierk wrote: > Does it make sense to implement a generic mechanism for handling MSRs > in userspace? I see no other way to handle the xen pv msr writes. > I imagine a mechanism analogous to PIO, adding a > KVM_EXIT_MSR code and a msr type in the kvm_run struct. Sounds sensible to me. Probably must be off by default for backward compatibility, then enabled by ioctl. I think it would be best to enable it for specific msrs. We probably also want to have a way for userspace to figure whenever some specific msr is implemented in-kernel to handle the case of an msr emulation moving from userspace to kernelspace gracefully. > I'm happy to take a stab at implementing this if no one else is > already working on it. I is somewhere on my todo list, but I didn't looked at it (yet). Feel free to go ahead ;) cheers, Gerd