mbox series

[0/3] KVM: PPC: Book3S HV: XIVE: assorted fixes on vCPU and RAM limits

Message ID 20190520071514.9308-1-clg@kaod.org
Headers show
Series KVM: PPC: Book3S HV: XIVE: assorted fixes on vCPU and RAM limits | expand

Message

Cédric Le Goater May 20, 2019, 7:15 a.m. UTC
Hello,

Here are a couple of fixes for issues in the XIVE KVM device when
testing the limits : RAM size and number of vCPUS.

Based on 5.2-rc1.

Available on GitHub:

    https://github.com/legoater/linux/commits/xive-5.2

Thanks,

C. 

Cédric Le Goater (3):
  KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
  KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
    reseting
  KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
    identifier

 arch/powerpc/kvm/book3s_xive_native.c | 46 ++++++++++++++++-----------
 1 file changed, 27 insertions(+), 19 deletions(-)

Comments

David Gibson May 22, 2019, 11:30 p.m. UTC | #1
On Mon, May 20, 2019 at 09:15:11AM +0200, Cédric Le Goater wrote:
> Hello,
> 
> Here are a couple of fixes for issues in the XIVE KVM device when
> testing the limits : RAM size and number of vCPUS.

How serious are the problems these patches fix?  I'm wondering if I
need to make a backport for RHEL8.1.

> 
> Based on 5.2-rc1.
> 
> Available on GitHub:
> 
>     https://github.com/legoater/linux/commits/xive-5.2
> 
> Thanks,
> 
> C. 
> 
> Cédric Le Goater (3):
>   KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
>   KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
>     reseting
>   KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
>     identifier
> 
>  arch/powerpc/kvm/book3s_xive_native.c | 46 ++++++++++++++++-----------
>  1 file changed, 27 insertions(+), 19 deletions(-)
>
Greg Kurz May 23, 2019, 6:01 a.m. UTC | #2
On Thu, 23 May 2019 09:30:43 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Mon, May 20, 2019 at 09:15:11AM +0200, Cédric Le Goater wrote:
> > Hello,
> > 
> > Here are a couple of fixes for issues in the XIVE KVM device when
> > testing the limits : RAM size and number of vCPUS.  
> 
> How serious are the problems these patches fix?  I'm wondering if I
> need to make a backport for RHEL8.1.
> 

Patch 2/3 fixes a QEMU error when hot-unplugging a vCPU:

qemu-system-ppc64: KVM_SET_DEVICE_ATTR failed: Group 4 attr 0x0000000000000046: Invalid argument


Patch 3/3 fixes an issue where the guest freezes at some point when doing
vCPU hot-plug/unplug in a loop.


Both issues have a BZ at IBM. They can be mirrored to RH if needed.

> > 
> > Based on 5.2-rc1.
> > 
> > Available on GitHub:
> > 
> >     https://github.com/legoater/linux/commits/xive-5.2
> > 
> > Thanks,
> > 
> > C. 
> > 
> > Cédric Le Goater (3):
> >   KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
> >   KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
> >     reseting
> >   KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
> >     identifier
> > 
> >  arch/powerpc/kvm/book3s_xive_native.c | 46 ++++++++++++++++-----------
> >  1 file changed, 27 insertions(+), 19 deletions(-)
> >   
>
Cédric Le Goater May 23, 2019, 6:06 a.m. UTC | #3
On 5/23/19 1:30 AM, David Gibson wrote:
> On Mon, May 20, 2019 at 09:15:11AM +0200, Cédric Le Goater wrote:
>> Hello,
>>
>> Here are a couple of fixes for issues in the XIVE KVM device when
>> testing the limits : RAM size and number of vCPUS.

This summary is wrong. RAM size was fixed in QEMU.

> How serious are the problems these patches fix?  I'm wondering if I
> need to make a backport for RHEL8.1.

Patch 1 is a cleanup patch. It does not fix any critical issues.

Patch 2 fixes CPU hotplug. The test on the EQ flag is at the wrong 
place :/ This is important I think.

Patch 3 fixes the maximum number of vCPUS supported. This one is 
less important maybe, unless we want to run a guest with 1024 vCPUs.
Which is quite slow to run on most P9 systems. 

QEMU emits a warning :

  warning: Number of SMP cpus requested (1024) exceeds the recommended cpus supported by KVM (120)

May be we should refuse to run QEMU when that number is above a 
certain threshold ? 

C. 



