~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to hw/i386/kvmvapic.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#include "exec/exec-all.h"
15
15
#include "sysemu/sysemu.h"
16
16
#include "sysemu/cpus.h"
 
17
#include "sysemu/hw_accel.h"
17
18
#include "sysemu/kvm.h"
18
19
#include "hw/i386/apic_internal.h"
19
20
#include "hw/sysbus.h"
412
413
    if (!kvm_enabled()) {
413
414
        cpu_get_tb_cpu_state(env, &current_pc, &current_cs_base,
414
415
                             &current_flags);
 
416
        /* Account this instruction, because we will exit the tb.
 
417
           This is the first instruction in the block. Therefore
 
418
           there is no need in restoring CPU state. */
 
419
        if (use_icount) {
 
420
            --cs->icount_decr.u16.low;
 
421
        }
415
422
    }
416
423
 
417
424
    pause_all_vcpus();
450
457
    resume_all_vcpus();
451
458
 
452
459
    if (!kvm_enabled()) {
453
 
        /* tb_lock will be reset when cpu_loop_exit_noexc longjmps
454
 
         * back into the cpu_exec loop. */
 
460
        /* Both tb_lock and iothread_mutex will be reset when
 
461
         *  longjmps back into the cpu_exec loop. */
455
462
        tb_lock();
456
463
        tb_gen_code(cs, current_pc, current_cs_base, current_flags, 1);
457
464
        cpu_loop_exit_noexc(cs);
534
541
    uint8_t alternates[2];
535
542
    const uint8_t *pattern;
536
543
    const uint8_t *patch;
537
 
    int patches = 0;
538
544
    off_t pos;
539
545
    uint8_t *rom;
540
546
 
565
571
    }
566
572
 
567
573
    g_free(rom);
568
 
 
569
 
    if (patches != 0 && patches != 2) {
570
 
        return -1;
571
 
    }
572
 
 
573
574
    return 0;
574
575
}
575
576