Hi Salil,

On 10/23/25 11:29 AM, Salil Mehta wrote:

[...]


Ah, I see. I think I understand the issue. It's complaining
about calling the  finalize twice. Is it possible to check as
I do not have a way to test it?


int kvm_arm_vcpu_finalize(struct kvm_vcpu *vcpu, int feature)
{
switch (feature) {
case KVM_ARM_VCPU_SVE:
[...]
if (kvm_arm_vcpu_sve_finalized(vcpu))
return -EPERM;-----> this where it must be popping?
[...]
}

I've pushed the fix to avoid calling the finalizing SVE
feature (KVM_ARM_VCPU_FINALIZE) twice on the
same RFC-V6.2 branch.

May I kindly request you to validate the fix again and
check SVE works on NVIDIA grace-hopper?


With the latest rfc-v6.2 branch, I don't hit the issue. The vCPU can be hot 
added
and removed on grace-hopper host.

host$ /home/gavin/sandbox/qemu.main/build/qemu-system-aarch64                   
  \
      -accel kvm -machine virt,gic-version=host,nvdimm=on                       
  \
      -cpu host,sve=on                                                          
  \
      -smp 
maxcpus=4,cpus=2,disabledcpus=2,sockets=2,clusters=2,cores=1,threads=1 \
      -m 4096M,slots=16,maxmem=128G                                             
  \
      -object memory-backend-ram,id=mem0,size=2048M                             
  \
      -object memory-backend-ram,id=mem1,size=2048M                             
  \
      -numa node,nodeid=0,memdev=mem0,cpus=0-1                                  
  \
      -numa node,nodeid=1,memdev=mem1,cpus=2-3                                  
  \
      -L /home/gavin/sandbox/qemu.main/build/pc-bios                            
  \
      -monitor none -serial mon:stdio -nographic -gdb tcp::6666                 
  \
      -qmp tcp:localhost:5555,server,wait=off                                   
  \
      -bios /home/gavin/sandbox/qemu.main/build/pc-bios/edk2-aarch64-code.fd    
  \
      -kernel /home/gavin/sandbox/linux.guest/arch/arm64/boot/Image             
  \
      -initrd /home/gavin/sandbox/images/rootfs.cpio.xz                         
  \
      -append memhp_default_state=online_movable
         :
         :
guest$ cd /sys/devices/system/cpu
guest$ cat present enabled online
0-3
0-1
0-1
(qemu) device_set 
host-arm-cpu,socket-id=1,cluster-id=0,core-id=0,thread-id=0,admin-state=enable
guest$ echo 1 > cpu2/online
guest$ cat present enabled online
0-3
0-2
0-2
        :
        :
guest$ cd /sys/device/system/cpu
guest$ cat present enabled online
0-3
0-2
0-2
(qemu) device_set 
host-arm-cpu,socket-id=1,cluster-id=0,core-id=0,thread-id=0,admin-state=disable
guest$ cat present enabled online
0-3
0-1
0-1

Thanks,
Gavin


Reply via email to