Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-08-13 Thread Pratik R. Sampat
On 8/9/2024 10:45 AM, Sean Christopherson wrote: > On Thu, Jul 11, 2024, Pratik Rajesh Sampat wrote: +static void sev_guest_status_assert(struct kvm_vm *vm, uint32_t type) +{ + struct kvm_sev_guest_status status; + bool cond; + int ret; + + ret = __vm_sev_i

Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-08-09 Thread Sean Christopherson
On Thu, Jul 11, 2024, Pratik Rajesh Sampat wrote: > >> +static void sev_guest_status_assert(struct kvm_vm *vm, uint32_t type) > >> +{ > >> + struct kvm_sev_guest_status status; > >> + bool cond; > >> + int ret; > >> + > >> + ret = __vm_sev_ioctl(vm, KVM_SEV_GUEST_STATUS, &status); > >> + cond

Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-07-11 Thread Sampat, Pratik Rajesh
Hi Tom On 7/11/2024 1:34 PM, Tom Lendacky wrote: > On 7/10/24 17:05, Pratik R. Sampat wrote: >> Introduce tests for sev and sev-es ioctl that exercises the boot path >> of launch, update and finish on an invalid policy. >> >> Signed-off-by: Pratik R. Sampat >> --- >> .../selftests/kvm/x86_64/sev

Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-07-11 Thread Tom Lendacky
On 7/10/24 17:05, Pratik R. Sampat wrote: > Introduce tests for sev and sev-es ioctl that exercises the boot path > of launch, update and finish on an invalid policy. > > Signed-off-by: Pratik R. Sampat > --- > .../selftests/kvm/x86_64/sev_smoke_test.c | 57 +++ > 1 file chan

Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-07-11 Thread Sampat, Pratik Rajesh
On 7/11/2024 10:23 AM, Peter Gonda wrote: >> + >> +static void test_sev_launch(void *guest_code, uint32_t type, uint64_t >> policy) >> +{ >> + struct kvm_vcpu *vcpu; >> + struct kvm_vm *vm; >> + struct ucall uc; >> + bool cond; >> + int ret; >> + >> + vm = vm

Re: [RFC 3/5] selftests: KVM: SEV IOCTL test

2024-07-11 Thread Peter Gonda
> + > +static void test_sev_launch(void *guest_code, uint32_t type, uint64_t policy) > +{ > + struct kvm_vcpu *vcpu; > + struct kvm_vm *vm; > + struct ucall uc; > + bool cond; > + int ret; > + > + vm = vm_sev_create_with_one_vcpu(type, guest_code, &vcpu); > +

[RFC 3/5] selftests: KVM: SEV IOCTL test

2024-07-10 Thread Pratik R. Sampat
Introduce tests for sev and sev-es ioctl that exercises the boot path of launch, update and finish on an invalid policy. Signed-off-by: Pratik R. Sampat --- .../selftests/kvm/x86_64/sev_smoke_test.c | 57 +++ 1 file changed, 57 insertions(+) diff --git a/tools/testing/selfte