From patchwork Wed Sep 20 11:52:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1837213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RrH3Z6PF9z1ynZ for ; Wed, 20 Sep 2023 21:53:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qivlQ-0005Jy-2N; Wed, 20 Sep 2023 11:53:05 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qivlD-0005IB-RE for kernel-team@lists.ubuntu.com; Wed, 20 Sep 2023 11:52:52 +0000 Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 77A7C3F196 for ; Wed, 20 Sep 2023 11:52:51 +0000 (UTC) Received: by mail-io1-f69.google.com with SMTP id ca18e2360f4ac-794c9992f15so34619839f.0 for ; Wed, 20 Sep 2023 04:52:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695210769; x=1695815569; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i6gvz8neH1DV9+0GUvYSz+Vo+iv2bZkrL57NoHhovnI=; b=T6FwtjW42Iv0fh3CZOW757nqHjg15GYQ6RpnlX2LeUYBq9IuXvas1x2f2gE4XlfKcT 9Rb04Z+wrKyu6cEvzw78PFfoh9NSpOOPgciA0msMyMIZRauAb03IqNr5PXEiWAsK1Jmu aiPQ/2kfS+YfjIZ/u82vio9s+uCx/qQOrIgwkTRIvqJKCEe9L7+n3g0ZYHEjyRkCZ9J+ Lof1Ulr0u32vDlUcINTT32Vl//uTD+FDgeqQBADqr6Z106oGtkiwX2Fw+vlDERG6z/LH 8Xzq0AJDRaks25bLIw7sdp7VypGUgexW95yhL1I0XAw6RXL4aoCWiyHkbU41+vmuzLZQ Ehbg== X-Gm-Message-State: AOJu0YycTU/hMjlczl27WKgueAhLweYZJGaLRDGEVbpssGIk7KrHX2OM xRTXHtJPTfcg9tRzD1uLxEhbO7Ba7TOulc8Swm1ZZ0Lv32FZLHMA+6YruVYnsk1eVVj3IQ4H+Tu wDL97GuGKr8hvG30fyQbrJunXCdLyu6Ue5UqlHhdauAd2ctgBAg== X-Received: by 2002:a6b:dc1a:0:b0:791:8f62:31ef with SMTP id s26-20020a6bdc1a000000b007918f6231efmr2103422ioc.5.1695210768837; Wed, 20 Sep 2023 04:52:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUf5Hc+V0Rt7GB5LfaJDrcwM8yXIp1nDMKUx1iJUnHo8tAHbfnqMxPBn5NTZm30IGivy40iA== X-Received: by 2002:a6b:dc1a:0:b0:791:8f62:31ef with SMTP id s26-20020a6bdc1a000000b007918f6231efmr2103415ioc.5.1695210768518; Wed, 20 Sep 2023 04:52:48 -0700 (PDT) Received: from smtp.gmail.com (174-045-099-030.res.spectrum.com. [174.45.99.30]) by smtp.gmail.com with ESMTPSA id f4-20020a5d8144000000b00790d81167a7sm4131340ioo.2.2023.09.20.04.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 04:52:48 -0700 (PDT) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: (no-up) hv: Fix supply vendor ID Date: Wed, 20 Sep 2023 05:52:43 -0600 Message-Id: <20230920115243.236834-2-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920115243.236834-1-tim.gardner@canonical.com> References: <20230920115243.236834-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2036600 There is a mistake in the commit (https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/jammy/commit/?id=5dd24f2df3280d4354641f4687dbb36e418e7de8) : Before the commit, the good guest_id is 0x8180000602100000. With the commit, the generated guest_id is incorrect: 0x0080000602100000, i.e. the 0x81 from bit 56~63 are dropped. See "include/asm-generic/hyperv-tlfs.h" for the definition of the bits: * Bit(s) * 63 - Indicates if the OS is Open Source or not; 1 is Open Source * 62:56 - Os Type; Linux is 0x100 !!!!! Dexuan: this should be 0x1. I'll post a patch to LKML to fix this typo. * 55:48 - Distro specific identification * 47:16 - Linux kernel version number * 15:0 - Distro specific identification See https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/tlfs ("February, 2020: Released Version 6.0b", page 15) As a result, the host thinks that the VM is not an open-source OS, and it's not Linux. Consequently, the "VM Availability" fron Azure portal is 0 (unhealthy): some users rely on the info to manage their VMs, e.g. if the VM is erroneously reported "unhealthy", the VM may be killed and re-created, and the new VM is still "unhealthy", and the VM may be killed and re-created again... Fixes commit df072c70a5aecc5f3beac8b8ceb16e6633fcb6c2 ('UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI') Signed-off-by: Tim Gardner --- include/asm-generic/hyperv-tlfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h index d44e0860c9f9..5b72376e4a88 100644 --- a/include/asm-generic/hyperv-tlfs.h +++ b/include/asm-generic/hyperv-tlfs.h @@ -135,7 +135,7 @@ union hv_reference_tsc_msr { * */ -#define HV_LINUX_VENDOR_ID 0x80 /* Canonical */ +#define HV_LINUX_VENDOR_ID 0x8180 /* Canonical */ /* * Crash notification flags.