Thread (7 messages) 7 messages, 2 authors, 2021-02-03
STALE1989d

[PATCH 5/5 v3] Test: SVM: Use ALIGN macro when aligning 'io_bitmap_area'

From: Krish Sadhukhan <hidden>
Date: 2021-02-03 01:29:36
Subsystem: the rest · Maintainer: Linus Torvalds

Since the macro is available and we already use it for MSR bitmap table, use
it for aligning IO bitmap table also.

Signed-off-by: Krish Sadhukhan <redacted>
---
 x86/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x86/svm.c b/x86/svm.c
index a1808c7..846cf2a 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -298,7 +298,7 @@ static void setup_svm(void)
 	wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_SVME);
 	wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_NX);
 
-	io_bitmap = (void *) (((ulong)io_bitmap_area + 4095) & ~4095);
+	io_bitmap = (void *) ALIGN((ulong)io_bitmap_area, PAGE_SIZE);
 
 	msr_bitmap = (void *) ALIGN((ulong)msr_bitmap_area, PAGE_SIZE);
 
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help