On 14 December 2020 21:13:40 GMT, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> wrote: >What about different address space ids? > >gfn_to_memslot() now calls kvm_memslots() which gives memslots for >address space id = 0 but what if we want something different? Note, >different vCPUs can (in theory) be in different address spaces so we >actually need 'vcpu' and not 'kvm' then. Sure, but then you want a different function; this one is called 'kvm_map_gfn()' and it operates on kvm_memslots(). It *doesn't* operate on the vcpu at all. Which is why it's so bizarre that its argument is a 'vcpu' which it only ever uses to get vcpu->kvm from it. It should just take the kvm pointer. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.