<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/virt, branch v5.1</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=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-04-30T19:23:06Z</updated>
<entry>
<title>Merge tag 'kvmarm-fixes-for-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master</title>
<updated>2019-04-30T19:23:06Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2019-04-30T19:23:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6245242d9145815c3f4be71f7d8af858f7c66319'/>
<id>urn:sha1:6245242d9145815c3f4be71f7d8af858f7c66319</id>
<content type='text'>
KVM/ARM fixes for 5.1, take #2:

- Don't try to emulate timers on userspace access
- Fix unaligned huge mappings, again
- Properly reset a vcpu that fails to reset(!)
- Properly retire pending LPIs on reset
- Fix computation of emulated CNTP_TVAL
</content>
</entry>
<entry>
<title>KVM: fix KVM_CLEAR_DIRTY_LOG for memory slots of unaligned size</title>
<updated>2019-04-30T19:22:15Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2019-04-17T13:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76d58e0f07ec203bbdfcaabd9a9fc10a5a3ed5ea'/>
<id>urn:sha1:76d58e0f07ec203bbdfcaabd9a9fc10a5a3ed5ea</id>
<content type='text'>
If a memory slot's size is not a multiple of 64 pages (256K), then
the KVM_CLEAR_DIRTY_LOG API is unusable: clearing the final 64 pages
either requires the requested page range to go beyond memslot-&gt;npages,
or requires log-&gt;num_pages to be unaligned, and kvm_clear_dirty_log_protect
requires log-&gt;num_pages to be both in range and aligned.

To allow this case, allow log-&gt;num_pages not to be a multiple of 64 if
it ends exactly on the last page of the slot.

Reported-by: Peter Xu &lt;peterx@redhat.com&gt;
Fixes: 98938aa8edd6 ("KVM: validate userspace input in kvm_clear_dirty_log_protect()", 2019-01-02)
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: Don't emulate virtual timers on userspace ioctls</title>
<updated>2019-04-25T13:13:31Z</updated>
<author>
<name>Christoffer Dall</name>
<email>christoffer.dall@arm.com</email>
</author>
<published>2019-04-25T12:57:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6bc210003dff7b789efae5bb02a0320dc24dd416'/>
<id>urn:sha1:6bc210003dff7b789efae5bb02a0320dc24dd416</id>
<content type='text'>
When a VCPU never runs before a guest exists, but we set timer registers
up via ioctls, the associated hrtimer might never get cancelled.

Since we moved vcpu_load/put into the arch-specific implementations and
only have load/put for KVM_RUN, we won't ever have a scheduled hrtimer
for emulating a timer when modifying the timer state via an ioctl from
user space.  All we need to do is make sure that we pick up the right
state when we load the timer state next time userspace calls KVM_RUN
again.

We also do not need to worry about this interacting with the bg_timer,
because if we were in WFI from the guest, and somehow ended up in a
kvm_arm_timer_set_reg, it means that:

 1. the VCPU thread has received a signal,
 2. we have called vcpu_load when being scheduled in again,
 3. we have called vcpu_put when we returned to userspace for it to issue
    another ioctl

And therefore will not have a bg_timer programmed and the event is
treated as a spurious wakeup from WFI if userspace decides to run the
vcpu again even if there are not virtual interrupts.

This fixes stray virtual timer interrupts triggered by an expiring
hrtimer, which happens after a failed live migration, for instance.

Fixes: bee038a674875 ("KVM: arm/arm64: Rework the timer code to use a timer_map")
Signed-off-by: Christoffer Dall &lt;christoffer.dall@arm.com&gt;
Reported-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Tested-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
<entry>
<title>kvm: arm: Skip stage2 huge mappings for unaligned ipa backed by THP</title>
<updated>2019-04-25T10:50:31Z</updated>
<author>
<name>Suzuki K Poulose</name>
<email>suzuki.poulose@arm.com</email>
</author>
<published>2019-04-10T15:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e8010bb71b39ff18aac9fb209b3c3093f4c4783'/>
<id>urn:sha1:2e8010bb71b39ff18aac9fb209b3c3093f4c4783</id>
<content type='text'>
With commit a80868f398554842b14, we no longer ensure that the
THP page is properly aligned in the guest IPA. Skip the stage2
huge mapping for unaligned IPA backed by transparent hugepages.

