Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7068d097 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Avi Kivity
Browse files

KVM: introduce KVM_HVA_ERR_RO_BAD



In the later patch, it indicates failure when we try to get a writable
hva from the readonly memslot

Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent ca3a490c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -83,10 +83,11 @@ static inline bool is_invalid_pfn(pfn_t pfn)
}

#define KVM_HVA_ERR_BAD		(PAGE_OFFSET)
#define KVM_HVA_ERR_RO_BAD	(PAGE_OFFSET + PAGE_SIZE)

static inline bool kvm_is_error_hva(unsigned long addr)
{
	return addr == PAGE_OFFSET;
	return addr >= PAGE_OFFSET;
}

#define KVM_ERR_PTR_BAD_PAGE	(ERR_PTR(-ENOENT))