Commit 1046127d authored by Fabien Chouteau's avatar Fabien Chouteau Committed by Stefan Weil
Browse files

Release SMP restriction on Windows



The previous patches make QEMU SMP safe on Windows, we can now release
the restriction.

Signed-off-by: default avatarFabien Chouteau <chouteau@adacore.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
parent ec9bd89f
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -69,25 +69,7 @@ static BOOL WINAPI qemu_ctrl_handler(DWORD type)

void os_setup_early_signal_handling(void)
{
    /* Note: cpu_interrupt() is currently not SMP safe, so we force
       QEMU to run on a single CPU */
    HANDLE h;
    DWORD_PTR mask, smask;
    int i;

    SetConsoleCtrlHandler(qemu_ctrl_handler, TRUE);

    h = GetCurrentProcess();
    if (GetProcessAffinityMask(h, &mask, &smask)) {
        for(i = 0; i < 32; i++) {
            if (mask & (1 << i))
                break;
        }
        if (i != 32) {
            mask = 1 << i;
            SetProcessAffinityMask(h, mask);
        }
    }
}

/* Look for support files in the same directory as the executable.  */