xmsr.h revision 276349
1296781Sdes/*-
257429Smarkm * Copyright (c) 2011 NetApp, Inc.
357429Smarkm * All rights reserved.
457429Smarkm *
557429Smarkm * Redistribution and use in source and binary forms, with or without
657429Smarkm * modification, are permitted provided that the following conditions
757429Smarkm * are met:
876259Sgreen * 1. Redistributions of source code must retain the above copyright
965668Skris *    notice, this list of conditions and the following disclaimer.
1065668Skris * 2. Redistributions in binary form must reproduce the above copyright
1165668Skris *    notice, this list of conditions and the following disclaimer in the
1265668Skris *    documentation and/or other materials provided with the distribution.
1365668Skris *
1457429Smarkm * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
1557429Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1657429Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1757429Smarkm * ARE DISCLAIMED.  IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
18162852Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19295367Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20295367Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21295367Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22162852Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23162852Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24162852Sdes * SUCH DAMAGE.
25162852Sdes *
2676259Sgreen * $FreeBSD: stable/10/usr.sbin/bhyve/xmsr.h 276349 2014-12-28 21:27:13Z neel $
2776259Sgreen */
2857429Smarkm
29296781Sdes#ifndef	_XMSR_H_
30296781Sdes#define	_XMSR_H_
31296781Sdes
32296781Sdesint init_msr(void);
33296781Sdesint emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t val);
34296781Sdesint emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t *val);
35296781Sdes
36296781Sdes#endif
37296781Sdes