summaryrefslogtreecommitdiff
path: root/proc.h
blob: 0a31f36a1fca264575a906a523a8e2a5c644a16d (plain)
1
2
3
4
5
6
7
8
#ifndef PROC_H
#define PROC_H

extern void cpu_affinity(int cpu);
extern int set_proc_prio(int prio);
extern int set_sched_status(int policy, int priority);

#endif /* PROC_H */
ctrl'>
authorAndre Przywara <andre.przywara@arm.com>2015-12-01 22:36:37 +0000
committerChristoffer Dall <christoffer.dall@linaro.org>2016-05-20 15:40:03 +0200
commit7d450e2821710718fd6703e9c486249cee913bab (patch)
tree02dc0e9f84440e3d77ee72f32e27d53bcedda758
parentc3199f28e09496aa9fec9313b4f6e90e7dc913f0 (diff)
KVM: arm/arm64: vgic-new: Add userland access to VGIC dist registers
Userland may want to save and restore the state of the in-kernel VGIC, so we provide the code which takes a userland request and translate that into calls to our MMIO framework. From Christoffer: When accessing the VGIC state from userspace we really don't want a VCPU to be messing with the state at the same time, and the API specifies that we should return -EBUSY if any VCPUs are running. Check and prevent VCPUs from running by grabbing their mutexes, one by one, and error out if we fail. (Note: This could potentially be simplified to just do a simple check and see if any VCPUs are running, and return -EBUSY then, without enforcing the locking throughout the duration of the uaccess, if we think that taking/releasing all these mutexes for every single GIC register access is too heavyweight.) Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat
-rw-r--r--virt/kvm/arm/vgic/vgic-kvm-device.c55
1 files changed, 54 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic/vgic-kvm-device.c b/virt/kvm/arm/vgic/vgic-kvm-device.c