<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/arch/x86/include/uapi/asm/kvm.h, branch jd/orphan-parallel</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/arch/x86/include/uapi/asm/kvm.h?h=jd%2Forphan-parallel</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/arch/x86/include/uapi/asm/kvm.h?h=jd%2Forphan-parallel'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-09-28T11:58:08Z</updated>
<entry>
<title>KVM: x86: Introduce MSR filtering</title>
<updated>2020-09-28T11:58:08Z</updated>
<author>
<name>Alexander Graf</name>
<email>graf@amazon.com</email>
</author>
<published>2020-09-25T14:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1a155254ff937ac92cf9940d273ea597b2c667a2'/>
<id>urn:sha1:1a155254ff937ac92cf9940d273ea597b2c667a2</id>
<content type='text'>
It's not desireable to have all MSRs always handled by KVM kernel space. Some
MSRs would be useful to handle in user space to either emulate behavior (like
uCode updates) or differentiate whether they are valid based on the CPU model.

To allow user space to specify which MSRs it wants to see handled by KVM,
this patch introduces a new ioctl to push filter rules with bitmaps into
KVM. Based on these bitmaps, KVM can then decide whether to reject MSR access.
With the addition of KVM_CAP_X86_USER_SPACE_MSR it can also deflect the
denied MSR events to user space to operate on.

If no filter is populated, MSR handling stays identical to before.

Signed-off-by: Alexander Graf &lt;graf@amazon.com&gt;

Message-Id: &lt;20200925143422.21718-8-graf@amazon.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: x86: Add infrastructure for MSR filtering</title>
<updated>2020-09-28T11:58:05Z</updated>
<author>
<name>Alexander Graf</name>
<email>graf@amazon.com</email>
</author>
<published>2020-09-25T14:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=51de8151bd21bae0ce76f604eec6a7176f7093b3'/>
<id>urn:sha1:51de8151bd21bae0ce76f604eec6a7176f7093b3</id>
<content type='text'>
In the following commits we will add pieces of MSR filtering.
To ensure that code compiles even with the feature half-merged, let's add
a few stubs and struct definitions before the real patches start.

Signed-off-by: Alexander Graf &lt;graf@amazon.com&gt;

Message-Id: &lt;20200925143422.21718-4-graf@amazon.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: nVMX: fixes for preemption timer migration</title>
<updated>2020-07-10T10:15:36Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2020-07-09T17:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=83d31e5271ac74aad14b5a1a2ed26923e1446329'/>
<id>urn:sha1:83d31e5271ac74aad14b5a1a2ed26923e1446329</id>
<content type='text'>
Commit 850448f35aaf ("KVM: nVMX: Fix VMX preemption timer migration",
2020-06-01) accidentally broke nVMX live migration from older version
by changing the userspace ABI.  Restore it and, while at it, ensure
that vmx-&gt;nested.has_preemption_timer_deadline is always initialized
according to the KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE flag.

Cc: Makarand Sonare &lt;makarandsonare@google.com&gt;
Fixes: 850448f35aaf ("KVM: nVMX: Fix VMX preemption timer migration")
Reviewed-by: Jim Mattson &lt;jmattson@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: nVMX: Fix VMX preemption timer migration</title>
<updated>2020-06-01T08:26:10Z</updated>
<author>
<name>Peter Shier</name>
<email>pshier@google.com</email>
</author>
<published>2020-05-26T21:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=850448f35aaf45215276468d63c91ab1e230cf06'/>
<id>urn:sha1:850448f35aaf45215276468d63c91ab1e230cf06</id>
<content type='text'>
Add new field to hold preemption timer expiration deadline
appended to struct kvm_vmx_nested_state_hdr. This is to prevent
the first VM-Enter after migration from incorrectly restarting the timer
with the full timer value instead of partially decayed timer value.
KVM_SET_NESTED_STATE restarts timer using migrated state regardless
of whether L1 sets VM_EXIT_SAVE_VMX_PREEMPTION_TIMER.

Fixes: cf8b84f48a593 ("kvm: nVMX: Prepare for checkpointing L2 state")

Signed-off-by: Peter Shier &lt;pshier@google.com&gt;
Signed-off-by: Makarand Sonare &lt;makarandsonare@google.com&gt;
Message-Id: &lt;20200526215107.205814-2-makarandsonare@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE</title>
<updated>2020-06-01T08:26:05Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2020-05-13T17:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=cc440cdad5b7a4c1de12dace725209eb3e0cf663'/>
<id>urn:sha1:cc440cdad5b7a4c1de12dace725209eb3e0cf663</id>
<content type='text'>
Similar to VMX, the state that is captured through the currently available
IOCTLs is a mix of L1 and L2 state, dependent on whether the L2 guest was
running at the moment when the process was interrupted to save its state.

