Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.15 62 lines 2.9 kB view raw
1Generic vcpu interface 2==================================== 3 4The virtual cpu "device" also accepts the ioctls KVM_SET_DEVICE_ATTR, 5KVM_GET_DEVICE_ATTR, and KVM_HAS_DEVICE_ATTR. The interface uses the same struct 6kvm_device_attr as other devices, but targets VCPU-wide settings and controls. 7 8The groups and attributes per virtual cpu, if any, are architecture specific. 9 101. GROUP: KVM_ARM_VCPU_PMU_V3_CTRL 11Architectures: ARM64 12 131.1. ATTRIBUTE: KVM_ARM_VCPU_PMU_V3_IRQ 14Parameters: in kvm_device_attr.addr the address for PMU overflow interrupt is a 15 pointer to an int 16Returns: -EBUSY: The PMU overflow interrupt is already set 17 -ENXIO: The overflow interrupt not set when attempting to get it 18 -ENODEV: PMUv3 not supported 19 -EINVAL: Invalid PMU overflow interrupt number supplied or 20 trying to set the IRQ number without using an in-kernel 21 irqchip. 22 23A value describing the PMUv3 (Performance Monitor Unit v3) overflow interrupt 24number for this vcpu. This interrupt could be a PPI or SPI, but the interrupt 25type must be same for each vcpu. As a PPI, the interrupt number is the same for 26all vcpus, while as an SPI it must be a separate number per vcpu. 27 281.2 ATTRIBUTE: KVM_ARM_VCPU_PMU_V3_INIT 29Parameters: no additional parameter in kvm_device_attr.addr 30Returns: -ENODEV: PMUv3 not supported or GIC not initialized 31 -ENXIO: PMUv3 not properly configured or in-kernel irqchip not 32 configured as required prior to calling this attribute 33 -EBUSY: PMUv3 already initialized 34 35Request the initialization of the PMUv3. If using the PMUv3 with an in-kernel 36virtual GIC implementation, this must be done after initializing the in-kernel 37irqchip. 38 39 402. GROUP: KVM_ARM_VCPU_TIMER_CTRL 41Architectures: ARM,ARM64 42 432.1. ATTRIBUTE: KVM_ARM_VCPU_TIMER_IRQ_VTIMER 442.2. ATTRIBUTE: KVM_ARM_VCPU_TIMER_IRQ_PTIMER 45Parameters: in kvm_device_attr.addr the address for the timer interrupt is a 46 pointer to an int 47Returns: -EINVAL: Invalid timer interrupt number 48 -EBUSY: One or more VCPUs has already run 49 50A value describing the architected timer interrupt number when connected to an 51in-kernel virtual GIC. These must be a PPI (16 <= intid < 32). Setting the 52attribute overrides the default values (see below). 53 54KVM_ARM_VCPU_TIMER_IRQ_VTIMER: The EL1 virtual timer intid (default: 27) 55KVM_ARM_VCPU_TIMER_IRQ_PTIMER: The EL1 physical timer intid (default: 30) 56 57Setting the same PPI for different timers will prevent the VCPUs from running. 58Setting the interrupt number on a VCPU configures all VCPUs created at that 59time to use the number provided for a given timer, overwriting any previously 60configured values on other VCPUs. Userspace should configure the interrupt 61numbers on at least one VCPU after creating all VCPUs and before running any 62VCPUs.