From patchwork Thu Feb 15 14:20:33 2024 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: 772899 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp854350wre; Thu, 15 Feb 2024 06:22:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWkejSsTzcx4LchUfo+Bre4Fa29rnBSg/cxS3eyGtkVtzPlg4WhAujfGKTbzFvEWk0vTy1LYi64ZY01M6SckrAj X-Google-Smtp-Source: AGHT+IFa4fbanx5r9oC0c2/i7kGQuswq/k/lnkc8w4nGD+ohIfd1UX0WiMZQBhEwfgvZUYcu5emI X-Received: by 2002:ac8:5d56:0:b0:42c:8b9f:572f with SMTP id g22-20020ac85d56000000b0042c8b9f572fmr2393747qtx.30.1708006922093; Thu, 15 Feb 2024 06:22:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708006922; cv=none; d=google.com; s=arc-20160816; b=icIF+6blg9Z+qrvcXAYrzrujJ40cSzLfrliLmwlb9Hj4VmugVLmYHhMPid26ZAl4Fw XehtML+0zi6C7mCDk3nSVxrru1MHFZ0duVheCteZt/jgUa7hk1f8ZOL+futm43KfOQzP XVKu9ThR9wTxyN9MNYzx6NblXeXhCCcX3ERwjaANvc+DmRXOWoeSrBx+1+R4U8i3Pd8H Na0+Kj1z08Je1sg1RH89oskOcxYMf3Jr4QOWXV2rq+mJcnK9z5++vj7mF9nXGlgfAqKe kWjR3eLscHTZEov+M9zGUCJVpF25Wvh2txoGYp0+N2mz7+X3bMJ9tLJJ0kE19ZHPPUi5 vP2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3nHBcC1vTxuWuhw1KTr8iuMLr3JCNHYJX8skgFi1VDE=; fh=DMqkOfgEuEv+NK82oH8jB6Bnw2j32Ri8LBZL6rw6gdA=; b=IdLcWSqrwk7/rNUEPof1UVwpKYSWgg6l2sFN13aMhaSApWmdkD23dI1i+k8Smiv8jN rt3UEiBTbHuU+7pChho30/pZdM7Ts7gL9NFtXxe12LnotgnyBCVCzHvJtiyXWK1whqsC OrHP8X921NCCAZknU69HylrpSajx/JYX6Vk7DR9yBLbsbpQCRkdNh2OmhaBcXxxwbViR 0DPS8vri/9icIAKuxLTBzF8ZEw1mNwwRDo+JJF6PcrVtQ8dNJSegyT8UOD90LNUme89Q 3yf8BiIasmdc1A7aiz31IAPYhnaQCsLr9ph5Y/yimVKPU+0ThPPO+8rsicghlgT7HvNQ 9l0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NeenWfF6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x13-20020ac8538d000000b0042c2f47ede5si1407577qtp.467.2024.02.15.06.22.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 06:22:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NeenWfF6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1racbj-0005aQ-VQ; Thu, 15 Feb 2024 09:20:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1racbg-0005YS-OT for qemu-devel@nongnu.org; Thu, 15 Feb 2024 09:20:56 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1racbW-0000DF-Kt for qemu-devel@nongnu.org; Thu, 15 Feb 2024 09:20:56 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-41211acfcfcso6360905e9.1 for ; Thu, 15 Feb 2024 06:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708006843; x=1708611643; darn=nongnu.org; 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=3nHBcC1vTxuWuhw1KTr8iuMLr3JCNHYJX8skgFi1VDE=; b=NeenWfF6pti7xuc5xaXoi2F2DFjYnQRtALd5VeHXVVoFKFRn0ampEC5BSpukajIP3g z2CchPiDOi8hCi0jDvgl97XeTE3JF7x2/EqS1y3pv2EFRKWsaGufNe+wU+bOC+Au+Kdz tIqmN+xdEwBi5xamAU3A+zymxacPgMPcoGFDYHqV4uR2zg6PGzXyLZ66wj4gjd9TTL+n FZSqBVTECY+W7C0rb8N0loVY17l95LgjMGrTrtwPqqUNjRBegp3sI35oL5036f3yILzt Vt88kbXfTgyXULtjC8FpFoZ4qCE2cSqK3lXzT5Qp+ySzeQFrUPbHoO0FR+YRvSDalYx3 aKgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708006843; x=1708611643; 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=3nHBcC1vTxuWuhw1KTr8iuMLr3JCNHYJX8skgFi1VDE=; b=JPy59Ay2+G+01OZo9eczhD1w8ImXLIlspv1LY3yFxFYdoKzeL4Xj4Ian4d1GtuRjet x2E3b5OMXkVD+PK0Hz2WA3j13bl3gcqgFwoewAL8F7ethvylilFlIMj9oaMsODdGVDZ5 Gt+g+2xb9BScXayU5V2jpOwgt+thdIVsinLWPQWXXDVzfEZ0E96wRITd1ufC/wBvCGRu hGYSd+qn2Z/E77+u7ymX8opZdWkgTiU2O3E+yctJSqSNfn0Rx73IhLnyZ59LGDfAX2/a fUBzjTxabbykvMKdyqqz+GG8X9CUQuRSt8nNMKKQEAWLc/ix8v5Gy6WtPgxhX5wUI5WP 77MA== X-Gm-Message-State: AOJu0YxSlJvv6UXmkqchwF6SZlXZ3Tx99I9T++TPCgvqKz6XeAoq+3zS 3MN888kM5X5ANzTO2PToeGpqp5xomw0NDddv2DZYy2jIt93FhP1pXXA/JDIbu+VvjE5e00xRV97 +VGg= X-Received: by 2002:a05:600c:3caa:b0:411:d7de:ea8e with SMTP id bg42-20020a05600c3caa00b00411d7deea8emr1310715wmb.23.1708006843679; Thu, 15 Feb 2024 06:20:43 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id z7-20020a05600c0a0700b00411c3c2fc55sm2159883wmp.45.2024.02.15.06.20.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 06:20:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Eduardo Habkost , Richard Henderson , Paolo Bonzini , kvm@vger.kernel.org, Marcelo Tosatti , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= Subject: [PATCH v2 1/3] MAINTAINERS: Cover hw/i386/kvm/ in 'X86 KVM CPUs' section Date: Thu, 15 Feb 2024 15:20:33 +0100 Message-ID: <20240215142035.73331-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215142035.73331-1-philmd@linaro.org> References: <20240215142035.73331-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index a24c2b51b6..b526a08015 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -490,6 +490,7 @@ L: kvm@vger.kernel.org S: Supported F: docs/system/i386/amd-memory-encryption.rst F: docs/system/i386/sgx.rst +F: hw/i386/kvm/ F: target/i386/kvm/ F: target/i386/sev* F: scripts/kvm/vmxcap From patchwork Thu Feb 15 14:20:34 2024 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: 772897 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp854321wre; Thu, 15 Feb 2024 06:21:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW2Bk+32ARFjBC6Zn6C8KlcA4AK7+aRq9phJ+QqTM8xydHtDc3mTxfGmsEu1Melo6WLHrt+aQxFGIHmYn4/DWRs X-Google-Smtp-Source: AGHT+IHNVsZFCdyEin+9hkJoKqUsiB68tk94Cravifz8jMVTC/gSHEpQ1EwY9uo6lYLXJElrXcSV X-Received: by 2002:a05:6214:d4f:b0:68f:27a7:2938 with SMTP id 15-20020a0562140d4f00b0068f27a72938mr1250636qvr.26.1708006919514; Thu, 15 Feb 2024 06:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708006919; cv=none; d=google.com; s=arc-20160816; b=IdDiCipw50txYtSSr0IuTjQWQiJD228/pcr2p1xc3YNDG0qQ4vFBhXoEhGdwhkDf4i o9SpaWdPdGupoWV+PlqHwN0sRed4udSPg6P3naFsQ63JbR8A+H9wuI44SkeM8E1Um0+R fp9P4fI1hpCnddyq2HIaBsOO1tO0hQVcHe4ihK8V2i6XHpl04X6k5+zaInspmPqEPdfB DuY5uWI3wVgKEbTg2h7nQRxDJXCS7+mbtHZFKIRYhS8fiKG29p5Rdzu6dkL1tANm0YzD EN8DXRMybaJ70D8afb4SmjxfQVo6nwJSyMtP5zEPm3ns7AOdKeclVhX8z2ESWQVKPkEs gN4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZLvepa7gcmUSWKB1EKhqFyqI1EusKlbmBcij87F8F7E=; fh=DMqkOfgEuEv+NK82oH8jB6Bnw2j32Ri8LBZL6rw6gdA=; b=RDBlreyjitrQRXJ0I5qSrYml6VodTaC3mRo+DjTuyGDvWRo5PvMVqsBkuXki3inS+7 WYdS9f2ykdBqnnjHgAInmEH28UwGbjpzYD8KWqNQuUFEbWVPANVKKINbChov+XKlqTIG uX9BNyUuvWCc+xp0jUR44trBIP4hlb796JCKOf89ZwUks1ubANppaZwMmloazvT68kGg 27GvD1RfhVcqPA2EEHmpHIJmyyRnxM5tMJl2Mkogsi2FBiH72j5oZcBZKBUl8SiafQbD 6yjft1En6RbBf+6HksnnOE26rQ2aJUqf9PC8i20gz4gxDmMBtlGmlM+cs8LRj1vlexon NzhA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QqtJ+lZq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3-20020a0562140dc300b0068f144f0510si1593898qvt.459.2024.02.15.06.21.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 06:21:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QqtJ+lZq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1racbi-0005Yz-L5; Thu, 15 Feb 2024 09:20:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1racbe-0005Ww-CH for qemu-devel@nongnu.org; Thu, 15 Feb 2024 09:20:54 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1racbc-0000Dy-DW for qemu-devel@nongnu.org; Thu, 15 Feb 2024 09:20:54 -0500 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2d11d17dddeso10669191fa.3 for ; Thu, 15 Feb 2024 06:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708006849; x=1708611649; darn=nongnu.org; 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=ZLvepa7gcmUSWKB1EKhqFyqI1EusKlbmBcij87F8F7E=; b=QqtJ+lZqk2Xhcu9yC88OaoqUcczOLiQenAiXnVxt/IHQnCyDYqjmHIe2zE5zNfd7LZ HhXxT9Nr8Y1Tiu0/qf4E3IMQygZ1Y+w9GCztTx7P35RTfyU9OeXo6fojqdBOyOqhlBDb o8lge0OU776UY9eTF0PpAsYG2FHk9HN1WirnistnJo+fzhkXAHY1ntojgIGPY/wphrbP ZHehF2D21XRiOrUsFUCgXcoPbxH3hSzsPdCuJd6UebsFNGcvLV1dsv5uX0eaadUvd1kC KqcpzhKez1hDx2BlC3R5Ofs4D8IhtxvIM0KCSjCMjhpvbhdXltY/YDPk1RHVTI5Zi+zm 3S4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708006849; x=1708611649; 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=ZLvepa7gcmUSWKB1EKhqFyqI1EusKlbmBcij87F8F7E=; b=tNvcYvMnvR2VFb4upzV+ndSBL/C5a2WOB3UyiHA0huBftrBMscqvLtyh2/7UbDSIdG lRtxPLptdeSuBpdmmjKQrgfty+wDS94/ws/iLnVa3QXJu0geP2BhL7tj48ezKoctntTG H7U1nqIRYY8vRPEMs2NvTCObNJEWgPZ5/aZXp582bBc2NHIHTqKy4aBGZUiPn0BgRQWf rd11DL3NiNULwxApPSkvun319RglF6V294dolRlsoBU2r8EHHmG+058mqZqhk7AXX7WY qlM434oXNCy+egeReX3nL57BeNWl/v6KHBsDS/gALwlgi7/eKe2NhJiREZ3wWiit4DiD +Bdg== X-Gm-Message-State: AOJu0YxpjIDdsv6qk3v+qn3HtkIrszkn9chkZi9BAp3dyuOYP9EH9Fgx 7aYWFNyAEuEb54zAiqieaCoWJd8ydjWrkcPJy3HpTlu7E2Jd4aszlMdik3fcu+h4h/iMK9ITuWY 3u5k= X-Received: by 2002:a2e:a548:0:b0:2d0:c996:7c99 with SMTP id e8-20020a2ea548000000b002d0c9967c99mr1604340ljn.51.1708006849401; Thu, 15 Feb 2024 06:20:49 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id m40-20020a05600c3b2800b00411c9c0ede4sm2228137wms.7.2024.02.15.06.20.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 06:20:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Eduardo Habkost , Richard Henderson , Paolo Bonzini , kvm@vger.kernel.org, Marcelo Tosatti , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= Subject: [PATCH v2 2/3] hw/i386: Move SGX files within the kvm/ directory Date: Thu, 15 Feb 2024 15:20:34 +0100 Message-ID: <20240215142035.73331-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215142035.73331-1-philmd@linaro.org> References: <20240215142035.73331-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=philmd@linaro.org; helo=mail-lj1-x234.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Per hw/i386/Kconfig: config SGX bool depends on KVM So move SGX related files under kvm/ for clarity. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/{ => kvm}/sgx-epc.c | 0 hw/i386/{ => kvm}/sgx-stub.c | 0 hw/i386/{ => kvm}/sgx.c | 0 hw/i386/kvm/meson.build | 3 +++ hw/i386/meson.build | 2 -- 5 files changed, 3 insertions(+), 2 deletions(-) rename hw/i386/{ => kvm}/sgx-epc.c (100%) rename hw/i386/{ => kvm}/sgx-stub.c (100%) rename hw/i386/{ => kvm}/sgx.c (100%) diff --git a/hw/i386/sgx-epc.c b/hw/i386/kvm/sgx-epc.c similarity index 100% rename from hw/i386/sgx-epc.c rename to hw/i386/kvm/sgx-epc.c diff --git a/hw/i386/sgx-stub.c b/hw/i386/kvm/sgx-stub.c similarity index 100% rename from hw/i386/sgx-stub.c rename to hw/i386/kvm/sgx-stub.c diff --git a/hw/i386/sgx.c b/hw/i386/kvm/sgx.c similarity index 100% rename from hw/i386/sgx.c rename to hw/i386/kvm/sgx.c diff --git a/hw/i386/kvm/meson.build b/hw/i386/kvm/meson.build index a4a2e23c06..c9c7adea77 100644 --- a/hw/i386/kvm/meson.build +++ b/hw/i386/kvm/meson.build @@ -13,6 +13,9 @@ i386_kvm_ss.add(when: 'CONFIG_XEN_EMU', if_true: files( 'xenstore_impl.c', )) +i386_ss.add(when: 'CONFIG_SGX', if_true: files('sgx-epc.c','sgx.c'), + if_false: files('sgx-stub.c')) + i386_ss.add_all(when: 'CONFIG_KVM', if_true: i386_kvm_ss) xen_stubs_ss = ss.source_set() diff --git a/hw/i386/meson.build b/hw/i386/meson.build index b9c1ca39cb..d7318b83e4 100644 --- a/hw/i386/meson.build +++ b/hw/i386/meson.build @@ -17,8 +17,6 @@ i386_ss.add(when: 'CONFIG_Q35', if_true: files('pc_q35.c')) i386_ss.add(when: 'CONFIG_VMMOUSE', if_true: files('vmmouse.c')) i386_ss.add(when: 'CONFIG_VMPORT', if_true: files('vmport.c')) i386_ss.add(when: 'CONFIG_VTD', if_true: files('intel_iommu.c')) -i386_ss.add(when: 'CONFIG_SGX', if_true: files('sgx-epc.c','sgx.c'), - if_false: files('sgx-stub.c')) i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c')) i386_ss.add(when: 'CONFIG_PC', if_true: files( From patchwork Thu Feb 15 14:20:35 2024 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: 772898 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp854319wre; Thu, 15 Feb 2024 06:21:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXeX5piSWCAMvGDFUezR/CLSe+vM6/zoYxP44BI9f3zoJCLAlSvJcudMogjHvUIf0xKJZoQ4N+31d4GQcBFGHcR X-Google-Smtp-Source: AGHT+IGoTq6CuuyePMl+zgCBt9J3H4LlGt1PT6cySGCoBkhS/bmbFP0DZLJQjDfDWygWA3Ajss9V X-Received: by 2002:a0c:f084:0:b0:68f:29f1:7d1c with SMTP id g4-20020a0cf084000000b0068f29f17d1cmr580722qvk.32.1708006919387; Thu, 15 Feb 2024 06:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708006919; cv=none; d=google.com; s=arc-20160816; b=b67kjIq3bH01KVUZe2wz4YDO5XTpdpqBRN61qNo9YVVcmm5o9Yn+TxYy6on2ERR8yi MyXbzCdB5TH0hcfO3NOL7Rw5TTI6hU+ugDRIjhJQYIhIPFOh8vvvwNLzA8WvUi5p5bgU nnti4gf7seQt40lB2AwwTpepf+MZ3zebIbrowXY1809KYRK3FxxDjRqAu9Tt/CF4Qnsl d3UnoMhcR5TIdkgwiw9PUnnWVZvwUH2ReQALOkctOTkAt97hDHyy9wIsHu7tciyBCSMm ahNKIOgE/NYllMRWj6wVkyVPCEw09NTMfP1QZ3Cco18fBokYT0TPlWeXLgTHN/ryaUGa JJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V9a2tbqcFhv7866Po+eazVne7c9fJyb++6ZKJPt9MeE=; fh=3Hd8qMl8w0TWU/7EzjzjgUkpGqVLHsqXOaZ3eVq4yfA=; b=bv6sTk6opvgtbrp+pRSpbW9sO/rF3gzrX4iIabOkMqOGb3WFTrP0qOFPSx5VIoHbRx l6ZU+rIK3+/EKeshREvTO5EDuNiGKvKUy9J2NamKi/N/Sym3X3eS2/SH3sC9LNp6XT5f 0rRSXtaHOA5WFKSPi7Cht7DBqHztms/6Kp9nbmCDzgoQp0bwA7k/WsZvYT5hRs5BMUeP a8gjS/K3vrfdePK+vMjZgdIAtpvNy+wUDGWMMm7QAaBZ2U/K3Ro0gIisVWvbE0agkKuG vR6Vst8urzKIZNSPJouXlywTxOBJir7cbU0mQBjK0sJY8qjUQUQgPvEePqt3OWhQdVV8 LIOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jQ5qJT7T; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id eq12-20020ad4596c000000b0068cbb4a23d9si1562547qvb.118.2024.02.15.06.21.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 06:21:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jQ5qJT7T; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1racbu-0005gS-RS; Thu, 15 Feb 2024 09:21:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1racbs-0005dL-EQ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 09:21:08 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1racbh-0000En-BZ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 09:21:08 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4121954d4c0so3556245e9.0 for ; Thu, 15 Feb 2024 06:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708006855; x=1708611655; darn=nongnu.org; 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=V9a2tbqcFhv7866Po+eazVne7c9fJyb++6ZKJPt9MeE=; b=jQ5qJT7TFC22SWPzleXZ0K8hWMveJGkAQ6eXr4/RMaXQv6sE0mmFX7JPKTE/2msJE8 krjuisnwpOUV2WelnoK0fde9HgHt5Ms/LhyyIFUovlCrnyM0EDHC1LTmEfyC8G7L6btL Pi5uR/VUPa/Lb2ZBhC21z7lOE/uZk40o9IXPAvAEfPVjPvMHG0JVerHkpSqpprjnk4+T zj8TvmvWTScBREGd9TAlQPZqjqBNpCmyAmtrnCuJ0nBpMYRkAjTweEVzftWufzNxuHVZ GzLGyHDtO2/+nbXykpr2XV59qmrvpgnarB2zD6o4lBf5zlBjmggxhDuI+t0Q7VT2Q7GQ 6BGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708006855; x=1708611655; 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=V9a2tbqcFhv7866Po+eazVne7c9fJyb++6ZKJPt9MeE=; b=HyVa1gfE7elpqrKr9A8UP6bI2g6iTal3W6ee7cBGywUZrg+DYnWaSnDXg28g8Hnn4k i4o2Qhu2hTCOdJKEQxd02EtTsLVs/8P1TzCTcH5RxVQdIKR8XL5gDDyTgdg92fzfLmfg FmY3PRiBtIrLXOP7o5TiugoztrMxZBX2HuKQT6FnMmWUdjhUIoXJu1jiZGaYPiX4HITI ALKoaD8rKB7lexpN+iQHxje02eDR+VzPc70J6Qvt7AGCezEJ8fcSOscnI5JRZBLyaU7W 5TwsvKx2k5QJk2efPiRmeLS6Jfhbpos+xqcJ0EPB99TBDNHVClgsHdeLi8HSdOF3dIYf sgtg== X-Gm-Message-State: AOJu0Yz6d0CaVhoHAmMTRyErKDPOar3veglUF0/XThg28FO62pPKIr+u u79pTPYEV7GB8V2XKycPTaUqE983maeSdYff/WuW7UC+M1nsGLyoQ6ud4gZYIwenTsda59f2Ik7 7/Dg= X-Received: by 2002:a05:600c:1c0a:b0:411:dd82:a23c with SMTP id j10-20020a05600c1c0a00b00411dd82a23cmr1813787wms.0.1708006855024; Thu, 15 Feb 2024 06:20:55 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b004103e15441dsm2147381wmb.6.2024.02.15.06.20.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 06:20:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Eduardo Habkost , Richard Henderson , Paolo Bonzini , kvm@vger.kernel.org, Marcelo Tosatti , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Michael Tokarev Subject: [PATCH v2 3/3] hw/i386/sgx: Use QDev API Date: Thu, 15 Feb 2024 15:20:35 +0100 Message-ID: <20240215142035.73331-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215142035.73331-1-philmd@linaro.org> References: <20240215142035.73331-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Prefer the QDev API over the low level QOM one. No logical change intended. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé --- Only build-tested. --- hw/i386/kvm/sgx.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/i386/kvm/sgx.c b/hw/i386/kvm/sgx.c index 70305547d4..de76397bcf 100644 --- a/hw/i386/kvm/sgx.c +++ b/hw/i386/kvm/sgx.c @@ -286,7 +286,6 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms) SGXEPCState *sgx_epc = &pcms->sgx_epc; X86MachineState *x86ms = X86_MACHINE(pcms); SgxEPCList *list = NULL; - Object *obj; memset(sgx_epc, 0, sizeof(SGXEPCState)); if (!x86ms->sgx_epc_list) { @@ -300,16 +299,15 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms) &sgx_epc->mr); for (list = x86ms->sgx_epc_list; list; list = list->next) { - obj = object_new("sgx-epc"); + DeviceState *dev = qdev_new(TYPE_SGX_EPC); /* set the memdev link with memory backend */ - object_property_parse(obj, SGX_EPC_MEMDEV_PROP, list->value->memdev, - &error_fatal); + object_property_parse(OBJECT(dev), SGX_EPC_MEMDEV_PROP, + list->value->memdev, &error_fatal); /* set the numa node property for sgx epc object */ - object_property_set_uint(obj, SGX_EPC_NUMA_NODE_PROP, list->value->node, - &error_fatal); - object_property_set_bool(obj, "realized", true, &error_fatal); - object_unref(obj); + object_property_set_uint(OBJECT(dev), SGX_EPC_NUMA_NODE_PROP, + list->value->node, &error_fatal); + qdev_realize_and_unref(dev, NULL, &error_fatal); } if ((sgx_epc->base + sgx_epc->size) < sgx_epc->base) {