From patchwork Mon May 2 16:36:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Kelley X-Patchwork-Id: 568907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18B6CC433F5 for ; Mon, 2 May 2022 17:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386558AbiEBROs (ORCPT ); Mon, 2 May 2022 13:14:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242779AbiEBROp (ORCPT ); Mon, 2 May 2022 13:14:45 -0400 X-Greylist: delayed 2048 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 02 May 2022 10:11:14 PDT Received: from na01-obe.outbound.protection.outlook.com (unknown [52.101.57.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664F06370; Mon, 2 May 2022 10:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fkkIzjsJANnG9Sl44ODMcf9Tf9vWbHeI9vlmqtj06ivqEcA1dltckYq+nk75Aso4bhPVnMahV6jZ+/AcMzXNDFoaRo9d/mSTl6Jnqm+DP1ARxP2Ph8P/704XzTKHtG0NclHyleZ1R0IMG1zB9u/XKsydjws4FW0GBw9l2edFKPzMLAkHlq/wGd6vn6P7mdPwpHmY5sf28MPVir8CAPYFEega5xPXyKUiUHBEcSC7IOrDU2IqHs64dlIbBkSokbRy3CbbiH9p6nxwxZPR4LvkFvEz85vy5jNK/imyurzYWqWODkot5ngdkH4q6VNhqali/fSNEn+NVOcOlHSaUNDPLw== 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=9t+A4uN1sq4GLloROfjHSsKjKH/3OhaJ3pY+r2HBBuc=; b=DUumBBE/Qae3ua7HdSBJ4HDuzQT1pPgU0knyRBcDKKuhrdNzYYpI6NF1L5TFya6orufdEqUBJnMEX3xDPLgF7CzAz6ZE+sKKmiQuIOIZIGFW3Zx2gOYyabpq0qJaNCR+5rSeMA+Cu7Af+QDggO0CFQF+TRfeTepnwEqqk4ZoQBZrwyqDtqbUIlHhySGmtqLMH6Zkry8iurS3etxrDUIeiQEqtVqLAMRKqMql46qRCP73fK1yKVGSTL24Lvmjo3zYMa44vSBZJtV1AwwOtm/8e6z4GYhAbquxJ7N1UsptN3LkjYKp3O95UgDtP+6Sq+c1wW/YMZFo+wTORwnTyfmKRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9t+A4uN1sq4GLloROfjHSsKjKH/3OhaJ3pY+r2HBBuc=; b=j1rOwVq93nviGk/JnjkD+A1KwuPiDoV2HTNK0fbIb0sE65zQ2HGNqm1qe2Bn5k9GyZR8885bc4NnkkZgeQ3yYLFsIwpIo9X1IbvgC1A3qUZbA04jmpk1lWl41fHUj5y/BcSzo+8kUCkW/EsjjtStoE4DGLnnxRCt+4uHyRffynk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) by DM6PR21MB1180.namprd21.prod.outlook.com (2603:10b6:5:161::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.4; Mon, 2 May 2022 16:37:03 +0000 Received: from DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::588e:9ede:461a:2372]) by DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::588e:9ede:461a:2372%4]) with mapi id 15.20.5250.004; Mon, 2 May 2022 16:37:03 +0000 From: Michael Kelley To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, vkuznets@redhat.com, decui@microsoft.com, drawat.floss@gmail.com, airlied@linux.ie, daniel@ffwll.ch, jejb@linux.ibm.com, martin.petersen@oracle.com, deller@gmx.de, dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: mikelley@microsoft.com Subject: [PATCH 1/4] Drivers: hv: vmbus: Remove support for Hyper-V 2008 and Hyper-V 2008R2/Win7 Date: Mon, 2 May 2022 09:36:28 -0700 Message-Id: <1651509391-2058-2-git-send-email-mikelley@microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1651509391-2058-1-git-send-email-mikelley@microsoft.com> References: <1651509391-2058-1-git-send-email-mikelley@microsoft.com> X-ClientProxiedBy: MW2PR2101CA0020.namprd21.prod.outlook.com (2603:10b6:302:1::33) To DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ebb8b28d-41b6-4f1f-0835-08da2c59fd06 X-MS-TrafficTypeDiagnostic: DM6PR21MB1180:EE_ X-LD-Processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NJXUOFiQvyo+D5QJoq9WT1xTdM/rkRwMcrl1ng4HLjR2SGemsQ1Fxhq56j1TmJizwm7VhdbPD/9HOGycbkTuB4d2fH1U2btk4vAbdGuNV9TodAc1exxrIonODPiEuqRXKSTt0utMH6Yiy/5qedkxKdkyQfDliAC7XL1YvrA0qAAb6j9JNYLYMm1WYHMO1l221VmS1pwwp8brvA2Iid9IyZjhyI6CBMBSVS3pL1ZSP2cljPaDIyCUGJkU8VZtlz3UrDxhxe3SyXPwhvK0dcf0PJwf0ulPsVDyTGUhkfEXSRqXu2k3dM/iNI+tZd72fBuPg971XRyjXeKMnDATPT5lyko9veM32erqZLa5y0VGzG8x+tuHN/a8GGBRHbqFmBpG2xYSKlJJLz4LlFRcXKK3x6lLF75jlrwc7s12Z6h/ErGR8eBcuJEMvufL7WZJAebnm/B4gBYia29mEYTSnkqnAzJgoMdw7n+F9HPauGpIxmacT519IRiRvrMSHeKNV6CExnTsZD2Vz5BkU9Cy+sjP6xHZeMG2ABFmJeulix9/ZKyUTHwyErPd0jj54fNf4ckY4sF7HDUUe8/9XzT5V+SlZXKIy56hSrdFjMtWDHMlt4gl7ZRAHc1I+/xTu3vugBsbQ0zFS6NQlxovMsZ/rFI+PPrr2RRuc5aq4ea9HnZcGm1YlC27MXJ2kmbcUbfoqDsGSVFnaitjiKlJg88/lq2+tZJoDS4uN3/gEEDkAQixzwhygMoeZRlxzCpAg4r/De7H2VxxrS/sIdERzFFd5C5H3w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR21MB1370.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(451199009)(82950400001)(7416002)(10290500003)(66946007)(6486002)(66556008)(66476007)(2616005)(107886003)(6512007)(26005)(921005)(5660300002)(6506007)(83380400001)(508600001)(82960400001)(86362001)(6666004)(316002)(8936002)(38350700002)(38100700002)(186003)(52116002)(4326008)(36756003)(8676002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2ckJIgJixQjXfAA0va3Cvg19wP8StWisivfjXaidoxwYgQ7T7MxaLkX/G5SMWfPv4AnDUV6HQi3gpX5r57eJwmRbm/4AaAOsio3P6DPXYyba6AFR5ogIEV/aFyhc2OzysoedpVvyhuBMDYhAN2Dxky+UY9jH37rHME1iyuu8pd1eJfidXvSFY6uu2yBcb4qUG400S8Wmd+AeEcKDadQDTBtFVQJ7k9VK9QfLLyGM0vhq9+FOhL35p4y3DETrC7G8PHY+31oTqFYdmDqV3/ebXSKFXex4eixs4oTBM97keBWtLuDJEkih1rFLMZgHogL97apqO1T8xmp0ItGSrWWc7bUc8PphWIvHiNdC4RgTynQpxGhHjyToWuzU05QAL710ZtTeli+gNu2q6bKb0ngu1Fp/dPlF/HS1jc0oUQjBLLtzBvAb0BrwwkRODNVseM601CSOIeLrDHNfqVQutSjUNqdz9xui/f6TG/y2Zw1U3W+R4IrN5ydI+KT3nzfx+zs1gFPG7/M9KmiTb6lE9R6AYduNbeVVRn5rYga/69fvXFK8J83mFTvAhb+5PDXRX5eM/GrudJsqPveU57v4sGmLQUTPPAKneCZCSe3KDlTORW+VJE8Xk22tcLMmpAmcTfGd5H0VP1vVVIP1/PUuA6LqT9FFFAQ7i44jmJSZXTtiK6ayPLoFy7NhZhCgmtCMXfgWYKyGflIK2JpaWAD34Ds6NDkHEGkBDBf64WxR92o9XZ1wfpXDE5KRuuYRzQ0umfY4frajbkXINMuh+cOGfONkZrJzz2Bg+Tb5YPIZnUwF/PqRgD1WnUAA879zvorkMmiUT5u21EIEV5Xk4VeBHxIXeLuVwlufXQfIJhtSTgOusl2qx4sjZ5u47gVkbZTNPocp7QgA/JKoZHJrLUnfoa/jAx45lhTPayQliUwnbPnm/D8OyKm0j70QSlieg6Sgl4ZrNtbpR9+6qAOsN2CuUINtPY2lOU9rxZY9eV+i+kQhYi7ZvMu/KovDt09RD4eAURnX+05pwZI0BidPVK0Crkw6dtrM817Xsknf6FqQUgWio+NtL0TKNoPU5zT0FVwr9pC/YHhwpaL/5dnB2q9nd/DAu+oLGXLfaQ4SvCL0QY+7Ba5vnG/xgqFIA1a8Ti6Gjq4yksnL1W18QJrYdnLC+yVaehSuTYaavI5HesbU9L4hRE10kuah3a/jW5zwOSU0x+jsUeR5HHXQ2ovK2vw/srLX2c0LeU9NN6phDe2/Ri2aTBuHI2NnSpIo3Ft631vsIWoK/juU7MJidHuIlwDKfDFQSp26N5fKJuSF9OECbo7+RPNCmNfCtkX41N1buO8U564QLxaBJTnhrzzATjBXbmcBi2DZDgt27+lCogcriaq/LLhxAHBrc1NQXNeA5ZdMAHpn9Vij8E0vqlZYKK2B+N5rMl2Rr0ugWqFv1xzW0sqjhQ1PVDe45J6WyYZ06tkHSlfNnzsf4SUojX032U96Jgs+XM0Xjd8oQCkyXkzVqQVqiTciErCvdnhpr95PdN7PJAVoWb78al5sh95VWNAji20NONLAWRKKV9HLdpQAlp2u8/F09l5XYyHuy1Mq0AqfCuRB4tzL3GrQTbrZjm90cKNU+leODNkS0aaLli5wOigIcDllUGV6q5GhIwnLBLK6o1V92WBOROB8EH7oZesn5orQlnGMMGBuhT6Mq56MWMoNgLKxqkUf8gZ6/pNbNpPqQuJJDp+sUYVFsJG9sBZ6y25sF6w6YKGZh75D/pfQjbK1OHw= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebb8b28d-41b6-4f1f-0835-08da2c59fd06 X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2022 16:37:03.5988 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K5j6gi+tXXVNWcnrcjHf3mJFxkX5oBGwa8b1VKGRcbAd2lmXzuPoJLLbEpgOh4aNFEs5mTuxnhupdZ+qA8AtDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR21MB1180 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The VMbus driver has special case code for running on the first released versions of Hyper-V: 2008 and 2008 R2/Windows 7. These versions are now out of support (except for extended security updates) and lack the performance features needed for effective production usage of Linux guests. Simplify the code by removing the negotiation of the VMbus protocol versions required for these releases of Hyper-V, and by removing the special case code for handling these VMbus protocol versions. Signed-off-by: Michael Kelley --- drivers/hv/channel_mgmt.c | 29 +++++++++-------------- drivers/hv/connection.c | 6 ++--- drivers/hv/vmbus_drv.c | 60 ++++++++++------------------------------------- include/linux/hyperv.h | 10 +++++--- 4 files changed, 33 insertions(+), 72 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 85a2142..575459a 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -713,15 +713,13 @@ static bool hv_cpuself_used(u32 cpu, struct vmbus_channel *chn) static int next_numa_node_id; /* - * Starting with Win8, we can statically distribute the incoming - * channel interrupt load by binding a channel to VCPU. + * We can statically distribute the incoming channel interrupt load + * by binding a channel to VCPU. * - * For pre-win8 hosts or non-performance critical channels we assign the - * VMBUS_CONNECT_CPU. - * - * Starting with win8, performance critical channels will be distributed - * evenly among all the available NUMA nodes. Once the node is assigned, - * we will assign the CPU based on a simple round robin scheme. + * For non-performance critical channels we assign the VMBUS_CONNECT_CPU. + * Performance critical channels will be distributed evenly among all + * the available NUMA nodes. Once the node is assigned, we will assign + * the CPU based on a simple round robin scheme. */ static void init_vp_index(struct vmbus_channel *channel) { @@ -732,13 +730,10 @@ static void init_vp_index(struct vmbus_channel *channel) u32 target_cpu; int numa_node; - if ((vmbus_proto_version == VERSION_WS2008) || - (vmbus_proto_version == VERSION_WIN7) || (!perf_chn) || + if (!perf_chn || !alloc_cpumask_var(&available_mask, GFP_KERNEL)) { /* - * Prior to win8, all channel interrupts are - * delivered on VMBUS_CONNECT_CPU. - * Also if the channel is not a performance critical + * If the channel is not a performance critical * channel, bind it to VMBUS_CONNECT_CPU. * In case alloc_cpumask_var() fails, bind it to * VMBUS_CONNECT_CPU. @@ -931,11 +926,9 @@ static void vmbus_setup_channel_state(struct vmbus_channel *channel, */ channel->sig_event = VMBUS_EVENT_CONNECTION_ID; - if (vmbus_proto_version != VERSION_WS2008) { - channel->is_dedicated_interrupt = - (offer->is_dedicated_interrupt != 0); - channel->sig_event = offer->connection_id; - } + channel->is_dedicated_interrupt = + (offer->is_dedicated_interrupt != 0); + channel->sig_event = offer->connection_id; memcpy(&channel->offermsg, offer, sizeof(struct vmbus_channel_offer_channel)); diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index a3d8be8..6218bbf 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -47,6 +47,8 @@ struct vmbus_connection vmbus_connection = { /* * Table of VMBus versions listed from newest to oldest. + * VERSION_WIN7 and VERSION_WS2008 are no longer supported in + * Linux guests and are not listed. */ static __u32 vmbus_versions[] = { VERSION_WIN10_V5_3, @@ -56,9 +58,7 @@ struct vmbus_connection vmbus_connection = { VERSION_WIN10_V4_1, VERSION_WIN10, VERSION_WIN8_1, - VERSION_WIN8, - VERSION_WIN7, - VERSION_WS2008 + VERSION_WIN8 }; /* diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 14de170..9c1b3620 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1263,23 +1263,17 @@ static void vmbus_chan_sched(struct hv_per_cpu_context *hv_cpu) unsigned long *recv_int_page; u32 maxbits, relid; - if (vmbus_proto_version < VERSION_WIN8) { - maxbits = MAX_NUM_CHANNELS_SUPPORTED; - recv_int_page = vmbus_connection.recv_int_page; - } else { - /* - * When the host is win8 and beyond, the event page - * can be directly checked to get the id of the channel - * that has the interrupt pending. - */ - void *page_addr = hv_cpu->synic_event_page; - union hv_synic_event_flags *event - = (union hv_synic_event_flags *)page_addr + - VMBUS_MESSAGE_SINT; + /* + * The event page can be directly checked to get the id of + * the channel that has the interrupt pending. + */ + void *page_addr = hv_cpu->synic_event_page; + union hv_synic_event_flags *event + = (union hv_synic_event_flags *)page_addr + + VMBUS_MESSAGE_SINT; - maxbits = HV_EVENT_FLAGS_COUNT; - recv_int_page = event->flags; - } + maxbits = HV_EVENT_FLAGS_COUNT; + recv_int_page = event->flags; if (unlikely(!recv_int_page)) return; @@ -1351,40 +1345,10 @@ static void vmbus_isr(void) { struct hv_per_cpu_context *hv_cpu = this_cpu_ptr(hv_context.cpu_context); - void *page_addr = hv_cpu->synic_event_page; + void *page_addr; struct hv_message *msg; - union hv_synic_event_flags *event; - bool handled = false; - - if (unlikely(page_addr == NULL)) - return; - - event = (union hv_synic_event_flags *)page_addr + - VMBUS_MESSAGE_SINT; - /* - * Check for events before checking for messages. This is the order - * in which events and messages are checked in Windows guests on - * Hyper-V, and the Windows team suggested we do the same. - */ - - if ((vmbus_proto_version == VERSION_WS2008) || - (vmbus_proto_version == VERSION_WIN7)) { - - /* Since we are a child, we only need to check bit 0 */ - if (sync_test_and_clear_bit(0, event->flags)) - handled = true; - } else { - /* - * Our host is win8 or above. The signaling mechanism - * has changed and we can directly look at the event page. - * If bit n is set then we have an interrup on the channel - * whose id is n. - */ - handled = true; - } - if (handled) - vmbus_chan_sched(hv_cpu); + vmbus_chan_sched(hv_cpu); page_addr = hv_cpu->synic_message_page; msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT; diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index fe2e017..9a4ac13 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -230,15 +230,19 @@ static inline u32 hv_get_avail_to_write_percent( * two 16 bit quantities: major_number. minor_number. * * 0 . 13 (Windows Server 2008) - * 1 . 1 (Windows 7) - * 2 . 4 (Windows 8) - * 3 . 0 (Windows 8 R2) + * 1 . 1 (Windows 7, WS2008 R2) + * 2 . 4 (Windows 8, WS2012) + * 3 . 0 (Windows 8.1, WS2012 R2) * 4 . 0 (Windows 10) * 4 . 1 (Windows 10 RS3) * 5 . 0 (Newer Windows 10) * 5 . 1 (Windows 10 RS4) * 5 . 2 (Windows Server 2019, RS5) * 5 . 3 (Windows Server 2022) + * + * The WS2008 and WIN7 versions are listed here for + * completeness but are no longer supported in the + * Linux kernel. */ #define VERSION_WS2008 ((0 << 16) | (13)) From patchwork Mon May 2 16:36:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Kelley X-Patchwork-Id: 568909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA530C4332F for ; Mon, 2 May 2022 16:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386427AbiEBQzo (ORCPT ); Mon, 2 May 2022 12:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386393AbiEBQyn (ORCPT ); Mon, 2 May 2022 12:54:43 -0400 Received: from na01-obe.outbound.protection.outlook.com (mail-centralusazon11021014.outbound.protection.outlook.com [52.101.62.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16F96245; Mon, 2 May 2022 09:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iz82rLC/u3RMIgxaZqYb4+Fm5a2CupVlhO4TI8/0EF3T57u0t7B/ULvN2UOV/wkJ1Mb2vsMcMcV8LPYRwY5zNZC3r7hUGsLpgvSkk39nexHXKKj7mlnyJG6YFeN6fPiGmoXsYTm70tEMsxuthSdvZFILodb34NRokgea9YJYO8xxU/0XhHIv72MJKvOBZ7BaZAEKXEMLD9UQE/jXb/EKFVWU2C2KOd/60Ae/JY6vYyWLWDQbeSZHLzhTOAkJ/WbXiN6NqO+vjuaf+KGa07f/4Yy6P1zdMzu839jb1kIE6BZCJftLkn4dV6AjCVDiMfRGG2KJxWGI3Dmv8tDeG6PnFw== 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=hpm0B8znkiT/KSp9Hgvhde9feu11S0SLNlKNoQjIs1Q=; b=PZ6jXehPs1MEys/q3SyXlecJRpJ6renYfL/7FFeAAUUYD1SMKnnsvu01g5NhmSD1TuC4i33+vJTnP0Z+9rUlMurGTEPLDSIbwgItlrVKMhr1v+FocD6ndz/XBNDsZJgOy/MIcLTge6LgBpFSkA0k06FUf5TnxYVDAUlW8ImvYP0CFn57ku1Q+iZEFQO9TCRqfU3NuxBkhuzDg8qzl6cN4qscyFHGMhp+kvreOKmg3TybFYzcHwx1tMyEHlQfQcz44nVPPKv/r2Xb6LSI+ujUSo0g9URYN5M5iPsvRh6p3Fd6wndb4Zru0Q1l18SWjI76hi6VnpVYCOu+eNuRS7aozw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hpm0B8znkiT/KSp9Hgvhde9feu11S0SLNlKNoQjIs1Q=; b=beQ3VwpKCVjbx7FL1qckRFU3ibTfhQ+mga+j0EioOUvqoKKmfwa/F9KzsqxA3SBI5BFTb7edQp6YYF0EecLhkv5vW7LdfaqixdaNHdWNtcHG5Z1BeIWi1eGUJ7mMmzxHgl23r3MWN8UNrwg+V1Up/T/s+AOa5SfNSGTNYhyP/iM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) by DM6PR21MB1180.namprd21.prod.outlook.com (2603:10b6:5:161::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.4; Mon, 2 May 2022 16:37:06 +0000 Received: from DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::588e:9ede:461a:2372]) by DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::588e:9ede:461a:2372%4]) with mapi id 15.20.5250.004; Mon, 2 May 2022 16:37:06 +0000 From: Michael Kelley To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, vkuznets@redhat.com, decui@microsoft.com, drawat.floss@gmail.com, airlied@linux.ie, daniel@ffwll.ch, jejb@linux.ibm.com, martin.petersen@oracle.com, deller@gmx.de, dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: mikelley@microsoft.com Subject: [PATCH 3/4] video: hyperv_fb: Remove support for Hyper-V 2008 and 2008R2/Win7 Date: Mon, 2 May 2022 09:36:30 -0700 Message-Id: <1651509391-2058-4-git-send-email-mikelley@microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1651509391-2058-1-git-send-email-mikelley@microsoft.com> References: <1651509391-2058-1-git-send-email-mikelley@microsoft.com> X-ClientProxiedBy: MW2PR2101CA0020.namprd21.prod.outlook.com (2603:10b6:302:1::33) To DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b53f87e5-7e92-4268-ba56-08da2c59fea0 X-MS-TrafficTypeDiagnostic: DM6PR21MB1180:EE_ X-LD-Processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Zq4TsfllzaIWCrUOLCcwScJduGamnW9zCM3iWb0s2bZiWPihXtBHCSiWO7FIPGV2NklAO+V0T+zEXv2Pt5KwfXh2kNyLnilCrZwPtZw9mzwXHKmbdzX3cLkFf1rLgnySb6GKmvn0cx4McGnRY6Cj3Y6IPDPeUbI9RAZWHbsPOUbV35sDQBYXNcL4fm+MfNgPy+jo1MEQloirVirFrezKTburAEpobmbj7Hi5v/GvWFuLR+/gnNdQOol7PSNp/piAb8yUd9lrIjJdGHlYJIgRV5n7jXAqvP+VjG1K2yW+pKDGZNRYgY2ORvemAOxBouZ/Lu7zo5kxOBIxcIyGO4X0YDAgFJ6pLzybaqKt8t+NYCdBhTljKzaARqN9RtBpnwx8xonRuKjLsWcIZTMDcMRMGRDMX9IF/rnfp89t1XbKIFhCHTUYz1OGg6Oy8+Yl2oI5ikfte3QmwmBOuDq33S8FUqzsMInXTlBF6FpOlEZXkQueH/x0/QpvcMORTTyH3SzSbsPCF09DPmAFq3GumSuNJkYVB24pwM8XhVDySa3P80EiAZoDbC+d/0ZMToOVjd+HxMW6S+nd6hN6D3Htx64kbFVAAJIc4llpqteo2+DwrOlDfCB1RyF6NUROmWZjAT057ZeXFduGYSEYxlwdh1b/aFeFW0ow3OyjLq5soyIQ17BS6LWx/eEmRPS+GARNHg5xgS440aPcFlByrt00bJY9Sofoh2tDNeOEetU4F5TU7Qhnj97VgscQezpz7os6/eqvvG1pOaGbuwWLCsyiz91jA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR21MB1370.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(451199009)(82950400001)(7416002)(10290500003)(66946007)(6486002)(66556008)(66476007)(2616005)(107886003)(6512007)(26005)(921005)(5660300002)(6506007)(83380400001)(508600001)(82960400001)(86362001)(6666004)(316002)(8936002)(38350700002)(38100700002)(186003)(52116002)(4326008)(36756003)(8676002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m2xUdC9Y2FCkZAsF0GqyQMSUK5RZezP756VMHCDmJyKcjKg4RiYFiRpKW2pIYVw41uV4rIVLDqiKCzTcWhak0AeBYr+HOnBT+UDty3UI+3V3DbmZD3U37RztXNz6OfN3mTNW5j/MMBtBT8vMOCZ8LiGYApfbS4VXCFcLrmRy4HmQLVD/arOEmpjxHEzd08RfbsmYJYg9mabFc6mso/2D/y729xKHH6UlHBlmMyu+ibFpZszpbn7HlH7VjmjBmm78ko93OWs4PretiT4LBVZNCCGeS5v/SyUgmoI68rdTd1qAfh2m/t3vKh4+pz488VNlqgts0hedESuxF/vaixe/1E0PgbSQVXEwPqCZdFFLXMGyVEgcIXHq1fB6tbw5SkcB98utvNX7166afANyZ/Akl6SmVwjfdKhHax+4E/tchIw8mqTXRZ7Mow4khAWsvq1/OGibRa+af+qRz44DOOL5XBEzAzMpgv0HmU/iZTirDU/IRw8bQzLFel1/UrcwnJsLsnJVavYOjtWsHX0VKoCokppLYGhlv/2eue/KF3h4lkM5pUdK6d9ozcVm/T+VfhzB8RITqLZO2sdvjLMZwHBw0dGv3X0kSlgr9mgWdwa0UDnuJd4f4AcCi/ZfbOPLiBX3WLoVh/upJfxR/yCTy2K8pGNPgeJdf9oq4AvOIWOpXv5KTaW7OkfEYBAO6K9sPHoZEMHoGWTg9cSUBC0nvLlwmvxectwL8MrQtHaVxbhCG6y7GH6Rmn+fAuAYj6Nw8apkRfDpiFSk4pQgpJbVhlxqRwjpYDAFVqB6WST6XxGhyr5VJ/JyW6elOTWRJxOb4hQTUkNaSoynO4XEluHDr6YSAsrNZczl/kWtRzcsrY3Be3gH5544XhVYBr1FsQuUNZoSmKvmaok2GBxr94klaNFIMiwZEbFHo+cfmDItuLc7b0ByUgrCS3eRhahgHyoBl2sAQUGV7vwe6P8WHTgdMvzyiiA+DNd0tP5iVeA36uIrB5GBZ40ezTNXf77EhQ7t3eouJ6dsFS+26BcOQJbIocGWJdQD6RdnX0YxjuIDRcKfL+aDtseyrSydcjTEuDRPQDF/a2qG6THNmwH2z5nFnqbmD1zJsWjf+V5hagmndJpSBB6mqvK5sVMN/o9IsttB8R4OF9gvJ5wztO2bXV3jhLiBVi6Beu1vGL1T6mw0rXZPtvbGI4fPVpdpVbXzCkbC2kkL0c7fqLi9XXKR8MhOdDdIlnbTbB6p3SkTAG+pexIaGnR3m1SFQ7ilaESEJ06sTmlXCwhVMvkVQZi5UbXvFdWFo/HBdpVJBYYnuVRhMROFvlAsF30ZMJNNsPMm6hCy3ST7ObblRvGgefpWH3UviYyRwmTeyvoI9QBmec4O1EIqmRup5EnAgLtp37XbbBocmlj2lVqXzSVzjTbvd0M3vzL5LVV+nDDeMrR7fPro31AYneq72HEYnt1rgJ1Y7OUfkLxjAuQ1OmsZQTXImce9Z1I0AFv+L0cPi87qAYgtTDFMb2NeePUxzLS1xtCpU4LspC4nsJ2ybYcmZ6HEokZWVwvC6ndxhjQDO1iDLzbZ6ALCixyty/HBg2LaAlDjNL/SvXoioR41xj8F2KMOD/GBP90DlrvSIOWz3S9cFm7dKO209g/Ce24aip9G73R8pOfsCvH2Rt/jZK3Y/vUUM8Kf/mgraPzei48s3JGUhmHw1NFVj+FMJrXS+2JGNAKLDyeYZawiEVJQBPmPJsf/S92ItCYN/giLuA+JjLjbP4bJ41ASYUk= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b53f87e5-7e92-4268-ba56-08da2c59fea0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2022 16:37:06.3304 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VKc8XnBF7m9mKYfGGLlBkk18aJp+R0IjlU/tov84Ea9Ra4RBaBppFDTxJSItLnEwp3Rt3O+NRYbzitXUmPaq3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR21MB1180 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The hyperv_fb driver has special case code for running on the first released versions of Hyper-V: 2008 and 2008 R2/Windows 7. These versions are now out of support (except for extended security updates) and lack support for performance features that are needed for effective production usage of Linux guests. The negotiation of the VMbus protocol versions required by these old Hyper-V versions has been removed from the VMbus driver. So now remove the handling of these VMbus protocol versions from the hyperv_fb driver. Signed-off-by: Michael Kelley --- drivers/video/fbdev/hyperv_fb.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c index c8e0ea2..7563d54 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -63,6 +63,7 @@ #define MAX_VMBUS_PKT_SIZE 0x4000 #define SYNTHVID_VERSION(major, minor) ((minor) << 16 | (major)) +/* Support for VERSION_WIN7 is removed. #define is retained for reference. */ #define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0) #define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2) #define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5) @@ -70,13 +71,7 @@ #define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff) #define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16) -#define SYNTHVID_DEPTH_WIN7 16 #define SYNTHVID_DEPTH_WIN8 32 - -#define SYNTHVID_FB_SIZE_WIN7 (4 * 1024 * 1024) -#define SYNTHVID_WIDTH_MAX_WIN7 1600 -#define SYNTHVID_HEIGHT_MAX_WIN7 1200 - #define SYNTHVID_FB_SIZE_WIN8 (8 * 1024 * 1024) #define PCI_VENDOR_ID_MICROSOFT 0x1414 @@ -644,12 +639,6 @@ static int synthvid_connect_vsp(struct hv_device *hdev) case VERSION_WIN8: case VERSION_WIN8_1: ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN8); - if (!ret) - break; - fallthrough; - case VERSION_WS2008: - case VERSION_WIN7: - ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN7); break; default: ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN10); @@ -661,11 +650,7 @@ static int synthvid_connect_vsp(struct hv_device *hdev) goto error; } - if (par->synthvid_version == SYNTHVID_VERSION_WIN7) - screen_depth = SYNTHVID_DEPTH_WIN7; - else - screen_depth = SYNTHVID_DEPTH_WIN8; - + screen_depth = SYNTHVID_DEPTH_WIN8; if (synthvid_ver_ge(par->synthvid_version, SYNTHVID_VERSION_WIN10)) { ret = synthvid_get_supported_resolution(hdev); if (ret) @@ -933,9 +918,7 @@ static void hvfb_get_option(struct fb_info *info) (synthvid_ver_ge(par->synthvid_version, SYNTHVID_VERSION_WIN10) && (x * y * screen_depth / 8 > screen_fb_size)) || (par->synthvid_version == SYNTHVID_VERSION_WIN8 && - x * y * screen_depth / 8 > SYNTHVID_FB_SIZE_WIN8) || - (par->synthvid_version == SYNTHVID_VERSION_WIN7 && - (x > SYNTHVID_WIDTH_MAX_WIN7 || y > SYNTHVID_HEIGHT_MAX_WIN7))) { + x * y * screen_depth / 8 > SYNTHVID_FB_SIZE_WIN8)) { pr_err("Screen resolution option is out of range: skipped\n"); return; } From patchwork Mon May 2 16:36:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Kelley X-Patchwork-Id: 568908 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FAEDC433F5 for ; Mon, 2 May 2022 16:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241544AbiEBQ4i (ORCPT ); Mon, 2 May 2022 12:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242265AbiEBQ4d (ORCPT ); Mon, 2 May 2022 12:56:33 -0400 X-Greylist: delayed 95 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 02 May 2022 09:53:04 PDT Received: from na01-obe.outbound.protection.outlook.com (unknown [52.101.56.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76771AE63; Mon, 2 May 2022 09:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1jOZJ4WbNLczMyKCwjZ8MQI/UTjIeUYhI3SP5fbQ0QmgZEJgQTyypvIfdIwNuDY7mtMeYJI1cKkGeWCny7PMDmc/+Xqgf5EP7FMntor8oF0Rxvi/EL1w/offK3hlM3lKlrkIFKotfz+j2CM4FX9iHv+NtQ1b/VUESIq0m1zHymbDgaTPpkwv5GIpYoor/zaduh83/7LThCuhWUSqTFBSMlqjyE1H/ByXx2UPybJsdopbzyX20B7lAdS21nVCMm8ptXwA1XEF/9LZt1577FUemNQ97ZoZ23h2egCIq6iaxgBcySpyhgFpiLe2x63R3isK3RPJh5L4IbE9nfUKJOllQ== 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=f/Q7CqmIrXWTJW6KP03YP2l7/pKl9BfEPheXtcb5nyg=; b=llmOkeiecwMECfdefLJroXHawJ+2Wo2FoM0hpFapIjvN+3WHG/CdbJ3r+/0gbMNeFspTADewjY9bECVbBQlbztlN0x+luZUo3YUFnH8O3ZBHgNyjwJiCadYyvmWzwcHAOZleAb6tK1pJR5ekKDarXfGSakblNaMM/g06PvlTKiEzas6vcCeYx43y/zxhh2yYMsiEoei1FV0Ujb+aTKzDmX8fgBQH0yyl6mY3sckiRZ7rdA+7XPeYoGCqfAAORRgG8kdTqNrTz6L7kcWw8CpuwSO7cTo8lYNidDlm9YrQekPNH8NHA4brC6hRov/ZLmWT9rR+SWngkEDlh8DRxT7+Ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f/Q7CqmIrXWTJW6KP03YP2l7/pKl9BfEPheXtcb5nyg=; b=b7FgZ5tODXorjjwgImOSbf8W/pDixmeTH6GL6wMbwhkj0B2vvyqrEgC7b1bghHM1GlNJDXgNNvEMMKtHWT3UKFsA4FTYA0ysS2XPAVqwsFJz9iUncF6z1dEDocFBn8PxaXzRI0px5UKg+aRjGEPR/ZMNbU/zI/MPfyTlarTezTw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) by DM6PR21MB1180.namprd21.prod.outlook.com (2603:10b6:5:161::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.4; Mon, 2 May 2022 16:37:07 +0000 Received: from DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::588e:9ede:461a:2372]) by DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::588e:9ede:461a:2372%4]) with mapi id 15.20.5250.004; Mon, 2 May 2022 16:37:07 +0000 From: Michael Kelley To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, vkuznets@redhat.com, decui@microsoft.com, drawat.floss@gmail.com, airlied@linux.ie, daniel@ffwll.ch, jejb@linux.ibm.com, martin.petersen@oracle.com, deller@gmx.de, dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: mikelley@microsoft.com Subject: [PATCH 4/4] drm/hyperv: Remove support for Hyper-V 2008 and 2008R2/Win7 Date: Mon, 2 May 2022 09:36:31 -0700 Message-Id: <1651509391-2058-5-git-send-email-mikelley@microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1651509391-2058-1-git-send-email-mikelley@microsoft.com> References: <1651509391-2058-1-git-send-email-mikelley@microsoft.com> X-ClientProxiedBy: MW2PR2101CA0020.namprd21.prod.outlook.com (2603:10b6:302:1::33) To DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1684c8c-944d-4e0a-6444-08da2c59ff79 X-MS-TrafficTypeDiagnostic: DM6PR21MB1180:EE_ X-LD-Processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J4pTyf8BzTuf4lgsgVJmsZzV1m06ZP0ZdtesfJjVp1HWkhK+FSmUfu1kIg2IT2e9IBEpyrvQ/Zh0Ar6ym09LVPDB3ePGmkX/xw4+doYYwVm2NiDtd25NpxTOmRgzncwuDA213QMhcBHZTiBc/LIwWLhyaq54619tDsKAMFQYT0a+dCgwqweRk4x/CNrCpVWQb8c4+AJ/rAV9ZvD+fi/PMeFQ8i17bW+O34VpmtbYDkhi6U/NYBtvMI3L3wsjkPD3GBO4qJ9fcD2xKSBqsrxl6GDirF+PUhDFkK//ZF5IM5MuMPzE+Le/KnYzSYf1fp6F0IujIO2pKnTdkramAoZT07kc0PKJhJ2KUYun9Hb+TdcPngtihrRyW4b+owdn2UQey8L+i8NCJyX2JbeQdKbyNpquwv4OC7pwaGVDDfQCXE8UDrmnvzJWClbMzHZaObLp55kJ41DVFkMyzYQDSghyp33DI1YNsE+I6lQsTuxz4bhmKSTN8PLcKaD4iHV95dGKZcCVQU4MmKYEhiv6cWjjVRvgbiYX2XGyHNx1nMm7J2dn+vGEnDLO9Hd8muNZSQWa94ahJ369FWp+OeydDlX6PXkGFRGh3j77zTX/p2jmfjMh1ETlrjUBNbTvgExyxRclsZEGUA6n5BRAI5kH4mJmGPYJTQ4RLBJ/xwZxUHUxzxiNnDkQtu8fwS9L7PEViw3oZyGsiehENoyVb1MD8WM3Y6bPLnwo08I3qaUDgC8/DdOmkJlYxYgoUlt/88uzRTDcViP1DvtAgd/DFU8gifqU2A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR21MB1370.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(451199009)(82950400001)(7416002)(10290500003)(66946007)(6486002)(66556008)(66476007)(2616005)(107886003)(6512007)(26005)(921005)(5660300002)(6506007)(83380400001)(508600001)(82960400001)(86362001)(6666004)(316002)(8936002)(38350700002)(38100700002)(186003)(52116002)(4326008)(36756003)(8676002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kQfFLCwxFkW77JGzTBl0d88VVAFHRINR1oXNL0fgV1eanIgaLCi+qirYUu5TryHluB20wy1ctFAJpx2llZP/pgM0GCr4iNVmEr9o/VoflAucBx/qin8IHBJP9MhDQv3xEaT+PqxNF0myTyFsgxzYkRrPwTikj83QuzkyzEHp1MDMeAe5xs4RoMFKrfQdhy/8BGU4Cwjoygb+SiPrCXRjbL3bwM1pvilPpeUe/T620gKAru6f/cLA/JsBTey02tSgA8AsRc7wrW+gdJyM8H1OrI/Jrf94h4DDveSBA6hWBnLtPvvl6SZyYGcdP62obDKKIPGMSAT8dOhF8TQRak3M6oPsPKuLCljVCSE95Tkh85knlKYKQi6W5gkVYC6rOSBpXVKlBX4gAHKLsuKthzirIDB+HAefTCJ2fDVOpnnncVBRE/yqFvuel71g4zbRWNfV51L6VBsgrSAOdXEJ7m1yuTMrH4h/7aG3A8W46EtG9OXKVIdYTjYsbJWPjZ/hPD43bmpIWDF2GdhtKrcR4lNR3Mc6iej0re1+gCkxarTDlZIrmgJJfn8fx8oPQjvv0GNHMVMVJLi7NhyGHGulmpioC9PKC1Zr2uRNmqHi+WgonNyQc7W9qGU4/vaT5dbaRMvRRLH3Z/iOYc+cuyhtmIs5scfZgtqlm5DdsHugNLZWl5GnLIj0AcIzIUAhED88L/b1UqQvugZdeZMs8u1WgapdwMu7PWAteKhmtGs6xVgfXmXV/hzBi8S97mCH/eFufOYJTq/rqx+2RLYp9b+5zUPPkOWLX6ml9AwUGgv8bUpu2pZfBuWFRwRz+BMP5qLGJ8p75V5byN7h1kJ9fpbQYv8QuUlQwDcHhMcWJQ7lr28HLDjtqF9jD+E7TWeqSK2ntQ5kaH5f3Fu95Hvwzk6+k1QESqsMmtYQQE4xxgXNCy+8w5HWsvPKLoGYtxIJNFRgz8+lheSfX9FAjypfCeGuin6xiNYACdN8AQdQvw8FFzYQTJcvMVQyqQjWtF+7aJLWwTz8JLx8VUyHGJ8/kq33xbQW6qofofdQbQYEGlAN2GZ5VbVL3VWI9GvZun8cpLtvyQzITiwvQ9mb43Lvmi1qw4cXBdhPRXvesJUILQHzxwxEasJBFp3Iq0XbePbc1l2ELzMFwOm2Z50M5E/PPgh45bvScfjW0bAB+P8xMprVjPnhjuu3bivbcfkf/mC1pb/jVtqdRsMOvn1JUcaPO9fWm4TWBkQTykiReizQFnB2DCp8La4FUM6OP+B0aQoXVAo77A023nAcEQ9OP0kSKuYHLrL0agRQgssBQ11BD6T00ZL0TO7svVbiQVfTa2P+TRydsgQwZXvKLKnrpjtfPmR9R3g/cpqgUveuhSw1WBPLKglI3B3Yb2EGWixAgYEPtFRqHs9gXg76aZO/mKkUlDEJZrhi/ihaToJ4BwliYXOWqw330Q6bjNu0aCvptvhPBYEiMFHWAHo7x/EUMNLt+VVXUsirdBvZoA27aykMpR4kX1vkMCdnq0IGs2f97Sifs7zdx21bthMlk3UeZ8CvQGT4fJhTaw9+7x7JorSuF2CjglInCEmcii3abP+K4r66QuCC0UjjBCgtaFughXUCytPUI7Hpzr4eZCpbtBShPcszrJG5jBhNOQ0RnLfzsFgAmtAePEee1rIUqWo8bGWWxV8n/tJzl+nNpiYdQuCNu02kvLjXi3AnNmN1XHpysfJsGjtHUs/M/F+NFBFx6vWUilNlaL/gra2juxFZ3zHnQD1g/C0gEZY= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1684c8c-944d-4e0a-6444-08da2c59ff79 X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2022 16:37:07.7353 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3UtRDPArWZI/KLjZXUlPUZJJ+16zbSJUY93iF+cjQpU28y4ixFVzvXHf6CPNZAV3qDsF4joL7bAUIWWD1PX4eg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR21MB1180 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The DRM Hyper-V driver has special case code for running on the first released versions of Hyper-V: 2008 and 2008 R2/Windows 7. These versions are now out of support (except for extended security updates) and lack support for performance features that are needed for effective production usage of Linux guests. The negotiation of the VMbus protocol versions required by these old Hyper-V versions has been removed from the VMbus driver. So now remove the handling of these VMbus protocol versions from the DRM Hyper-V driver. Signed-off-by: Michael Kelley --- drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c index c0155c6..76a182a 100644 --- a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c +++ b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c @@ -18,16 +18,16 @@ #define SYNTHVID_VERSION(major, minor) ((minor) << 16 | (major)) #define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff) #define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16) + +/* Support for VERSION_WIN7 is removed. #define is retained for reference. */ #define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0) #define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2) #define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5) -#define SYNTHVID_DEPTH_WIN7 16 #define SYNTHVID_DEPTH_WIN8 32 -#define SYNTHVID_FB_SIZE_WIN7 (4 * 1024 * 1024) +#define SYNTHVID_WIDTH_WIN8 1600 +#define SYNTHVID_HEIGHT_WIN8 1200 #define SYNTHVID_FB_SIZE_WIN8 (8 * 1024 * 1024) -#define SYNTHVID_WIDTH_MAX_WIN7 1600 -#define SYNTHVID_HEIGHT_MAX_WIN7 1200 enum pipe_msg_type { PIPE_MSG_INVALID, @@ -496,12 +496,6 @@ int hyperv_connect_vsp(struct hv_device *hdev) case VERSION_WIN8: case VERSION_WIN8_1: ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN8); - if (!ret) - break; - fallthrough; - case VERSION_WS2008: - case VERSION_WIN7: - ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN7); break; default: ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN10); @@ -513,18 +507,15 @@ int hyperv_connect_vsp(struct hv_device *hdev) goto error; } - if (hv->synthvid_version == SYNTHVID_VERSION_WIN7) - hv->screen_depth = SYNTHVID_DEPTH_WIN7; - else - hv->screen_depth = SYNTHVID_DEPTH_WIN8; + hv->screen_depth = SYNTHVID_DEPTH_WIN8; if (hyperv_version_ge(hv->synthvid_version, SYNTHVID_VERSION_WIN10)) { ret = hyperv_get_supported_resolution(hdev); if (ret) drm_err(dev, "Failed to get supported resolution from host, use default\n"); } else { - hv->screen_width_max = SYNTHVID_WIDTH_MAX_WIN7; - hv->screen_height_max = SYNTHVID_HEIGHT_MAX_WIN7; + hv->screen_width_max = SYNTHVID_WIDTH_WIN8; + hv->screen_height_max = SYNTHVID_HEIGHT_WIN8; } hv->mmio_megabytes = hdev->channel->offermsg.offer.mmio_megabytes;