Date: Sat, 4 Aug 2012 02:38:05 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r239026 - projects/bhyve/lib/libvmmapi Message-ID: <201208040238.q742c5Gu098362@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208040238.q742c5Gu098362>