Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2012 01:58:12 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r244167 - projects/bhyve/usr.sbin/bhyve
Message-ID:  <201212130158.qBD1wCWj009391@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grehan
Date: Thu Dec 13 01:58:11 2012
New Revision: 244167
URL: http://svnweb.freebsd.org/changeset/base/244167

Log:
  Rename fbsdrun.* -> bhyverun.*
  
  bhyve is intended to be a generic hypervisor, and not FreeBSD-specific.
  
  (renaming internal routines will come later)
  
  Reviewed by:	neel
  Obtained from:	NetApp

Added:
  projects/bhyve/usr.sbin/bhyve/bhyverun.c
     - copied, changed from r244154, projects/bhyve/usr.sbin/bhyve/fbsdrun.c
  projects/bhyve/usr.sbin/bhyve/bhyverun.h
     - copied unchanged from r244154, projects/bhyve/usr.sbin/bhyve/fbsdrun.h
Deleted:
  projects/bhyve/usr.sbin/bhyve/fbsdrun.c
  projects/bhyve/usr.sbin/bhyve/fbsdrun.h
Modified:
  projects/bhyve/usr.sbin/bhyve/Makefile
  projects/bhyve/usr.sbin/bhyve/acpi.c
  projects/bhyve/usr.sbin/bhyve/ioapic.c
  projects/bhyve/usr.sbin/bhyve/mptbl.c
  projects/bhyve/usr.sbin/bhyve/pci_emul.c
  projects/bhyve/usr.sbin/bhyve/pci_uart.c
  projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
  projects/bhyve/usr.sbin/bhyve/pci_virtio_net.c
  projects/bhyve/usr.sbin/bhyve/pit_8254.c
  projects/bhyve/usr.sbin/bhyve/spinup_ap.c

Modified: projects/bhyve/usr.sbin/bhyve/Makefile
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/Makefile	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/Makefile	Thu Dec 13 01:58:11 2012	(r244167)
@@ -6,7 +6,7 @@ PROG=	bhyve
 
 DEBUG_FLAGS= -g -O0 
 
-SRCS=	acpi.c atpic.c consport.c dbgport.c elcr.c fbsdrun.c inout.c 
+SRCS=	acpi.c atpic.c bhyverun.c consport.c dbgport.c elcr.c inout.c 
 SRCS+=  ioapic.c mem.c mevent.c mptbl.c
 SRCS+=	pci_emul.c pci_hostbridge.c pci_passthru.c pci_virtio_block.c
 SRCS+=	pci_virtio_net.c pci_uart.c pit_8254.c pmtmr.c post.c rtc.c uart.c

Modified: projects/bhyve/usr.sbin/bhyve/acpi.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/acpi.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/acpi.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <unistd.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "acpi.h"
 
 /*

Copied and modified: projects/bhyve/usr.sbin/bhyve/bhyverun.c (from r244154, projects/bhyve/usr.sbin/bhyve/fbsdrun.c)
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/fbsdrun.c	Wed Dec 12 15:45:03 2012	(r244154, copy source)
+++ projects/bhyve/usr.sbin/bhyve/bhyverun.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/vmm.h>
 #include <vmmapi.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "acpi.h"
 #include "inout.h"
 #include "dbgport.h"

Copied: projects/bhyve/usr.sbin/bhyve/bhyverun.h (from r244154, projects/bhyve/usr.sbin/bhyve/fbsdrun.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/bhyve/usr.sbin/bhyve/bhyverun.h	Thu Dec 13 01:58:11 2012	(r244167, copy of r244154, projects/bhyve/usr.sbin/bhyve/fbsdrun.h)
@@ -0,0 +1,53 @@
+/*-
+ * Copyright (c) 2011 NetApp, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef	_FBSDRUN_H_
+#define	_FBSDRUN_H_
+
+#ifndef CTASSERT		/* Allow lint to override */
+#define	CTASSERT(x)		_CTASSERT(x, __LINE__)
+#define	_CTASSERT(x, y)		__CTASSERT(x, y)
+#define	__CTASSERT(x, y)	typedef char __assert ## y[(x) ? 1 : -1]
+#endif
+
+struct vmctx;
+extern int guest_hz;
+extern int guest_tslice;
+extern int guest_ncpus;
+extern char *vmname;
+
+extern u_long lomem_sz, himem_sz;
+
+void *paddr_guest2host(uintptr_t);
+
+void fbsdrun_addcpu(struct vmctx *ctx, int cpu, uint64_t rip);
+int  fbsdrun_muxed(void);
+int  fbsdrun_vmexit_on_hlt(void);
+int  fbsdrun_vmexit_on_pause(void);
+int  fbsdrun_disable_x2apic(void);
+#endif

Modified: projects/bhyve/usr.sbin/bhyve/ioapic.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/ioapic.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/ioapic.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
 
 #include "inout.h"
 #include "mem.h"
-#include "fbsdrun.h"
+#include "bhyverun.h"
 
 #include <stdio.h>
 

Modified: projects/bhyve/usr.sbin/bhyve/mptbl.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/mptbl.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/mptbl.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 #include <string.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "mptbl.h"
 
 #define MPTABLE_BASE		0xF0000

Modified: projects/bhyve/usr.sbin/bhyve/pci_emul.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/pci_emul.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/pci_emul.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/vmm.h>
 #include <vmmapi.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "inout.h"
 #include "mem.h"
 #include "mptbl.h"

Modified: projects/bhyve/usr.sbin/bhyve/pci_uart.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/pci_uart.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/pci_uart.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
 #include <stdbool.h>
 #include <string.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "pci_emul.h"
 #include "mevent.h"
 

Modified: projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
 #include <assert.h>
 #include <pthread.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "pci_emul.h"
 #include "virtio.h"
 

Modified: projects/bhyve/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/pci_virtio_net.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/pci_virtio_net.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
 #include <md5.h>
 #include <pthread.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "pci_emul.h"
 #include "mevent.h"
 #include "virtio.h"

Modified: projects/bhyve/usr.sbin/bhyve/pit_8254.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/pit_8254.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/pit_8254.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 #include <assert.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "inout.h"
 #include "pit_8254.h"
 

Modified: projects/bhyve/usr.sbin/bhyve/spinup_ap.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/spinup_ap.c	Thu Dec 13 01:44:58 2012	(r244166)
+++ projects/bhyve/usr.sbin/bhyve/spinup_ap.c	Thu Dec 13 01:58:11 2012	(r244167)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <stdlib.h>
 #include <assert.h>
 
-#include "fbsdrun.h"
+#include "bhyverun.h"
 #include "spinup_ap.h"
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212130158.qBD1wCWj009391>