From patchwork Sat Jun 24 17:41:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13291720 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBA0DEB64DC for ; Sat, 24 Jun 2023 17:42:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.554646.865967 (Exim 4.92) (envelope-from ) id 1qD7Gn-0001R6-0D; Sat, 24 Jun 2023 17:41:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 554646.865967; Sat, 24 Jun 2023 17:41:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qD7Gm-0001Qz-SX; Sat, 24 Jun 2023 17:41:56 +0000 Received: by outflank-mailman (input) for mailman id 554646; Sat, 24 Jun 2023 17:41:55 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qD7Gl-0000wd-Tg for xen-devel@lists.xenproject.org; Sat, 24 Jun 2023 17:41:55 +0000 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [2a00:1450:4864:20::42e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 687594aa-12b6-11ee-8611-37d641c3527e; Sat, 24 Jun 2023 19:41:54 +0200 (CEST) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-313e714342cso444875f8f.0 for ; Sat, 24 Jun 2023 10:41:54 -0700 (PDT) Received: from m1x-phil.lan ([176.187.217.150]) by smtp.gmail.com with ESMTPSA id i11-20020adfefcb000000b0030ae3a6be5bsm2589165wrp.78.2023.06.24.10.41.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 24 Jun 2023 10:41:53 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 687594aa-12b6-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687628514; x=1690220514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KWWds0uHrElgc22pSSxJ50tOp/lAV9kSI84s7Y2g/GM=; b=JjwltddD/cnNRwVGBpMlwyJ7wVl1Dd+vLMYIA1ed2CA1z7xOvX3DxVnc8gtCpAefSE xo5g1CiCqTPXpIH4UJy5+rsZYpuKE81Z7be0dQTZ7JzdeX9j5u9Mx8Z5FVXetI2JfTyn 47UG4xbVI3FVQad68NuGZMbwNXEiWjQIy56FIAywQDCoHP3eiLzbyyHqhhjC+Qo5u3Cg 4ws7FQYnR+gqZpuWyo+1mj6A2Kgebxl4XbhZ5VUeZWE7itV80GK8EINXxv01Dffpjd6L xbEKH2Df7yWf84jA7YjCpGFhq4pv94jz889H0Vtin/e3lUxP++i7igvK6CJ6NiiQ/q9Z ZPCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687628514; x=1690220514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KWWds0uHrElgc22pSSxJ50tOp/lAV9kSI84s7Y2g/GM=; b=JbfNmFC+ZW97D6kyq7EyO9PkvjxMOhYQUOkgxf59xCqXhMOvbRa3ev0uFUqSBX11M9 tqjcHWbYKLr7Q3GNhdnzXMBKYQAYtsErX8V44Y/H7QhQb67D99Vb4AlSMEra8l6zAm4W ZN7djHAaT55SUipirWq2BkTHmZLMqeCMRLUZz31MxKNkgiDU5VVO/R0LZ8h1+wYBvuQd lZqZXHZLU6tjk/ZitiI24eoFWs0cadC7qf5mvXv5gCLBbnaRMKcj2NxKohqLGRgvPKXi dOf/ba9KnCyMo44hIvpNl6BiYLCl3bgLlLvnCFomRiNZb0kUyQsz6GGRcOEQiBQP5unz YaAg== X-Gm-Message-State: AC+VfDxhm+KC10g8knWL6XNj4WdM0WrHYOM5DuDR3JJd3N+NDbqWK9P8 nH83VaK3qHoZ9Zor+UjR+zA4Yw== X-Google-Smtp-Source: ACHHUZ4nAed12yC0ATc4y4T6ov4JNqGmFeW1j5VBFhJ02T6YV9zBXbm//g8zhdDQtOShKB4zz31FCw== X-Received: by 2002:a5d:5541:0:b0:311:abb:e377 with SMTP id g1-20020a5d5541000000b003110abbe377mr6323739wrw.39.1687628513811; Sat, 24 Jun 2023 10:41:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, Marcel Apfelbaum , Peter Maydell , Roman Bolshakov , qemu-arm@nongnu.org, Richard Henderson , Alexander Graf , xen-devel@lists.xenproject.org, Sunil Muthuswamy , Anthony Perard , Stefano Stabellini , Yanan Wang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paul Durrant , Reinoud Zandijk , Eduardo Habkost , Cameron Esfahani , Paolo Bonzini Subject: [PATCH v3 04/16] accel: Fix a leak on Windows HAX Date: Sat, 24 Jun 2023 19:41:09 +0200 Message-Id: <20230624174121.11508-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230624174121.11508-1-philmd@linaro.org> References: <20230624174121.11508-1-philmd@linaro.org> MIME-Version: 1.0 hThread is only used on the error path in hax_kick_vcpu_thread(). Fixes: b0cb0a66d6 ("Plumb the HAXM-based hardware acceleration support") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/i386/hax/hax-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c index 3e5992a63b..a2321a1eff 100644 --- a/target/i386/hax/hax-all.c +++ b/target/i386/hax/hax-all.c @@ -205,6 +205,9 @@ int hax_vcpu_destroy(CPUState *cpu) */ hax_close_fd(vcpu->fd); hax_global.vm->vcpus[vcpu->vcpu_id] = NULL; +#ifdef _WIN32 + CloseHandle(cpu->hThread); +#endif g_free(vcpu); return 0; }