> From: Roger Pau Monne <[email protected]>
> Sent: Friday, July 1, 2022 9:17 PM
>
> @@ -4065,6 +4065,11 @@ void vmx_vmexit_handler(struct cpu_user_regs
> *regs)
>
> if ( unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) )
> return vmx_failed_vmentry(exit_reason, regs);
Add a blank line.
> + if ( unlikely(exit_reason & VMX_EXIT_REASONS_BUS_LOCK) )
> + {
> + perfc_incr(buslock);
> + exit_reason &= ~VMX_EXIT_REASONS_BUS_LOCK;
> + }
>
> if ( v->arch.hvm.vmx.vmx_realmode )
> {
> @@ -4561,6 +4566,15 @@ void vmx_vmexit_handler(struct cpu_user_regs
> *regs)
> vmx_handle_descriptor_access(exit_reason);
> break;
>
> + case EXIT_REASON_BUS_LOCK:
> + /*
> + * Nothing to do: just taking a vmexit should be enough of a pause to
> + * prevent a VM from crippling the host with bus locks. Note
> + * EXIT_REASON_BUS_LOCK will always have bit 26 set in exit_reason,
> and
> + * hence the perf counter is already increased.
> + */
> + break;
> +
Would it be helpful from diagnostic angle by throwing out a warning,
once per the culprit domain?