Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C128C433E0 for ; Wed, 3 Jun 2020 13:57:25 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E89C4206A2 for ; Wed, 3 Jun 2020 13:57:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E89C4206A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jgTtB-0008U2-OT; Wed, 03 Jun 2020 13:57:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jgTtB-0008Tx-Dc for xen-devel@lists.xenproject.org; Wed, 03 Jun 2020 13:57:05 +0000 X-Inumbo-ID: 1ac75814-a5a2-11ea-81bc-bc764e2007e4 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1ac75814-a5a2-11ea-81bc-bc764e2007e4; Wed, 03 Jun 2020 13:57:04 +0000 (UTC) Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: px/94CR6m58rgUqn6TH2mprv/7R8t7s1G9T0cktCs4f83+xtzc0DJ8jJM3JxeQmdfhskB8m+Xb CCHptaD+G4jKbxXluDq5hd6HpOmKnl3n2SY0cOJjVcbJUbd17wCeSaX3Hmk0l930MvfDxZz1KG XT0wv+VXqMs6eERI5ygRxhFVTGoJx1dEGZKOPQD23aX7+ZCbG5uO8lcERmtwyzJldqIcC+DXz4 04btNGA05xI9s2KAkpi1L3m8KMrNXLEgx12upkApPC4niCsNGpbtE7xY4dDb4pNTPxuV7u3v/8 OAY= X-SBRS: 2.7 X-MesageID: 19471919 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,467,1583211600"; d="scan'208";a="19471919" Date: Wed, 3 Jun 2020 15:56:56 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Tamas K Lengyel Subject: Re: [PATCH v3 for-4.14] x86/monitor: revert default behavior when monitoring register write events Message-ID: <20200603135656.GE1195@Air-de-Roger> References: <20200602134909.66581-1-tamas@tklengyel.com> <20200603082824.GC1195@Air-de-Roger> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Petre Pircalabu , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Alexandru Isaila , Xen-devel Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Jun 03, 2020 at 06:25:31AM -0600, Tamas K Lengyel wrote: > On Wed, Jun 3, 2020 at 2:28 AM Roger Pau Monné wrote: > > > > On Tue, Jun 02, 2020 at 07:49:09AM -0600, Tamas K Lengyel wrote: > > > diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c > > > index 8aa14137e2..36894b33a4 100644 > > > --- a/xen/arch/x86/hvm/monitor.c > > > +++ b/xen/arch/x86/hvm/monitor.c > > > @@ -53,11 +53,11 @@ bool hvm_monitor_cr(unsigned int index, unsigned long value, unsigned long old) > > > .u.write_ctrlreg.old_value = old > > > }; > > > > > > - if ( monitor_traps(curr, sync, &req) >= 0 ) > > > - return 1; > > > + return monitor_traps(curr, sync, &req) >= 0 && > > > + curr->domain->arch.monitor.control_register_values; > > > > Nit (it can be fixed while committing IMO): curr should be aligned to > > monitor. > > This is the established style already in-place, see > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/monitor.c;h=8aa14137e25a47d3826843441e244decf81dc855;hb=refs/heads/staging#l76: > > 76 return curr->domain->arch.monitor.emul_unimplemented_enabled && > 77 monitor_traps(curr, true, &req) == 1; > > I don't really care either way but at least we should be consistent. Oh, OK. This is slightly different from the indentation that I tend to use, sorry for the request then. Roger.