Commit 8dd69b8f2cba91b7f2bcb3b4e12fbd35574869c1
1 parent
089af991
fummy DM_LOWPRI handling
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1648 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
8 deletions
hw/apic.c
... | ... | @@ -109,8 +109,16 @@ static void apic_bus_deliver(uint32_t deliver_bitmask, uint8_t delivery_mode, |
109 | 109 | |
110 | 110 | switch (delivery_mode) { |
111 | 111 | case APIC_DM_LOWPRI: |
112 | + /* XXX: search for focus processor, arbitration */ | |
113 | + if (deliver_bitmask) { | |
114 | + uint32_t m = 1; | |
115 | + while ((deliver_bitmask & m) == 0) | |
116 | + m <<= 1; | |
117 | + deliver_bitmask = m; | |
118 | + } | |
119 | + break; | |
120 | + | |
112 | 121 | case APIC_DM_FIXED: |
113 | - /* XXX: arbitration */ | |
114 | 122 | break; |
115 | 123 | |
116 | 124 | case APIC_DM_SMI: |
... | ... | @@ -336,12 +344,12 @@ static void apic_init_ipi(APICState *s) |
336 | 344 | static void apic_startup(APICState *s, int vector_num) |
337 | 345 | { |
338 | 346 | CPUState *env = s->cpu_env; |
339 | - if (!env->cpu_halted) | |
347 | + if (!(env->hflags & HF_HALTED_MASK)) | |
340 | 348 | return; |
341 | 349 | env->eip = 0; |
342 | 350 | cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12, |
343 | 351 | 0xffff, 0); |
344 | - env->cpu_halted = 0; | |
352 | + env->hflags &= ~HF_HALTED_MASK; | |
345 | 353 | } |
346 | 354 | |
347 | 355 | static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode, |
... | ... | @@ -368,11 +376,6 @@ static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode, |
368 | 376 | } |
369 | 377 | |
370 | 378 | switch (delivery_mode) { |
371 | - case APIC_DM_LOWPRI: | |
372 | - /* XXX: search for focus processor, arbitration */ | |
373 | - dest = s->id; | |
374 | - break; | |
375 | - | |
376 | 379 | case APIC_DM_INIT: |
377 | 380 | { |
378 | 381 | int trig_mode = (s->icr[0] >> 15) & 1; | ... | ... |