From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adalbert Lazar Subject: Re: [RFC PATCH v2 1/1] kvm: Add documentation and ABI/API header for VM introspection Date: Tue, 11 Jul 2017 19:48:49 +0300 Message-ID: <1499791729.BdcecF.28697@host> References: <20170707143416.11195-1-alazar@bitdefender.com> <20170707143416.11195-2-alazar@bitdefender.com> <7104167e-0747-92fe-05df-1b7e1848d65f@redhat.com> <1499700768.37E8E87C5.13190@host> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Cc: Radim =?iso-8859-2?b?S3LobeH4?= , Jan Kiszka , Stefan Hajnoczi , Mihai Dontu To: Paolo Bonzini , kvm@vger.kernel.org Return-path: Received: from mx01.bbu.dsd.mx.bitdefender.com ([91.199.104.161]:42784 "EHLO mx01.bbu.dsd.mx.bitdefender.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755512AbdGKQsh (ORCPT ); Tue, 11 Jul 2017 12:48:37 -0400 Received: from smtp02.buh.bitdefender.net (smtp.bitdefender.biz [10.17.80.76]) by mx-sr.buh.bitdefender.com (Postfix) with ESMTP id 668C87FBD3 for ; Tue, 11 Jul 2017 19:48:35 +0300 (EEST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 10 Jul 2017 19:03:06 +0200, Paolo Bonzini wrote: > I'm not sure what you think of removing KVMI_EVENT_ACTION_SET_REGS and > more or less standardizing on actions SKIP/RETRY/ALLOW/CRASH. > > The main remaining issue seems to be map/unmap. Definitely, SKIP/RETRY/ALLOW/CRASH looks better, but SET_REGS helps performance wise. Maybe we could have it as an optional flag for ALLOW? Or at least for the hot paths? Summarily, on events, besides CRASH (vs SHUTDOWN cmd) and any other additional flag: * CR, MSR - ALLOW with untouched new_value will let the guest continue, but with "new_value = old_value" is a "deny" * xsetbv - ALLOW is implied * breakpoint - SKIP means the BP is processed by the introspector, ALLOW means let the guest handle it * hypercall - ALLOW is implied * page_fault - ALLOW means emulate, RETRY means let guest re-trigger the PF, ALLOW with adjusted PC is a "skip" (done by the tool for the moment). Adalbert