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


Groups > linux.kernel > #1714093

Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM.

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM.
Date 2017-08-17 16:40 +0200
Message-ID <ufu7M-67i-29@gated-at.bofh.it> (permalink)
References <udF7k-1tj-11@gated-at.bofh.it> <udF7k-1tj-21@gated-at.bofh.it> <ufrCX-4m1-39@gated-at.bofh.it> <ufrWh-4Je-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 17/08/2017 13:53, Yu Zhang wrote:
> 
> 
> On 8/17/2017 7:57 PM, Paolo Bonzini wrote:
>> On 12/08/2017 15:35, Yu Zhang wrote:
>>> index a98b88a..50107ae 100644
>>> --- a/arch/x86/kvm/emulate.c
>>> +++ b/arch/x86/kvm/emulate.c
>>> @@ -694,7 +694,7 @@ static __always_inline int __linearize(struct
>>> x86_emulate_ctxt *ctxt,
>>>       switch (mode) {
>>>       case X86EMUL_MODE_PROT64:
>>>           *linear = la;
>>> -        if (is_noncanonical_address(la))
>>> +        if (emul_is_noncanonical_address(la, ctxt))
>>>               goto bad;
>>>             *max_size = min_t(u64, ~0u, (1ull << 48) - la);
>> Oops, you missed one here.  Probably best to use ctxt_virt_addr_bits and
>> then "inline" emul_is_noncanonical_address as "get_canonical(la,
>> va_bits) != la".
> 
> Sorry, I just sent out the v2 patch set without noticing this reply. :-)
> 
> The emul_is_noncanonical() is defined in x86.h so that no
> ctxt_virt_addr_bits needed in emulate.c, are you
> suggesting to use ctx_virt_addr_bits in this file each time before
> emul_is_noncanonical_address() is called?

No, only in this instance which uses "48" after the call to
emul_is_noncanonical_address.

Paolo

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


Thread

[PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Yu Zhang <yu.c.zhang@linux.intel.com> - 2017-08-12 16:00 +0200
  Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Paolo Bonzini <pbonzini@redhat.com> - 2017-08-17 14:00 +0200
    Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Yu Zhang <yu.c.zhang@linux.intel.com> - 2017-08-17 14:20 +0200
      Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Paolo Bonzini <pbonzini@redhat.com> - 2017-08-17 16:40 +0200
        Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Yu Zhang <yu.c.zhang@linux.intel.com> - 2017-08-18 11:00 +0200
          Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Paolo Bonzini <pbonzini@redhat.com> - 2017-08-18 15:00 +0200
            Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Yu Zhang <yu.c.zhang@linux.intel.com> - 2017-08-21 10:00 +0200
              Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Paolo Bonzini <pbonzini@redhat.com> - 2017-08-21 12:20 +0200
                Re: [PATCH v1 4/4] KVM: MMU: Expose the LA57 feature to VM. Yu Zhang <yu.c.zhang@linux.intel.com> - 2017-08-21 14:40 +0200

csiph-web