Message ID | 20221223005739.1295925-1-seanjc@google.com (mailing list archive) |
---|---|
Headers | show |
Series | drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups | expand |
On Fri, Dec 23, 2022 at 12:57:12AM +0000, Sean Christopherson wrote: > Fix a variety of found-by-inspection bugs in KVMGT, and overhaul KVM's > page-track APIs to provide a leaner and cleaner interface. The motivation > for this series is to (significantly) reduce the number of KVM APIs that > KVMGT uses, with a long-term goal of making all kvm_host.h headers > KVM-internal. That said, I think the cleanup itself is worthwhile, > e.g. KVMGT really shouldn't be touching kvm->mmu_lock. > > Note! The KVMGT changes are compile tested only as I don't have the > necessary hardware (AFAIK). Testing, and lots of it, on the KVMGT side > of things is needed and any help on that front would be much appreciated. hi Sean, Thanks for the patch! Could you also provide the commit id that this series is based on? I applied them on top of latest master branch (6.1.0+, 8395ae05cb5a2e31d36106e8c85efa11cda849be) in repo https://github.com/torvalds/linux.git, yet met some conflicts and I fixed them manually. (patch 11 and patch 25). A rough test shows that below mutex_init is missing. But even with this fix, I still met guest hang during guest boots up. Will look into it and have a detailed review next week. diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c index a7ac2ec00196..c274b6a05555 100644 --- a/drivers/gpu/drm/i915/gvt/vgpu.c +++ b/drivers/gpu/drm/i915/gvt/vgpu.c @@ -331,6 +331,7 @@ int intel_gvt_create_vgpu(struct intel_vgpu *vgpu, vgpu->id = ret; vgpu->sched_ctl.weight = conf->weight; mutex_init(&vgpu->vgpu_lock); + mutex_init(&vgpu->gfn_lock); mutex_init(&vgpu->dmabuf_lock); INIT_LIST_HEAD(&vgpu->dmabuf_obj_list_head); INIT_RADIX_TREE(&vgpu->page_track_tree, GFP_KERNEL); Thanks Yan
On Fri, Dec 23, 2022, Yan Zhao wrote: > On Fri, Dec 23, 2022 at 12:57:12AM +0000, Sean Christopherson wrote: > > Fix a variety of found-by-inspection bugs in KVMGT, and overhaul KVM's > > page-track APIs to provide a leaner and cleaner interface. The motivation > > for this series is to (significantly) reduce the number of KVM APIs that > > KVMGT uses, with a long-term goal of making all kvm_host.h headers > > KVM-internal. That said, I think the cleanup itself is worthwhile, > > e.g. KVMGT really shouldn't be touching kvm->mmu_lock. > > > > Note! The KVMGT changes are compile tested only as I don't have the > > necessary hardware (AFAIK). Testing, and lots of it, on the KVMGT side > > of things is needed and any help on that front would be much appreciated. > hi Sean, > Thanks for the patch! > Could you also provide the commit id that this series is based on? The commit ID is provided in the cover letter: base-commit: 9d75a3251adfbcf444681474511b58042a364863 Though you might have a hard time finding that commit as it's from an old version of kvm/queue that's probably since been force pushed. > I applied them on top of latest master branch (6.1.0+, > 8395ae05cb5a2e31d36106e8c85efa11cda849be) in repo > https://github.com/torvalds/linux.git, yet met some conflicts and I > fixed them manually. (patch 11 and patch 25). > > A rough test shows that below mutex_init is missing. > But even with this fix, I still met guest hang during guest boots up. > Will look into it and have a detailed review next week. Thanks again for the reviews and testing! I'll get a v2 out in the next week or so (catching up from holidays) and will be more explicit in documenting the base version.
On Wed, Jan 04, 2023 at 01:01:13AM +0000, Sean Christopherson wrote: > On Fri, Dec 23, 2022, Yan Zhao wrote: > > On Fri, Dec 23, 2022 at 12:57:12AM +0000, Sean Christopherson wrote: > > > Fix a variety of found-by-inspection bugs in KVMGT, and overhaul KVM's > > > page-track APIs to provide a leaner and cleaner interface. The motivation > > > for this series is to (significantly) reduce the number of KVM APIs that > > > KVMGT uses, with a long-term goal of making all kvm_host.h headers > > > KVM-internal. That said, I think the cleanup itself is worthwhile, > > > e.g. KVMGT really shouldn't be touching kvm->mmu_lock. > > > > > > Note! The KVMGT changes are compile tested only as I don't have the > > > necessary hardware (AFAIK). Testing, and lots of it, on the KVMGT side > > > of things is needed and any help on that front would be much appreciated. > > hi Sean, > > Thanks for the patch! > > Could you also provide the commit id that this series is based on? > > The commit ID is provided in the cover letter: > > base-commit: 9d75a3251adfbcf444681474511b58042a364863 > > Though you might have a hard time finding that commit as it's from an old > version of kvm/queue that's probably since been force pushed. > > > I applied them on top of latest master branch (6.1.0+, > > 8395ae05cb5a2e31d36106e8c85efa11cda849be) in repo > > https://github.com/torvalds/linux.git, yet met some conflicts and I > > fixed them manually. (patch 11 and patch 25). > > > > A rough test shows that below mutex_init is missing. > > But even with this fix, I still met guest hang during guest boots up. > > Will look into it and have a detailed review next week. > > Thanks again for the reviews and testing! I'll get a v2 out in the next week or > so (catching up from holidays) and will be more explicit in documenting the base > version. That's fine and it's a pleasure to me :)