<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kvm, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-01T12:41:48Z</updated>
<entry>
<title>KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()</title>
<updated>2024-03-01T12:41:48Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-02-21T09:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b89f761f4b930fe72568069b2d89806ea8f1b6b6'/>
<id>urn:sha1:b89f761f4b930fe72568069b2d89806ea8f1b6b6</id>
<content type='text'>
commit 8d3a7dfb801d157ac423261d7cd62c33e95375f8 upstream.

vgic_get_irq() may not return a valid descriptor if there is no ITS that
holds a valid translation for the specified INTID. If that is the case,
it is safe to silently ignore it and continue processing the LPI pending
table.

Cc: stable@vger.kernel.org
Fixes: 33d3bc9556a7 ("KVM: arm64: vgic-its: Read initial LPI pending table")
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240221092732.4126848-2-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler</title>
<updated>2024-03-01T12:41:48Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-02-21T09:27:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f727213d6d307d7f459656c9572cefa833c2ec82'/>
<id>urn:sha1:f727213d6d307d7f459656c9572cefa833c2ec82</id>
<content type='text'>
commit 85a71ee9a0700f6c18862ef3b0011ed9dad99aca upstream.

It is possible that an LPI mapped in a different ITS gets unmapped while
handling the MOVALL command. If that is the case, there is no state that
can be migrated to the destination. Silently ignore it and continue
migrating other LPIs.

Cc: stable@vger.kernel.org
Fixes: ff9c114394aa ("KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE")
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240221092732.4126848-3-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Fix circular locking dependency</title>
<updated>2024-02-23T08:51:53Z</updated>
<author>
<name>Sebastian Ene</name>
</author>
<published>2024-01-24T09:10:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ab1c40a1e915e350d9181a4603af393141970cc'/>
<id>urn:sha1:3ab1c40a1e915e350d9181a4603af393141970cc</id>
<content type='text'>
commit 10c02aad111df02088d1a81792a709f6a7eca6cc upstream.

The rule inside kvm enforces that the vcpu-&gt;mutex is taken *inside*
kvm-&gt;lock. The rule is violated by the pkvm_create_hyp_vm() which acquires
the kvm-&gt;lock while already holding the vcpu-&gt;mutex lock from
kvm_vcpu_ioctl(). Avoid the circular locking dependency altogether by
protecting the hyp vm handle with the config_lock, much like we already
do for other forms of VM-scoped data.

Signed-off-by: Sebastian Ene &lt;sebastianene@google.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20240124091027.1477174-2-sebastianene@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache</title>
<updated>2024-01-25T23:45:17Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-01-04T18:32:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd3956a1b3dd11f46488c928cb890d6937d1ca80'/>
<id>urn:sha1:dd3956a1b3dd11f46488c928cb890d6937d1ca80</id>
<content type='text'>
commit ad362fe07fecf0aba839ff2cc59a3617bd42c33f upstream.

There is a potential UAF scenario in the case of an LPI translation
cache hit racing with an operation that invalidates the cache, such
as a DISCARD ITS command. The root of the problem is that
vgic_its_check_cache() does not elevate the refcount on the vgic_irq
before dropping the lock that serializes refcount changes.

Have vgic_its_check_cache() raise the refcount on the returned vgic_irq
and add the corresponding decrement after queueing the interrupt.

Cc: stable@vger.kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20240104183233.3560639-1-oliver.upton@linux.dev
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: vgic-v4: Restore pending state on host userspace write</title>
<updated>2024-01-25T23:45:17Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-12-17T11:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85e99dffcfbd9ee9ef75d1b75a271c9d92259525'/>
<id>urn:sha1:85e99dffcfbd9ee9ef75d1b75a271c9d92259525</id>
<content type='text'>
commit 7b95382f965133ef61ce44aaabc518c16eb46909 upstream.

When the VMM writes to ISPENDR0 to set the state pending state of
an SGI, we fail to convey this to the HW if this SGI is already
backed by a GICv4.1 vSGI.

