From patchwork Fri Dec 16 22:04:09 2022 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: 634480 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1085384pvb; Fri, 16 Dec 2022 14:24:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXtooDyrrwwx18eGvaG/7pwqz9I1octtDh+faIjZZmbqTFJDIiIO8X9PC2MLSzFxbqOSxO3N X-Received: by 2002:ac8:6ec9:0:b0:3a9:2478:2d70 with SMTP id f9-20020ac86ec9000000b003a924782d70mr11561873qtv.24.1671229456432; Fri, 16 Dec 2022 14:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671229456; cv=none; d=google.com; s=arc-20160816; b=zvgfwUEWU/WQJG4dp4px04dKg9cSjm3ZSWRQbtR9FU+STi+RpjjG/GCrDSjTfEOjG+ mTuDKwA3aAcHHAHpTkZCcnKrQkQHyg+b6RxeI1KFycs/CTlw6PaxnWyMaF4KH5YX7GTE nC7MpjTVl+ke6lsRKh41KoS40FWO603FlU+JzyoGWVU9pffiXiQJznHb6hw5LSB29xZN /2PVTwKSPOzF4dj2WnGoYFTt97zV+0M0U6/MsEU3cXs5XcRgQugCbZDcTbESrgqWEhEm VTdHMKjwcf9aGvoIYYKG3NWKHguj6uUg8Z1CD5gzyVtNEtnnhJLzHuIz32LHvkr/oYYt 0s5Q== 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=eLBFoNDM1Z35hmIAgQprz2tI86WbCCpPFsa3peLy1EM=; b=hgmnNoOShhQ8oF9YjniwaTcs/77yqv250GpnYudvRonQNTo9SoejzE7fOrNxextSfK mwmaFs7xVtvXh/kkf/ekrm/3e33775PiocgRmDvrYwS94uGTV48LkNzkAlxxw9+SZp5J ttiPrg/PXybxKJV9mzxePhBkACJGX2gugSGFLQefDkkalb2Z49WE289478zyPkArW68x 84HxLVqeV+pHbKbYVJ5wj8rTBtlF0/EomFs0ZfDo62hOSMREcqcicr3xvbSHU+3OwTbI 8h/GX8M7iu++jn5WL4KpS6EHSTxUdgVrjbVNOPX4BYpc7iSHPRWyhoFFX/SxAUDSAwp1 DjsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XGo4b7JB; 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 m19-20020ac84453000000b003a687783259si1502467qtn.553.2022.12.16.14.24.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Dec 2022 14:24:16 -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=XGo4b7JB; 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 1p6Ip8-0007hr-8a; Fri, 16 Dec 2022 17:04:58 -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 1p6Iom-0007fg-2M for qemu-devel@nongnu.org; Fri, 16 Dec 2022 17:04:37 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Iok-0005Bt-0G for qemu-devel@nongnu.org; Fri, 16 Dec 2022 17:04:35 -0500 Received: by mail-ed1-x532.google.com with SMTP id i9so5511578edj.4 for ; Fri, 16 Dec 2022 14:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=eLBFoNDM1Z35hmIAgQprz2tI86WbCCpPFsa3peLy1EM=; b=XGo4b7JBCogNCEAhigxMHOfTKfQN2L+sg+8R9B+w86byt19bl/87m9C0Jbv67cYesl jz8JlkzkKLvK8KtEaky89sYrkmzSiekvvfnJL9WuI1lEMJactDo+wmoN0D8MT6zWEQAO o1rf+sca3RD8LmGpgrrSNnqRrOkM/NuoBzLW7yx9GKYT/5HZupc9L8prpoakrWwMprHc L/lNX0hM6iEOi8f7n1XznOAy9SL+Ghst5W9TBa9eN7JygLpeX7rMNF2K3dUoWZtUJZpz Dp3pr3issqRsrcjsLJ5M9ZHnNEW2ombpJIo0eJ4BodHaA5GxT7ShkWPr4GkVdCc3T/7N cZ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=eLBFoNDM1Z35hmIAgQprz2tI86WbCCpPFsa3peLy1EM=; b=CSk5ILYsqtWFARtMo2eETohcTdi62Q5vLkEpbvHdBqQAFOXOhCoOuufF2pTLt5fAwN uNI+4wOyrFquwTKXw/evPtXWytxqGfqFDS/Ex1/dUibdtZqe19hd78AzTojGAOs8BHOQ ovc/JIaLDOQlrHrCHIdkyq4Fsp3SQXRtzx8MJUJ3kNoQ1vNw9I1LIVq5bxXBs/N940+P gfkZ23M8DTyJmppBttPezam/4a5TKINdWGeTSsjPhHNCq4M2MtqhU1aY7wRBmEZFJv7y bmImhQ7lAK+vBFjgjfFnCCwBIDOxjTqNQeG6/os7aFKwQEfIath70BFyY7ZNN4qFBgti 2aCw== X-Gm-Message-State: ANoB5pnVXNtr1ywkkyfUuWfRwx466eOsEqvkq4jwXITR0vJVnrT/Ur1u iCFFxFnX6Z6KVewWmzil6H+zh80/oFO3s+BRegY= X-Received: by 2002:a05:6402:f24:b0:46d:ca42:2e59 with SMTP id i36-20020a0564020f2400b0046dca422e59mr33897754eda.11.1671228272238; Fri, 16 Dec 2022 14:04:32 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id b4-20020aa7d484000000b0046267f8150csm1312805edr.19.2022.12.16.14.04.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Dec 2022 14:04:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Thomas Huth , Halil Pasic , Paolo Bonzini , Christian Borntraeger , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Eric Farman , Ilya Leoshkevich , qemu-s390x@nongnu.org, Richard Henderson , Peter Xu , Matthew Rosato Subject: [PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation Date: Fri, 16 Dec 2022 23:04:09 +0100 Message-Id: <20221216220411.6779-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221216220411.6779-1-philmd@linaro.org> References: <20221216220411.6779-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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=unavailable 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 Protected Virtualization is irrelevant in user emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/s390x/pv.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h index 5bca5bcaf1..a4814ce303 100644 --- a/include/hw/s390x/pv.h +++ b/include/hw/s390x/pv.h @@ -12,6 +12,12 @@ #ifndef HW_S390_PV_H #define HW_S390_PV_H +#ifdef CONFIG_USER_ONLY + +static inline bool s390_is_pv(void) { return false; } + +#else /* !CONFIG_USER_ONLY */ + #include "sysemu/kvm.h" #ifdef CONFIG_KVM @@ -79,4 +85,6 @@ static inline int kvm_s390_dump_completion_data(void *buff) { return 0; } int s390_pv_kvm_init(ConfidentialGuestSupport *cgs, Error **errp); int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp); +#endif /* CONFIG_USER_ONLY */ + #endif /* HW_S390_PV_H */