>>
>> Based on 5.2-rc1.
>>
>> Available on GitHub:
>>
>>     https://github.com/legoater/linux/commits/xive-5.2
>>
>> Thanks,
>>
>> C. 
>>
>> Cédric Le Goater (3):
>>   KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
>>   KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
>>     reseting
>>   KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
>>     identifier
>>
>>  arch/powerpc/kvm/book3s_xive_native.c | 46 ++++++++++++++++-----------
>>  1 file changed, 27 insertions(+), 19 deletions(-)
>>
>
David Gibson May 23, 2019, 6:27 a.m. UTC | #4
On Thu, May 23, 2019 at 08:01:23AM +0200, Greg Kurz wrote:
> On Thu, 23 May 2019 09:30:43 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Mon, May 20, 2019 at 09:15:11AM +0200, Cédric Le Goater wrote:
> > > Hello,
> > > 
> > > Here are a couple of fixes for issues in the XIVE KVM device when
> > > testing the limits : RAM size and number of vCPUS.  
> > 
> > How serious are the problems these patches fix?  I'm wondering if I
> > need to make a backport for RHEL8.1.
> > 
> 
> Patch 2/3 fixes a QEMU error when hot-unplugging a vCPU:
> 
> qemu-system-ppc64: KVM_SET_DEVICE_ATTR failed: Group 4 attr 0x0000000000000046: Invalid argument
> 
> 
> Patch 3/3 fixes an issue where the guest freezes at some point when doing
> vCPU hot-plug/unplug in a loop.

Oh.. weird.  It's not clear to me how it would do that.

> Both issues have a BZ at IBM. They can be mirrored to RH if needed.

That would be helpful, thanks.




> 
> > > 
> > > Based on 5.2-rc1.
> > > 
> > > Available on GitHub:
> > > 
> > >     https://github.com/legoater/linux/commits/xive-5.2
> > > 
> > > Thanks,
> > > 
> > > C. 
> > > 
> > > Cédric Le Goater (3):
> > >   KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
> > >   KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
> > >     reseting
> > >   KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
> > >     identifier
> > > 
> > >  arch/powerpc/kvm/book3s_xive_native.c | 46 ++++++++++++++++-----------
> > >  1 file changed, 27 insertions(+), 19 deletions(-)
> > >   
> > 
>
Greg Kurz May 23, 2019, 12:44 p.m. UTC | #5
On Thu, 23 May 2019 16:27:15 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Thu, May 23, 2019 at 08:01:23AM +0200, Greg Kurz wrote:
> > On Thu, 23 May 2019 09:30:43 +1000
> > David Gibson <david@gibson.dropbear.id.au> wrote:
> >   
> > > On Mon, May 20, 2019 at 09:15:11AM +0200, Cédric Le Goater wrote:  
> > > > Hello,
> > > > 
> > > > Here are a couple of fixes for issues in the XIVE KVM device when
> > > > testing the limits : RAM size and number of vCPUS.    
> > > 
> > > How serious are the problems these patches fix?  I'm wondering if I
> > > need to make a backport for RHEL8.1.
> > >   
> > 
> > Patch 2/3 fixes a QEMU error when hot-unplugging a vCPU:
> > 
> > qemu-system-ppc64: KVM_SET_DEVICE_ATTR failed: Group 4 attr 0x0000000000000046: Invalid argument
> > 
> > 
> > Patch 3/3 fixes an issue where the guest freezes at some point when doing
> > vCPU hot-plug/unplug in a loop.  
> 
> Oh.. weird.  It's not clear to me how it would do that.
> 

Cedric provided a better description in some other mail: guest with 1024
vCPUs.

> > Both issues have a BZ at IBM. They can be mirrored to RH if needed.  
> 
> That would be helpful, thanks.
> 

Ok, I'll take care of that.

> 
> 
> 
> >   
> > > > 
> > > > Based on 5.2-rc1.
> > > > 
> > > > Available on GitHub:
> > > > 
> > > >     https://github.com/legoater/linux/commits/xive-5.2
> > > > 
> > > > Thanks,
> > > > 
> > > > C. 
> > > > 
> > > > Cédric Le Goater (3):
> > > >   KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
> > > >   KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
> > > >     reseting
> > > >   KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
> > > >     identifier
> > > > 
> > > >  arch/powerpc/kvm/book3s_xive_native.c | 46 ++++++++++++++++-----------
> > > >  1 file changed, 27 insertions(+), 19 deletions(-)
> > > >     
> > >   
> >   
> 
> 
>
Paul Mackerras May 31, 2019, 6:33 a.m. UTC | #6
On Mon, May 20, 2019 at 09:15:11AM +0200, Cédric Le Goater wrote:
> Hello,
> 
> Here are a couple of fixes for issues in the XIVE KVM device when
> testing the limits : RAM size and number of vCPUS.
> 
> Based on 5.2-rc1.
> 
> Available on GitHub:
> 
>     https://github.com/legoater/linux/commits/xive-5.2
> 
> Thanks,
> 
> C. 
> 
> Cédric Le Goater (3):
>   KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released
>   KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when
>     reseting
>   KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU
>     identifier

Thanks, series applied to my kvm-ppc-fixes branch.

Paul.