~ubuntu-branches/ubuntu/karmic/linux-mvl-dove/karmic-proposed

« back to all changes in this revision

Viewing changes to arch/x86/kernel/kvm.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Bader
  • Date: 2010-03-10 22:24:12 UTC
  • mto: (15.1.2 karmic-security)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20100310222412-k86m3r53jw0je7x1
Tags: upstream-2.6.31
ImportĀ upstreamĀ versionĀ 2.6.31

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
struct kvm_para_state {
35
35
        u8 mmu_queue[MMU_QUEUE_SIZE];
36
36
        int mmu_queue_len;
 
37
        enum paravirt_lazy_mode mode;
37
38
};
38
39
 
39
40
static DEFINE_PER_CPU(struct kvm_para_state, para_state);
76
77
{
77
78
        struct kvm_para_state *state = kvm_para_state();
78
79
 
79
 
        if (paravirt_get_lazy_mode() != PARAVIRT_LAZY_MMU) {
 
80
        if (state->mode != PARAVIRT_LAZY_MMU) {
80
81
                kvm_mmu_op(buffer, len);
81
82
                return;
82
83
        }
184
185
 
185
186
static void kvm_enter_lazy_mmu(void)
186
187
{
 
188
        struct kvm_para_state *state = kvm_para_state();
 
189
 
187
190
        paravirt_enter_lazy_mmu();
 
191
        state->mode = paravirt_get_lazy_mode();
188
192
}
189
193
 
190
194
static void kvm_leave_lazy_mmu(void)
193
197
 
194
198
        mmu_queue_flush(state);
195
199
        paravirt_leave_lazy_mmu();
 
200
        state->mode = paravirt_get_lazy_mode();
196
201
}
197
202
 
198
203
static void __init paravirt_ops_setup(void)