Thread (11 messages) 11 messages, 3 authors, 2021-05-06

Re: [PATCH v2 1/3] KVM: X86: Rename DR6_INIT to DR6_ACTIVE_LOW

From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2021-02-02 16:09:23
Also in: lkml

On 02/02/21 16:02, Xiaoyao Li wrote:
On 2/2/2021 10:49 PM, Paolo Bonzini wrote:
quoted
On 02/02/21 10:04, Chenyi Qiang wrote:
quoted
 #define DR6_FIXED_1    0xfffe0ff0
-#define DR6_INIT    0xffff0ff0
+/*
+ * DR6_ACTIVE_LOW is actual the result of DR6_FIXED_1 | 
ACTIVE_LOW_BITS.
+ * We can regard all the current FIXED_1 bits as active_low bits even
+ * though in no case they will be turned into 0. But if they are 
defined
+ * in the future, it will require no code change.
+ * At the same time, it can be served as the init/reset value for DR6.
+ */
+#define DR6_ACTIVE_LOW    0xffff0ff0
 #define DR6_VOLATILE    0x0001e00f
Committed with some changes in the wording of the comment.

Also, DR6_FIXED_1 is (DR6_ACTIVE_LOW & ~DR6_VOLATILE).
Maybe we can add BUILD_BUG_ON() to make sure the correctness?
We can even

#define DR_FIXED_1  (DR6_ACTIVE_LOW & ~DR6_VOLATILE)

directly.  I have pushed this patch to kvm/queue, but the other two will 
have to wait for Fenghua's bare metal support.

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help