[v2,0/3] KVM: SVM: Fix GATag bug for >256 vCPUs

Message ID 20230207002156.521736-1-seanjc@google.com
Headers
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

Suravee Suthikulpanit Feb. 15, 2023, 8:21 p.m. UTC | #1
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
  
Sean Christopherson Feb. 15, 2023, 10:11 p.m. UTC | #2
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?
  
Paolo Bonzini March 14, 2023, 1:36 p.m. UTC | #3
Queued, thanks.

Paolo