|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH V1 09/16] arm/ioreq: Introduce arch specific bits for IOREQ/DM features
On 23/09/2020 21:16, Oleksandr wrote: On 23.09.20 21:03, Julien Grall wrote:Hi,Hi JulienOn 10/09/2020 21:22, Oleksandr Tyshchenko wrote:From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>I believe I am the originally author of this code...Sorry, will fixThis patch adds basic IOREQ/DM support on Arm. The subsequent patches will improve functionality, add remaining bits as well as address several TODOs.Find a bit weird to add code with TODOs that are handled in the same series? Can't we just split this patch in smaller one where everything is addressed from start?Sorry if I wasn't clear in description. Let me please clarify. Corresponding RFC patch had 3 major TODOs: 1. Handle properly when hvm_send_ioreq() returns IO_RETRY 2. Proper ref-counting for the foreign entries in set_foreign_p2m_entry()3. Check the return value of handle_hvm_io_completion() *and* avoid calling handle_hvm_io_completion() on every return.TODO #1 was fixed in current patchTODO #2 was fixed in "xen/mm: Handle properly reference in set_foreign_p2m_entry() on Arm" TODO #3 was partially fixed in current patch (check the return value of handle_hvm_io_completion()). The second part of TODO #3 (avoid calling handle_hvm_io_completion() on every return) was moved to a separate patch "xen/ioreq: Introduce hvm_domain_has_ioreq_server()" and fixed (or probably improved is a better word) there along with introducing a mechanism to actually improve. Right, none of those TODOs are described in the code. So it makes more difficult to know what you are actually referring to. I would suggest to reshuffle the series so the TODOs are addressed before when possible. Could you please clarify how this patch could be split in smaller one? This patch is going to be reduced a fair bit if you make some of the structure common. The next steps would be to move anything that is not directly related to IOREQ out. From a quick look, there are few things that can be moved in separate patches: - The addition of the ASSERT_UNREACHABLE()- The addition of the loop in leave_hypervisor_to_guest() as I think it deserve some explanation. - The sign extension in handle_ioserv() can possibly be abstracted. Actually the code is quite similar to handle_read(). Please note, the "PIO handling" TODO is expected to left unaddressed for the current series. It is not an big issue for now while Xen doesn't have support for vPCI on Arm. On Arm64 they are only used for PCI IO Bar and we would probably want to expose them to emulator as PIO access to make a DM completely arch-agnostic. So "PIO handling" should be implemented when we add support for vPCI. Please note, at the moment build on Arm32 is broken (see cmpxchg usage in hvm_send_buffered_ioreq()) due to the lack of cmpxchg_64 support on Arm32. There is a patch on review to address this issue: https://patchwork.kernel.org/patch/11715559/This has been committed.Thank you for the patch, will remove a notice. For future reference, I think such notice would be better after --- as they don't need to be part of the commit message.
I think Jan made some suggestion today. Let me know if you require more input. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |