lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5be2e278-fca0-d08a-3f2a-aa8ec70c9b9e@redhat.com>
Date:   Thu, 15 Dec 2016 14:09:53 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Brijesh Singh <brijesh.singh@....com>, kvm@...r.kernel.org
Cc:     thomas.lendacky@....com, rkrcmar@...hat.com, joro@...tes.org,
        x86@...nel.org, linux-kernel@...r.kernel.org, mingo@...hat.com,
        hpa@...or.com, tglx@...utronix.de, bp@...e.de
Subject: Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of
 page walk


>>> +     * If the exit was due to a NPF we may already have a GPA.
>>> +     * If the GPA is present, use it to avoid the GVA to GPA table walk.
>>> +     * Note, this cannot be used on string operations since string
>>> +     * operation using rep will only have the initial GPA from the NPF
>>> +     * occurred.
>>> +     */
>>
>> I was wondering if it would make sense to get rid of gpa_available and
>> rather define a new function:
>>
>> bool exception_gpa_valid(struct kvm_vcpu)
>> {
>>     // check if svm
>>     // check if exit code is NPF
>>     // check ctxt
>> }
>
> No, this would be a layering violation.  The emulator ops don't know
> about svm and exit codes (and in fact it's trivial to implement this
> optimization for vmx, with a slightly different logic), so we need to
> have gpa_available.

I was rather thinking about adding an vmx/svm independent callback, 
which would return false for vmx for now. I just saw the variable
and was wondering if it is really necessary.

-- 

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