All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Roman Kisel <romank@linux.microsoft.com>,
	arnd@arndb.de, bhelgaas@google.com, bp@alien8.de,
	catalin.marinas@arm.com, conor+dt@kernel.org,
	dan.carpenter@linaro.org, dave.hansen@linux.intel.com,
	decui@microsoft.com, haiyangz@microsoft.com, hpa@zytor.com,
	joey.gouly@arm.com, krzk+dt@kernel.org, kw@linux.com,
	kys@microsoft.com, lenb@kernel.org, lpieralisi@kernel.org,
	manivannan.sadhasivam@linaro.org, mark.rutland@arm.com,
	maz@kernel.org, mingo@redhat.com, oliver.upton@linux.dev,
	rafael@kernel.org, robh@kernel.org, ssengar@linux.microsoft.com,
	sudeep.holla@arm.com, suzuki.poulose@arm.com, tglx@linutronix.de,
	wei.liu@kernel.org, will@kernel.org, yuzenghui@huawei.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH hyperv-next v6 01/11] arm64: kvm, smccc: Introduce and use API for detecting hypervisor presence
Date: Mon, 17 Mar 2025 23:07:26 +0800	[thread overview]
Message-ID: <202503172236.TQovQLBw-lkp@intel.com> (raw)
In-Reply-To: <20250315001931.631210-2-romank@linux.microsoft.com>

Hi Roman,

kernel test robot noticed the following build warnings:

[auto build test WARNING on d9608f6dc3e3229a40e1db1dab573d6882f38c2a]

url:    https://github.com/intel-lab-lkp/linux/commits/Roman-Kisel/arm64-kvm-smccc-Introduce-and-use-API-for-detecting-hypervisor-presence/20250315-082319
base:   d9608f6dc3e3229a40e1db1dab573d6882f38c2a
patch link:    https://lore.kernel.org/r/20250315001931.631210-2-romank%40linux.microsoft.com
patch subject: [PATCH hyperv-next v6 01/11] arm64: kvm, smccc: Introduce and use API for detecting hypervisor presence
config: arm64-randconfig-r122-20250317 (https://download.01.org/0day-ci/archive/20250317/202503172236.TQovQLBw-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250317/202503172236.TQovQLBw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503172236.TQovQLBw-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kvm/hypercalls.c:356:17: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/hypercalls.c:356:17: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/hypercalls.c:356:17: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/hypercalls.c:356:17: sparse: sparse: cast to restricted __le32

vim +356 arch/arm64/kvm/hypercalls.c

   262	
   263	int kvm_smccc_call_handler(struct kvm_vcpu *vcpu)
   264	{
   265		struct kvm_smccc_features *smccc_feat = &vcpu->kvm->arch.smccc_feat;
   266		u32 func_id = smccc_get_function(vcpu);
   267		u64 val[4] = {SMCCC_RET_NOT_SUPPORTED};
   268		u32 feature;
   269		u8 action;
   270		gpa_t gpa;
   271	
   272		action = kvm_smccc_get_action(vcpu, func_id);
   273		switch (action) {
   274		case KVM_SMCCC_FILTER_HANDLE:
   275			break;
   276		case KVM_SMCCC_FILTER_DENY:
   277			goto out;
   278		case KVM_SMCCC_FILTER_FWD_TO_USER:
   279			kvm_prepare_hypercall_exit(vcpu, func_id);
   280			return 0;
   281		default:
   282			WARN_RATELIMIT(1, "Unhandled SMCCC filter action: %d\n", action);
   283			goto out;
   284		}
   285	
   286		switch (func_id) {
   287		case ARM_SMCCC_VERSION_FUNC_ID:
   288			val[0] = ARM_SMCCC_VERSION_1_1;
   289			break;
   290		case ARM_SMCCC_ARCH_FEATURES_FUNC_ID:
   291			feature = smccc_get_arg1(vcpu);
   292			switch (feature) {
   293			case ARM_SMCCC_ARCH_WORKAROUND_1:
   294				switch (arm64_get_spectre_v2_state()) {
   295				case SPECTRE_VULNERABLE:
   296					break;
   297				case SPECTRE_MITIGATED:
   298					val[0] = SMCCC_RET_SUCCESS;
   299					break;
   300				case SPECTRE_UNAFFECTED:
   301					val[0] = SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED;
   302					break;
   303				}
   304				break;
   305			case ARM_SMCCC_ARCH_WORKAROUND_2:
   306				switch (arm64_get_spectre_v4_state()) {
   307				case SPECTRE_VULNERABLE:
   308					break;
   309				case SPECTRE_MITIGATED:
   310					/*
   311					 * SSBS everywhere: Indicate no firmware
   312					 * support, as the SSBS support will be
   313					 * indicated to the guest and the default is
   314					 * safe.
   315					 *
   316					 * Otherwise, expose a permanent mitigation
   317					 * to the guest, and hide SSBS so that the
   318					 * guest stays protected.
   319					 */
   320					if (kvm_has_feat(vcpu->kvm, ID_AA64PFR1_EL1, SSBS, IMP))
   321						break;
   322					fallthrough;
   323				case SPECTRE_UNAFFECTED:
   324					val[0] = SMCCC_RET_NOT_REQUIRED;
   325					break;
   326				}
   327				break;
   328			case ARM_SMCCC_ARCH_WORKAROUND_3:
   329				switch (arm64_get_spectre_bhb_state()) {
   330				case SPECTRE_VULNERABLE:
   331					break;
   332				case SPECTRE_MITIGATED:
   333					val[0] = SMCCC_RET_SUCCESS;
   334					break;
   335				case SPECTRE_UNAFFECTED:
   336					val[0] = SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED;
   337					break;
   338				}
   339				break;
   340			case ARM_SMCCC_HV_PV_TIME_FEATURES:
   341				if (test_bit(KVM_REG_ARM_STD_HYP_BIT_PV_TIME,
   342					     &smccc_feat->std_hyp_bmap))
   343					val[0] = SMCCC_RET_SUCCESS;
   344				break;
   345			}
   346			break;
   347		case ARM_SMCCC_HV_PV_TIME_FEATURES:
   348			val[0] = kvm_hypercall_pv_features(vcpu);
   349			break;
   350		case ARM_SMCCC_HV_PV_TIME_ST:
   351			gpa = kvm_init_stolen_time(vcpu);
   352			if (gpa != INVALID_GPA)
   353				val[0] = gpa;
   354			break;
   355		case ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID:
 > 356			UUID_TO_SMCCC_RES(ARM_SMCCC_VENDOR_HYP_UID_KVM, val);
   357			break;
   358		case ARM_SMCCC_VENDOR_HYP_KVM_FEATURES_FUNC_ID:
   359			val[0] = smccc_feat->vendor_hyp_bmap;
   360			break;
   361		case ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID:
   362			kvm_ptp_get_time(vcpu, val);
   363			break;
   364		case ARM_SMCCC_TRNG_VERSION:
   365		case ARM_SMCCC_TRNG_FEATURES:
   366		case ARM_SMCCC_TRNG_GET_UUID:
   367		case ARM_SMCCC_TRNG_RND32:
   368		case ARM_SMCCC_TRNG_RND64:
   369			return kvm_trng_call(vcpu);
   370		default:
   371			return kvm_psci_call(vcpu);
   372		}
   373	
   374	out:
   375		smccc_set_retval(vcpu, val[0], val[1], val[2], val[3]);
   376		return 1;
   377	}
   378	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2025-03-17 15:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15  0:19 [PATCH hyperv-next v6 00/11] arm64: hyperv: Support Virtual Trust Level Boot Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 01/11] arm64: kvm, smccc: Introduce and use API for detecting hypervisor presence Roman Kisel