In particular, the SVM-specific state for nested virtualization includes
the L1 saved state (including the interrupt flag), the cached L2 controls,
and the GIF.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: nVMX: Emulate MTF when performing instruction emulation</title>
<updated>2020-02-23T08:36:23Z</updated>
<author>
<name>Oliver Upton</name>
<email>oupton@google.com</email>
</author>
<published>2020-02-07T10:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5ef8acbdd687c9d72582e2c05c0b9756efb37863'/>
<id>urn:sha1:5ef8acbdd687c9d72582e2c05c0b9756efb37863</id>
<content type='text'>
Since commit 5f3d45e7f282 ("kvm/x86: add support for
MONITOR_TRAP_FLAG"), KVM has allowed an L1 guest to use the monitor trap
flag processor-based execution control for its L2 guest. KVM simply
forwards any MTF VM-exits to the L1 guest, which works for normal
instruction execution.

However, when KVM needs to emulate an instruction on the behalf of an L2
guest, the monitor trap flag is not emulated. Add the necessary logic to
kvm_skip_emulated_instruction() to synthesize an MTF VM-exit to L1 upon
instruction emulation for L2.

Fixes: 5f3d45e7f282 ("kvm/x86: add support for MONITOR_TRAP_FLAG")
Signed-off-by: Oliver Upton &lt;oupton@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: x86: Add fixed counters to PMU filter</title>
<updated>2019-07-20T07:00:48Z</updated>
<author>
<name>Eric Hankland</name>
<email>ehankland@google.com</email>
</author>
<published>2019-07-18T18:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=30cd8604323dbaf20a80e797fe7057f5b02e394d'/>
<id>urn:sha1:30cd8604323dbaf20a80e797fe7057f5b02e394d</id>
<content type='text'>
Updates KVM_CAP_PMU_EVENT_FILTER so it can also whitelist or blacklist
fixed counters.

Signed-off-by: Eric Hankland &lt;ehankland@google.com&gt;
[No need to check padding fields for zero. - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-arm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD</title>
<updated>2019-07-11T13:14:16Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2019-07-11T13:14:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a45ff5994c9cde41af627c46abb9f32beae68943'/>
<id>urn:sha1:a45ff5994c9cde41af627c46abb9f32beae68943</id>
<content type='text'>
KVM/arm updates for 5.3

- Add support for chained PMU counters in guests
- Improve SError handling
- Handle Neoverse N1 erratum #1349291
- Allow side-channel mitigation status to be migrated
- Standardise most AArch64 system register accesses to msr_s/mrs_s
- Fix host MPIDR corruption on 32bit
</content>
</entry>
<entry>
<title>KVM: x86: PMU Event Filter</title>
<updated>2019-07-11T13:08:28Z</updated>
<author>
<name>Eric Hankland</name>
<email>ehankland@google.com</email>
</author>
<published>2019-07-11T01:25:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=66bb8a065f5aedd4551d8d3fbce582972f65c2e1'/>
<id>urn:sha1:66bb8a065f5aedd4551d8d3fbce582972f65c2e1</id>
<content type='text'>
Some events can provide a guest with information about other guests or the
host (e.g. L3 cache stats); providing the capability to restrict access
to a "safe" set of events would limit the potential for the PMU to be used
in any side channel attacks. This change introduces a new VM ioctl that
sets an event filter. If the guest attempts to program a counter for
any blacklisted or non-whitelisted event, the kernel counter won't be
created, so any RDPMC/RDMSR will show 0 instances of that event.

Signed-off-by: Eric Hankland &lt;ehankland@google.com&gt;
[Lots of changes. All remaining bugs are probably mine. - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: x86: Modify struct kvm_nested_state to have explicit fields for data</title>
<updated>2019-06-19T14:11:52Z</updated>
<author>
<name>Liran Alon</name>
<email>liran.alon@oracle.com</email>
</author>
<published>2019-06-16T12:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6ca00dfafda731d6eafdc164326e7336cdf42d74'/>
<id>urn:sha1:6ca00dfafda731d6eafdc164326e7336cdf42d74</id>
<content type='text'>
Improve the KVM_{GET,SET}_NESTED_STATE structs by detailing the format
of VMX nested state data in a struct.

In order to avoid changing the ioctl values of
KVM_{GET,SET}_NESTED_STATE, there is a need to preserve
sizeof(struct kvm_nested_state). This is done by defining the data
struct as "data.vmx[0]". It was the most elegant way I found to
preserve struct size while still keeping struct readable and easy to
maintain. It does have a misfortunate side-effect that now it has to be
accessed as "data.vmx[0]" rather than just "data.vmx".

Because we are already modifying these structs, I also modified the
following:
* Define the "format" field values as macros.
* Rename vmcs_pa to vmcs12_pa for better readability.

Signed-off-by: Liran Alon &lt;liran.alon@oracle.com&gt;
[Remove SVM stubs, add KVM_STATE_NESTED_VMX_VMCS12_SIZE. - Paolo]
Reviewed-by: Liran Alon &lt;liran.alon@oracle.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
