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]
Date:   Tue, 03 Mar 2020 17:18:07 +0100
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Cc:     Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 08/13] KVM: x86: Dynamically allocate per-vCPU emulation context

Sean Christopherson <sean.j.christopherson@...el.com> writes:

> On Tue, Mar 03, 2020 at 11:26:21AM +0100, Paolo Bonzini wrote:
>> On 26/02/20 18:29, Vitaly Kuznetsov wrote:
>> >>  struct x86_emulate_ctxt {
>> >> +	void *vcpu;
>> > Why 'void *'? I changed this to 'struct kvm_vcpu *' and it seems to
>> > compile just fine...
>> > 
>> 
>> I guess because it's really just an opaque pointer; using void* ensures
>> that the emulator doesn't break the emulator ops abstraction.
>
> Ya, it prevents the emulator from directly deferencing the vcpu.
>

Makes sense, a comment like /* Should never be dereferenced by the
emulater */ would've helped)

-- 
Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