diff options
author | Neel Natu <neel@FreeBSD.org> | 2012-08-04 02:38:05 +0000 |
---|---|---|
committer | Neel Natu <neel@FreeBSD.org> | 2012-08-04 02:38:05 +0000 |
commit | 90d4b48f60515ef33071e7d6bd07cba7cd4bcb0d (patch) | |
tree | 35e20beca4bf64ac0ffe24c48af3742948cc5454 /lib/libvmmapi | |
parent | 32c96bc8133091c3ccf205bae89a83702340f8d0 (diff) | |
download | src-90d4b48f60515ef33071e7d6bd07cba7cd4bcb0d.tar.gz src-90d4b48f60515ef33071e7d6bd07cba7cd4bcb0d.zip |
API to map an apic id to the vcpu.
At the moment this is a simple mapping because the numerical values are
identical.
Notes
Notes:
svn path=/projects/bhyve/; revision=239026
Diffstat (limited to 'lib/libvmmapi')
-rw-r--r-- | lib/libvmmapi/vmmapi.c | 10 | ||||
-rw-r--r-- | lib/libvmmapi/vmmapi.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 077a46b4f6c6..d88b6941873b 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -314,6 +314,16 @@ vm_build_tables(struct vmctx *ctxt, int ncpu, void *oemtbl, int oemtblsz) } 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; diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 7b664215c634..a21631971bba 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -60,6 +60,7 @@ int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, 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, |