-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AMD SEV-SNP vm support #3682
base: master
Are you sure you want to change the base?
Conversation
12fe5e9
to
0ca6462
Compare
Hello @zhencliu , I wanted to give this a try. Is it a recent version which is pushed here in this draft or do you have any recent updates which you are yet to push into this draft which resolves conflicts with recent master? |
Hi, thanks for looking into this, this patch was not updated since I pushed it, it's out of date, the reason is SNP is not yet supported even in upstream, so we still don't have a final qemu command line which can be running a SNP VM, the options/params are TBD, talked with VT maintainers, we'll wait till the qemu upstream is ready. |
Fix SNP mem allocation issue ontop of SNP draft PR avocado-framework#3682 Signed-off-by: Srikanth Aithal <[email protected]>
Fix SNP mem allocation issue ontop of SNP draft PR avocado-framework#3682 + AMDSEV fix Signed-off-by: Srikanth Aithal <[email protected]>
bdb8008
to
77d17f1
Compare
32af24f
to
749b0a5
Compare
qemu cmdline sample: -object sev-snp-guest,id=sev0, \ cbitpos=51,reduced-phys-bits=1, \ policy=0x30000, \ id-block=YWFhYWFhYWFhYWFhYWFhCg==, \ id-auth=CxHK/OKLkXGn/KpAC7Wl1FSiisWDbGTEKz..., \ auth-key-enabled=on, \ host-data=LNkCWBRC5CcdGXirbNUV1OrsR28s..., \ guest-visible-workarounds=AA==, \ Signed-off-by: Zhenchao Liu <[email protected]>
Hi @zixi-chen , conflict resolved, thanks. |
@zhencliu I was testing this PR, when SNP guest boots I also see memory-backend-ram getting assigned by default in addition to the memory-backend-memfd object. When further debugged I see this place avocado-vt/virttest/qemu_devices/qcontainer.py Line 3469 in 3a65355
|
Thanks.
The default memory-backend-ram is used only when we don't assign any value
Yes, may I ask how you pass memory-backend-memfd ? Actually we have a cartesian param "vm_mem_backend" to be used for assign the memory backend, you can set it as |
Thanks for getting back. I was using I am listing configs I use from a memory and vm type below, please let me know your config:
|
I see, vm_mem_backend is used for system memory, i.e. you will see the object id in machine option (e.g. -machine q35, xxx, memory-backend=mem_backend_obj_id). You defined the mem_devs, but set use_mem = no, which means no memory device will be generated. I cannot figure out what happened to your code, would you paste your code change, or the qemu command line in your debug log? |
@zhencliu I am testing out this patch on top of avocado-vt master, there is no custom code which I have added. Common config:
Using above common config without
Using common config with use_mem = no I see the SNP boot test passing, below are the mem related commandline generated:
|
Use slots_mem param to set the slots
So what is upm0 used for? Can we remove it? I mean the following configuration is OK for memory vm_secure_guest_type = snp Would you give your expected qemu command line for memory device? Then we can show you some sample configurations, currently we are confused for your usage of memory |
@zhencliu there were some confusions, now its clear. I have tested SNP boot with memfd successfully with this patch. I am now in process of trying out different memory configurations. I will let you know here how it goes. Thank you for your time till now! |
@zhencliu I could able to test this patch out in my environment with different memory topologies. |
No description provided.