On Tue, Oct 9, 2018 at 5:14 AM, Liran Alon <liran.alon@xxxxxxxxxx> wrote: > I dislike the fact that you also changed (1u << nr) to BIT(nr) on this patch. > All such use-cases currently in vmx.c are of the form (1u << X) and there is no use of BIT() macro. > I am not against it but I prefer for such a change to happen on a separate patch and modify other similar places as-well. Okay; I'll revert that part of the change in v2. >> - if (vcpu->arch.exception.nr == DB_VECTOR && >> - (vcpu->arch.dr7 & DR7_GD)) { >> - vcpu->arch.dr7 &= ~DR7_GD; >> - kvm_update_dr7(vcpu); >> + if (vcpu->arch.exception.nr == DB_VECTOR) { >> + kvm_deliver_exception_payload(vcpu); > > I would add a comment here that one should note that once we will modify nSVM to use > check_nested_events() framework, the call here for kvm_deliver_exception_payload() > should be moved to svm_check_nested_events(). Actually, if nSVM uses the check_nested_events framework, things are a little more complicated than that. The DR7 update has to be done in svm_check_nested_events as well. It would be nice to just move the DR7 update into kvm_deliver_exception_payload, but that would break the old ABI. I'm not sure that this is the appropriate place for a lengthy comment about a speculative future code change, but I'll go ahead and write something up.