Re: [PATCH v5 12/22] x86/virt/tdx: Convert all memory regions in memblock to TDX memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2022-08-03 at 07:22 -0700, Dave Hansen wrote:
> On 8/2/22 18:30, Kai Huang wrote:
> > On Fri, 2022-07-08 at 11:34 +1200, Kai Huang wrote:
> > > > Why not just entirely remove the lower 1MB from the memblock structure
> > > > on TDX systems?  Do something equivalent to adding this on the kernel
> > > > command line:
> > > > 
> > > >  	memmap=1M$0x0
> > > I will explore this option.  Thanks!
> > Hi Dave,
> > 
> > After investigating and testing, we cannot simply remove first 1MB from e820
> > table which is similar to what 'memmap=1M$0x0' does, as the kernel needs low
> > memory as trampoline to bring up all APs.
> 
> OK, so don't remove it, but reserve it so that the trampoline code can
> use it.

It's already reserved in the existing reserve_real_mode().  What we need is to
*remove* the first 1MB from memblock.memory, so that the
for_each_mem_pfn_range() will just not get any memory below 1MB.  Otherwise we
need to explicitly skip the first 1MB in TDX code like what I did  in this
series.

-- 
Thanks,
-Kai






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux