API to map an apic id to the vcpu.
At the moment this is a simple mapping because the numerical values are identical.
This commit is contained in:
parent
19e3bb399c
commit
f07527ef60
@ -313,6 +313,16 @@ vm_build_tables(struct vmctx *ctxt, int ncpu, void *oemtbl, int oemtblsz)
|
|||||||
oemtbl, oemtblsz));
|
oemtbl, 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
|
int
|
||||||
vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector)
|
vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector)
|
||||||
{
|
{
|
||||||
|
@ -60,6 +60,7 @@ int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip,
|
|||||||
struct vm_exit *ret_vmexit);
|
struct vm_exit *ret_vmexit);
|
||||||
int vm_build_tables(struct vmctx *ctxt, int ncpus, void *oemtbl,
|
int vm_build_tables(struct vmctx *ctxt, int ncpus, void *oemtbl,
|
||||||
int oemtblsz);
|
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 vm_inject_event(struct vmctx *ctx, int vcpu, enum vm_event_type type,
|
||||||
int vector);
|
int vector);
|
||||||
int vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type,
|
int vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type,
|
||||||
|
Loading…
Reference in New Issue
Block a user