Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-08-13 Thread Pratik R. Sampat
On 8/13/2024 10:27 AM, Sean Christopherson wrote: > On Tue, Aug 13, 2024, Pratik R. Sampat wrote: >> On 8/9/2024 10:40 AM, Sean Christopherson wrote: >>> On Wed, Jul 10, 2024, Pratik R. Sampat wrote: @@ -98,7 +100,7 @@ static inline void sev_register_encrypted_memory(struct kvm_vm *vm

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-08-13 Thread Sean Christopherson
On Tue, Aug 13, 2024, Pratik R. Sampat wrote: > On 8/9/2024 10:40 AM, Sean Christopherson wrote: > > On Wed, Jul 10, 2024, Pratik R. Sampat wrote: > >> @@ -98,7 +100,7 @@ static inline void sev_register_encrypted_memory(struct > >> kvm_vm *vm, > >>vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &r

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-08-13 Thread Pratik R. Sampat
Hi Sean, Thanks for your review. On 8/9/2024 10:40 AM, Sean Christopherson wrote: > On Wed, Jul 10, 2024, Pratik R. Sampat wrote: >> This commit separates the SEV, SEV-ES, SEV-SNP ioctl calls from its > > Don't start with "This commit". Please read > Documentation/process/maintainer-kvm-x86.rs

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-08-09 Thread Sean Christopherson
On Wed, Jul 10, 2024, Pratik R. Sampat wrote: > This commit separates the SEV, SEV-ES, SEV-SNP ioctl calls from its Don't start with "This commit". Please read Documentation/process/maintainer-kvm-x86.rst, and by extension, Documentation/process/maintainer-tip.rst. > positive test asserts. This

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-07-11 Thread Sampat, Pratik Rajesh
On 7/11/2024 11:11 AM, Peter Gonda wrote: >> +int sev_vm_launch_update(struct kvm_vm *vm, uint32_t policy) >> +{ >> + struct userspace_mem_region *region; >> + int ctr, ret; >> >> + hash_for_each(vm->regions.slot_hash, ctr, region, slot_node) { >> + ret = encrypt_

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-07-11 Thread Peter Gonda
> +int sev_vm_launch_update(struct kvm_vm *vm, uint32_t policy) > +{ > + struct userspace_mem_region *region; > + int ctr, ret; > > + hash_for_each(vm->regions.slot_hash, ctr, region, slot_node) { > + ret = encrypt_region(vm, region, 0); > + if (ret) >

Re: [RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-07-11 Thread Peter Gonda
On Wed, Jul 10, 2024 at 4:06 PM Pratik R. Sampat wrote: > > This commit separates the SEV, SEV-ES, SEV-SNP ioctl calls from its > positive test asserts. This is done so that negative tests can be > introduced and both kinds of testing can be performed independently > using the same base helpers of

[RFC 2/5] selftests: KVM: Decouple SEV ioctls from asserts

2024-07-10 Thread Pratik R. Sampat
This commit separates the SEV, SEV-ES, SEV-SNP ioctl calls from its positive test asserts. This is done so that negative tests can be introduced and both kinds of testing can be performed independently using the same base helpers of the ioctl. This commit also adds additional parameters such as fl