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

Krish Sadhukhan
2021-03-24T18:39:34Z

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 <krish.sadhukhan@oracle.com>
---
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