svn commit: r239026 - projects/bhyve/lib/libvmmapi
Neel Natu
neel at FreeBSD.org
Sat Aug 4 02:38:05 UTC 2012
Author: neel
Date: Sat Aug 4 02:38:05 2012
New Revision: 239026
URL: http://svn.freebsd.org/changeset/base/239026
Log:
API to map an apic id to the vcpu.
At the moment this is a simple mapping because the numerical values are
identical.
Modified:
projects/bhyve/lib/libvmmapi/vmmapi.c
projects/bhyve/lib/libvmmapi/vmmapi.h
Modified: projects/bhyve/lib/libvmmapi/vmmapi.c
==============================================================================
--- projects/bhyve/lib/libvmmapi/vmmapi.c Sat Aug 4 02:14:27 2012 (r239025)
+++ projects/bhyve/lib/libvmmapi/vmmapi.c Sat Aug 4 02:38:05 2012 (r239026)
@@ -314,6 +314,16 @@ vm_build_tables(struct vmctx *ctxt, int
}
int
+vm_apicid2vcpu(struct vmctx *ctx, int apicid)
+{
+ /*
+ * The apic id associated with the 'vcpu' has the same numerical value
+ * as the 'vcpu' itself.
+ */
+ return (apicid);
+}
+
+int
vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector)
{
struct vm_lapic_irq vmirq;
Modified: projects/bhyve/lib/libvmmapi/vmmapi.h
==============================================================================
--- projects/bhyve/lib/libvmmapi/vmmapi.h Sat Aug 4 02:14:27 2012 (r239025)
+++ projects/bhyve/lib/libvmmapi/vmmapi.h Sat Aug 4 02:38:05 2012 (r239026)
@@ -60,6 +60,7 @@ int vm_run(struct vmctx *ctx, int vcpu,
struct vm_exit *ret_vmexit);
int vm_build_tables(struct vmctx *ctxt, int ncpus, void *oemtbl,
int oemtblsz);
+int vm_apicid2vcpu(struct vmctx *ctx, int apicid);
int vm_inject_event(struct vmctx *ctx, int vcpu, enum vm_event_type type,
int vector);
int vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type,
More information about the svn-src-projects
mailing list