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

[PATCH v2 1/2] vpci/msix: reduce indentation in msix_write PBA handling


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 25 Feb 2022 16:39:55 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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=6xQx3p2gIUoOaj3d39MS75urWwINz7VNe9IUM3IGjb4=; b=GfnsmJ7mXOiBfypO4BPJ/ujEsTqW2eefbBeM3we05cJRFcsqzKAIgDB3b4cb9I/a7JlEtPyyUM5BPextIeEbzXq+o56eFYsgJHcrdzamXVmu6nzZArpZbc6yRPNe/J0HWKWaS3AEcxUuVyGwzTc8cO0VuRgDFGCV3ojJKeER7VoOgiz6Zya8uR3gqMf3LRA7wDpkiipKexgonb+AQKgxmy/a/ayipUGURki0kuw8o42s4eQkYy3dNhJZcD1cpYEzDwRuHONc7U0bYLaMxfuvrNj9rIKacVMs71UKmgeDMA0f4HW+F142GfG3g5nbq1tUikoT6RuhWFruCbzDHndKNw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jeReTPUdOael0apFxFejlRkY4U3ONSJp1KAgTpV3S1LL4deGgIzdNzPM4cjM3j1X+xSsYCklBCwudF8vUVeW1KfCff8UcneTnCt9l8kdHSf/qMHRxFDASw/knFpxYc9e+zkysmzBwYLxFtRvNQSoR3C1CDohPJY2f0rgveKokS9yWYJ8d8FXKGLK9OzXXp7AvRfNntDk+QtzrErUuRtVjeSDXy23ON5tAORPc5/HLmqtL3fFf59XwDPFBLITY1Xv/razPSg8a14AcbGUqZxU8D4ZIUHp1xqwU9GIE3FBEcozaIArVIEvul6xspmdJLLWyZlFtgAgIhpJaGI5wJKHbg==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Alex Olson <this.is.a0lson@xxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 25 Feb 2022 15:40:18 +0000
  • Ironport-data: A9a23:Olo6a6Igte+8JZNxFE+R2pUlxSXFcZb7ZxGr2PjKsXjdYENShDFTz WFKWGrVMveOYGSme9t2aNu2/BgHsMTXxtJjQQJlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh2NQ12YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 MxQiI2ibS0xApDngu4geUd9OSZeB5QTrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Glt3pgWQ6+DD yYfQSdKVQzCQxFxBmgOS5w6vsiF3liuKAQN/Tp5ooJoujOOnWSdyoPFLNrUYZqLXoNcxkKDo WTu8GHwAxVcP9uaoRKV/3TpiuLRkCfTXIMJCKb+5vNsmEeUxGEYFFsRT1TTnBWiohfgAZQFc RVSo3dw6/hpnKC2cjXjdwSlnW+WmjQEZ+d7CecHwl+o4K302T/MUwDoUQV9QNAhscY3Qxkj2 VmIg87lCFRTjVGFdZ6O3uzK9G3vYED5OUdHPHZZFlVdv7EPtalu1kqnczp1LEKiYjQZ8xnUy ivCkiUxjq57YSUjh/TipgCvb95BS/H0ou8JCuf/AjPNAuBRPtfNi2mUBb7zt6cowGGxFATpg ZT8s5LChN3i9LnU/MB3fM0DHauy+9GOOyDGjFhkEvEJrmrxpiH/JNwNuGkmfC+F1/ronxezM Sc/XisLufdu0IaCN/crM+pd9exwpUQfKTgVfq+NNYcfCnSAXASG4DtvdSatM5PFyyARfVUEE c7DK66EVC9CYYw+lWbeb7pNgNcDm3FlrUuOFM+T8vhS+efHDJJjYexeawXmgyFQxP7snTg5B P4Eb5rak0gECbamCsQVmKZKRW03wbEALcmeg+Rcd/KZIxogH2ckCvTLxqgmdZAjlKNQ/tokN FnnMqOE4DITXUH6FDg=
  • Ironport-hdrordr: A9a23:+2hXFam4qlAkMUL0DNIQD7OknZnpDfPIimdD5ihNYBxZY6Wkfp +V8sjzhCWatN9OYh0dcLC7WJVpQRvnhPlICO4qTMiftWjdyReVxeRZjLcKrAeQYhEWmtQtsJ uINpIOcuEYbmIK/foSgjPIa+rIqePvmMvD6Ja8vhVQpENRGtxdBm9Ce3em+yZNNW977PQCZf 6hDp0tnUvfRZ1bVLXxOlA1G8z44/HbnpPvZhALQzYh9Qm1lDutrJr3CQKR0BsyWy5Ghe5Kyx mJryXJooGY992rwB7V0GHeq7xQhdva09NGQOiBkNIcJDnAghuhIK5hR7qBljYop/zH0idhrP D85zMbe+hj4XLYeW+45TPrxgnbyT4rr0TvzFeJ6EGT1/DRdXYfMY5slIhZehzW5w4Lp9dnyp 9G2Gqfqt5+EQ7AtD6V3amHazha0m6P5VYym+8aiHJSFaEEbqVKkIAZ9ERJVL8dASPB7pw9Gu UGNrCS2B9vSyLbU5nlhBgt/DT1NU5DXCtuA3Jy9vB96gIm3UyQlCAjtYkidnRpzuNLd3AL3Z WBDk1SrsA9ciYnV9MPOA4/e7rDNoW0e2O2DIuzGyWvKEhVAQOEl3bIiI9FkN1CPqZ4i6cPpA ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/drivers/vpci/msix.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
index 2ab4079412..a1fa7a5f13 100644
--- a/xen/drivers/vpci/msix.c
+++ b/xen/drivers/vpci/msix.c
@@ -275,23 +275,24 @@ static int cf_check msix_write(
 
     if ( VMSIX_ADDR_IN_RANGE(addr, msix->pdev->vpci, VPCI_MSIX_PBA) )
     {
-        /* Ignore writes to PBA for DomUs, it's behavior is undefined. */
-        if ( is_hardware_domain(d) )
+
+        if ( !is_hardware_domain(d) )
+            /* Ignore writes to PBA for DomUs, it's behavior is undefined. */
+            return X86EMUL_OKAY;
+
+        switch ( len )
         {
-            switch ( len )
-            {
-            case 4:
-                writel(data, addr);
-                break;
+        case 4:
+            writel(data, addr);
+            break;
 
-            case 8:
-                writeq(data, addr);
-                break;
+        case 8:
+            writeq(data, addr);
+            break;
 
-            default:
-                ASSERT_UNREACHABLE();
-                break;
-            }
+        default:
+            ASSERT_UNREACHABLE();
+            break;
         }
 
         return X86EMUL_OKAY;
-- 
2.34.1




 


Rackspace

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