On 5/30/22, 6:10 AM, "Michal Prívozník" <mprivozn@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.