xref: /freebsd/sys/dev/hyperv/vmbus/x86/hyperv_reg.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1*4d846d26SWarner Losh /*- SPDX-License-Identifier: BSD-2-Clause
23f8f02b2SSouradeep Chakrabarti  * Copyright (c) 2022 Microsoft Corp.
33f8f02b2SSouradeep Chakrabarti  * All rights reserved.
43f8f02b2SSouradeep Chakrabarti  *
53f8f02b2SSouradeep Chakrabarti  * Redistribution and use in source and binary forms, with or without
63f8f02b2SSouradeep Chakrabarti  * modification, are permitted provided that the following conditions
73f8f02b2SSouradeep Chakrabarti  * are met:
83f8f02b2SSouradeep Chakrabarti  * 1. Redistributions of source code must retain the above copyright
93f8f02b2SSouradeep Chakrabarti  *    notice unmodified, this list of conditions, and the following
103f8f02b2SSouradeep Chakrabarti  *    disclaimer.
113f8f02b2SSouradeep Chakrabarti  * 2. Redistributions in binary form must reproduce the above copyright
123f8f02b2SSouradeep Chakrabarti  *    notice, this list of conditions and the following disclaimer in the
133f8f02b2SSouradeep Chakrabarti  *    documentation and/or other materials provided with the distribution.
143f8f02b2SSouradeep Chakrabarti  *
153f8f02b2SSouradeep Chakrabarti  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
163f8f02b2SSouradeep Chakrabarti  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
173f8f02b2SSouradeep Chakrabarti  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
183f8f02b2SSouradeep Chakrabarti  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
193f8f02b2SSouradeep Chakrabarti  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
203f8f02b2SSouradeep Chakrabarti  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
213f8f02b2SSouradeep Chakrabarti  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
223f8f02b2SSouradeep Chakrabarti  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
233f8f02b2SSouradeep Chakrabarti  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
243f8f02b2SSouradeep Chakrabarti  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
253f8f02b2SSouradeep Chakrabarti  */
263f8f02b2SSouradeep Chakrabarti 
273f8f02b2SSouradeep Chakrabarti #ifndef _HYPERV_REG_H_
283f8f02b2SSouradeep Chakrabarti #define _HYPERV_REG_H_
293f8f02b2SSouradeep Chakrabarti 
303f8f02b2SSouradeep Chakrabarti #include <sys/param.h>
313f8f02b2SSouradeep Chakrabarti #include <sys/systm.h>
323f8f02b2SSouradeep Chakrabarti 
333f8f02b2SSouradeep Chakrabarti /*
343f8f02b2SSouradeep Chakrabarti  * Hyper-V Synthetic MSRs
353f8f02b2SSouradeep Chakrabarti  */
363f8f02b2SSouradeep Chakrabarti 
373f8f02b2SSouradeep Chakrabarti #define MSR_HV_GUEST_OS_ID		0x40000000
383f8f02b2SSouradeep Chakrabarti #define MSR_HV_VP_INDEX			0x40000002
393f8f02b2SSouradeep Chakrabarti #define MSR_HV_SCONTROL			0x40000080
403f8f02b2SSouradeep Chakrabarti #define MSR_HV_SIEFP            0x40000082
413f8f02b2SSouradeep Chakrabarti #define MSR_HV_SIMP             0x40000083
423f8f02b2SSouradeep Chakrabarti #define MSR_HV_EOM			0x40000084
433f8f02b2SSouradeep Chakrabarti #define MSR_HV_SINT0			0x40000090
443f8f02b2SSouradeep Chakrabarti #define MSR_HV_SINT_AUTOEOI		0x00020000ULL
453f8f02b2SSouradeep Chakrabarti #define CPUID_LEAF_HV_IDENTITY		0x40000002
463f8f02b2SSouradeep Chakrabarti #define CPUID_LEAF_HV_FEATURES		0x40000003
473f8f02b2SSouradeep Chakrabarti #define CPUID_LEAF_HV_RECOMMENDS	0x40000004
483f8f02b2SSouradeep Chakrabarti #endif	/* !_HYPERV_REG_H_ */
49