This is a bit of a corner case, as this would only occur if the
vgic state is changed on an already running VM, but this can
apparently happen across a guest reset driven by the VMM.

Fix this by always writing out the pending_latch value to the
HW, and reseting it to false.

Reported-by: Kunkun Jiang &lt;jiangkunkun@huawei.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Zenghui Yu &lt;yuzenghui@huawei.com&gt;
Cc: stable@vger.kernel.org # 5.10+
Link: https://lore.kernel.org/r/7e7f2c0c-448b-10a9-8929-4b8f4f6e2a32@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvmarm-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master</title>
<updated>2023-12-22T23:03:54Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2023-12-22T23:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c2b2176ead1911d652b8848169bb44bdde75ca8'/>
<id>urn:sha1:5c2b2176ead1911d652b8848169bb44bdde75ca8</id>
<content type='text'>
KVM/arm64 fixes for 6.7, part #2

 - Ensure a vCPU's redistributor is unregistered from the MMIO bus
   if vCPU creation fails

 - Fix building KVM selftests for arm64 from the top-level Makefile
</content>
</entry>
<entry>
<title>KVM: arm64: vgic: Ensure that slots_lock is held in vgic_register_all_redist_iodevs()</title>
<updated>2023-12-12T07:11:38Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-12-07T15:12:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6bef365e310a5cd4b6e95fbb80b44725fce97e37'/>
<id>urn:sha1:6bef365e310a5cd4b6e95fbb80b44725fce97e37</id>
<content type='text'>
Although we implicitly depend on slots_lock being held when registering
IO devices with the IO bus infrastructure, we don't enforce this
requirement. Make it explicit.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20231207151201.3028710-5-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: vgic: Force vcpu vgic teardown on vcpu destroy</title>
<updated>2023-12-12T07:11:38Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-12-07T15:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=02e3858f08faabab9503ae2911cf7c7e27702257'/>
<id>urn:sha1:02e3858f08faabab9503ae2911cf7c7e27702257</id>
<content type='text'>
When failing to create a vcpu because (for example) it has a
duplicate vcpu_id, we destroy the vcpu. Amusingly, this leaves
the redistributor registered with the KVM_MMIO bus.

This is no good, and we should properly clean the mess. Force
a teardown of the vgic vcpu interface, including the RD device
before returning to the caller.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20231207151201.3028710-4-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: vgic: Add a non-locking primitive for kvm_vgic_vcpu_destroy()</title>
<updated>2023-12-12T07:11:38Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-12-07T15:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d26b9cb33c2d1ba68d1f26bb06c40300f16a3799'/>
<id>urn:sha1:d26b9cb33c2d1ba68d1f26bb06c40300f16a3799</id>
<content type='text'>
As we are going to need to call into kvm_vgic_vcpu_destroy() without
prior holding of the slots_lock, introduce __kvm_vgic_vcpu_destroy()
as a non-locking primitive of kvm_vgic_vcpu_destroy().

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20231207151201.3028710-3-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: vgic: Simplify kvm_vgic_destroy()</title>
<updated>2023-12-12T07:11:38Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-12-07T15:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01ad29d224ff73bc4e16e0ef9ece17f28598c4a4'/>
<id>urn:sha1:01ad29d224ff73bc4e16e0ef9ece17f28598c4a4</id>
<content type='text'>
When destroying a vgic, we have rather cumbersome rules about
when slots_lock and config_lock are held, resulting in fun
buglets.

The first port of call is to simplify kvm_vgic_map_resources()
so that there is only one call to kvm_vgic_destroy() instead of
two, with the second only holding half of the locks.

For that, we kill the non-locking primitive and move the call
outside of the locking altogether. This doesn't change anything
(we re-acquire the locks and teardown the whole vgic), and
simplifies the code significantly.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20231207151201.3028710-2-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
</feed>
