From patchwork Wed Nov 14 13:04:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandro Sanchez X-Patchwork-Id: 10682623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D65C14BA for ; Wed, 14 Nov 2018 13:25:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DF6528446 for ; Wed, 14 Nov 2018 13:25:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71DC8286C2; Wed, 14 Nov 2018 13:25:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C13E28446 for ; Wed, 14 Nov 2018 13:25:21 +0000 (UTC) Received: from localhost ([::1]:60227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMvAW-00058w-Ti for patchwork-qemu-devel@patchwork.kernel.org; Wed, 14 Nov 2018 08:25:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMuqm-0005hM-Df for qemu-devel@nongnu.org; Wed, 14 Nov 2018 08:05:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMuqi-000791-AE for qemu-devel@nongnu.org; Wed, 14 Nov 2018 08:04:56 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMuqi-00077w-4G for qemu-devel@nongnu.org; Wed, 14 Nov 2018 08:04:52 -0500 Received: by mail-wm1-x344.google.com with SMTP id r63-v6so15438749wma.4 for ; Wed, 14 Nov 2018 05:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kryptoslogic.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LQBvpuBbvjuGaJD7PUoqRcoR/Ys1g6mQF6XXhxmVEJk=; b=ulWwoX8pUg0bXvN32lXAfp06BBCN+2iwyyzg0hhL3AabyXV3ErbwikecGRIV7jGKUi GcDpK7a2gSr35VHX71aP4HSKOAT8mZlCXaII+3R01CAbXk0J80ZblLK01ODys2Kqvyxr fZl96woMZ88/5Gqz3TvX7YxIE/6EgGQiviQ1IoFewpLeG5OUZPUgkW8n5AwjJ1ueR9rc eGGIPJByvb9pXcQYzxEh6dEhxjr3rbASveXxyixQsgk2FTu8hgF6yx8rDZ4LYPwR78d0 asXhEe80NJUsljB73XEseflxPQZWpG/yifUmaiTPUukUiXHBrl+NwicjhhToL+1R1Vg4 TSzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LQBvpuBbvjuGaJD7PUoqRcoR/Ys1g6mQF6XXhxmVEJk=; b=QgFbcDKFaBeh1qecNlAhjretGT3Ntlw5bM1MNPiGVPNJGxmwdt+mXzRjPwTg6BuBK7 /4jrBNC3RbP+FWN9M9EawuQbLtp2j0Nu8htKmwOsDYII3sCre5T4mMr98mo/GHzkAJmz hK5RbFaT6lzAxL3UfveiSmuOxAqKR7dDqzpDX8VsicQ0R6GgOQGWsHDP87D3s5xvdl90 V4ekDK25ZtULWcBhLi4hqnsuSkytijGJWiMHVAUVvpkDiRZm1ToCl3GgjTGHZd662i43 QxXAk0QBHp765HtWia1IwAVQt8ZzwnAmkxqS3O5vBdxDy8w08LTOfVYs26iwnkLIlQYG 689w== X-Gm-Message-State: AGRZ1gL72K0tix7gFO9w4vRgJFVbJAOjxcbZIXMKR+tYx5keVnBB06Iw Ti4210g5w2Z8McRfnZCsDgECEVgoaXvXLA== X-Google-Smtp-Source: AJdET5c7bj6+4CiSXPoFeDD9cZ1hvAN2YIQbQGyXfGLaYWbBlnLn4GtYN82kcjnnAzvmfCTov+qkog== X-Received: by 2002:a1c:a8cf:: with SMTP id r198mr1850864wme.95.1542200690447; Wed, 14 Nov 2018 05:04:50 -0800 (PST) Received: from localhost.localdomain (189.red-83-55-165.dynamicip.rima-tde.net. [83.55.165.189]) by smtp.gmail.com with ESMTPSA id s66sm1618953wmf.34.2018.11.14.05.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 05:04:48 -0800 (PST) From: Alexandro Sanchez Bach To: qemu-devel@nongnu.org Date: Wed, 14 Nov 2018 05:04:28 -0800 Message-Id: <20181114130428.32326-1-asanchez@kryptoslogic.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH] hax: Support for Linux hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Alexandro Sanchez Bach , Eduardo Habkost , yu.ning@intel.com, Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Intel HAXM supports now 32-bit and 64-bit Linux hosts. This patch includes the corresponding userland changes. Since the Darwin userland backend is POSIX-compliant, the hax-darwin.{c,h} files have been renamed to hax-posix.{c,h}. This prefix is consistent with the naming used in the rest of QEMU. Signed-off-by: Alexandro Sanchez Bach --- target/i386/Makefile.objs | 5 ++++- target/i386/hax-i386.h | 10 +++++++++- target/i386/{hax-darwin.c => hax-posix.c} | 0 target/i386/{hax-darwin.h => hax-posix.h} | 0 4 files changed, 13 insertions(+), 2 deletions(-) rename target/i386/{hax-darwin.c => hax-posix.c} (100%) rename target/i386/{hax-darwin.h => hax-posix.h} (100%) diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs index 04678f5503..be36d31d23 100644 --- a/target/i386/Makefile.objs +++ b/target/i386/Makefile.objs @@ -12,8 +12,11 @@ obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o ifdef CONFIG_WIN32 obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-windows.o endif +ifdef CONFIG_LINUX +obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o +endif ifdef CONFIG_DARWIN -obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-darwin.o +obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o obj-$(CONFIG_HVF) += hvf/ endif obj-$(CONFIG_WHPX) += whpx-all.o diff --git a/target/i386/hax-i386.h b/target/i386/hax-i386.h index 6abc156f88..f87a64c9df 100644 --- a/target/i386/hax-i386.h +++ b/target/i386/hax-i386.h @@ -20,6 +20,10 @@ typedef int hax_fd; #endif +#ifdef CONFIG_LINUX +typedef int hax_fd; +#endif + #ifdef CONFIG_WIN32 typedef HANDLE hax_fd; #endif @@ -83,7 +87,11 @@ void hax_memory_init(void); #ifdef CONFIG_DARWIN -#include "target/i386/hax-darwin.h" +#include "target/i386/hax-posix.h" +#endif + +#ifdef CONFIG_LINUX +#include "target/i386/hax-posix.h" #endif #ifdef CONFIG_WIN32 diff --git a/target/i386/hax-darwin.c b/target/i386/hax-posix.c similarity index 100% rename from target/i386/hax-darwin.c rename to target/i386/hax-posix.c diff --git a/target/i386/hax-darwin.h b/target/i386/hax-posix.h similarity index 100% rename from target/i386/hax-darwin.h rename to target/i386/hax-posix.h