Page MenuHomeFreeBSD

D48717.id150111.diff
No OneTemporary

D48717.id150111.diff

Index: sys/riscv/vmm/vmm_sbi.c
===================================================================
--- sys/riscv/vmm/vmm_sbi.c
+++ sys/riscv/vmm/vmm_sbi.c
@@ -128,12 +128,14 @@
cpuset_t active_cpus;
struct hyp *hyp;
uint64_t hart_mask;
+ uint64_t hart_mask_base;
uint64_t func_id;
int hart_id;
int bit;
func_id = hypctx->guest_regs.hyp_a[6];
hart_mask = hypctx->guest_regs.hyp_a[0];
+ hart_mask_base = hypctx->guest_regs.hyp_a[1];
dprintf("%s: hart_mask %lx\n", __func__, hart_mask);
@@ -146,6 +148,8 @@
while ((bit = ffs(hart_mask))) {
hart_id = (bit - 1);
hart_mask &= ~(1u << hart_id);
+ if (hart_mask_base != -1)
+ hart_id += hart_mask_base;
if (CPU_ISSET(hart_id, &active_cpus)) {
/* TODO. */
target_vcpu = vm_vcpu(hyp->vm, hart_id);

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 11, 1:33 PM (10 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16595767
Default Alt Text
D48717.id150111.diff (793 B)

Event Timeline