<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/sev.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-10T18:00:03Z</updated>
<entry>
<title>Merge tag 'x86_misc_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2022-01-10T18:00:03Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-01-10T18:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e97a0c02b94f2ecd5cbf29ded90c5db055e8ad0'/>
<id>urn:sha1:2e97a0c02b94f2ecd5cbf29ded90c5db055e8ad0</id>
<content type='text'>
Pull misc x86 updates from Borislav Petkov:
 "The pile which we cannot find the proper topic for so we stick it in
  x86/misc:

   - Add support for decoding instructions which do MMIO accesses in
     order to use it in SEV and TDX guests

   - An include fix and reorg to allow for removing set_fs in UML later"

* tag 'x86_misc_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mtrr: Remove the mtrr_bp_init() stub
  x86/sev-es: Use insn_decode_mmio() for MMIO implementation
  x86/insn-eval: Introduce insn_decode_mmio()
  x86/insn-eval: Introduce insn_get_modrm_reg_ptr()
  x86/insn-eval: Handle insn_get_opcode() failure
</content>
</entry>
<entry>
<title>Merge tag 'x86_sev_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2022-01-10T17:33:40Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-01-10T17:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01d5e7872c1c2c04f4fd419c9a4968e148efc5a0'/>
<id>urn:sha1:01d5e7872c1c2c04f4fd419c9a4968e148efc5a0</id>
<content type='text'>
Pull x86 SEV updates from Borislav Petkov:
 "The accumulated pile of x86/sev generalizations and cleanups:

   - Share the SEV string unrolling logic with TDX as TDX guests need it
     too

   - Cleanups and generalzation of code shared by SEV and TDX"

* tag 'x86_sev_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/sev: Move common memory encryption code to mem_encrypt.c
  x86/sev: Rename mem_encrypt.c to mem_encrypt_amd.c
  x86/sev: Use CC_ATTR attribute to generalize string I/O unroll
  x86/sev: Remove do_early_exception() forward declarations
  x86/head64: Carve out the guest encryption postprocessing into a helper
  x86/sev: Get rid of excessive use of defines
  x86/sev: Shorten GHCB terminate macro names
</content>
</entry>
<entry>
<title>x86/sev: Fix SEV-ES INS/OUTS instructions for word, dword, and qword</title>
<updated>2021-12-03T17:09:30Z</updated>
<author>
<name>Michael Sterritt</name>
</author>
<published>2021-11-19T23:27:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d5379d0475419085d3575bd9155f2e558e96390'/>
<id>urn:sha1:1d5379d0475419085d3575bd9155f2e558e96390</id>
<content type='text'>
Properly type the operands being passed to __put_user()/__get_user().
Otherwise, these routines truncate data for dependent instructions
(e.g., INSW) and only read/write one byte.

This has been tested by sending a string with REP OUTSW to a port and
then reading it back in with REP INSW on the same port.

Previous behavior was to only send and receive the first char of the
size. For example, word operations for "abcd" would only read/write
"ac". With change, the full string is now written and read back.

Fixes: f980f9c31a923 (x86/sev-es: Compile early handler code into kernel image)
Signed-off-by: Michael Sterritt &lt;sterritt@google.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Marc Orr &lt;marcorr@google.com&gt;
Reviewed-by: Peter Gonda &lt;pgonda@google.com&gt;
Reviewed-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Link: https://lkml.kernel.org/r/20211119232757.176201-1-sterritt@google.com
</content>
</entry>
<entry>
<title>x86/sev-es: Use insn_decode_mmio() for MMIO implementation</title>
<updated>2021-11-30T22:53:30Z</updated>
<author>
<name>Kirill A. Shutemov</name>
</author>
<published>2021-11-30T18:49:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c494eb366dbfc5095c0f159bbb5c6d4ec3ed37ec'/>
<id>urn:sha1:c494eb366dbfc5095c0f159bbb5c6d4ec3ed37ec</id>
<content type='text'>
Switch SEV implementation to insn_decode_mmio(). The helper is going
to be used by TDX too.

No functional changes.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Signed-off-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Reviewed-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Reviewed-by: Tony Luck &lt;tony.luck@intel.com&gt;
Tested-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Link: https://lkml.kernel.org/r/20211130184933.31005-5-kirill.shutemov@linux.intel.com
</content>
</entry>
<entry>
<title>x86/sev: Remove do_early_exception() forward declarations</title>
<updated>2021-11-15T20:06:33Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2021-11-10T22:06:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75cc9a84c9eb36e436e3fcee5158fe31d1dfd78f'/>
<id>urn:sha1:75cc9a84c9eb36e436e3fcee5158fe31d1dfd78f</id>
<content type='text'>
There's a perfectly fine prototype in the asm/setup.h header. Use it.

No functional changes.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lkml.kernel.org/r/20211110220731.2396491-8-brijesh.singh@amd.com
</content>
</entry>
<entry>
<title>x86/sev: Shorten GHCB terminate macro names</title>
<updated>2021-11-15T19:31:16Z</updated>
<author>
<name>Brijesh Singh</name>
</author>
<published>2021-11-10T22:06:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18c3933c1983157df9dc06d4f3bfc764f161ed7a'/>
<id>urn:sha1:18c3933c1983157df9dc06d4f3bfc764f161ed7a</id>
<content type='text'>
Shorten macro names for improved readability.