2025-03-15  0:27   ` Roman Kisel
2025-03-15 13:12     ` Arnd Bergmann
2025-03-17 17:28       ` Roman Kisel
2025-03-17 11:29   ` Mark Rutland
2025-03-17 17:11     ` Roman Kisel
2025-03-17 15:07   ` kernel test robot [this message]
2025-03-15  0:19 ` [PATCH hyperv-next v6 02/11] arm64: hyperv: Use SMCCC to detect " Roman Kisel
2025-03-17 11:37   ` Mark Rutland
2025-03-17 17:12     ` Roman Kisel
2025-03-19 22:11     ` Michael Kelley
2025-03-20 18:47       ` Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 03/11] Drivers: hv: Enable VTL mode for arm64 Roman Kisel
2025-03-15 19:41   ` kernel test robot
2025-03-15 23:29   ` kernel test robot
2025-03-15  0:19 ` [PATCH hyperv-next v6 04/11] Drivers: hv: Provide arch-neutral implementation of get_vtl() Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 05/11] arm64: hyperv: Initialize the Virtual Trust Level field Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 06/11] arm64, x86: hyperv: Report the VTL the system boots in Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 07/11] dt-bindings: microsoft,vmbus: Add interrupt and DMA coherence properties Roman Kisel
2025-03-16 17:36   ` Krzysztof Kozlowski
2025-03-17 17:07     ` Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 08/11] Drivers: hv: vmbus: Get the IRQ number from DeviceTree Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 09/11] Drivers: hv: vmbus: Introduce hv_get_vmbus_root_device() Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 10/11] ACPI: irq: Introduce acpi_get_gsi_dispatcher() Roman Kisel
2025-03-26 14:55   ` Rafael J. Wysocki
2025-03-26 15:32     ` Roman Kisel
2025-03-15  0:19 ` [PATCH hyperv-next v6 11/11] PCI: hv: Get vPCI MSI IRQ domain from DeviceTree Roman Kisel
2025-03-15 18:49   ` Bjorn Helgaas
2025-03-17 17:07     ` Roman Kisel
2025-03-15 23:50   ` kernel test robot
2025-03-26 14:56   ` Rafael J. Wysocki
2025-03-26 15:37     ` Roman Kisel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202503172236.TQovQLBw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=joey.gouly@arm.com \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=kys@microsoft.com \
    --cc=lenb@kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oliver.upton@linux.dev \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=romank@linux.microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=sudeep.holla@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.