qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 03/13] migration/ram: add support to send enc


From: Singh, Brijesh
Subject: Re: [Qemu-devel] [PATCH v2 03/13] migration/ram: add support to send encrypted pages
Date: Fri, 12 Jul 2019 15:46:18 +0000


On 7/12/19 4:27 AM, Dr. David Alan Gilbert wrote:

[snip]

>>>
>>> OK, that's our very last usable flag!  Use it wisely!
>>>
>>
>> Hmm, maybe then I missed something. I thought the flag is 64-bit and
>> we have more room. Did I miss something ?
> 
> The 64bit value written in the stream is
>    (the address of the page) | (the set of flags)
> 
> so the set of usable flags depends on the minimum page alignment
> of which the worst case is ARM with a TARGET_PAGE_BITS_MIN of 10
> (most others are 4k at least but that's still only 2 left).
> 
>>

Got it, thanks


>>
>> Currently, there are two interfaces by which we can know if we
>> are dealing with encrypted guest. kvm_memcrypt_enabled() or
>> MachineState->memory_encryption pointer. I did realized that
>> migration code have not dealt with kvm so far.
>>
>> How about target/i386/sev.c exporting the migration functions and
>> based on state of MachineState->memory_encryption we call the
>> SEV migration routines for the encrypted pages?
> 
> I'm migration not machine; so from my point of view the thing that's
> important is making sure we've not got KVM direct dependencies in here;
> if you've already got a MachineState->memory_encryption pointer then I'd
> hope you could do something like:
> 
>      ret = MachineState->memory_encryption->ops->save(....)
> 

I will look into doing something like this.

thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]