From patchwork Fri Jun 22 10:37:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 139604 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp719579lji; Fri, 22 Jun 2018 03:53:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL4N3y/tzxy1KR6ApCkvEaROUpFiDsLQLa0ZTJDeFa7KJO/m70ULqxEU5hWVdaNmUmV/6v3 X-Received: by 2002:a37:21a0:: with SMTP id f32-v6mr800959qki.45.1529664826375; Fri, 22 Jun 2018 03:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529664826; cv=none; d=google.com; s=arc-20160816; b=nD+OHqgJTfA2XELTJp3KtALCg7lY4mybUP7LBCdmuzHL4ha+uA2eCIDmQUlnPmxtLV 00sipHGhV+9C9966jl2hZFqNyKaBE5FwqQEKUoRkER5APPWvOcJIyIixC9Xd/2FNMkCv +qu1TUdBehIDkVJZGOtB5xtKePNPkK1ZysCuOcwD4s+/GvkGIBEPSlW6iXh7Pk8KoKCp yz3BPKsrEdP/BcKyTvcHGorEWi3On+bipqOtNx8H8fLjLHJT6sd6eQdrC1JCDZ7ls6uJ xR05iCQJ8FaywNtBBBEF099SspqWNJIcv02cSvNzcwXmAGIvPJ2kX332G8BnOveEplY9 qo+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=+kmkR6nThCnIWy9TO/Aq1TeDlmpHgXE/qS7ytzlitl0=; b=eWBmMclcCNRHXmzd3LtjmjGxRKIWRYswk2uSMUxVuF9dsL0xgPRme0YbTR5POuQljq VMuPcK6OOmqhOoV/tOK/gOWQt8CUWAh8w7A3ZDBoMOESMPIyuN0INqugZCLVhzVHbF7b EtDzOzusZFanGVTrsdP4zZYJXJ6PKz9XNBQNtPD+9LlXuFDgyLtVpjCO6zVowdePPRdu srdGPtzYIcZqCwG+kUi649xduOVhCiJKNChZuXuOmczWr393GnS9VO55YIahYKN0HCrm TPvGgidCwyfLjBDvUplEMGHaQ5OAE22GTGqJkRINZyldQiEPFEV6mEylHhnnZGvaWy2/ vtoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MvlJNhJs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 20-v6si4359641qtq.196.2018.06.22.03.53.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 22 Jun 2018 03:53:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MvlJNhJs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWJhJ-0006JR-S4 for patch@linaro.org; Fri, 22 Jun 2018 06:53:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWJRR-00023n-Nx for qemu-devel@nongnu.org; Fri, 22 Jun 2018 06:37:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWJRN-0004Pe-Pk for qemu-devel@nongnu.org; Fri, 22 Jun 2018 06:37:21 -0400 Received: from mail-yb0-x242.google.com ([2607:f8b0:4002:c09::242]:35415) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWJRN-0004PR-L4 for qemu-devel@nongnu.org; Fri, 22 Jun 2018 06:37:17 -0400 Received: by mail-yb0-x242.google.com with SMTP id a16-v6so2372051ybm.2 for ; Fri, 22 Jun 2018 03:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+kmkR6nThCnIWy9TO/Aq1TeDlmpHgXE/qS7ytzlitl0=; b=MvlJNhJsVecrCy7+NiktvouLUzr8du9+YTcmra74S0pEwPk9ZYj9PEHNTv003G+JNK f62WaYL+hKtMEFenEV/gAGIZb0pqx/jWOtiLNEBvdmcuGsNRhxwvD+ES/B+35r5rZ837 ijjv9T43xQqStagxxzaNxqcizrwLB/x/MFNsY= 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; bh=+kmkR6nThCnIWy9TO/Aq1TeDlmpHgXE/qS7ytzlitl0=; b=T2cXQae/pmTS5Qhuy2iDqEXPe9cHnJPJmODkAyM++jc5kP2gLosBsbVR9mGDlqa4J+ cMrjrOZpIVLv7Z8FoDU39o6oQeKOsJvEMkYUhBbtTvLfyoDSfKh50BzCLudb3/TUttkE vN8ISBc5YdreCzIeXLvAleQ27CZnAJTGDty8M52qreO97HaRlCU6IDPtqNJfNGg6O6xb NJnLVb/aq8/2V1Icl33sg20c4SU7DQJSJqFa8geDnQs0DYnabD1MJn5uGFLS6rTf0JEX mjxBLgmdq2G2kfxOZTXF00HfBakq57n6GFt8jG9FigULpHbLe7+ZofEvBdKK8w5AtXHx t8CQ== X-Gm-Message-State: APt69E04VTM6kUAgJ89t7KZ2ffGwS9K7sjkMdE/fAsJgnNHiRDdNyMGg JyTIvdXpkqmjaYSR0n+QXB7cIQ== X-Received: by 2002:a25:fa02:: with SMTP id b2-v6mr452946ybe.315.1529663836554; Fri, 22 Jun 2018 03:37:16 -0700 (PDT) Received: from localhost.localdomain ([104.237.86.172]) by smtp.gmail.com with ESMTPSA id w3-v6sm2594614ywj.66.2018.06.22.03.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jun 2018 03:37:16 -0700 (PDT) From: Hongbo Zhang To: peter.maydell@linaro.org, qemu-arm@nongnu.org Date: Fri, 22 Jun 2018 18:37:07 +0800 Message-Id: <1529663827-28854-1-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::242 Subject: [Qemu-devel] [PATCH] hw/arm/virt: fix psci conduit in acpi when el3 enabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When QEMU_PSCI_CONDUIT_DISABLED is set, it doesn't mean all the PSCI conduits are totally disabled, it only mean the QEMU built-in PSCI support is disabled, in such a case, e.g. EL3 is enabled and external firmware (it is usually Arm Trusted Firmware) is loaded, SMC should be used for the guest to trigger PSCI functions. Signed-off-by: Hongbo Zhang --- hw/arm/virt-acpi-build.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 74f5744..e5b4947 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -715,7 +715,11 @@ static void build_fadt_rev5(GArray *table_data, BIOSLinker *linker, switch (vms->psci_conduit) { case QEMU_PSCI_CONDUIT_DISABLED: - fadt.arm_boot_arch = 0; + /* This case means QEMU's internal EL3 implementation is disabled, + * but when firmware is loaded, the guest can still use SMC as PSCI + * conduit to call external firmware PSCI services + */ + fadt.arm_boot_arch = ACPI_FADT_ARM_PSCI_COMPLIANT; break; case QEMU_PSCI_CONDUIT_HVC: fadt.arm_boot_arch = ACPI_FADT_ARM_PSCI_COMPLIANT |