lkml.org 
[lkml]   [2022]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] selftests: KVM: Add support for posted interrupt handling in L2
On Thu, Aug 25, 2022, Sean Christopherson wrote:
> > +
> > +void prepare_virtual_apic(struct vmx_pages *vmx, struct kvm_vm *vm)
> > +{
> > + vmx->virtual_apic = (void *)vm_vaddr_alloc_page(vm);
> > + vmx->virtual_apic_hva = addr_gva2hva(vm, (uintptr_t)vmx->virtual_apic);
> > + vmx->virtual_apic_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->virtual_apic);
> > +}
> > +
> > +void prepare_posted_intr_desc(struct vmx_pages *vmx, struct kvm_vm *vm)
> > +{
> > + vmx->posted_intr_desc = (void *)vm_vaddr_alloc_page(vm);
> > + vmx->posted_intr_desc_hva =
> > + addr_gva2hva(vm, (uintptr_t)vmx->posted_intr_desc);
> > + vmx->posted_intr_desc_gpa =
> > + addr_gva2gpa(vm, (uintptr_t)vmx->posted_intr_desc);
>
> Let these poke out, or capture the field in a local var. Actually, posted_intr_desc
> is a void *, is casting even necessary?
>
Will do. Yeah, casting is necessary here because add_ga2gpa takes
'vm_vaddr_t' which is the 'long unsigned int', so we have to cast it.
>
> > +}
> > --
> > 2.37.1.455.g008518b4e5-goog
> >

\
 
 \ /
  Last update: 2022-08-28 21:56    [W:0.129 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site