Re: Avoid unneccessary %dr6 accesses in nested VM setups

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

 



On Wed, Oct 17, 2018 at 3:24 PM, Christian Ehrhardt <lk@xxxxxxx> wrote:

>>  if (vcpu->arch.dr6 != DR6_RESERVED)
>>                 set_debugreg(DR6_RESERVED, 6);
>
> I don't like this idea. It works as long as DR6_RESERVED
> includes a non-reserved bit (RTM). However, someone is bound to change
> that in the future. And when DR6_RESERVED does not include RTM
> anymore (as its name suggests), the if(...) above will always return
> false on machines without RTM support (as RTM will always be set in
> vcpu->arch.dr6).

I suspect that DR6_RESERVED can't be changed without breaking things,
but you could always use DR6_INIT, which really shouldn't change:

if (vcpu->arch.dr6 != DR6_INIT)
        set_debugreg(DR6_INIT, 6);



[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