Re: [PATCH] KVM: selftests: Rename vm_handle_exception in evmcs test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 08, 2021, Ricardo Koller wrote:
> On Fri, Jun 04, 2021 at 09:26:54PM +0000, Sean Christopherson wrote:
> > The multiple layers of routing is also confusing and a bit hard to wade through
> > for the uninitiated.  The whole thing can be made more straightfoward by doing
> > away with the intermediate routing, whacking ~50 lines of code in the process.
> > E.g. (definitely not functional code):
> 
> This works but it would remove the ability to replace the default sync
> handler with something else, like a handler that can cover all possible
> ec values. In this case we would have to call
> vm_install_exception_handler_ec 64 times.  On the other hand, the tests that
> we are planning don't seem to need it, so I will move on with the suggestion.

My objection to layering handlers is that it introduces ambiguity regarding
ordering and override functionality, e.g. if a test overrides both the "default"
handler and a specific exception handler, which handler will be invoked?  My
expectation would be that the more specific override would win, but someone else
might expect that overriding the default would win.

It should be relatively easy to provide helpers to override the handler for
multiple/all exceptions if we do end up with tests that want that functionality. 
But yeah, definitely a future problem :-)



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux