Re: [PATCH] net: move from strlcpy with unused retval to strscpy

2022-08-19 Thread Tom Lendacky via Virtualization
On 8/18/22 16:00, Wolfram Sang wrote: Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=v6a6g1ouzcprm...@mail.gm

Re: [PATCH v3 00/10] x86/sev: KEXEC/KDUMP support for SEV-ES guests

2022-04-29 Thread Tom Lendacky via Virtualization
On 4/29/22 04:06, Tao Liu wrote: On Thu, Jan 27, 2022 at 11:10:34AM +0100, Joerg Roedel wrote: Hi Joerg, I tried the patch set with 5.17.0-rc1 kernel, and I have a few questions: 1) Is it a bug or should qemu-kvm 6.2.0 be patched with specific patch? Because I found it will exit with 0

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Tom Lendacky via Virtualization
On 4/27/22 07:37, Juergen Gross wrote: On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote:    /* protected virtualization */    static

Re: [PATCH v5 07/16] x86/kvm: Use bounce buffers for TD guest

2021-10-20 Thread Tom Lendacky via Virtualization
On 10/20/21 11:50 AM, Sathyanarayanan Kuppuswamy wrote: On 10/20/21 9:39 AM, Tom Lendacky wrote: On 10/8/21 7:37 PM, Kuppuswamy Sathyanarayanan wrote: From: "Kirill A. Shutemov" Intel TDX doesn't allow VMM to directly access guest private memory. Any memory that is required for communicatio

Re: [PATCH v5 06/16] x86/tdx: Make DMA pages shared

2021-10-20 Thread Tom Lendacky via Virtualization
On 10/20/21 11:45 AM, Sathyanarayanan Kuppuswamy wrote: On 10/20/21 9:33 AM, Tom Lendacky wrote: On 10/8/21 7:37 PM, Kuppuswamy Sathyanarayanan wrote: ...   bool force_dma_unencrypted(struct device *dev)   { -    return amd_force_dma_unencrypted(dev); +    if (cc_platform_has(CC_ATTR_GUEST_T

Re: [PATCH v5 07/16] x86/kvm: Use bounce buffers for TD guest

2021-10-20 Thread Tom Lendacky via Virtualization
On 10/8/21 7:37 PM, Kuppuswamy Sathyanarayanan wrote: From: "Kirill A. Shutemov" Intel TDX doesn't allow VMM to directly access guest private memory. Any memory that is required for communication with VMM must be shared explicitly. The same rule applies for any DMA to and from TDX guest. All DM

Re: [PATCH v5 06/16] x86/tdx: Make DMA pages shared

2021-10-20 Thread Tom Lendacky via Virtualization
On 10/8/21 7:37 PM, Kuppuswamy Sathyanarayanan wrote: From: "Kirill A. Shutemov" Just like MKTME, TDX reassigns bits of the physical address for metadata. MKTME used several bits for an encryption KeyID. TDX uses a single bit in guests to communicate whether a physical page should be protected

Re: [PATCH v5 01/16] x86/mm: Move force_dma_unencrypted() to common code

2021-10-20 Thread Tom Lendacky via Virtualization
On 10/8/21 7:36 PM, Kuppuswamy Sathyanarayanan wrote: From: "Kirill A. Shutemov" Intel TDX doesn't allow VMM to access guest private memory. Any memory that is required for communication with VMM must be shared explicitly by setting the bit in page table entry. After setting the shared bit, the

Re: [PATCH v5 04/16] x86/tdx: Make pages shared in ioremap()

2021-10-20 Thread Tom Lendacky via Virtualization
On 10/8/21 7:36 PM, Kuppuswamy Sathyanarayanan wrote: From: "Kirill A. Shutemov" All ioremap()ed pages that are not backed by normal memory (NONE or RESERVED) have to be mapped as shared. Reuse the infrastructure from AMD SEV code. Note that DMA code doesn't use ioremap() to convert memory to

Re: [PATCH 04/12] x86/sev: Do not hardcode GHCB protocol version

2021-07-21 Thread Tom Lendacky via Virtualization
On 7/21/21 9:20 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Introduce the sev_get_ghcb_proto_ver() which will return the negotiated > GHCB protocol version and use it to set the version field in the GHCB. > > Signed-off-by: Joerg Roedel > --- > arch/x86/boot/compressed/sev.c | 5 + >

Re: [PATCH 2/3] x86/sev: Add defines for GHCB version 2 MSR protocol requests

2021-06-23 Thread Tom Lendacky via Virtualization
On 6/23/21 4:32 AM, Borislav Petkov wrote: > On Wed, Jun 23, 2021 at 08:40:00AM +0200, Joerg Roedel wrote: >> From: Brijesh Singh >> > > Ok, so I took a critical look at this and it doesn't make sense to have > a differently named define each time you need the [63:12] slice of > GHCBData. So you

Re: [PATCH 2/3] x86/sev: Add defines for GHCB version 2 MSR protocol requests

2021-06-22 Thread Tom Lendacky via Virtualization
On 6/22/21 9:48 AM, Joerg Roedel wrote: > From: Brijesh Singh > > Add the necessary defines for supporting the GHCB version 2 protocol. > This includes defines for: > > - MSR-based AP hlt request/response > - Hypervisor Feature request/response > > This is the bare minimum of reques