From owner-svn-src-head@freebsd.org Mon Apr 11 06:22:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1703BB0ACCD; Mon, 11 Apr 2016 06:22:28 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCBA615ED; Mon, 11 Apr 2016 06:22:27 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3B6MRAF024342; Mon, 11 Apr 2016 06:22:27 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3B6MRlm024341; Mon, 11 Apr 2016 06:22:27 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201604110622.u3B6MRlm024341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 11 Apr 2016 06:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297808 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 06:22:28 -0000 Author: sephe Date: Mon Apr 11 06:22:26 2016 New Revision: 297808 URL: https://svnweb.freebsd.org/changeset/base/297808 Log: hyperv: Define macro for Hyper-V interface Suggested by: rpokala MFC after: 1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/vmbus/hv_hv.c Modified: head/sys/dev/hyperv/vmbus/hv_hv.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_hv.c Mon Apr 11 06:15:40 2016 (r297807) +++ head/sys/dev/hyperv/vmbus/hv_hv.c Mon Apr 11 06:22:26 2016 (r297808) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #define HV_NANOSECONDS_PER_SEC 1000000000L +#define HYPERV_INTERFACE 0x31237648 /* HV#1 */ static u_int hv_get_timecount(struct timecounter *tc); @@ -416,7 +417,7 @@ hyperv_identify(void) op = HV_CPU_ID_FUNCTION_HV_INTERFACE; do_cpuid(op, regs); - if (regs[0] != 0x31237648 /* HV#1 */) + if (regs[0] != HYPERV_INTERFACE) return (false); op = HV_CPU_ID_FUNCTION_MS_HV_FEATURES;