Suggested-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Venu Busireddy &lt;venu.busireddy@oracle.com&gt;
Link: https://lkml.kernel.org/r/20211110220731.2396491-5-brijesh.singh@amd.com
</content>
</entry>
<entry>
<title>Merge tag 'x86_core_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2021-11-02T14:56:47Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-11-02T14:56:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc0356d6a02e064387c16a83cb96fe43ef33181e'/>
<id>urn:sha1:cc0356d6a02e064387c16a83cb96fe43ef33181e</id>
<content type='text'>
Pull x86 core updates from Borislav Petkov:

 - Do not #GP on userspace use of CLI/STI but pretend it was a NOP to
   keep old userspace from breaking. Adjust the corresponding iopl
   selftest to that.

 - Improve stack overflow warnings to say which stack got overflowed and
   raise the exception stack sizes to 2 pages since overflowing the
   single page of exception stack is very easy to do nowadays with all
   the tracing machinery enabled. With that, rip out the custom mapping
   of AMD SEV's too.

 - A bunch of changes in preparation for FGKASLR like supporting more
   than 64K section headers in the relocs tool, correct ORC lookup table
   size to cover the whole kernel .text and other adjustments.

* tag 'x86_core_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage
  vmlinux.lds.h: Have ORC lookup cover entire _etext - _stext
  x86/boot/compressed: Avoid duplicate malloc() implementations
  x86/boot: Allow a "silent" kaslr random byte fetch
  x86/tools/relocs: Support &gt;64K section headers
  x86/sev: Make the #VC exception stacks part of the default stacks storage
  x86: Increase exception stack sizes
  x86/mm/64: Improve stack overflow warnings
  x86/iopl: Fake iopl(3) CLI/STI usage
</content>
</entry>
<entry>
<title>Merge tag 'x86_sev_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2021-11-01T22:52:26Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-11-01T22:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20273d2588c48563e95549e055eeb16ded64dee8'/>
<id>urn:sha1:20273d2588c48563e95549e055eeb16ded64dee8</id>
<content type='text'>
Pull x86 SEV updates from Borislav Petkov:

 - Export sev_es_ghcb_hv_call() so that HyperV Isolation VMs can use it
   too

 - Non-urgent fixes and cleanups

* tag 'x86_sev_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/sev: Expose sev_es_ghcb_hv_call() for use by HyperV
  x86/sev: Allow #VC exceptions on the VC2 stack
  x86/sev: Fix stack type check in vc_switch_off_ist()
  x86/sme: Use #define USE_EARLY_PGTABLE_L5 in mem_encrypt_identity.c
  x86/sev: Carve out HV call's return value verification
</content>
</entry>
<entry>
<title>Merge tag 'x86_cc_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2021-11-01T22:16:52Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-11-01T22:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e5772c8d9cf0a77ba4d6fd34fd4126fb66c9983'/>
<id>urn:sha1:6e5772c8d9cf0a77ba4d6fd34fd4126fb66c9983</id>
<content type='text'>
Pull generic confidential computing updates from Borislav Petkov:
 "Add an interface called cc_platform_has() which is supposed to be used
  by confidential computing solutions to query different aspects of the
  system.

  The intent behind it is to unify testing of such aspects instead of
  having each confidential computing solution add its own set of tests
  to code paths in the kernel, leading to an unwieldy mess"

* tag 'x86_cc_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  treewide: Replace the use of mem_encrypt_active() with cc_platform_has()
  x86/sev: Replace occurrences of sev_es_active() with cc_platform_has()
  x86/sev: Replace occurrences of sev_active() with cc_platform_has()
  x86/sme: Replace occurrences of sme_active() with cc_platform_has()
  powerpc/pseries/svm: Add a powerpc version of cc_platform_has()
  x86/sev: Add an x86 version of cc_platform_has()
  arch/cc: Introduce a function to check for confidential computing features
  x86/ioremap: Selectively build arch override encryption functions
</content>
</entry>
<entry>
<title>x86/sev: Expose sev_es_ghcb_hv_call() for use by HyperV</title>
<updated>2021-10-25T16:11:42Z</updated>
<author>
<name>Tianyu Lan</name>
</author>
<published>2021-10-25T12:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=007faec014cb5d26983c1f86fd08c6539b41392e'/>
<id>urn:sha1:007faec014cb5d26983c1f86fd08c6539b41392e</id>
<content type='text'>
Hyper-V needs to issue the GHCB HV call in order to read/write MSRs in
Isolation VMs. For that, expose sev_es_ghcb_hv_call().

The Hyper-V Isolation VMs are unenlightened guests and run a paravisor
at VMPL0 for communicating. GHCB pages are being allocated and set up
by that paravisor. Linux gets the GHCB page's physical address via
MSR_AMD64_SEV_ES_GHCB from the paravisor and should not change it.

Add a @set_ghcb_msr parameter to sev_es_ghcb_hv_call() to control
whether the function should set the GHCB's address prior to the call or
not and export that function for use by HyperV.

  [ bp: - Massage commit message
        - add a struct ghcb forward declaration to fix randconfig builds. ]

Signed-off-by: Tianyu Lan &lt;Tianyu.Lan@microsoft.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/20211025122116.264793-6-ltykernel@gmail.com
</content>
</entry>
</feed>
