[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] arm/vgic-v3: fix virq offset in the rank


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 26 Jul 2022 17:54:15 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yqf2HrM5cwNlZb1sRn9sgOYekHVMARMf1nskCLjgsNg=; b=K/H57BJN82CpPgw+NFmq5wTe0FpJFdpzWoGKvE7aYkuGgk4ntRsDxwSgj+b50gs/Gg3BbqGiXSGOHOaaeFA/IdqxG2EQM3Fw7SgV4Pa+L49T9LdhchLy+fMA1narwvnJr0B9HtI/0q/vG4VHc//Djn2XbONoCjFkK1uadF1TJq0KPYZE8+1kNLPt4+9IH3GY+kMbgCVopZUAl3I2iKdKkG57ATNnPdeupkM7zD0rizLKJrOl9MhO15Y+ULF1XObLaAuS8eydjHMvwXq82sQ2dv3QyZeDa95gQ23NmDs1JVk980Cnayev4+b97nUeir2zW94tpNKmOPEB1BA0ICsljQ==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yqf2HrM5cwNlZb1sRn9sgOYekHVMARMf1nskCLjgsNg=; b=Ws/ztLCFgwEleruslGLhVZYT2q8reFcFrQaDWah53cp7LEfQZbvnXBZl4ch7tbXFlUV4fzPii0S/73LNT1Iu8x/J/1misOzVkmtE9CwsYR8a9gYZR/QESKXxnqb/SyPX+/IGyrae60fewqRwOSAReiDI1VvmZBuP543qpwyHqWha/r3VXwKoLicIDCguPo0WTORWCtUu2TtlAe7EBZNc67VOkQbLqVtuBWdDv4FJlhdcuQntTF/W/8RAIxaBrpfSTdS8oPA5ek1U7uxsMtnqxKtGqWV1ozhuJn+AhiXyZq4pCbZLXL8+cWVrVvvDpPlwnA45QVOP7g74+jLmF/YG4Q==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=lMfMiMxNPx1DQd8nddOfMoejmp5FZNb/fpXoXiU2GqMqoo7w916UJdmUxMnRsfYBebFUBVSV0g7+Q0S2Uj7HYvmJqVJ0Z1kFjoDKY1ElyGEJtGzXqdl+0ZcdKGNovOPzz4k7HaCBYFnzL5T8YhVOfcIFdnQZukrBr5P54t7WE6jD5PKEVnER+GqexrOaDpMNasyi1FV9YpcDzlqHb2IpKkuV8IS0Y7A1CHoWesVC0IZ6pvsE+zFn638sNH+T1Xq+rwo3PRHY8ro3bvxJmzra/0bwBvEgFjWI0/QtCwyuVB1VDZTxlrODnWyvuO23KmIDyRuKES9qjpNWDuGUWulaMA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EgSr1P95KSyHfx747T17Qgmot+/m0ni0bJzUVw/LdGAd9NcoRGdWFpVRoiLqzO+2Wd4ztt8VHy0XbefFs9+dY7QcQWrvotp2mvfOGF4M3gPzAoAMkknNMpHC/KexpN2I947x4M3xP6w3nMWyVpKTgWolH+8j2h1HodtelixNdUApKbAOe/G/Bo6ftccNFT0PVfGCo5IRD4kmBS/kpfN1VdoOdI/mz5uTqLStsrIscUGHbIgntXsNP+SSg9eNWkgoWE7uih9cKZ8p41K/x+KUIhOjfha4aQ16aY/my3UWLQbO/22GCLMMhiEkzkpj36AZz4StnZZQjhnM0O2YOmUQGg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Hongda Deng <Hongda.Deng@xxxxxxx>, Xen development discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 26 Jul 2022 17:54:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYmDhKpSlCCmBtRkalGlTcUHBM2q2Q/kQAgAACugA=
  • Thread-topic: [PATCH] arm/vgic-v3: fix virq offset in the rank

Hi Julien,

>> /* Get the index in the rank */
>> - offset &= virq & INTERRUPT_RANK_MASK;
>> + offset = virq & INTERRUPT_RANK_MASK;
> 
> AFAICT, vgic_fetch_irouter() has the same problem. Can you update it here as 
> well?

I think that function is ok, because in there we have:

/* There is exactly 1 vIRQ per IROUTER */
offset = offset  / NR_BYTES_PER_IROUTER;

/* Get the index in the rank */
offset = offset & INTERRUPT_RANK_MASK;

Which is basically offset = (offset  / NR_BYTES_PER_IROUTER) & 
INTERRUPT_RANK_MASK;

Like in the counterpart (updated by this patch) vgic_store_irouter who has:

/* There is 1 vIRQ per IROUTER */
virq = offset / NR_BYTES_PER_IROUTER;

[…]

/* Get the index in the rank */
offset = virq & INTERRUPT_RANK_MASK;

Which is the same as above

Cheers,
Luca

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.