Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-22 Thread Boris Ostrovsky
On 6/22/20 2:52 PM, Souptick Joarder wrote: > > I read the code again. I think, this check is needed to handle a scenario when > lock_pages() return -ENOSPC. Better to keep this check. Let me post v2 of this > RFC for a clear view. Actually, error handling seems to be somewhat broken here. If loc

Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-22 Thread Boris Ostrovsky
On 6/22/20 3:28 PM, Souptick Joarder wrote: > On Tue, Jun 23, 2020 at 12:40 AM Boris Ostrovsky > wrote: >> On 6/22/20 2:52 PM, Souptick Joarder wrote: >>> I read the code again. I think, this check is needed to handle a scenario >>> when >>> lock_pages() re

Re: [RFC PATCH v2] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-23 Thread Boris Ostrovsky
On 6/23/20 7:58 AM, Souptick Joarder wrote: > In 2019, we introduced pin_user_pages*() and now we are converting > get_user_pages*() to the new API as appropriate. [1] & [2] could > be referred for more information. This is case 5 as per document [1]. > > As discussed, pages need to be marked as di

Re: [RFC PATCH v2] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-24 Thread Boris Ostrovsky
On 6/23/20 9:36 PM, Souptick Joarder wrote: > On Tue, Jun 23, 2020 at 11:11 PM Boris Ostrovsky > wrote: >> On 6/23/20 7:58 AM, Souptick Joarder wrote: >>> In 2019, we introduced pin_user_pages*() and now we are converting >>> get_user_pages*() to the new API as appro

Re: [RFC PATCH v2] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-06-24 Thread Boris Ostrovsky
On 6/24/20 12:41 PM, Souptick Joarder wrote: > On Wed, Jun 24, 2020 at 9:07 PM Boris Ostrovsky > wrote: >> On 6/23/20 9:36 PM, Souptick Joarder wrote: >>> On Tue, Jun 23, 2020 at 11:11 PM Boris Ostrovsky >>> wrote: >>>> On 6/23/20 7:58 AM, Souptick J

Re: [PATCH 1/2] xen/privcmd: Corrected error handling path and mark pages dirty

2020-06-25 Thread Boris Ostrovsky
there is no reason for making this change) > > Signed-off-by: Souptick Joarder > Cc: John Hubbard > Cc: Boris Ostrovsky > Cc: Paul Durrant > --- > Hi, > > I'm compile tested this, I don't think so. > but unable to run-tim

Re: [PATCH 3/6] x86/entry/64/compat: Fix Xen PV SYSENTER frame setup

2020-06-27 Thread Boris Ostrovsky
such that it relied on > having a valid stack pointer, so now the Xen asm needs to invoke it > with a valid stack. > > Fix it up like SYSCALL: use the Xen-provided frame and skip the bare > metal prologue. > > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellin

Re: [PATCH v2 1/2] xen/xenbus: avoid large structs and arrays on the stack

2020-07-02 Thread Boris Ostrovsky
/hvm specific mapping > functions to the single caller. > > Reported-by: Arnd Bergmann > Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support

2020-07-02 Thread Boris Ostrovsky
On 7/1/20 7:06 AM, Juergen Gross wrote: > Xen is requiring 64-bit machines today and since Xen 4.14 it can be > built without 32-bit PV guest support. There is no need to carry the > burden of 32-bit PV guest support in the kernel any longer, as new > guests can be either HVM or PVH, or they can us

Re: [PATCH v2 1/4] x86/xen: remove 32-bit Xen PV guest support

2020-07-02 Thread Boris Ostrovsky
On 7/2/20 7:24 PM, Andrew Cooper wrote: > On 02/07/2020 23:59, Boris Ostrovsky wrote: >> On 7/1/20 7:06 AM, Juergen Gross wrote: >>> >>> -#ifdef CONFIG_X86_PAE >>> -static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) >>> -{ &

Re: [PATCH v2 0/2] xen/xenbus: some cleanups

2020-07-03 Thread Boris Ostrovsky
On 7/1/20 8:16 AM, Juergen Gross wrote: > Avoid allocating large amount of data on the stack in > xenbus_map_ring_valloc() and some related return value cleanups. > > Juergen Gross (2): > xen/xenbus: avoid large structs and arrays on the stack > xen/xenbus: let xenbus_map_ring_valloc() return e

Re: [PATCH] xen/xenbus: Fix a double free in xenbus_map_ring_pv()

