bitkeeper revision 1.1159.1.240 (417505d1cNviTFEfz5-CEV8P1-J16g)

Merge ssh://srg//auto/groups/xeno/BK/xeno-unstable.bk
into equilibrium.research:/home/irchomes/mwilli2/xeno-docs.bk
This commit is contained in:
mwilli2@equilibrium.research committed 2004-10-19 12:17:21 +00:00
commit 86136259db
7 files changed
+60 -37

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ br260@labyrinth.cl.cam.ac.uk
br260@laudney.cl.cam.ac.uk
cl349@freefall.cl.cam.ac.uk
cl349@labyrinth.cl.cam.ac.uk
cwc22@centipede.cl.cam.ac.uk
djm@kirby.fc.hp.com
gm281@boulderdash.cl.cam.ac.uk
gm281@tetrapod.cl.cam.ac.uk
@@ -393,14 +393,17 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
unsigned long ticks = 0;
long sec_diff;
retry:
__get_time_values_from_xen();
do {
__get_time_values_from_xen();
delta = (s64)(shadow_system_time +
(__get_time_delta_usecs() * 1000) -
processed_system_time);
}
while ( !TIME_VALUES_UP_TO_DATE );
if ( (delta = (s64)(shadow_system_time + __get_time_delta_usecs() * 1000 -
processed_system_time)) < 0 )
if ( unlikely(delta < 0) )
{
if (!TIME_VALUES_UP_TO_DATE)
goto retry;
printk("Timer ISR: Time went backwards: %lld\n", delta);
return;
}
@@ -367,15 +367,16 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
s64 delta, nsec;
long sec_diff, wtm_nsec;
retry:
__get_time_values_from_xen();
do {
__get_time_values_from_xen();
delta = (s64)(shadow_system_time +
(cur_timer->get_offset() * NSEC_PER_USEC) -
processed_system_time);
if (delta < 0) {
if (!TIME_VALUES_UP_TO_DATE)
goto retry;
delta = (s64)(shadow_system_time +
(cur_timer->get_offset() * NSEC_PER_USEC) -
processed_system_time);
}
while (!TIME_VALUES_UP_TO_DATE);
if (unlikely(delta < 0)) {
printk("Timer ISR: Time went backwards: %lld %lld %ld %lld\n",
delta, shadow_system_time,
(cur_timer->get_offset() * NSEC_PER_USEC),
+2 -2
View File
@@ -579,9 +579,9 @@ class ProgAtropos(Prog):
print "\nSet atropos parameters."
def main(self, args):
if len(args) != 5: self.err("%s: Invalid argument(s)" % args[0])
if len(args) != 6: self.err("%s: Invalid argument(s)" % args[0])
dom = args[1]
v = map(int, args[2:5])
v = map(int, args[2:6])
server.xend_domain_cpu_atropos_set(dom, *v)
xm.prog(ProgAtropos)
+21 -8
View File
@@ -295,11 +295,20 @@ static int shadow_mode_table_op(
int bytes = ((((d->max_pages - i) > chunk) ?
chunk : (d->max_pages - i)) + 7) / 8;
copy_to_user(
sc->dirty_bitmap + (i/(8*sizeof(unsigned long))),
m->shadow_dirty_bitmap +(i/(8*sizeof(unsigned long))),
bytes);
if (copy_to_user(
sc->dirty_bitmap + (i/(8*sizeof(unsigned long))),
m->shadow_dirty_bitmap +(i/(8*sizeof(unsigned long))),
bytes))
{
// copy_to_user can fail when copying to guest app memory.
// app should zero buffer after mallocing, and pin it
rc = -EINVAL;
memset(
m->shadow_dirty_bitmap + (i/(8*sizeof(unsigned long))),
0, (d->max_pages/8) - (i/(8*sizeof(unsigned long))));
break;
}
memset(
m->shadow_dirty_bitmap + (i/(8*sizeof(unsigned long))),
0, bytes);
@@ -322,8 +331,12 @@ static int shadow_mode_table_op(
}
sc->pages = d->max_pages;
copy_to_user(
sc->dirty_bitmap, m->shadow_dirty_bitmap, (d->max_pages+7)/8);
if (copy_to_user(
sc->dirty_bitmap, m->shadow_dirty_bitmap, (d->max_pages+7)/8))
{
rc = -EINVAL;
break;
}
break;
@@ -431,7 +444,7 @@ unsigned long shadow_l2_table(
perfc_incrc(shadow_l2_table_count);
if ( (spfn_info = alloc_shadow_page(m)) != NULL )
if ( (spfn_info = alloc_shadow_page(m)) == NULL )
BUG(); /* XXX Deal gracefully with failure. */
spfn_info->u.inuse.type_info = PGT_l2_page_table;
+16 -12
View File
@@ -19,7 +19,7 @@
#include <asm/flushtlb.h>
unsigned long *mapcache;
static unsigned int map_idx, shadow_map_idx[NR_CPUS];
static unsigned int map_idx, epoch, shadow_epoch[NR_CPUS];
static spinlock_t map_lock = SPIN_LOCK_UNLOCKED;
/* Use a spare PTE bit to mark entries ready for recycling. */
@@ -30,11 +30,11 @@ static void flush_all_ready_maps(void)
unsigned long *cache = mapcache;
/* A bit skanky -- depends on having an aligned PAGE_SIZE set of PTEs. */
do { if ( (*cache & READY_FOR_TLB_FLUSH) ) *cache = 0; }
do {
if ( (*cache & READY_FOR_TLB_FLUSH) )
*cache = 0;
}
while ( ((unsigned long)(++cache) & ~PAGE_MASK) != 0 );
perfc_incrc(domain_page_tlb_flush);
local_flush_tlb();
}
@@ -50,25 +50,29 @@ void *map_domain_mem(unsigned long pa)
spin_lock_irqsave(&map_lock, flags);
/* Has some other CPU caused a wrap? We must flush if so. */
if ( map_idx < shadow_map_idx[cpu] )
if ( epoch != shadow_epoch[cpu] )
{
perfc_incrc(domain_page_tlb_flush);
local_flush_tlb();
shadow_epoch[cpu] = epoch;
}
for ( ; ; )
{
do {
idx = map_idx = (map_idx + 1) & (MAPCACHE_ENTRIES - 1);
if ( idx == 0 ) flush_all_ready_maps();
if ( cache[idx] == 0 ) break;
if ( unlikely(idx == 0) )
{
flush_all_ready_maps();
perfc_incrc(domain_page_tlb_flush);
local_flush_tlb();
shadow_epoch[cpu] = ++epoch;
}
}
while ( cache[idx] != 0 );
cache[idx] = (pa & PAGE_MASK) | __PAGE_HYPERVISOR;
spin_unlock_irqrestore(&map_lock, flags);
shadow_map_idx[cpu] = idx;
va = MAPCACHE_VIRT_START + (idx << PAGE_SHIFT) + (pa & ~PAGE_MASK);
return (void *)va;
}
+2 -1
View File
@@ -271,7 +271,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
else
{
domain_pause(d);
if(d->processor != cpu % smp_num_cpus)
synchronise_pagetables(~0UL);
if ( d->processor != (cpu % smp_num_cpus) )
set_bit(DF_MIGRATED, &d->flags);
set_bit(DF_CPUPINNED, &d->flags);
d->processor = cpu % smp_num_cpus;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.