Message ID | 20170913090522.4022-15-Sergio.G.DelReal@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GI2Q8BH9"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xsbTC6hLGz9sMN for <incoming@patchwork.ozlabs.org>; Wed, 13 Sep 2017 19:09:35 +1000 (AEST) Received: from localhost ([::1]:41066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1ds3fp-0004at-VE for incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 05:09:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <sergio.g.delreal@gmail.com>) id 1ds3cT-0001d1-Jz for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:06:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <sergio.g.delreal@gmail.com>) id 1ds3cS-0007bl-DA for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:06:05 -0400 Received: from mail-vk0-x242.google.com ([2607:f8b0:400c:c05::242]:36913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <sergio.g.delreal@gmail.com>) id 1ds3cS-0007bZ-A5 for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:06:04 -0400 Received: by mail-vk0-x242.google.com with SMTP id 184so3319699vkn.4 for <qemu-devel@nongnu.org>; Wed, 13 Sep 2017 02:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sQZfEirLUEfl+0nLwAE0//xDERmby12p+jvWz+cQod0=; b=GI2Q8BH94yL8bLp4SAnG3jxGfk5q7Mi6WMHwgZQDsdojPGvnpbc0TAj6ZNbmb0noiX 7NRcW7Vbj4IXON/P2cApJX0oEqPy/0EzutEt3EPH5R/zJyEZUU/fNCdVbdla5BHwNvjg OP+CreSBBkNV98wnJfyg4J/siII5pBxA30/WrAqLJiMqVoNPqKXSD+l4GgPuMxUuBhUZ yFO3pXS5CqRsEwmZ9uae1an7HCe7FsUkt9vv7tftQ2hIit/5BMNb5xZTTPBotspfMFli CTTw48hArUhL9Pd62XaiLNdfLkliPE6GHpSJh2lWFgg8sKqyDjF8Em97BpofbWgdDkCr tfpw== 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:in-reply-to :references; bh=sQZfEirLUEfl+0nLwAE0//xDERmby12p+jvWz+cQod0=; b=Hd8G18RVh/yTQvrac4i7pu2hbmQGQ/y09o/ndZ0VshuI686wO9rBETLsdNAx8fjNzR 2CZVspUzXWbRNBxuSsaWiShwXeeaLxm8Y0lvoQpaNzJ4tsSIwpUQJZQpnLviqUETRnIm zlmIBAGP4jDXRWNM97T+durmhQZweXR4J4guGJ8sFTXz8nHu5PguNe21y651v3ztXRHI EdLbkkQUyoHQNcbSb/zrRMSywIzAuewnfEgMaBlAXNsIU3HoY1HDo1SOquw1dcdGBi2z 8gCi4ZbeExlETB/FHakHmn88jeZitJjOqPaLTfyopIo24hVX9Ly7nLolsHFmU/dCDkWy xoVg== X-Gm-Message-State: AHPjjUg6ipwZtUGwKdvSh8mHP2muaQf3J/lFwCh45RdwdrqqHajrFOTu 3Xv1CAyBoRM/UfPV X-Google-Smtp-Source: AOwi7QBRJnVziFnUXeM7Ed9gxB0Dh8lH16ohcwLq2FSjaXvjYf6DzYVs1YcNQgwMBA1t0L98uSlhWg== X-Received: by 10.31.107.68 with SMTP id g65mr12480121vkc.9.1505293563736; Wed, 13 Sep 2017 02:06:03 -0700 (PDT) Received: from localhost.localdomain ([190.66.154.128]) by smtp.gmail.com with ESMTPSA id r74sm2677601vkf.19.2017.09.13.02.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Sep 2017 02:06:03 -0700 (PDT) From: Sergio Andres Gomez Del Real <sergio.g.delreal@gmail.com> X-Google-Original-From: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com> To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 04:05:22 -0500 Message-Id: <20170913090522.4022-15-Sergio.G.DelReal@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170913090522.4022-1-Sergio.G.DelReal@gmail.com> References: <20170913090522.4022-1-Sergio.G.DelReal@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c05::242 Subject: [Qemu-devel] [PATCH v4 14/14] hvf: inject General Protection Fault when vmexit through vmcall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com>, pbonzini@redhat.com, stefanha@gmail.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
add support for Hypervisor.framework in QEMU
|
expand
|
diff --git a/target/i386/hvf-all.c b/target/i386/hvf-all.c index 105a63ad4f..0a544470ad 100644 --- a/target/i386/hvf-all.c +++ b/target/i386/hvf-all.c @@ -903,7 +903,9 @@ int hvf_vcpu_exec(CPUState *cpu) macvm_set_rip(cpu, rip + ins_len); break; case VMX_REASON_VMCALL: - /* TODO: inject #GP fault */ + env->exception_injected = EXCP0D_GPF; + env->has_error_code = true; + env->error_code = 0; break; default: error_report("%llx: unhandled exit %llx\n", rip, exit_reason);
This patch injects a GP fault when the guest vmexit's by executing a vmcall instruction. Signed-off-by: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com> --- target/i386/hvf-all.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)