2020-07-10 Thread Boris Ostrovsky
On 7/10/20 8:15 AM, Jürgen Groß wrote: > On 10.07.20 13:36, Dan Carpenter wrote: >> When there is an error the caller frees "info->node" so the free here >> will result in a double free.  We should just delete first kfree(). >> >> Fixes: 3848e4e0a32a ("xen/xenbus: avoid large structs and arrays on

Re: [PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode

2020-07-13 Thread Boris Ostrovsky
On 7/2/20 2:21 PM, Anchal Agarwal wrote: > From: Munehisa Kamata > > Guest hibernation is different from xen suspend/resume/live migration. > Xen save/restore does not use pm_ops as is needed by guest hibernation. > Hibernation in guest follows ACPI path and is guest inititated , the > hibernation

Re: [PATCH v2 00/11] Fix PM hibernation in Xen guests

2020-07-13 Thread Boris Ostrovsky
On 7/10/20 2:17 PM, Agarwal, Anchal wrote: > Gentle ping on this series. Have you tested save/restore? -bois

Re: [Xen-devel] [PATCH] xen/events: fix binding user event channels to cpus

2019-07-01 Thread Boris Ostrovsky
nd the event channel won't be moved to another vcpu > in case the original vcpu they were bound to is going offline. > > Cc: # 4.13 > Fixes: c48f64ab472389df ("xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to > next online VCPU") > Signed-off-by:

Re: [Xen-devel] [PATCH v3 3/4] Revert "xen: Introduce 'xen_nopv' to disable PV extensions for HVM guests."

2019-07-01 Thread Boris Ostrovsky
On Mon, Jul 01, 2019 at 10:20:27AM +0800, Zhenzhong Duan wrote: > This reverts commit 8d693b911bb9c57009c24cb1772d205b84c7985c. > > Instead we use an unified parameter 'nopv' for all the hypervisor > platforms. > > Signed-off-by: Zhenzhong Duan > Reviewed

Re: [Xen-devel] [PATCH v4 2/5] x86: Add nopv parameter to disable PV extensions

2019-07-02 Thread Boris Ostrovsky
On 7/1/19 1:19 AM, Zhenzhong Duan wrote: > > There is already 'xen_nopv' parameter for XEN platform but not for > others. 'xen_nopv' can then be removed with this change. This is no longer true. -boris ___ Xen-devel mailing list Xen-devel@lists.xenpr

Re: [Xen-devel] [PATCH v4 4/5] x86/xen: Add 'nopv' support for HVM guest

2019-07-02 Thread Boris Ostrovsky
anic itself if 'nopv' enabled for a > PVH guest. > > Signed-off-by: Zhenzhong Duan > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > --- > arch/x86/xen/enlighte

Re: [Xen-devel] [PATCH v4 5/5] xen: Add 'xen_nopv' parameter back for backward compatibility

2019-07-02 Thread Boris Ostrovsky
On 7/1/19 1:19 AM, Zhenzhong Duan wrote: > Map 'xen_nopv' to 'nopv' and mark 'xen_nopv' obsolete in > kernel-parameters.txt I am not sure we want patch #3, why not do everything in a single patch? > > Signed-off-by: Zhenzhong Duan > Cc: Boris

Re: [Xen-devel] [PATCH v5 3/4] xen: Map "xen_nopv" parameter to "nopv" and mark it obsolete

2019-07-05 Thread Boris Ostrovsky
On 7/2/19 9:19 PM, Zhenzhong Duan wrote: > Clean up unnecessory code after that operation. > > Signed-off-by: Zhenzhong Duan > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov R

Re: [Xen-devel] [PATCH v5 4/4] x86/xen: Add "nopv" support for HVM guest

2019-07-05 Thread Boris Ostrovsky
nic itself if nopv enabled for a > PVH guest. > > Signed-off-by: Zhenzhong Duan > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > --- > arch/x86/xen/enlighten_hvm.c |

Re: [Xen-devel] [PATCH v6 4/4] x86/xen: Add "nopv" support for HVM guest

2019-07-08 Thread Boris Ostrovsky
On 7/7/19 5:15 AM, Zhenzhong Duan wrote: > > +static uint32_t __init xen_platform_hvm(void) > +{ > + if (xen_pv_domain()) > + return 0; > + > + if (xen_pvh_domain() && nopv) { > + /* Guest booting via the Xen-PVH boot entry goes here */ > + pr_info("\"n

Re: [Xen-devel] [PATCH v6 4/4] x86/xen: Add "nopv" support for HVM guest

2019-07-09 Thread Boris Ostrovsky
On 7/9/19 12:20 AM, Zhenzhong Duan wrote: > > -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = { > +static uint32_t __init xen_platform_hvm(void) > +{ > +   uint32_t xen_domain = xen_cpuid_base(); > +   struct x86_hyper_init *h = &x86_hyper_xen_hvm.init; > + > +   if (xen_pv

Re: [Xen-devel] [PATCH v6 4/4] x86/xen: Add "nopv" support for HVM guest

2019-07-10 Thread Boris Ostrovsky
On 7/9/19 10:07 PM, Zhenzhong Duan wrote: > On 2019/7/9 22:54, Boris Ostrovsky wrote: >> On 7/9/19 12:20 AM, Zhenzhong Duan wrote: >>> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = { >>> +static uint32_t __init xen_platform_hvm(void) >>>

Re: [Xen-devel] [PATCH v7 5/5] x86/xen: Add "nopv" support for HVM guest

2019-07-15 Thread Boris Ostrovsky
r. > > Move xen_platform_hvm() after xen_hvm_guest_late_init() to avoid compile > error. > > Signed-off-by: Zhenzhong Duan > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov Reviewed-b

Re: [Xen-devel] [PATCH 1/2] x86/xen: remove 32-bit Xen PV guest support

2019-07-15 Thread Boris Ostrovsky
> diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile > index 084de77a109e..d42737f31304 100644 > --- a/arch/x86/xen/Makefile > +++ b/arch/x86/xen/Makefile > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0 > -OBJECT_FILES_NON_STANDARD_xen-asm_$(BITS).o := y > +OBJECT_FILES_NON_STANDAR

Re: [Xen-devel] [PATCH] xen/pciback: remove set but not used variable 'old_state'

2019-07-24 Thread Boris Ostrovsky
ot used [-Wunused-but-set-variable] > > It is never used so can be removed. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Reviewed-by: Boris Ostrovsky ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-09 Thread Boris Ostrovsky
On 3/9/22 1:18 AM, Christoph Hellwig wrote: On Tue, Mar 08, 2022 at 04:38:21PM -0500, Boris Ostrovsky wrote: On 3/1/22 5:53 AM, Christoph Hellwig wrote: Allow to pass a remap argument to the swiotlb initialization functions to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping

Re: [PATCH] xen: use time_is_before_eq_jiffies() instead of open coding it

2022-03-11 Thread Boris Ostrovsky
On 2/27/22 10:15 PM, Qing Wang wrote: From: Wang Qing Use the helper function time_is_{before,after}_jiffies() to improve code readability. Signed-off-by: Wang Qing Reviewed-by: Boris Ostrovsky Applied to for-linus-5.18

Re: [PATCH v4 2/2] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32

2022-03-11 Thread Boris Ostrovsky
ter the 'vcpu_info' for boot vcpu is registered when the boot vcpu is >= 32. This issue can be reproduced on purpose via below command at the guest side when kdump/kexec is enabled: "taskset -c 33 echo c > /proc/sysrq-trigger" The bugfix for PVM is not implemented

Re: [PATCH] drivers/xen: use helper macro __ATTR_RW

2022-03-11 Thread Boris Ostrovsky
On 3/5/22 8:38 AM, zhanglianjie wrote: Use helper macro __ATTR_RW to define HYPERVISOR_ATTR_RW to make code more clear. Minor readability improvement. Signed-off-by: zhanglianjie Reviewed-by: Boris Ostrovsky Applied to for-linus-5.18 (with whitespace change noted in commit message)

Re: [PATCH] x86/xen: Fix kerneldoc warning

2022-03-11 Thread Boris Ostrovsky
: Boris Ostrovsky Applied to for-linus-5.18

Re: [PATCH 12/15] swiotlb: provide swiotlb_init variants that remap the buffer

2022-03-14 Thread Boris Ostrovsky
On 3/14/22 3:31 AM, Christoph Hellwig wrote: -void __init swiotlb_init(bool addressing_limit, unsigned int flags) +void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags, + int (*remap)(void *tlb, unsigned long nslabs)) { - size_t bytes = PAGE_ALIGN(defau

Re: [PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-14 Thread Boris Ostrovsky
On 3/14/22 3:31 AM, Christoph Hellwig wrote: - static void __init pci_xen_swiotlb_init(void) { if (!xen_initial_domain() && !x86_swiotlb_enable) return; x86_swiotlb_enable = true; - xen_swiotlb = true; - xen_swiotlb_init_early(); + swiotlb_i

Re: [PATCH 14/15] swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl

2022-03-14 Thread Boris Ostrovsky
On 3/14/22 3:31 AM, Christoph Hellwig wrote: @@ -314,6 +293,7 @@ void __init swiotlb_init(bool addressing_limit, unsigned int flags) int swiotlb_init_late(size_t size, gfp_t gfp_mask, int (*remap)(void *tlb, unsigned long nslabs)) { + struct io_tlb_mem *mem = &io_tlb_

Re: [PATCH 1/2] xen/grant-table: remove gnttab_*transfer*() functions

2022-03-14 Thread Boris Ostrovsky
On 3/11/22 5:34 AM, Juergen Gross wrote: All grant table operations related to the "transfer" functionality are unused currently. There have been users in the old days of the "Xen-o-Linux" kernel, but those didn't make it upstream. So remove the "transfer" related functions. Do we need to a

Re: [PATCH 12/15] swiotlb: provide swiotlb_init variants that remap the buffer

2022-03-15 Thread Boris Ostrovsky
On 3/15/22 2:36 AM, Christoph Hellwig wrote: @@ -271,12 +273,23 @@ void __init swiotlb_init(bool addressing_limit, unsigned int flags) * allow to pick a location everywhere for hypervisors with guest * memory encryption. */ +retry: + bytes = PAGE_ALIGN(defaul

Re: [PATCH 1/2] xen/grant-table: remove gnttab_*transfer*() functions

2022-03-15 Thread Boris Ostrovsky
On 3/15/22 2:10 AM, Juergen Gross wrote: On 15.03.22 00:37, Boris Ostrovsky wrote: On 3/11/22 5:34 AM, Juergen Gross wrote: All grant table operations related to the "transfer" functionality are unused currently. There have been users in the old days of the "Xen-o-Linux&quo

Re: [PATCH 1/2] xen/grant-table: remove gnttab_*transfer*() functions

2022-03-16 Thread Boris Ostrovsky
On 3/11/22 5:34 AM, Juergen Gross wrote: All grant table operations related to the "transfer" functionality are unused currently. There have been users in the old days of the "Xen-o-Linux" kernel, but those didn't make it upstream. So remove the "transfer" related functions. Signed-off-by: Ju

Re: [PATCH] arch:x86:xen: Remove unnecessary assignment in xen_apic_read()

2022-03-16 Thread Boris Ostrovsky
On 3/14/22 3:05 AM, jianchunfu wrote: In the function xen_apic_read(), the initialized value of 'ret' is unused because it will be assigned by the function HYPERVISOR_platform_op(), thus remove it. Signed-off-by: jianchunfu Reviewed-by: Boris Ostrovsky Applied to for-linus-

Re: [PATCH] xen: fix is_xen_pmu()

2022-03-22 Thread Boris Ostrovsky
On 3/22/22 11:50 AM, Juergen Gross wrote: is_xen_pmu() is taking the cpu number as parameter, but it is not using it. Instead it just tests whether the Xen PMU initialization on the current cpu did succeed. As this test is done by checking a percpu pointer, preemption needs to be disabled in or

Re: [PATCH v2] xen: fix is_xen_pmu()

2022-03-25 Thread Boris Ostrovsky
boolean variable not being set. Fixes: bf6dfb154d93 ("xen/PMU: PMU emulation code") Reported-by: Marek Marczykowski-Górecki Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH] xen: don't hang when resuming PCI device

2022-03-26 Thread Boris Ostrovsky
On 3/22/22 9:21 PM, Jakub Kądziołka wrote: If a xen domain with at least two VCPUs has a PCI device attached which enters the D3hot state during suspend, the kernel may hang while resuming, depending on the core on which an async resume task gets scheduled. The bug occurs because xen's do_susp

Re: [PATCH v2] xen: fix is_xen_pmu()

2022-03-26 Thread Boris Ostrovsky
On 3/25/22 10:20 AM, Juergen Gross wrote: is_xen_pmu() is taking the cpu number as parameter, but it is not using it. Instead it just tests whether the Xen PMU initialization on the current cpu did succeed. As this test is done by checking a percpu pointer, preemption needs to be disabled in or

Re: cleanup swiotlb initialization v8

2022-04-05 Thread Boris Ostrovsky
://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/swiotlb-init-cleanup Tested-by: Boris Ostrovsky

Re: [PATCH] xen/balloon: don't use PV mode extra memory for zone device allocations

2022-04-07 Thread Boris Ostrovsky
at it move some code to get rid of another #ifdef. Remove a comment which is stale since some time now. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH] xen/balloon: don't use PV mode extra memory for zone device allocations

2022-04-09 Thread Boris Ostrovsky
On 4/7/22 5:38 AM, Juergen Gross wrote: When running as a Xen PV guest use the extra memory (memory which isn't allocated for the guest at boot time) only for ballooning purposes and not for zone device allocations. This will remove some code without any lack of functionality. While at it move

Re: [PATCH 2/4] xen/scsiback: use new command result macros

2022-04-20 Thread Boris Ostrovsky
On 4/20/22 5:25 AM, Juergen Gross wrote: @@ -569,7 +645,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req, wait_for_completion(&pending_req->tmr_done); err = (se_cmd->se_tmr_req->response == TMR_FUNCTION_COMPLETE) ? - SUCCESS : FAILED; +

Re: [PATCH 4/4] xen/scsifront: harden driver against malicious backend

2022-04-20 Thread Boris Ostrovsky
Just a couple of nits. On 4/20/22 5:25 AM, Juergen Gross wrote: -static int scsifront_ring_drain(struct vscsifrnt_info *info) +static int scsifront_ring_drain(struct vscsifrnt_info *info, + unsigned int *eoiflag) { - struct vscsiif_response *ring_rsp; +

Re: [PATCH 09/18] xen/xenbus: add xenbus_setup_ring() service function

2022-04-20 Thread Boris Ostrovsky
On 4/20/22 11:09 AM, Juergen Gross wrote: +/* + * xenbus_setup_ring + * @dev: xenbus device + * @vaddr: pointer to starting virtual address of the ring + * @nr_pages: number of pages to be granted + * @grefs: grant reference array to be filled in + * + * Allocate physically contiguous pages

Re: [PATCH 2/4] xen/scsiback: use new command result macros

2022-04-21 Thread Boris Ostrovsky
On 4/21/22 4:40 AM, Juergen Gross wrote: On 20.04.22 18:12, Boris Ostrovsky wrote: On 4/20/22 5:25 AM, Juergen Gross wrote: @@ -569,7 +645,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,   wait_for_completion(&pending_req->tmr_done);   err =

Re: [PATCH v2] xen: Convert kmap() to kmap_local_page()

2022-04-21 Thread Boris Ostrovsky
On 4/19/22 7:43 PM, Alaa Mohamed wrote: kmap() is being deprecated and these usages are all local to the thread so there is no reason kmap_local_page() can't be used. Replace kmap() calls with kmap_local_page(). Signed-off-by: Alaa Mohamed Applied to for-linus-5.18. (Juergen, I kept your

Re: [PATCH V1 3/6] xen/virtio: Add option to restrict memory access under Xen

2022-04-24 Thread Boris Ostrovsky
On 4/24/22 12:53 PM, Oleksandr wrote: On 23.04.22 19:40, Christoph Hellwig wrote: + +#ifdef CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS +int arch_has_restricted_virtio_memory_access(void) +{ +    return (xen_has_restricted_virtio_memory_access() || +    cc_platform_has(CC_AT

Re: [PATCH v2 2/9] x86/xen: simplify xen_oldmem_pfn_is_ram()

2021-10-05 Thread Boris Ostrovsky
On 10/5/21 8:14 AM, David Hildenbrand wrote: > Let's simplify return handling. > > Signed-off-by: David Hildenbrand Reviewed-by: Boris Ostrovsky

Re: [PATCH v2 3/9] x86/xen: print a warning when HVMOP_get_mem_type fails

2021-10-05 Thread Boris Ostrovsky
kernel.org/r/3b935aa0-6d85-0bcd-100e-15098add3...@oracle.com > > Suggested-by: Boris Ostrovsky > Signed-off-by: David Hildenbrand Reviewed-by: Boris Ostrovsky

Re: [PATCH] xen/balloon: fix cancelled balloon action

2021-10-05 Thread Boris Ostrovsky
case. > > Cc: sta...@vger.kernel.org > Fixes: 8480ed9c2bbd56 ("xen/balloon: use a kernel thread instead a workqueue") > Reported-by: Marek Marczykowski-Górecki > Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH] x86/pvh: add prototype for xen_pvh_init()

2021-10-06 Thread Boris Ostrovsky
On 10/6/21 2:19 AM, Juergen Gross wrote: > xen_pvh_init() is lacking a prototype in a header, add it. > > Reported-by: kernel test robot > Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH linux 1/2] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32

2021-10-12 Thread Boris Ostrovsky
On 10/12/21 3:24 AM, Dongli Zhang wrote: The sched_clock() can be used very early since upstream commit 857baa87b642 ("sched/clock: Enable sched clock early"). In addition, with upstream commit 38669ba205d1 ("x86/xen/time: Output xen sched_clock time from 0"), kdump kernel in Xen HVM guest may

Re: [PATCH] xen: fix wrong SPDX headers of Xen related headers

2021-10-15 Thread Boris Ostrovsky
;. Some files still contain the MIT license text. Replace that by the related SPDX line. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH V3 04/49] x86/xen: Add xenpv_restore_regs_and_return_to_usermode()

2021-10-16 Thread Boris Ostrovsky
a per-CPU trampoline stack for IDT entries") Cc: Jan Beulich Cc: Thomas Gleixner Cc: Juergen Gross Cc: Peter Anvin Cc: xen-devel@lists.xenproject.org> Cc: Boris Ostrovsky Signed-off-by: Lai Jiangshan Reviewed-by: Boris Ostrovsky

Re: [PATCH net-next v2 01/12] net: xen: use eth_hw_addr_set()

2021-10-22 Thread Boris Ostrovsky
riate helpers. Signed-off-by: Jakub Kicinski Reviewed-by: Boris Ostrovsky

Re: [PATCH v5] xen-pciback: allow compiling on other archs than x86

2021-10-27 Thread Boris Ostrovsky
On 9/28/21 3:35 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Xen-pciback driver was designed to be built for x86 only. But it can also be used by other architectures, e.g. Arm. Currently PCI backend implements multiple functionalities at a time, such as: 1. It is used as

Re: [PATCH 0/6] xen/x86: PV boot speedup

2021-10-27 Thread Boris Ostrovsky
On 9/30/21 8:33 AM, Jan Beulich wrote: The observed (by the human eye) performance difference of early boot between native and PV-on-Xen was just too large to not look into. As it turns out, gaining performance back wasn't all that difficult. While the series (re)introduces a small number of P

Re: [PATCH -next] xen-pciback: Fix return in pm_ctrl_init()

2021-10-27 Thread Boris Ostrovsky
On 10/8/21 11:01 AM, Juergen Gross wrote: On 08.10.21 09:44, YueHaibing wrote: Return NULL instead of passing to ERR_PTR while err is zero, this fix smatch warnings: drivers/xen/xen-pciback/conf_space_capability.c:163   pm_ctrl_init() warn: passing zero to 'ERR_PTR' Fixes: a92336a1176b ("xen/

Re: [PATCH] x86/xen: Remove redundant irq_enter/exit() invocations

2021-10-27 Thread Boris Ostrovsky
Stabellini Cc: Boris Ostrovsky Cc: x...@kernel.org Cc: xen-devel@lists.xenproject.org Reviewed-by: Juergen Gross Applied to for-linus-5.16 -boris

Re: [PATCH] xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls

2021-10-27 Thread Boris Ostrovsky
On 10/14/21 3:42 PM, Stefano Stabellini wrote: On Thu, 14 Oct 2021, Christophe JAILLET wrote: 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle:

Re: [PATCH] xen: fix wrong SPDX headers of Xen related headers

2021-10-27 Thread Boris Ostrovsky
On 10/15/21 10:33 AM, Juergen Gross wrote: Commit b24413180f5600 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") was meant to do a tree-wide cleanup for files without any license information by adding a SPDX GPL-2.0 line to them. Unfortunately this was applied

Re: [PATCH v2] xen: Fix implicit type conversion

2021-10-27 Thread Boris Ostrovsky
On 10/26/21 5:59 AM, Jiamei Xie wrote: -Original Message- From: Xen-devel On Behalf Of Juergen Gross Sent: 2021年10月26日 15:36 To: Jiasheng Jiang ; boris.ostrov...@oracle.com; sstabell...@kernel.org Cc: xen-devel@lists.xenproject.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH v2

Re: [PATCH v5] xen-pciback: allow compiling on other archs than x86

2021-10-27 Thread Boris Ostrovsky
On 10/27/21 10:08 AM, Oleksandr Andrushchenko wrote: Hi, Boris! On 27.10.21 15:59, Boris Ostrovsky wrote: Can you please rebase this on top of 5.15-rc7? There is a bunch of conflicts due to cae7d81a3730dfe08623f8c1083230c8d0987639. I'll try to do that ASAP (what is the deadline for

Re: [PATCH v5] xen-pciback: allow compiling on other archs than x86

2021-10-27 Thread Boris Ostrovsky
On 10/27/21 10:49 AM, Oleksandr Andrushchenko wrote: On 27.10.21 17:46, Boris Ostrovsky wrote: On 10/27/21 10:08 AM, Oleksandr Andrushchenko wrote: Hi, Boris! On 27.10.21 15:59, Boris Ostrovsky wrote: Can you please rebase this on top of 5.15-rc7? There is a bunch of conflicts due to

Re: [PATCH] x86/pvh: add prototype for xen_pvh_init()

2021-10-28 Thread Boris Ostrovsky
On 10/6/21 8:43 AM, Boris Ostrovsky wrote: On 10/6/21 2:19 AM, Juergen Gross wrote: xen_pvh_init() is lacking a prototype in a header, add it. Reported-by: kernel test robot Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Applied to for-linus-5.16 -boris

Re: [PATCH] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-28 Thread Boris Ostrovsky
On 10/28/21 6:59 AM, Juergen Gross wrote: + + while (current_credit()) + schedule_timeout_interruptible(HZ / 10); Should we be concerned that we may get stuck here forever if for some reason we can't balloon down everything? -boris

Re: [PATCH V2 1/4] xen/unpopulated-alloc: Drop check for virt_addr_valid() in fill_list()

2021-10-28 Thread Boris Ostrovsky
On 10/26/21 12:05 PM, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko If memremap_pages() succeeds the range is guaranteed to have proper page table, there is no need for an additional virt_addr_valid() check. Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Boris Ostrovsky

Re: [PATCH V2 3/4] xen/unpopulated-alloc: Add mechanism to use Xen resource

2021-10-28 Thread Boris Ostrovsky
On 10/26/21 12:05 PM, Oleksandr Tyshchenko wrote: +static void unpopulated_init(void) +{ + static bool inited = false; + int ret; + + if (inited) + return; + + /* +* Try to initialize Xen resource the first and fall back to default +* res

Re: [PATCH v3 0/2] x86/xen: simplify irq pvops

2021-10-29 Thread Boris Ostrovsky
On 10/28/21 3:27 AM, Juergen Gross wrote: The pvops function for Xen PV guests handling the interrupt flag are much more complex than needed. With the supported Xen hypervisor versions they can be simplified a lot, especially by removing the need for disabling preemption. Juergen Gross (2):

Re: [RESEND PATCH v6] xen-pciback: allow compiling on other archs than x86

2021-10-29 Thread Boris Ostrovsky
On 10/28/21 10:36 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Xen-pciback driver was designed to be built for x86 only. But it can also be used by other architectures, e.g. Arm. Currently PCI backend implements multiple functionalities at a time, such as: 1. It is used a

Re: [PATCH v3] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-29 Thread Boris Ostrovsky
On 10/29/21 10:20 AM, Juergen Gross wrote: --- a/Documentation/ABI/stable/sysfs-devices-system-xen_memory +++ b/Documentation/ABI/stable/sysfs-devices-system-xen_memory @@ -84,3 +84,13 @@ Description: Control scrubbing pages before returning them to Xen for others domains

Re: [PATCH v3] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-10-29 Thread Boris Ostrovsky
On 10/29/21 6:18 PM, Marek Marczykowski-Górecki wrote: On Fri, Oct 29, 2021 at 05:46:18PM -0400, Boris Ostrovsky wrote: On 10/29/21 10:20 AM, Juergen Gross wrote: --- a/Documentation/ABI/stable/sysfs-devices-system-xen_memory +++ b/Documentation/ABI/stable/sysfs-devices-system-xen_memory

Re: [PATCH v2 1/1] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32

2021-11-01 Thread Boris Ostrovsky
duced on purpose via below command at the guest side when kdump/kexec is enabled: "taskset -c 33 echo c > /proc/sysrq-trigger" Reference: https://lists.xenproject.org/archives/html/xen-devel/2021-10/msg00571.html Cc: Joe Jin Signed-off-by: Dongli Zhang --- Changed since v1: - Add c

Re: [PATCH 0/4] xen: do some cleanup

2021-11-01 Thread Boris Ostrovsky
/mmu_pv.c| 1 - arch/x86/xen/xen-head.S | 12 +- drivers/xen/mem-reservation.c| 27 ++-- include/xen/arm/hypercall.h | 15 -- 9 files changed, 118 insertions(+), 180 deletions(-) Reviewed-by: Boris Ostrovsky

[PATCH] x86/smp: Factor out parts of native_smp_prepare_cpus()

2021-11-02 Thread Boris Ostrovsky
or x86") Signed-off-by: Boris Ostrovsky --- arch/x86/include/asm/smp.h | 1 + arch/x86/kernel/smpboot.c | 19 +-- arch/x86/xen/smp_pv.c | 11 ++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.

Re: [PATCH 0/4] xen: do some cleanup

2021-11-03 Thread Boris Ostrovsky
On 11/1/21 3:15 PM, Boris Ostrovsky wrote: On 10/28/21 4:12 AM, Juergen Gross wrote: Some cleanups, mostly related to no longer supporting 32-bit PV mode. Juergen Gross (4):    x86/xen: remove 32-bit pv leftovers    xen: allow pv-only hypercalls only with CONFIG_XEN_PV    xen: remove

Re: [PATCH v2] xen/balloon: rename alloc/free_xenballooned_pages

2021-11-03 Thread Boris Ostrovsky
with !CONFIG_XEN_UNPOPULATED_ALLOC and rename them to the xen_*() variants they are replacing. This allows to remove some ifdeffery from the xen.h header file. Adapt the prototype of the functions to match. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH v4] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-11-03 Thread Boris Ostrovsky
recki Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH v4] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-11-04 Thread Boris Ostrovsky
On 11/3/21 9:55 PM, Boris Ostrovsky wrote: On 11/2/21 5:19 AM, Juergen Gross wrote: When running as PVH or HVM guest with actual memory < max memory the hypervisor is using "populate on demand" in order to allow the guest to balloon down from its maximum memory size. For

Re: [PATCH v4] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-11-04 Thread Boris Ostrovsky
On 11/4/21 12:21 PM, Juergen Gross wrote: On 04.11.21 16:55, Boris Ostrovsky wrote: On 11/3/21 9:55 PM, Boris Ostrovsky wrote: On 11/2/21 5:19 AM, Juergen Gross wrote: When running as PVH or HVM guest with actual memory < max memory the hypervisor is using "populate on demand"

Re: [PATCH v4] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-11-04 Thread Boris Ostrovsky
And if so, would you mind doing this while committing (I have one day off tomorrow)? Yes, of course. Thanks. So I'll change this to pr_notice, even though it's not the best solution. -boris

Re: [PATCH v4] xen/balloon: add late_initcall_sync() for initial ballooning done

2021-11-05 Thread Boris Ostrovsky
On 11/2/21 5:19 AM, Juergen Gross wrote: When running as PVH or HVM guest with actual memory < max memory the hypervisor is using "populate on demand" in order to allow the guest to balloon down from its maximum memory size. For this to work correctly the guest must not touch more memory pages

Re: [PATCH v2] xen/balloon: rename alloc/free_xenballooned_pages

2021-11-05 Thread Boris Ostrovsky
On 11/2/21 5:22 AM, Juergen Gross wrote: alloc_xenballooned_pages() and free_xenballooned_pages() are used as direct replacements of xen_alloc_unpopulated_pages() and xen_free_unpopulated_pages() in case CONFIG_XEN_UNPOPULATED_ALLOC isn't defined. Guard both functions with !CONFIG_XEN_UNPOPULA

Re: [PATCH v2 1/1] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32

2021-11-05 Thread Boris Ostrovsky
On 11/4/21 1:59 PM, Dongli Zhang wrote: Hi Boris, On 11/1/21 10:34 AM, Boris Ostrovsky wrote: On 10/27/21 9:25 PM, Dongli Zhang wrote: The sched_clock() can be used very early since commit 857baa87b642 ("sched/clock: Enable sched clock early"). In addition, with commit 38669ba2

Re: [PATCH] x86/smp: Factor out parts of native_smp_prepare_cpus()

2021-11-08 Thread Boris Ostrovsky
On 11/8/21 10:11 AM, Peter Zijlstra wrote: On Tue, Nov 02, 2021 at 07:36:36PM -0400, Boris Ostrovsky wrote: Commit 66558b730f25 ("sched: Add cluster scheduler level for x86") introduced cpu_l2c_shared_map mask which is expected to be initialized by smp_op.smp_prepare_cpus(). That c

Re: [PATCH] xen/balloon: fix unused-variable warning

2021-11-09 Thread Boris Ostrovsky
On 11/8/21 6:14 AM, Arnd Bergmann wrote: From: Arnd Bergmann In configurations with CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=n and CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y, gcc warns about an unused variable: drivers/xen/balloon.c:83:12: error: 'xen_hotplug_unpopulated' defined but not used [-Werror=un

Re: [PATCH] xen/privcmd: make option visible in Kconfig

2021-11-16 Thread Boris Ostrovsky
On 11/16/21 11:05 AM, Jan Beulich wrote: On 16.11.2021 16:01, Juergen Gross wrote: On 16.11.21 15:55, Jan Beulich wrote: On 16.11.2021 15:33, Juergen Gross wrote: config XEN_PRIVCMD - tristate + tristate "Xen hypercall passthrough driver" depends on XEN de

Re: [PATCH] xen/privcmd: make option visible in Kconfig

2021-11-17 Thread Boris Ostrovsky
On 11/16/21 5:33 PM, Boris Ostrovsky wrote: On 11/16/21 11:05 AM, Jan Beulich wrote: On 16.11.2021 16:01, Juergen Gross wrote: On 16.11.21 15:55, Jan Beulich wrote: On 16.11.2021 15:33, Juergen Gross wrote:       config XEN_PRIVCMD -    tristate +    tristate "Xen hypercall passth

Re: [PATCH v2] xen: don't continue xenstore initialization in case of errors

2021-11-17 Thread Boris Ostrovsky
On 11/15/21 5:27 PM, Stefano Stabellini wrote: From: Stefano Stabellini In case of errors in xenbus_init (e.g. missing xen_store_gfn parameter), we goto out_error but we forget to reset xen_store_domain_type to XS_UNKNOWN. As a consequence xenbus_probe_initcall and other initcalls will still

Re: [PATCH] xen: detect uninitialized xenbus in xenbus_init

2021-11-18 Thread Boris Ostrovsky
On 11/18/21 4:00 PM, Stefano Stabellini wrote: /* * Avoid truncation on 32-bit. * TODO: handle addresses >= 4G */ if ( v >= ~0UL ) { err = -EINVAL; goto out_error; } Since this is only relevant to 32-bit kern

Re: [PATCH] xen/pvh: add missing prototype to header

2021-11-19 Thread Boris Ostrovsky
Reviewed-by: Boris Ostrovsky

Re: [PATCH v2] xen: detect uninitialized xenbus in xenbus_init

2021-11-19 Thread Boris Ostrovsky
eviewed-by: Boris Ostrovsky

Re: [PATCH] xen/pvh: add missing prototype to header

2021-11-22 Thread Boris Ostrovsky
On 11/19/21 10:39 AM, Juergen Gross wrote: The prototype of mem_map_via_hcall() is missing in its header, so add it. Reported-by: kernel test robot Fixes: a43fb7da53007e67ad ("xen/pvh: Move Xen code for getting mem map via hcall out of common file") Signed-off-by: Juergen Gross Applied

Re: [PATCH 0/5] xen: cleanup detection of non-essential pv devices

2021-11-23 Thread Boris Ostrovsky
ls-front.c    |  1 +   drivers/xen/xenbus/xenbus_probe_frontend.c | 14 +++---   include/xen/xenbus.h   |  1 +   sound/xen/xen_snd_front.c  |  1 +   8 files changed, 10 insertions(+), 11 deletions(-) Any further comments? Reviewed-by: Boris Ostrovsk

<    4   5   6   7   8   9   10   11   12   >