From: Zhang Xiantao <[EMAIL PROTECTED]> Date: Tue, 11 Dec 2007 20:45:48 +0800 Subject: [PATCH] kvm: Moving memslot_id to x86.h
Since it is not called in kvm_main.c, and it also will block kvm structure split, so moved it out. Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h | 5 ----- drivers/kvm/x86.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 668a830..17715b9 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -417,11 +417,6 @@ static inline void kvm_guest_exit(void) current->flags &= ~PF_VCPU; } -static inline int memslot_id(struct kvm *kvm, struct kvm_memory_slot *slot) -{ - return slot - kvm->memslots; -} - static inline gpa_t gfn_to_gpa(gfn_t gfn) { return (gpa_t)gfn << PAGE_SHIFT; diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h index 0fc7020..d711c91 100644 --- a/drivers/kvm/x86.h +++ b/drivers/kvm/x86.h @@ -493,4 +493,9 @@ static inline int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) || vcpu->mp_state == VCPU_MP_STATE_SIPI_RECEIVED; } +static inline int memslot_id(struct kvm *kvm, struct kvm_memory_slot *slot) +{ + return slot - kvm->memslots; +} + #endif -- 1.5.1.2
0002-kvm-Moving-memslot_id-to-x86.h.patch
Description: 0002-kvm-Moving-memslot_id-to-x86.h.patch
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel