[BACK]Return to patch-target_i386_nvmm_nvmm-all.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / emulators / qemu / patches

Annotation of pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c, Revision 1.4

1.4     ! nia         1: $NetBSD: patch-target_i386_nvmm_nvmm-all.c,v 1.1 2021/05/24 14:22:08 ryoon Exp $
1.1       ryoon       2:
1.4     ! nia         3: Re-add NetBSD 9 support.
        !             4:
        !             5: --- target/i386/nvmm/nvmm-all.c.orig   2021-08-24 17:35:41.000000000 +0000
1.1       ryoon       6: +++ target/i386/nvmm/nvmm-all.c
1.4     ! nia         7: @@ -750,7 +750,11 @@ nvmm_vcpu_loop(CPUState *cpu)
        !             8:          nvmm_vcpu_pre_run(cpu);
        !             9:
        !            10:          if (qatomic_read(&cpu->exit_request)) {
1.2       nia        11: +#if NVMM_USER_VERSION >= 2
1.4     ! nia        12:              nvmm_vcpu_stop(vcpu);
1.2       nia        13: +#else
                     14: +            qemu_cpu_kick_self();
                     15: +#endif
1.4     ! nia        16:          }
        !            17:
        !            18:          /* Read exit_request before the kernel reads the immediate exit flag */
        !            19: @@ -767,6 +771,7 @@ nvmm_vcpu_loop(CPUState *cpu)
        !            20:          switch (exit->reason) {
        !            21:          case NVMM_VCPU_EXIT_NONE:
        !            22:              break;
1.2       nia        23: +#if NVMM_USER_VERSION >= 2
1.4     ! nia        24:          case NVMM_VCPU_EXIT_STOPPED:
        !            25:              /*
        !            26:               * The kernel cleared the immediate exit flag; cpu->exit_request
        !            27: @@ -775,6 +780,7 @@ nvmm_vcpu_loop(CPUState *cpu)
        !            28:              smp_wmb();
        !            29:              qcpu->stop = true;
        !            30:              break;
        !            31: +#endif
        !            32:          case NVMM_VCPU_EXIT_MEMORY:
        !            33:              ret = nvmm_handle_mem(mach, vcpu);
        !            34:              break;
        !            35: @@ -888,8 +894,12 @@ nvmm_ipi_signal(int sigcpu)
        !            36:  {
        !            37:      if (current_cpu) {
        !            38:          struct qemu_vcpu *qcpu = get_qemu_vcpu(current_cpu);
1.2       nia        39: +#if NVMM_USER_VERSION >= 2
1.4     ! nia        40:          struct nvmm_vcpu *vcpu = &qcpu->vcpu;
        !            41:          nvmm_vcpu_stop(vcpu);
1.2       nia        42: +#else
                     43: +        qcpu->stop = true;
                     44: +#endif
1.4     ! nia        45:      }
        !            46:  }
        !            47:

CVSweb <webmaster@jp.NetBSD.org>