[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALzav=diVvCJnJpuKQc7-KeogZw3cTFkzuSWu6PLAHCONJBwhg@mail.gmail.com>
Date: Thu, 1 Feb 2024 15:06:46 -0800
From: David Matlack <dmatlack@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: 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>
Subject: Re: [PATCH v18 064/121] KVM: TDX: Create initial guest memory
+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.
Powered by blists - more mailing lists