direct-io.hg

changeset 1203:416921d3ed45

bitkeeper revision 1.814 (405e9e2f2N33e61cODYJiwTCPjf5Cw)

memory.c:
Fix broken fix from yesterday. :-)
author kaf24@scramble.cl.cam.ac.uk
date Mon Mar 22 08:05:03 2004 +0000 (2004-03-22)
parents a449515eb5b1
children 5f1ec88d7c3a
files xen/common/memory.c
line diff
     1.1 --- a/xen/common/memory.c	Sun Mar 21 14:42:49 2004 +0000
     1.2 +++ b/xen/common/memory.c	Mon Mar 22 08:05:03 2004 +0000
     1.3 @@ -776,6 +776,7 @@ static int do_extended_command(unsigned 
     1.4      int okay = 1, cpu = smp_processor_id();
     1.5      unsigned int cmd = val & MMUEXT_CMD_MASK;
     1.6      unsigned long pfn = ptr >> PAGE_SHIFT;
     1.7 +    unsigned long old_base_pfn;
     1.8      struct pfn_info *page = &frame_table[pfn];
     1.9  
    1.10      switch ( cmd )
    1.11 @@ -831,10 +832,10 @@ static int do_extended_command(unsigned 
    1.12          {
    1.13              invalidate_shadow_ldt();
    1.14              percpu_info[cpu].deferred_ops &= ~DOP_FLUSH_TLB;
    1.15 +            old_base_pfn = pagetable_val(current->mm.pagetable) >> PAGE_SHIFT;
    1.16              current->mm.pagetable = mk_pagetable(pfn << PAGE_SHIFT);
    1.17 -            write_cr3_counted(pagetable_val(current->mm.pagetable));
    1.18 -            put_page_and_type(&frame_table[pagetable_val(current->mm.pagetable)
    1.19 -                                          >> PAGE_SHIFT]);
    1.20 +            write_cr3_counted(pfn << PAGE_SHIFT);
    1.21 +            put_page_and_type(&frame_table[old_base_pfn]);
    1.22          }
    1.23          else
    1.24          {