Message ID | 20230207002156.521736-1-seanjc@google.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2547893wrn; Mon, 6 Feb 2023 16:24:39 -0800 (PST) X-Google-Smtp-Source: AK7set+Cb7Z0uUomG3HddVZtAhpWi9PbwiEC6UfIIQfBl+wrrp6IgoTc5DK4BUoiiVqGJtG/0gQ4 X-Received: by 2002:a17:903:41c8:b0:199:126d:4ffb with SMTP id u8-20020a17090341c800b00199126d4ffbmr1295052ple.4.1675729479462; Mon, 06 Feb 2023 16:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675729479; cv=none; d=google.com; s=arc-20160816; b=gOda05tL8uVv6eQYVpdecdcQ4pk2Q3wrSMZPppg88pceux7jdaScxTfNTjFqxVWlpI lR7w3Mc3Ye66Oh1kFyQfGibQdtf/2ev3Pz1Y+ZHXLOzk7sgGusOMwjGKU9Qs8xM8jgdz OL4XLfyF+6nTLQizmVzH9+FQ5nM8KuGbHeEnDAUQ8bXkNhnnt5ILCzPJsl+GG3c54U0T RHqAN5HrRiYuAUXHPW+vbM8pSnMt2WOVE7sUaXPgdZ7HhWr9FsbZVoCPR7QPd+wj0AA7 NY9KTO91fDDIaEvs5lqo1x4nHWBb1GoorA2jTQFvFHh0rOkG+yCnVfgDdmlV2iqr28w+ jdHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :reply-to:dkim-signature; bh=Fr3xqRzLNYPURQh7ZU8Jus7/FUthEiow4VKsPMI3ES0=; b=GJCouDCtm28eHlBe5dYb7qii+nCRFYG3JAU3AllQWGMkDYxwBVBx4u+YKQG7GBfrZF qal5FItm3ikthjAxVvakwNJfOl1cXmfaAl61ZXmt50VUgNhR/KZWRiJ5x7bEqWB5KQ2V hYnc60c/tVigqV70SoZC44YZrcwBgcqegrmTfveJf5OEqOmAnEUw3OZEyiEMhQ5qeIB3 1yd+KWRz0/TRH7lYDUMgOFGgiUrfXx7t1ERgz7UtaQykiiOR1+idKtQHNqy3Eag+IFJF HO8F8wY+w3WE7EQNNg/QP+r/2sc6bOBqwBP+UpwacBd0b+Z14uuS/Al7DsAzWAOrjEZt udwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ltr7A+qk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j190-20020a638bc7000000b004e4ee9be446si12065868pge.185.2023.02.06.16.24.26; Mon, 06 Feb 2023 16:24:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ltr7A+qk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbjBGAWB (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Mon, 6 Feb 2023 19:22:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjBGAV7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Feb 2023 19:21:59 -0500 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED05C30B31 for <linux-kernel@vger.kernel.org>; Mon, 6 Feb 2023 16:21:58 -0800 (PST) Received: by mail-pg1-x54a.google.com with SMTP id 201-20020a6300d2000000b004ccf545f44fso5875113pga.12 for <linux-kernel@vger.kernel.org>; Mon, 06 Feb 2023 16:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=Fr3xqRzLNYPURQh7ZU8Jus7/FUthEiow4VKsPMI3ES0=; b=ltr7A+qkkRfn6cuKgarkC/VuDPyW+dOumVtox9JdiPUdd6tafcq4rEY3Rrzp7qzmSu +Q8k5Wi3bgRY8uWDhOiqSqMo1Ma61+0XF+f7SQjvzG6NSzv7zWmBYCDyxOatI/07aXGH 6SmgO751zuI3wRhhP3KCK1Ysvtl1ADTXu8FMjsgfF+bo7MbXU7MvbLrW8KOMHfIud6Vw MSWquT/lej2eOINeW+RgMCatqZg41zX/6Ys2YbuFp5Z3An2hcxkJukob4MGypx18LJVY LFBI5LSGslWicDSZEwfq23/Vj8RHKJz4jyhOB5w04DQZklcasKmaSfTFTx79EbPnQ+ox wS+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:reply-to :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fr3xqRzLNYPURQh7ZU8Jus7/FUthEiow4VKsPMI3ES0=; b=BNL3LPpWZRZJm1T9uFvY2k2qgXDDmW3qCv60XOnBwp9DKbnGUsTkycwrpAQhVwbclI A2KMxZvN0E2utIIl6znyHlRFKXFdrcE1v18Pzo+wWlunFsrH625LGU33dtaMZkUxHJbB EhZiINrFQ1C0+O8+lCyEkRmCejWeVRN/ysDbYyMu7Vw8pWYKDkJa7yiZfmf9/oFdWswy PiWZGRtGGRxqnQm3W4q5y0oj/2RU0yKNDl0QDafUk07UjNQ4wLj+04g7e1OS6GmMxEIG ri/9bQjAjnrQ5lyzSvWzjQ47yAIhSd3lNnkk9fR8PjuZ6a8bINa/aVgUZg6ix0f7fzhS vuCA== X-Gm-Message-State: AO0yUKVzSIYxQ0EIBRFpQDwsw0ca20tPzG+H6mOyzFY9moMUXu6xX/lD gIw26QORisLoVUdO7pyTeunM55shopE= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a62:53c6:0:b0:58d:a84a:190b with SMTP id h189-20020a6253c6000000b0058da84a190bmr285757pfb.48.1675729318448; Mon, 06 Feb 2023 16:21:58 -0800 (PST) Reply-To: Sean Christopherson <seanjc@google.com> Date: Tue, 7 Feb 2023 00:21:53 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog Message-ID: <20230207002156.521736-1-seanjc@google.com> Subject: [PATCH v2 0/3] KVM: SVM: Fix GATag bug for >256 vCPUs From: Sean Christopherson <seanjc@google.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Alejandro Jimenez <alejandro.j.jimenez@oracle.com>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757129714761932656?= X-GMAIL-MSGID: =?utf-8?q?1757129714761932656?= |
Series | KVM: SVM: Fix GATag bug for >256 vCPUs | |
Message
Sean Christopherson
Feb. 7, 2023, 12:21 a.m. UTC
Fix a bug in KVM's use of the GATag where it unintentionally drops a bit from vCPU IDs greater than 255 and as a result wakes the wrong vCPU. Suravee and/or Alejandro, can you give this proper testing? It's compile tested only at this point. I'll do basic testing before officially applying, but AFAIK I don't have access to x2AVIC hardware, nor do I have a ready-to-go configuration to properly exercise this code. Thanks! Sean Christopherson (2): KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask KVM: SVM: WARN if GATag generation drops VM or vCPU ID information Suravee Suthikulpanit (1): KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs arch/x86/include/asm/svm.h | 12 +++++++----- arch/x86/kvm/svm/avic.c | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 14 deletions(-) base-commit: 32e69f232db4ca11f26e5961daeff93906ce232f
Comments
On 2/7/2023 7:21 AM, Sean Christopherson wrote: > Fix a bug in KVM's use of the GATag where it unintentionally drops a bit > from vCPU IDs greater than 255 and as a result wakes the wrong vCPU. > > Suravee and/or Alejandro, can you give this proper testing? It's compile > tested only at this point. I'll do basic testing before officially > applying, but AFAIK I don't have access to x2AVIC hardware, nor do I have > a ready-to-go configuration to properly exercise this code. > > Thanks! > > Sean Christopherson (2): > KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask > KVM: SVM: WARN if GATag generation drops VM or vCPU ID information > > Suravee Suthikulpanit (1): > KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs > > arch/x86/include/asm/svm.h | 12 +++++++----- > arch/x86/kvm/svm/avic.c | 37 ++++++++++++++++++++++++++++--------- > 2 files changed, 35 insertions(+), 14 deletions(-) > > > base-commit: 32e69f232db4ca11f26e5961daeff93906ce232f For the series: Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Thanks, Suravee
On Thu, Feb 16, 2023, Suthikulpanit, Suravee wrote: > > > On 2/7/2023 7:21 AM, Sean Christopherson wrote: > > Fix a bug in KVM's use of the GATag where it unintentionally drops a bit > > from vCPU IDs greater than 255 and as a result wakes the wrong vCPU. > > > > Suravee and/or Alejandro, can you give this proper testing? It's compile > > tested only at this point. I'll do basic testing before officially > > applying, but AFAIK I don't have access to x2AVIC hardware, nor do I have > > a ready-to-go configuration to properly exercise this code. > > > > Thanks! > > > > Sean Christopherson (2): > > KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask > > KVM: SVM: WARN if GATag generation drops VM or vCPU ID information > > > > Suravee Suthikulpanit (1): > > KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs > > > > arch/x86/include/asm/svm.h | 12 +++++++----- > > arch/x86/kvm/svm/avic.c | 37 ++++++++++++++++++++++++++++--------- > > 2 files changed, 35 insertions(+), 14 deletions(-) > > > > > > base-commit: 32e69f232db4ca11f26e5961daeff93906ce232f > > For the series: > > Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Thanks much! Paolo, do you want to grab this directly, or should I throw this in next for a few days and send a separate pull request? Or do something else entirely?
Queued, thanks. Paolo