Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596141

Re: [PATCH RFC 4/4] VMX: Expose the LA57 feature to VM

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC 4/4] VMX: Expose the LA57 feature to VM
Date 2017-03-09 16:20 +0100
Message-ID <tj81c-6XD-3@gated-at.bofh.it> (permalink)
References <sTFlL-4Oj-7@gated-at.bofh.it> <sTFlL-4Oj-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH RFC 4/4] VMX: Expose the LA57 feature to VM Paolo Bonzini <pbonzini@redhat.com> - 2017-03-09 16:20 +0100

csiph-web