Fixes: a80868f398554842b14 ("KVM: arm/arm64: Enforce PTE mappings at stage2 when needed")
Reported-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Chirstoffer Dall &lt;christoffer.dall@arm.com&gt;
Cc: Zenghui Yu &lt;yuzenghui@huawei.com&gt;
Cc: Zheng Xiang &lt;zhengxiang9@huawei.com&gt;
Cc: Andrew Murray &lt;andrew.murray@arm.com&gt;
Cc: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: Ensure vcpu target is unset on reset failure</title>
<updated>2019-04-25T10:50:31Z</updated>
<author>
<name>Andrew Jones</name>
<email>drjones@redhat.com</email>
</author>
<published>2019-04-04T17:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=811328fc3222f7b55846de0cd0404339e2e1e6d7'/>
<id>urn:sha1:811328fc3222f7b55846de0cd0404339e2e1e6d7</id>
<content type='text'>
A failed KVM_ARM_VCPU_INIT should not set the vcpu target,
as the vcpu target is used by kvm_vcpu_initialized() to
determine if other vcpu ioctls may proceed. We need to set
the target before calling kvm_reset_vcpu(), but if that call
fails, we should then unset it and clear the feature bitmap
while we're at it.

Signed-off-by: Andrew Jones &lt;drjones@redhat.com&gt;
[maz: Simplified patch, completed commit message]
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
<entry>
<title>KVM: fix spectrev1 gadgets</title>
<updated>2019-04-16T13:38:07Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2019-04-11T09:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d487e9bf8ba66a7174c56a0029c54b1eca8f99c'/>
<id>urn:sha1:1d487e9bf8ba66a7174c56a0029c54b1eca8f99c</id>
<content type='text'>
These were found with smatch, and then generalized when applicable.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: vgic-v3: Retire pending interrupts on disabling LPIs</title>
<updated>2019-04-03T01:18:43Z</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2019-04-02T05:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96085b949672dca19773495813b577eb3bedf06e'/>
<id>urn:sha1:96085b949672dca19773495813b577eb3bedf06e</id>
<content type='text'>
When disabling LPIs (for example on reset) at the redistributor
level, it is expected that LPIs that was pending in the CPU
interface are eventually retired.

Currently, this is not what is happening, and these LPIs will
stay in the ap_list, eventually being acknowledged by the vcpu
(which didn't quite expect this behaviour).

The fix is thus to retire these LPIs from the list of pending
interrupts as we disable LPIs.

Reported-by: Heyi Guo &lt;guoheyi@huawei.com&gt;
Tested-by: Heyi Guo &lt;guoheyi@huawei.com&gt;
Fixes: 0e4e82f154e3 ("KVM: arm64: vgic-its: Enable ITS emulation as a virtual MSI controller")
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm/arm64: arch_timer: Fix CNTP_TVAL calculation</title>
<updated>2019-03-30T10:06:00Z</updated>
<author>
<name>Wei Huang</name>
<email>wei@redhat.com</email>
</author>
<published>2019-03-29T20:12:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8fa76162487143d202db20ce84e12061b671a058'/>
<id>urn:sha1:8fa76162487143d202db20ce84e12061b671a058</id>
<content type='text'>
Recently the generic timer test of kvm-unit-tests failed to complete
(stalled) when a physical timer is being used. This issue is caused
by incorrect update of CNTP_CVAL when CNTP_TVAL is being accessed,
introduced by 'Commit 84135d3d18da ("KVM: arm/arm64: consolidate arch
timer trap handlers")'. According to Arm ARM, the read/write behavior
of accesses to the TVAL registers is expected to be:

  * READ: TimerValue = (CompareValue – (Counter - Offset)
  * WRITE: CompareValue = ((Counter - Offset) + Sign(TimerValue)

This patch fixes the TVAL read/write code path according to the
specification.

Fixes: 84135d3d18da ("KVM: arm/arm64: consolidate arch timer trap handlers")
Signed-off-by: Wei Huang &lt;wei@redhat.com&gt;
[maz: commit message tidy-up]
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvmarm-fixes-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master</title>
<updated>2019-03-28T18:07:30Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2019-03-28T18:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=690edec54cbaa0e98dc592aae6864272f48f3c84'/>
<id>urn:sha1:690edec54cbaa0e98dc592aae6864272f48f3c84</id>
<content type='text'>
KVM/ARM fixes for 5.1

- Fix THP handling in the presence of pre-existing PTEs
- Honor request for PTE mappings even when THPs are available
- GICv4 performance improvement
- Take the srcu lock when writing to guest-controlled ITS data structures
- Reset the virtual PMU in preemptible context
- Various cleanups
</content>
</entry>
<entry>
<title>kvm: don't redefine flags as something else</title>
<updated>2019-03-28T16:28:59Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2019-03-15T17:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca0488aadd014809862428cde896a6a6e8f13e42'/>
<id>urn:sha1:ca0488aadd014809862428cde896a6a6e8f13e42</id>
<content type='text'>
The function irqfd_wakeup() has flags defined as __poll_t and then it
has additional flags which is used for irqflags.

Redefine the inner flags variable as iflags so it does not shadow the
outer flags.

Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: "Radim Krčmář" &lt;rkrcmar@redhat.com&gt;
Cc: kvm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
