On Tue, Aug 26, 2025 at 1:52 AM Binbin Wu <binbin...@linux.intel.com> wrote: > > > > On 8/21/2025 12:29 PM, Sagi Shahar wrote: > [...] > > + > > +/* > > + * Allows each vCPU to be initialized with different eip and esp. > > + * > > + * __packed is used since the offsets are hardcoded in td_boot.S > > + * > > + * TODO: Replace hardcoded offsets with OFFSET(). This requires getting the > > + * neccesry Kbuild scripts working in KVM selftests. > neccesry -> necessary > > Also, are the comments about "__packed" and "TODO" out dated? >
Thanks, I forgot to update those. > > + */ > > +struct td_per_vcpu_parameters { > > + uint32_t esp_gva; > > + uint64_t guest_code; > > +}; > > + > > +/* > > + * Boot parameters for the TD. > > + * > > + * Unlike a regular VM, KVM cannot set registers such as esp, eip, etc > > + * before boot, so to run selftests, these registers' values have to be > > + * initialized by the TD. > > + * > > + * This struct is loaded in TD private memory at TD_BOOT_PARAMETERS_GPA. > > + * > > + * The TD boot code will read off parameters from this struct and set up > > the > > + * vCPU for executing selftests. > > + * > > + * __packed is used since the offsets are hardcoded in td_boot.S > Same as above for "__packed". > > > + */ > > > [...]