From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability. Date: Fri, 18 Dec 2015 22:25:50 +0100 Message-ID: <567479DE.6010805@redhat.com> References: <1439923615-10600-1-git-send-email-peterhornyack@google.com> <1439923615-10600-3-git-send-email-peterhornyack@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , Andrey Smetanin , Roman Kagan , "Denis V. Lunev" To: Peter Hornyack , kvm list , Gleb Natapov Return-path: Received: from mail-wm0-f50.google.com ([74.125.82.50]:33516 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964992AbbLRVZx (ORCPT ); Fri, 18 Dec 2015 16:25:53 -0500 Received: by mail-wm0-f50.google.com with SMTP id p187so1457886wmp.0 for ; Fri, 18 Dec 2015 13:25:52 -0800 (PST) In-Reply-To: <1439923615-10600-3-git-send-email-peterhornyack@google.com> Sender: kvm-owner@vger.kernel.org List-ID: On 18/08/2015 20:46, Peter Hornyack wrote: > Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm > does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide > capability that guards the new exit reason and which can be enabled via > the KVM_ENABLE_CAP ioctl. > > Signed-off-by: Peter Hornyack > --- > Documentation/virtual/kvm/api.txt | 48 +++++++++++++++++++++++++++++++++++++++ > include/uapi/linux/kvm.h | 14 ++++++++++++ > 2 files changed, 62 insertions(+) Let's instead add: - KVM_CAP_MSR_EXITS - KVM_CAP_ENABLE_MSR_EXIT - KVM_CAP_DISABLE_MSR_EXIT and 3 kinds of exits: KVM_EXIT_MSR_READ, KVM_EXIT_MSR_WRITE, KVM_EXIT_MSR_AFTER_WRITE. The first two use four fields (type, msr, data, handled) and #GP if handled=0 is zero on the next entry. The last one uses the first three fields and can be used for HyperV. Paolo