Bug 214165

Summary: Missing clflush before RECEIVE_UPDATE_DATA
Product: Virtualization Reporter: Masahiro Kozuka (masa.koz)
Component: kvmAssignee: virtualization_kvm
Status: NEW ---    
Severity: normal CC: seanjc
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.13.12 Subsystem:
Regression: No Bisected commit-id:
Attachments: Add the missing sev_clflush_pages()

Description Masahiro Kozuka 2021-08-24 11:52:46 UTC
Created attachment 298457 [details]
Add the missing sev_clflush_pages()

In sev_receive_update_data(), sev_clflush_pages() is not called b/w sev_pin_memory() and RECEIVE_UPDATE_DATA. Because of this missing, we will often see the pre-written contents in the memory updated by RECEIVE_UPDATE_DATA. I guess that we should call sev_clflush_pages() as LAUNCH_UPDATE_DATA.
Comment 1 Sean Christopherson 2021-09-13 23:06:46 UTC
If you can provided a Signed-off-by, I'll happily write a changelog and post the patch on your behalf.  Thanks!
Comment 2 Masahiro Kozuka 2021-09-14 00:30:40 UTC
(In reply to Sean Christopherson from comment #1)
> If you can provided a Signed-off-by, I'll happily write a changelog and post
> the patch on your behalf.  Thanks!

Thabk you for your reply. Please use Signed-off-by: Masahiro Kozuka <masa.koz@kozuka.jp>