Message ID | 20241220161551.89317-11-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2146074wrq; Fri, 20 Dec 2024 08:20:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXPEImO0VjA/Kdw8qsfQrkZdPtZFDZV8qH1zOblJmPGcMgjtxwz5CxCsiBJf+iEXQe+6DgQnA==@linaro.org X-Google-Smtp-Source: AGHT+IGmXRHIXgUoqbtqr75VWAyAGIqRvjgge/bGRPq8h4dFiRZAr122UFDEcS1GgoI4K62TcAHe X-Received: by 2002:a05:622a:50:b0:467:5c17:e28a with SMTP id d75a77b69052e-46a4a9b77b7mr64432631cf.46.1734711615289; Fri, 20 Dec 2024 08:20:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734711615; cv=none; d=google.com; s=arc-20240605; b=WEOvX16veVbfX/VDEO7PT5tnaQs1N3WkjC7EBEEu172LBa4lwLmodeb8LMbs3gn4I/ 5BFwqkEfQO8bnab0SlofwBoUeVbhinowBFoAHrhHp2m3VpDE9Ls2JzGuyaUXtx1uRi/7 Fipp7UEOGpRYHP41FUsV+zrwMsxgbgxsXPaWk43zZ/lNfhxR2WIfZ7yoOLRccFHctzJp Oc3S2zvz/9MeT0NuUPjww4sz6K3mcOa0J54REZVEVhmuX6oc+LFsCERjAWXSggVTjYXc tJ18cPuBZpMJl1qlN2gsARVaGYyve2TgTg3s3RBG2C7sjG3xvf1yrHG1n8nJkzU9QVCO BKNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=Zb+0VQxzILhCFrzwEvDqpARJdylYJT6AW0M63nRZSlg=; fh=2sHkELdqEfd5EiXbJUoyvbx1ROIjhjwIrkUAGgkrAJw=; b=OU/bR2/y7uFkdQ7rbYXK4zToq1L4829tJTTLRt5s2I+xTb8KE9JWhbDNYx84Ex9AaS NFAkGXLzr7hUX/otoQc3kJf/f6OL77qJxBd/5fKMIY/kPEKC6fIVwNHwmBKqOdlfx9f/ yvUjZW5zT4IpLMeJQ2vtp/X/T2GFnQEUhZ3e1mYpM4Fc2ly7FpePKc3qWvOn/A/1ySUL rhJWnWhJyKyteUjgFnHtIOd57KPS8J29SdKb30bbsWJ8AP8SNIswjcw9Dns9tXcGwMON 8PD/e9UWxFYECeeCrRfPj0A6xm2kqFWXFhaW6ks3sZxKBfafX0yksQ0pRwRCthEPIIvj Kwtw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wwd0O7sV; 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; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ebbe3c5si39664591cf.432.2024.12.20.08.20.15 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Dec 2024 08:20:15 -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=wwd0O7sV; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tOfgW-0006iw-48; Fri, 20 Dec 2024 11:17:04 -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 <philmd@linaro.org>) id 1tOfgA-0006Rj-Ta for qemu-devel@nongnu.org; Fri, 20 Dec 2024 11:16:45 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tOfg8-0007JV-OT for qemu-devel@nongnu.org; Fri, 20 Dec 2024 11:16:42 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso15446655e9.1 for <qemu-devel@nongnu.org>; Fri, 20 Dec 2024 08:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734711399; x=1735316199; 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=Zb+0VQxzILhCFrzwEvDqpARJdylYJT6AW0M63nRZSlg=; b=wwd0O7sVlwfvccMYYfAO6xnt9cTbdKg/+q5UXqtvFoztmqodOpGLgzlIeCPIGlXpAV mkLjvpo6IeK/pe+NoIyIEQOsEmIUDoMd4GCQPGX/vHoGGobz4w8/qaL7nsgtTAdasLvs rW3+9Mm9RHpNa+l+trAZgKUsETUeLTBdX+8oYHn3yH+MB/eX15hVZ3ZuqsEx1iRgVYRb Ub+dYms/wkMPRoXVTmsQrT7o+I10PjU3Y45XUTnJ5d8VLbor4fmhP0w1nR50hzUMVJvc UZZ+tMTQ25vjJ4K3GAMndFUCH1VVevpvzPPTN3EkFN/rOWUXmRZ4QbXb95lWDNqr7AQl +OhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711399; x=1735316199; 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=Zb+0VQxzILhCFrzwEvDqpARJdylYJT6AW0M63nRZSlg=; b=vMKs2ri84evJ92+JjoAJ5yeaLl8JmWHj4VQ4q1RrvT6GxLGwpExY8zDfoJ5c5lOiXD 9QwZKTcylhUYapIPGifjUZ4BUp1/3OokMR+ONKiAWf7bEoyi75Ok6+IEhce5t6ock/La OU4kNTC8FnJ5L2ttwwF8tBvNan1/9LXKCuZqNHn8nbW9Pc59HlBhxEn2Sd8TOY6I+EGQ mnlwoLl+BepDRzbk63PJ9cQ8+XbXl1F5gtTnEXyBCbHrSaKys1wFZDNVs1aUx/CIjrz+ X6NpFQiQZALR3OChvkfbfUnoPpDQxmMzljQM9MOxflBeQ+aRgmZje3p/A6O6yJA7wD/Q 3ruA== X-Gm-Message-State: AOJu0YzKkKBaWOVweYVTjDNLad0bpreW3+uD6Dl1WzIS09KlWUy/t2sm v0HJ1bWP2bWFUxNq2rc/KKv637+cbzxceT/U5gXwQwgSLSPB34t6QgNJKgPDprYQGwIxtDHDFaz Y X-Gm-Gg: ASbGncsob9SDwYKaDNxuSEg6RAYfxSNeqfFnjgdWlXvcDDvuB09t+E3IHWaafyj0oav 8jZbg1Mwlm4PwDVhSdgyUSxlrCtzbITLvSE6apOdVtylaheir1niHUjpJ+mcd4/Y7ZZh7GRbjkH DqLElBgAq5MMZmRlnzXSlmyHExHOh0tzAMdYW98jt8o/DiEfMKOo2n8rA5pb5nHonwybAFrT05C cz+pnql7DJYnYVvqEEOG1fZEmrGj5PCt3fxOPz7qL3t+cgaPvChe9XVru49gI6LuEZlcOSKla4= X-Received: by 2002:a05:600c:1d25:b0:434:fdf3:2c26 with SMTP id 5b1f17b1804b1-43668646362mr31307445e9.19.1734711399050; Fri, 20 Dec 2024 08:16:39 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b295sm85627725e9.33.2024.12.20.08.16.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Dec 2024 08:16:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Zhao Liu <zhao1.liu@intel.com> Subject: [PULL 10/59] target/i386/sev: Reduce system specific declarations Date: Fri, 20 Dec 2024 17:15:01 +0100 Message-ID: <20241220161551.89317-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241220161551.89317-1-philmd@linaro.org> References: <20241220161551.89317-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://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> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/59] hvf: arm: Ignore writes to CNTP_CTL_EL0
|
expand
|
diff --git a/target/i386/sev.h b/target/i386/sev.h index 858005a119c..373669eaace 100644 --- a/target/i386/sev.h +++ b/target/i386/sev.h @@ -18,7 +18,17 @@ #include CONFIG_DEVICES /* CONFIG_SEV */ #endif -#include "exec/confidential-guest-support.h" +#if !defined(CONFIG_SEV) || defined(CONFIG_USER_ONLY) +#define sev_enabled() 0 +#define sev_es_enabled() 0 +#define sev_snp_enabled() 0 +#else +bool sev_enabled(void); +bool sev_es_enabled(void); +bool sev_snp_enabled(void); +#endif + +#if !defined(CONFIG_USER_ONLY) #define TYPE_SEV_COMMON "sev-common" #define TYPE_SEV_GUEST "sev-guest" @@ -45,18 +55,6 @@ typedef struct SevKernelLoaderContext { size_t cmdline_size; } SevKernelLoaderContext; -#ifdef CONFIG_SEV -bool sev_enabled(void); -bool sev_es_enabled(void); -bool sev_snp_enabled(void); -#else -#define sev_enabled() 0 -#define sev_es_enabled() 0 -#define sev_snp_enabled() 0 -#endif - -uint32_t sev_get_cbit_position(void); -uint32_t sev_get_reduced_phys_bits(void); bool sev_add_kernel_loader_hashes(SevKernelLoaderContext *ctx, Error **errp); int sev_encrypt_flash(hwaddr gpa, uint8_t *ptr, uint64_t len, Error **errp); @@ -68,4 +66,9 @@ void sev_es_set_reset_vector(CPUState *cpu); void pc_system_parse_sev_metadata(uint8_t *flash_ptr, size_t flash_size); +#endif /* !CONFIG_USER_ONLY */ + +uint32_t sev_get_cbit_position(void); +uint32_t sev_get_reduced_phys_bits(void); + #endif diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index ef80281d28b..e6271e10208 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -36,7 +36,7 @@ #include "hw/qdev-properties.h" #include "hw/block/flash.h" #include "sysemu/kvm.h" -#include "sev.h" +#include "target/i386/sev.h" #define FLASH_SECTOR_SIZE 4096