From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 2/5] KVM: New guest debug interface Date: Mon, 08 Dec 2008 10:13:42 +0100 Message-ID: <493CE546.2030507@siemens.com> References: <20081127114342.10901.31992.stgit@mchn012c.ww002.siemens.net> <20081127114343.10901.26107.stgit@mchn012c.ww002.siemens.net> <493B9DAE.7050007@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Hollis Blanchard , Joerg Roedel To: Avi Kivity Return-path: Received: from lizzard.sbs.de ([194.138.37.39]:17101 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbYLHJOu (ORCPT ); Mon, 8 Dec 2008 04:14:50 -0500 In-Reply-To: <493B9DAE.7050007@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Jan Kiszka wrote: >> This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL >> instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic >> part, controlling the "main switch" and the single-step feature. The >> arch specific part adds an x86 interface for intercepting both types of >> debug exceptions separately and re-injecting them when the host was not >> interested. Moveover, the foundation for guest debugging via debug >> registers is layed. >> > > Have you tested compile-time compatibility with older userspace? Yes, works. > >> Note that both SVM and VTX are supported, but only the latter was tested >> yet. Based on the experience with all those VTX corner case, I would be >> fairly surprised if SVM will work out of the box. >> >> > > I'd like svm to work before applying. To validate the design? I will see if I can organize an SVM box, but I can't promise when I'll be able to do the testing. Anyone willing to contribute time on this would be warmly welcome! > >> @@ -439,7 +437,8 @@ struct kvm_trace_rec { >> #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) >> #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct >> kvm_translation) >> #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct >> kvm_interrupt) >> -#define KVM_DEBUG_GUEST _IOW(KVMIO, 0x87, struct >> kvm_debug_guest) >> +/* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG >> instead */ >> +#define KVM_DEBUG_GUEST __KVM_DEPRECATED_DEBUG_GUEST >> #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) >> #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) >> #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) >> @@ -468,6 +467,26 @@ struct kvm_trace_rec { >> #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct >> kvm_mp_state) >> /* Available with KVM_CAP_NMI */ >> #define KVM_NMI _IO(KVMIO, 0x9a) >> +/* Available with KVM_CAP_SET_GUEST_DEBUG */ >> +#define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9a, struct >> kvm_guest_debug) >> + >> > > 0x9b... Oh, rebased a bit too often. Jan -- Siemens AG, Corporate Technology, CT SE 26 Corporate Competence Center Embedded Linux