Re: [PATCH 3/7] mshv: Rename mshv_mem_region to mshv_region

From: Anirudh Rayabharam

Date: Thu Apr 02 2026 - 23:55:19 EST


On Thu, Apr 02, 2026 at 10:57:09AM -0700, Stanislav Kinsburskii wrote:
> On Thu, Apr 02, 2026 at 04:33:24PM +0000, Anirudh Rayabharam wrote:
> > On Wed, Apr 01, 2026 at 10:12:40PM +0000, Stanislav Kinsburskii wrote:
> > > The mshv_mem_region structure represents guest address space regions,
> > > which can be either RAM-backed memory or memory-mapped IO regions
> > > without physical backing. The "mem_" prefix incorrectly suggests the
> > > structure only handles memory regions, creating confusion about its
> > > actual purpose.
> > >
> > > Remove the "mem_" prefix to align with existing function naming
> > > (mshv_region_map, mshv_region_pin, etc.) and accurately reflect that
> > > this structure manages arbitrary guest address space mappings
> > > regardless of their backing type.
> >
> > I don't think the "mem_" prefix automatically suggested the backing
> > type.
> >
>
> What else can it suggest?

To me it just suggested that the struct contained info or properties of
a guest memory region. The name itself didn't suggest what backing type
the memory has.

>
> > Isn't mshv_region too vague now? Region of what?
> >
>
> The region of address space, which can or can not be backed by memory.

Yeah but that's not obvious just from the new name. The new name just
says mshv_region and doesn't what the region is of.

Thanks,
Anirudh.

>
> Thanks,
> Stanislav
>
> > Thanks,
> > Anirudh.