Skip to content
Snippets Groups Projects
Commit 8fd27449 authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

fix: addr alignment mask

parent a61495ee
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
#include <linux/printk.h>
#include <linux/slab.h>
static int alloc_vmxon_internals(struct vmxon_reg_t *reg) {
static int alloc_vmxon_internals(struct vmxon_region_t *reg) {
if (!reg) {
DEBUG_FMT("vmxon_reg_t isn't allocated\n");
return -1;
......@@ -18,8 +18,8 @@ static int alloc_vmxon_internals(struct vmxon_reg_t *reg) {
return -1;
}
if (((unsigned long long)region & 0x1fff) != 0) {
DEBUG_FMT("Region isn't properly aligned\n");
if (((unsigned long long)region & 0xfff) != 0) {
DEBUG_FMT("Region 0x%px isn't properly aligned\n", region);
return -1;
}
......@@ -34,7 +34,7 @@ static int alloc_vmxon_internals(struct vmxon_reg_t *reg) {
return 0;
}
static int write_vmcs_rev_id_to_vmxon(struct vmxon_reg_t *reg) {
static int write_vmcs_rev_id_to_vmxon(struct vmxon_region_t *reg) {
if (!reg) {
DEBUG_FMT("vmxon_reg_t isn't allocated\n");
return -1;
......@@ -51,7 +51,7 @@ static int write_vmcs_rev_id_to_vmxon(struct vmxon_reg_t *reg) {
return 0;
}
int init_vmxon_reg(struct vmxon_reg_t *reg) {
int init_vmxon_reg(struct vmxon_region_t *reg) {
if (alloc_vmxon_internals(reg) != 0) {
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment