Skip to contentSkip to conversation

Symbol definition not found

DISCUSSION Zhe FANG 3 participants 3 messages Oct 28, 2007

lore
Share & tools
lore

Zhe FANG

author
#0 lore raw

Hi,
I'm studying on some Xen source code. I came up to a symbol named "_mfn" (stands for "machine frame number"). But I searched the whole project and couldn't find its definition. Anyone be kind enough to explain? Thanks.

Signature · 2 lines
Best wishes,
Zhe, FANG
#1 lore raw

I think it's constructed by name splicing inside a macro ('_ ## _name', or something like that). mfn_x gets constructed the same way.

-- Keir

Quoted 5 lines · Zhe FANG

Hi,
I'm studying on some Xen source code. I came up to a symbol named "_mfn" (stands for "machine frame number"). But I searched the whole project and couldn't find its definition. Anyone be kind enough to explain? Thanks.

#2 lore raw
Quoted 2 lines · Keir Fraser

I think it's constructed by name splicing inside a macro ('_ ## _name', or something like that). mfn_x gets constructed the same way.

The definitions have moved around a bit; they're currently in include/asm-x86/mm.h, at about line 500 (the TYPE_SAFE macro). They don't do anything except make it harder to forget to translate between frame-number spaces -- in the shadow code there's an equivalent type 'gfn_t' for untranslated frame numbers from the guest's page tables.

Cheers,

Tim.

Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508