linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: "Borislav Petkov" <bp@suse.de>,
	"Brijesh Singh" <brijesh.singh@amd.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Sean Christopherson" <sean.j.christopherson@intel.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH v8 1/2] x86/mm: add .bss..decrypted section to hold shared variables
Date: Fri, 14 Sep 2018 16:55:51 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1809141655030.10480@nanos.tec.linutronix.de> (raw)
In-Reply-To: <07c76a33-7883-f407-5b1c-b6de7dda37b1@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

On Fri, 14 Sep 2018, Tom Lendacky wrote:

> On 09/14/2018 09:12 AM, Borislav Petkov wrote:
> > On Fri, Sep 14, 2018 at 02:17:05PM +0200, Thomas Gleixner wrote:
> >>> The sme_encrypt_kernel() does not have access to pmd (after pointer
> >>> fixup is applied). You can extend the sme_encrypt_kernel() to pass an
> >>> additional arguments but then we start getting in include hell. The pmd
> >>> is defined as "pmdval_t". If we extend the sme_encrypt_kernel() then 
> >>> asm/mem_encrypt.h need to include the header file which defines
> >>> "pmdval_t". Adding the 'asm/pgtable_type.h' was causing all kind of
> >>> compilation errors. I didn't spend much time on it. IMO, we really don't
> >>> need to go in this path unless we see some value from doing this.
> >>
> >> Keep it here then.
> > 
> > *For what is worth*, a simple forward declaration works. I've taken the
> > 64-bit forward declaration of pmdval_t as SME is 64-bit only anyway.
> 
> Just my 2 cents, but I'd prefer it to be in head64.c.  This is where
> the future pagetable entries are all updated to set the encryption
> mask by applying sme_get_me_mask() to load_delta.  So, to me, it makes
> sense to keep the clearing of the encryption mask for the bss_decrypted
> section here.

Yes, at least for now, I just keep it there and we can sort that out after
we fixed the problem at hand.

Thanks,

	tglx

  reply	other threads:[~2018-09-14 14:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 21:51 [PATCH v8 0/2] x86: Fix SEV guest regression Brijesh Singh
2018-09-13 21:51 ` [PATCH v8 1/2] x86/mm: add .bss..decrypted section to hold shared variables Brijesh Singh
2018-09-13 23:24   ` Thomas Gleixner
2018-09-14  2:14     ` Brijesh Singh
2018-09-14  7:10   ` Borislav Petkov
2018-09-14 11:58     ` Brijesh Singh
2018-09-14 12:17       ` Thomas Gleixner
2018-09-14 14:12         ` Borislav Petkov
2018-09-14 14:27           ` Brijesh Singh
2018-09-14 14:45             ` Borislav Petkov
2018-09-14 14:50           ` Tom Lendacky
2018-09-14 14:55             ` Thomas Gleixner [this message]
2018-09-13 21:51 ` [PATCH v8 2/2] x86/kvm: use __bss_decrypted attribute in " Brijesh Singh
2018-09-13 23:31   ` Thomas Gleixner
2018-09-14  0:25   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1809141655030.10480@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bp@suse.de \
    --cc=brijesh.singh@amd.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).