[libvirt][PATCH RESEND v12 5/6] conf: Introduce SGX EPC element into device memory xml

Yang, Lin A lin.a.yang at intel.com
Wed Jun 1 23:06:06 UTC 2022


On 5/30/22, 6:10 AM, "Michal Prívozník" <mprivozn at redhat.com> wrote:

> > +    for (i = 0; i < def->nmems; i++) {
> > +        /* sgx epc memory does not support hotplug */
> > +        if (def->mems[i]->model != VIR_DOMAIN_MEMORY_MODEL_SGX_EPC) {
>
> This is very, very easy to overlook. I mean the condition. Also, notice
> how when you added new memory type compiler identified all the places
> you need to adjust? That's because I've rewrote the code to use switch()
> everywhere. And this new code goes against that direction.

Thanks for pointing this out. I will update it to use switch() style instead of
if condition.

Thanks,
Lin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220601/29f12047/attachment-0001.htm>


More information about the libvir-list mailing list