Re: [PATCH v2 3/4] selftests: kvm: Add exception handling to selftests

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

 





On 09.10.20 17:32, Aaron Lewis wrote:

+#ifdef __x86_64__
+       assert_on_unhandled_exception(vm, vcpuid);
+#endif

Can we avoid the #ifdef and instead just implement a stub function for
the other archs? Then move the prototype the the function to a generic
header of course.

Alex

I considered that, I even implemented it that way at first, but when I
looked around I saw no examples of stubs in the other archs, and I saw
an example of leaving the #ifdef with a corresponding arch specific
implementation  (ie: kvm_get_cpu_address_width()).  That's why I went
with it this way.  If the stub is preferred I can change it.

We usually do the stub way in normal KVM code. I'd prefer to copy that design pattern in the selftest code as well - it makes things easier to follow IMHO.

Thanks,

Alex




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879






[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