|
From: | Paolo Bonzini |
Subject: | Re: [RESEND PATCH 05/32] vl: Add "sgx-epc" option to expose SGX EPC sections to guest |
Date: | Tue, 4 May 2021 08:58:18 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 04/05/21 02:09, Sean Christopherson wrote:
Is there a way to process "-device sgx-epc..." before vCPUs are realized? The ordering problem was the only reason I added a dedicated option.
If it's just CPUID, one possibility could be to mark the EPC sections specially in KVM_SET_USER_MEMORY_REGION and synthesize the leaves within KVM; or even look inside the VMA structs and detect EPC regions that way.
Otherwise, the -M solution would work. Paolo
From the changelog: Because SGX EPC is enumerated through CPUID, EPC "devices" need to be realized prior to realizing the vCPUs themselves, i.e. long before generic devices are parsed and realized. So even though EPC sections could be realized through the generic -devices command, they need to be created much earlier for them to actually be usable by the guest.
[Prev in Thread] | Current Thread | [Next in Thread] |