From: "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.com>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
Dexuan Cui <decui@microsoft.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"luto@kernel.org" <luto@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
"sathyanarayanan.kuppuswamy@linux.intel.com"
<sathyanarayanan.kuppuswamy@linux.intel.com>,
"seanjc@google.com" <seanjc@google.com>,
"rick.p.edgecombe@intel.com" <rick.p.edgecombe@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [RFC PATCH 1/1] x86/mm: Mark CoCo VM pages invalid while moving between private and shared
Date: Tue, 29 Aug 2023 02:57:50 +0300 [thread overview]
Message-ID: <20230828235750.nbj54llqo7laqmif@box.shutemov.name> (raw)
In-Reply-To: <BYAPR21MB16886F58824A36D2FF6428AFD7E0A@BYAPR21MB1688.namprd21.prod.outlook.com>
On Mon, Aug 28, 2023 at 11:23:55PM +0000, Michael Kelley (LINUX) wrote:
> > I guess in this case it is better to use slow_virt_to_phys(), but have a
> > comment somewhere why it is self. Maybe also add comment inside
> > slow_virt_to_phys() to indicate that we don't check present bit for a
> > reason.
> >
>
> OK, works for me. I'll turn my original RFC patch into a small patch
> set that's pretty much as the RFC version is coded, along with the
> appropriate comments in slow_virt_to_phys(). Additional patches
> in the set will remove code that becomes unnecessary or that can
> be simplified.
Oh, I just realized that it conflicts with another patchset that I am
currently working on. This patchset adds kexec support for TDX. One thing
I do in this patchset is revert all shared pages to private during kexec,
so that the next kernel can use them[1]. I determine the shared status by
checking the shared bit in the kernel page tables.
If I understand correctly, your change will work with my patch because
my patch is buggy and does not check the preset bit (irony detected).
Ugh. This gets messy.
[1] https://github.com/intel/tdx/commit/4b63531fc315551c3c42023ea655206c77eef5a1
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2023-08-28 23:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 16:41 Michael Kelley
2023-08-02 21:57 ` Tom Lendacky
2023-08-05 14:38 ` Michael Kelley (LINUX)
2023-08-06 22:19 ` kirill.shutemov
2023-08-16 2:54 ` Michael Kelley (LINUX)
2023-08-28 14:22 ` Michael Kelley (LINUX)
2023-08-28 16:13 ` kirill.shutemov
2023-08-28 21:00 ` Michael Kelley (LINUX)
2023-08-28 22:13 ` kirill.shutemov
2023-08-28 23:23 ` Michael Kelley (LINUX)
2023-08-28 23:57 ` kirill.shutemov [this message]
2023-08-30 0:02 ` Edgecombe, Rick P
2023-08-30 3:33 ` Michael Kelley (LINUX)
2023-08-30 23:40 ` Edgecombe, Rick P
2023-08-31 17:29 ` Edgecombe, Rick P
2023-09-01 14:44 ` Michael Kelley (LINUX)
2023-09-01 16:33 ` Edgecombe, Rick P
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=20230828235750.nbj54llqo7laqmif@box.shutemov.name \
--to=kirill.shutemov@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mikelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=wei.liu@kernel.org \
--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
all inboxes | Powered by JetHome®