From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 1/5] VMX: Add tests for CR3 and CR8 interception Date: Mon, 16 Jun 2014 13:31:53 +0200 Message-ID: <539ED5A9.8030405@siemens.com> References: <539ECC8C.6010605@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm , Bandan Das To: Paolo Bonzini Return-path: Received: from david.siemens.de ([192.35.17.14]:39431 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbaFPLcA (ORCPT ); Mon, 16 Jun 2014 07:32:00 -0400 In-Reply-To: <539ECC8C.6010605@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2014-06-16 12:53, Paolo Bonzini wrote: > Il 15/06/2014 16:24, Jan Kiszka ha scritto: >> +++ b/x86/vmx_tests.c >> @@ -820,8 +820,8 @@ static int iobmp_exit_handler() >> #define INSN_ALWAYS_TRAP 2 >> #define INSN_NEVER_TRAP 3 >> >> -#define FIELD_EXIT_QUAL 0 >> -#define FIELD_INSN_INFO 1 >> +#define FIELD_EXIT_QUAL 0x1 >> +#define FIELD_INSN_INFO 0x2 > > Small nit, using (1 << 0) and (1 << 1) would have reminded better this > lazy maintainer that these fields form a bitmask. :) Yes, see also the bug in KVM constants I posted recently. I'm inclined to apply such a pattern exclusively for now on, at least where this produces no inconsistencies with existing code. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux