lkml.org 
[lkml]   [2017]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC 4/4] VMX: Expose the LA57 feature to VM
From
Date


On 29/12/2016 10:26, Liang Li wrote:
> - if (is_noncanonical_address(la))
> + if (is_noncanonical_address(la, virt_addr_bits(ctxt)))

Using virt_addr_bits and get_virt_addr_bits is quite a mouthful. What
about using instead a pair of functions like these:

bool is_noncanonical_address(struct kvm_vcpu *vcpu, u64 addr)
{
return addr == get_canonical(addr, get_virt_addr_bits(vcpu));
}

bool emulate_is_noncanonical_address(struct x86_emulate_ctxt *ctxt,
u64 addr)
{
return addr == get_canonical(addr, virt_addr_bits(ctxt));
}


Paolo

\
 
 \ /
  Last update: 2017-03-09 16:18    [W:0.139 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site