<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/kvm, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-06-27T10:55:51Z</updated>
<entry>
<title>arm64: KVM: fix build with CONFIG_ARM_PMU disabled</title>
<updated>2016-06-27T10:55:51Z</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2016-06-08T10:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0efce9da1255f13d910842b62cb14371044a3c50'/>
<id>urn:sha1:0efce9da1255f13d910842b62cb14371044a3c50</id>
<content type='text'>
When CONFIG_ARM_PMU is disabled, we get the following build error:

arch/arm64/kvm/sys_regs.c: In function 'pmu_counter_idx_valid':
arch/arm64/kvm/sys_regs.c:564:27: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function)
  if (idx &gt;= val &amp;&amp; idx != ARMV8_PMU_CYCLE_IDX)
                           ^
arch/arm64/kvm/sys_regs.c:564:27: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kvm/sys_regs.c: In function 'access_pmu_evcntr':
arch/arm64/kvm/sys_regs.c:592:10: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function)
    idx = ARMV8_PMU_CYCLE_IDX;
          ^
arch/arm64/kvm/sys_regs.c: In function 'access_pmu_evtyper':
arch/arm64/kvm/sys_regs.c:638:14: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function)
   if (idx == ARMV8_PMU_CYCLE_IDX)
              ^
arch/arm64/kvm/hyp/switch.c:86:15: error: 'ARMV8_PMU_USERENR_MASK' undeclared (first use in this function)
  write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0);

This patch fixes the build with CONFIG_ARM_PMU disabled.

Cc: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: implement mapped IRQ handling</title>
<updated>2016-05-20T13:40:09Z</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2015-12-22T00:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=568e8c901eaa62004640cad8b9773819f27461a0'/>
<id>urn:sha1:568e8c901eaa62004640cad8b9773819f27461a0</id>
<content type='text'>
We now store the mapped hardware IRQ number in our struct, so we
don't need the irq_phys_map for the new VGIC.
Implement the hardware IRQ mapping on top of the reworked arch
timer interface.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: vgic_init: implement map_resources</title>
<updated>2016-05-20T13:40:07Z</updated>
<author>
<name>Eric Auger</name>
<email>eric.auger@linaro.org</email>
</author>
<published>2015-12-21T14:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0442ee227e826afc4df16cdfb8bd6eef6a8f425'/>
<id>urn:sha1:b0442ee227e826afc4df16cdfb8bd6eef6a8f425</id>
<content type='text'>
map_resources is the last initialization step. It is executed on
first VCPU run. At that stage the code checks that userspace has provided
the base addresses for the relevant VGIC regions, which depend on the
type of VGIC that is exposed to the guest.  Also we check if the two
regions overlap.
If the checks succeeded, we register the respective register frames with
the kvm_io_bus framework.

If we emulate a GICv2, the function also forces vgic_init execution if
it has not been executed yet. Also we map the virtual GIC CPU interface
onto the guest's CPU interface.

Signed-off-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: vgic_init: implement vgic_init</title>
<updated>2016-05-20T13:40:06Z</updated>
<author>
<name>Eric Auger</name>
<email>eric.auger@linaro.org</email>
</author>
<published>2015-12-21T17:09:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad275b8bb1e659b14120174d87e3c1fdc22e9978'/>
<id>urn:sha1:ad275b8bb1e659b14120174d87e3c1fdc22e9978</id>
<content type='text'>
This patch allocates and initializes the data structures used
to model the vgic distributor and virtual cpu interfaces. At that
stage the number of IRQs and number of virtual CPUs is frozen.

Signed-off-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: vgic_init: implement vgic_create</title>
<updated>2016-05-20T13:40:06Z</updated>
<author>
<name>Eric Auger</name>
<email>eric.auger@linaro.org</email>
</author>
<published>2015-12-21T13:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e6431da8f3a04759ac8d77b7c98eec0de580343'/>
<id>urn:sha1:5e6431da8f3a04759ac8d77b7c98eec0de580343</id>
<content type='text'>
This patch implements the vgic_creation function which is
called on CREATE_IRQCHIP VM IOCTL (v2 only) or KVM_CREATE_DEVICE

Signed-off-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: vgic_init: implement kvm_vgic_hyp_init</title>
<updated>2016-05-20T13:40:05Z</updated>
<author>
<name>Eric Auger</name>
<email>eric.auger@linaro.org</email>
</author>
<published>2015-12-01T14:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=909777324588b40d431e6e3af0911ee62e0d00e3'/>
<id>urn:sha1:909777324588b40d431e6e3af0911ee62e0d00e3</id>
<content type='text'>
Implements kvm_vgic_hyp_init and vgic_probe function.
This uses the new firmware independent VGIC probing to support both ACPI
and DT based systems (code from Marc Zyngier).

The vgic_global struct is enriched with new fields populated
by those functions.

Signed-off-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: vgic_kvm_device: implement kvm_vgic_addr</title>
<updated>2016-05-20T13:40:01Z</updated>
<author>
<name>Eric Auger</name>
<email>eric.auger@linaro.org</email>
</author>
<published>2015-12-21T15:36:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2c1f9abff83ee0ad0f78e03918c7edf070edb39'/>
<id>urn:sha1:e2c1f9abff83ee0ad0f78e03918c7edf070edb39</id>
<content type='text'>
kvm_vgic_addr is used by the userspace to set the base address of
the following register regions, as seen by the guest:
- distributor(v2 and v3),
- re-distributors (v3),
- CPU interface (v2).

Signed-off-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: Add GICv3 SGI system register trap handler</title>
<updated>2016-05-20T13:39:59Z</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2016-01-26T15:31:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=621ecd8d2123bc13e140b519e01a18200aeb614c'/>
<id>urn:sha1:621ecd8d2123bc13e140b519e01a18200aeb614c</id>
<content type='text'>
In contrast to GICv2 SGIs in a GICv3 implementation are not triggered
by a MMIO write, but with a system register write. KVM knows about
that register already, we just need to implement the handler and wire
it up to the core KVM/ARM code.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: Add MMIO handling framework</title>
<updated>2016-05-20T13:39:49Z</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2016-04-26T10:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4493b1c4866a03963a35be7d157c911a617a3694'/>
<id>urn:sha1:4493b1c4866a03963a35be7d157c911a617a3694</id>
<content type='text'>
Add an MMIO handling framework to the VGIC emulation:
Each register is described by its offset, size (or number of bits per
IRQ, if applicable) and the read/write handler functions. We provide
initialization macros to describe each GIC register later easily.

Separate dispatch functions for read and write accesses are connected
to the kvm_io_bus framework and binary-search for the responsible
register handler based on the offset address within the region.
We convert the incoming data (referenced by a pointer) to the host's
endianess and use pass-by-value to hand the data over to the actual
handler functions.

The register handler prototype and the endianess conversion are
courtesy of Christoffer Dall.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-new: Implement kvm_vgic_vcpu_pending_irq</title>
<updated>2016-05-20T13:39:49Z</updated>
<author>
<name>Eric Auger</name>
<email>eric.auger@linaro.org</email>
</author>
<published>2015-12-07T15:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90eee56c5f9081686035972dfcddfd6c85cafdf9'/>
<id>urn:sha1:90eee56c5f9081686035972dfcddfd6c85cafdf9</id>
<content type='text'>
Tell KVM whether a particular VCPU has an IRQ that needs handling
in the guest. This is used to decide whether a VCPU is runnable.

Signed-off-by: Eric Auger &lt;eric.auger@linaro.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
</feed>
