1
0
Fork 0

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: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hifive-unleashed-5.1
Xiao Guangrong 2012-08-21 11:02:22 +08:00 committed by Avi Kivity
parent ca3a490c7d
commit 7068d09715
1 changed files with 3 additions and 2 deletions

View File

@ -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))