lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 26 Feb 2024 10:07:12 -0800
From: Isaku Yamahata <isaku.yamahata@...ux.intel.com>
To: David Matlack <dmatlack@...gle.com>
Cc: Sean Christopherson <seanjc@...gle.com>, isaku.yamahata@...el.com,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	isaku.yamahata@...il.com, Paolo Bonzini <pbonzini@...hat.com>,
	erdemaktas@...gle.com, Sagi Shahar <sagis@...gle.com>,
	Kai Huang <kai.huang@...el.com>, chen.bo@...el.com,
	hang.yuan@...el.com, tina.zhang@...el.com, gkirkpatrick@...gle.com,
	Vipin Sharma <vipinsh@...gle.com>, isaku.yamahata@...ux.intel.com
Subject: Re: [PATCH v18 064/121] KVM: TDX: Create initial guest memory

On Thu, Feb 01, 2024 at 03:06:46PM -0800,
David Matlack <dmatlack@...gle.com> wrote:

> +Vipin Sharma
> 
> On Wed, Jan 31, 2024 at 4:21 PM Sean Christopherson <seanjc@...gle.com> wrote:
> > On Mon, Jan 22, 2024, isaku.yamahata@...el.com wrote:
> >
> > The real reason for this drive-by pseudo-review is that I am hoping/wishing we
> > can turn this into a generic KVM ioctl() to allow userspace to pre-map guest
> > memory[*].
> >
> > If we're going to carry non-trivial code, we might as well squeeze as much use
> > out of it as we can.
> >
> > Beyond wanting to shove this into KVM_MEMORY_ENCRYPT_OP, is there any reason why
> > this is a VM ioctl() and not a vCPU ioctl()?  Very roughly, couldn't we use a
> > struct like this as input to a vCPU ioctl() that maps memory, and optionally
> > initializes memory from @source?
> >
> >         struct kvm_memory_mapping {
> >                 __u64 base_gfn;
> >                 __u64 nr_pages;
> >                 __u64 flags;
> >                 __u64 source;
> >         }
> >
> > TDX would need to do special things for copying the source, but beyond that most
> > of the code in this function is generic.
> >
> > [*] https://lore.kernel.org/all/65262e67-7885-971a-896d-ad9c0a760907@polito.it
> 
> We would also be interested in such an API to reduce the guest
> performance impact of intra-host migration.

I introduce KVM_MEMORY_MAPPING and KVM_CAP_MEMORY_MAPPING with v19.
We can continue the discussion there.
-- 
Isaku Yamahata <isaku.yamahata@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