From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90D01C433EF for ; Mon, 6 Sep 2021 13:25:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5495760F45 for ; Mon, 6 Sep 2021 13:25:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5495760F45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:54862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNEcf-0003Zx-Dn for qemu-devel@archiver.kernel.org; Mon, 06 Sep 2021 09:25:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNEPg-0001aA-MS for qemu-devel@nongnu.org; Mon, 06 Sep 2021 09:11:52 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:38877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNEPe-0007uG-Ja for qemu-devel@nongnu.org; Mon, 06 Sep 2021 09:11:52 -0400 Received: by mail-wr1-x431.google.com with SMTP id u16so9796905wrn.5 for ; Mon, 06 Sep 2021 06:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/RU/BIwi2NMUOiTU0NmUWQqmXLerm1KNQgo7Fx1Az8k=; b=ZbW0ed3KIkaSwvDtv7qPhatvH/HaZ810ovR23o24n1i2qqGIInXNa/4V5f4RUgJnvv y56fanUViw8mAAA0lc57RDBcgkFYTOg9r/TJlvNbI3MUgkOAZO0RIiwIAoGS4bRUh5fa UMntCJxWzjNVT9ygEAICJaqa95dxnOTM09+mjjaVu7zZicRO+Jf57VKXQoqqHrlOegiQ DyYbxLuFI2Xnb9IUS5/Ef1SdJ4ZqrF3RF97gY/mJN/1up2J3BPOiMl+Fi9utH2Eyjj2+ s2sDey5gv+hFQKGLMtb2KaEvNrhJrHxSm7P/v/I0MGHMTsGbs6aIom3gPdimvARV10rb DWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/RU/BIwi2NMUOiTU0NmUWQqmXLerm1KNQgo7Fx1Az8k=; b=i1h+cxlQ88mxhqkMClpCNjWkQPIM0UK9g/OJctScTeXapozr/4lErOsk3JT9x+KXUr U0aDU7DpJIY3nNpCPZ4nqW73nG+PL9fdd+lNysVxw+lnZIOwFW79DLd6R9JnLeoE6Yj+ GAy990ncEWPA6d5kwgBa+psrZ5HH5eCkd+D7aTs4Tp/YyRLpUaL8XHAZGLOEnsKnvWRS bZBbqNd8Lmp0cBZUCwGgu4EehCT1ni7bNSx3TLqbtqEezohfs9fR38cwbEmEQ2Dsdw6J YUMH8veEavECLOI0srjJksxUV7AyLKXFsZWblYKWfQPqPHBI7U0rA0x2sbsTV7lTnk9h FQIg== X-Gm-Message-State: AOAM533DepF+k5ATNQGFlPv0FcTZzFrVp1JtKWdbJt/kqZM/rLuCn5jF 4v5WXrIF/La4fxO6pKl5tEQMZgmMfJA= X-Google-Smtp-Source: ABdhPJxLeYRmWYYjapn2DvRiDLZqirJzviuiWoJcAYvYd9cSLuxb78HOiM1qGvFB7wY0OUqhieT69g== X-Received: by 2002:adf:e604:: with SMTP id p4mr13467132wrm.37.1630933909286; Mon, 06 Sep 2021 06:11:49 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id k4sm7992331wrm.74.2021.09.06.06.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 06:11:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 28/36] q35: Add support for SGX EPC Date: Mon, 6 Sep 2021 15:10:51 +0200 Message-Id: <20210906131059.55234-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210906131059.55234-1-pbonzini@redhat.com> References: <20210906131059.55234-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yang Zhong , Sean Christopherson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Sean Christopherson Enable SGX EPC virtualization, which is currently only support by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong Message-Id: <20210719112136.57018-21-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini --- hw/i386/pc_q35.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 565fadce54..f27d49f7e4 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -177,6 +177,9 @@ static void pc_q35_init(MachineState *machine) x86ms->below_4g_mem_size = machine->ram_size; } + if (x86ms->sgx_epc_list) { + pc_machine_init_sgx_epc(pcms); + } x86_cpus_init(x86ms, pcmc->default_cpu_version); kvmclock_create(pcmc->kvmclock_create_always); -- 2.31.1