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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210125043811.4vqtgfuok2dvwvxo@offworld>
Date:   Sun, 24 Jan 2021 20:38:11 -0800
From:   Davidlohr Bueso <dave@...olabs.net>
To:     shuo.a.liu@...el.com
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "H . Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Yu Wang <yu1.wang@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>
Subject: Re: [PATCH v8 09/18] virt: acrn: Introduce I/O request management

On Fri, 22 Jan 2021, shuo.a.liu@...el.com wrote:

>From: Shuo Liu <shuo.a.liu@...el.com>
>
>An I/O request of a User VM, which is constructed by the hypervisor, is
>distributed by the ACRN Hypervisor Service Module to an I/O client
>corresponding to the address range of the I/O request.
>
>For each User VM, there is a shared 4-KByte memory region used for I/O
>requests communication between the hypervisor and Service VM. An I/O
>request is a 256-byte structure buffer, which is 'struct
>acrn_io_request', that is filled by an I/O handler of the hypervisor
>when a trapped I/O access happens in a User VM. ACRN userspace in the
>Service VM first allocates a 4-KByte page and passes the GPA (Guest
>Physical Address) of the buffer to the hypervisor. The buffer is used as
>an array of 16 I/O request slots with each I/O request slot being 256
>bytes. This array is indexed by vCPU ID.
>
>An I/O client, which is 'struct acrn_ioreq_client', is responsible for
>handling User VM I/O requests whose accessed GPA falls in a certain
>range. Multiple I/O clients can be associated with each User VM. There
>is a special client associated with each User VM, called the default
>client, that handles all I/O requests that do not fit into the range of
>any other I/O clients. The ACRN userspace acts as the default client for
>each User VM.
>
>The state transitions of a ACRN I/O request are as follows.
>
>   FREE -> PENDING -> PROCESSING -> COMPLETE -> FREE -> ...
>
>FREE: this I/O request slot is empty
>PENDING: a valid I/O request is pending in this slot
>PROCESSING: the I/O request is being processed
>COMPLETE: the I/O request has been processed
>
>An I/O request in COMPLETE or FREE state is owned by the hypervisor. HSM
>and ACRN userspace are in charge of processing the others.
>
>The processing flow of I/O requests are listed as following:
>
>a) The I/O handler of the hypervisor will fill an I/O request with
>   PENDING state when a trapped I/O access happens in a User VM.
>b) The hypervisor makes an upcall, which is a notification interrupt, to
>   the Service VM.
>c) The upcall handler schedules a worker to dispatch I/O requests.
>d) The worker looks for the PENDING I/O requests, assigns them to
>   different registered clients based on the address of the I/O accesses,
>   updates their state to PROCESSING, and notifies the corresponding
>   client to handle.
>e) The notified client handles the assigned I/O requests.
>f) The HSM updates I/O requests states to COMPLETE and notifies the
>   hypervisor of the completion via hypercalls.
>
>Signed-off-by: Shuo Liu <shuo.a.liu@...el.com>
>Reviewed-by: Zhi Wang <zhi.a.wang@...el.com>
>Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
>Cc: Zhi Wang <zhi.a.wang@...el.com>
>Cc: Zhenyu Wang <zhenyuw@...ux.intel.com>
>Cc: Yu Wang <yu1.wang@...el.com>
>Cc: Reinette Chatre <reinette.chatre@...el.com>
>Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>Cc: Davidlohr Bueso <dave@...olabs.net>

Thanks for respinning this with a workqueue.

Acked-by: Davidlohr Bueso <dbueso@...e.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