Re: [Xen-devel] [PATCH][tip] x86/paravirt: Make the virt_spin_lock_key setup after jump_label_init()

2017-10-27 Thread Vitaly Kuznetsov
Boris Petkov writes: > On October 27, 2017 6:02:00 PM GMT+02:00, Dou Liyang > wrote: >>Commit: >> >> 9043442b43b1 ("locking/paravirt: Use new static key for controlling >> call of virt_spin_lock()") >> >>set the static virt_spin_lock_key to a value

Re: [Xen-devel] [PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality

2017-10-06 Thread Vitaly Kuznetsov
Josh Poimboeuf writes: > - For the most common runtime cases (everything except Xen and vSMP), > vmlinux disassembly now matches what the actual runtime code looks > like. This improves debuggability and kernel developer sanity (a > precious resource). > > ... > > -

Re: [Xen-devel] [PATCH qemu-traditional] switch to the new ioreq server API

2017-09-21 Thread Vitaly Kuznetsov
Paul Durrant <paul.durr...@citrix.com> writes: >> -Original Message----- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: 06 September 2017 10:29 >> To: xen-devel@lists.xen.org >> Cc: Paul Durrant <paul.durr...@citrix.com>; Ian Jack

[Xen-devel] [PATCH qemu-traditional] switch to the new ioreq server API

2017-09-06 Thread Vitaly Kuznetsov
dling code is stolen as-is from qemu-upstream. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- hw/pci.c| 5 ++ hw/xen_common.h | 163 hw/xen_machine_fv.c | 31 -- i386-dm/exec-dm.c | 7 +++ i386-dm/h

Re: [Xen-devel] [PATCH] xen: reset creation_finished flag on soft reset

2017-09-05 Thread Vitaly Kuznetsov
he hypervisor is required. -- Vitaly >From 030c73f4f0361752dad57a2a90179876ad697bfd Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov <vkuzn...@redhat.com> Date: Tue, 5 Sep 2017 18:16:03 +0200 Subject: [PATCH] switch to the new IOREQ server API Signed-of

Re: [Xen-devel] [PATCH] xen: reset creation_finished flag on soft reset

2017-09-01 Thread Vitaly Kuznetsov
Paul Durrant <paul.durr...@citrix.com> writes: >> -Original Message----- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: 01 September 2017 10:27 >> To: Andrew Cooper <andrew.coop...@citrix.com>; Paul Durrant >> <paul.durr...@citri

Re: [Xen-devel] [PATCH] xen: reset creation_finished flag on soft reset

2017-09-01 Thread Vitaly Kuznetsov
Andrew Cooper <andrew.coop...@citrix.com> writes: > On 01/09/2017 10:11, Vitaly Kuznetsov wrote: >> C/s e7dabe5 ("x86/hvm: don't unconditionally create a default ioreq >> server") broke soft reset when QEMU traditional is being used. During >> soft reset

[Xen-devel] [PATCH] xen: reset creation_finished flag on soft reset

2017-09-01 Thread Vitaly Kuznetsov
true' when toolstack unpauses the domain, just like after normal creation. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- xen/common/domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index b22aacc57e..b529c5d7ad 100644 --- a/xen

[Xen-devel] [PATCH v3] x86: enable RCU based table free

2017-08-28 Thread Vitaly Kuznetsov
any notable performance impact. Suggested-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Acked-by: Juergen Gross <jgr...@suse.com> Acked-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> --- Changes since v2: - Add

Re: [Xen-devel] [PATCH v2] x86: enable RCU based table free

2017-08-25 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Peter Zijlstra <pet...@infradead.org> writes: > >> On Thu, Aug 24, 2017 at 11:22:58AM +0200, Vitaly Kuznetsov wrote: >> >>> diff --git a/arch/x86/include/asm/tlb.h b/arch/x86/include/asm/tlb.h >

Re: [Xen-devel] [PATCH v2] x86: enable RCU based table free

2017-08-24 Thread Vitaly Kuznetsov
Peter Zijlstra <pet...@infradead.org> writes: > On Thu, Aug 24, 2017 at 11:22:58AM +0200, Vitaly Kuznetsov wrote: > >> diff --git a/arch/x86/include/asm/tlb.h b/arch/x86/include/asm/tlb.h >> index c7797307fc2b..d43a7fcafee9 100644 >> --- a/arch/x86/include/asm/tlb.h

[Xen-devel] [PATCH v2] x86: enable RCU based table free

2017-08-24 Thread Vitaly Kuznetsov
any notable performance impact. Suggested-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Acked-by: Juergen Gross <jgr...@suse.com> --- Changes since v1: - Enable HAVE_RCU_TABLE_FREE unconditionally to avoid different code pathes fo

Re: [Xen-devel] [PATCH] x86: enable RCU based table free when PARAVIRT

2017-08-24 Thread Vitaly Kuznetsov
Linus Torvalds writes: > On Wed, Aug 23, 2017 at 3:36 PM, Kirill A. Shutemov > wrote: >> >> Below is test cases that allocates a lot of page tables and measuare >> fork/exit time. (I'm not entirely sure it's the best way to stress

[Xen-devel] [PATCH] x86: enable RCU based table free when PARAVIRT

2017-08-23 Thread Vitaly Kuznetsov
-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Acked-by: Juergen Gross <jgr...@suse.com> --- Changes since RFC: - Added Juergen's Acked-by. Fixed a typo in the description. I didn't get any other feedback on my RFC, assuming there

Re: [Xen-devel] [PATCH RFC] x86: enable RCU based table free when PARAVIRT

2017-08-18 Thread Vitaly Kuznetsov
Juergen Gross <jgr...@suse.com> writes: > On 17/08/17 11:20, Vitaly Kuznetsov wrote: >> On x86 software page-table walkers depend on the fact that remote TLB flush >> does an IPI: walk is performed lockless but with interrupts disabled and in >> case the pagetab

[Xen-devel] [PATCH RFC] x86: enable RCU based table free when PARAVIRT

2017-08-17 Thread Vitaly Kuznetsov
-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/Kconfig | 1 + arch/x86/include/asm/tlb.h | 7 +++ arch/x86/mm/pgtable.c | 15 +++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --gi

Re: [Xen-devel] [PATCH] xen/x86: Don't BUG on CPU0 offlining

2017-06-28 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk <konrad.w...@oracle.com> writes: > On Mon, Jun 26, 2017 at 06:39:30PM +0200, Vitaly Kuznetsov wrote: >> CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests >> BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a >

[Xen-devel] [PATCH] xen/x86: Don't BUG on CPU0 offlining

2017-06-26 Thread Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> ---

Re: [Xen-devel] Support of lguest?

2017-05-15 Thread Vitaly Kuznetsov
Juergen Gross writes: > Lguest and Xen pv-guests are the only users of pv_mmu_ops (with the > one exception of the .exit_mmap member, which is being used by Xen > HVM-guests, too). > > As it is possible now to build a kernel without Xen pv-guest support > while keeping PVH and

[Xen-devel] [PATCH v2] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-11 Thread Vitaly Kuznetsov
resume. Fix the bug by removing the whole xen device completely with device_unregister(), this guarantees we won't have any calls into netfront after a failure. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v1: instead of cleaning drvdata and ch

Re: [Xen-devel] [PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-05 Thread Vitaly Kuznetsov
David Miller <da...@davemloft.net> writes: > From: Vitaly Kuznetsov <vkuzn...@redhat.com> > Date: Thu, 4 May 2017 14:23:04 +0200 > >> Unavoidable crashes in netfront_resume() and netback_changed() after a >> previous fail in talk_to_netback() (e.g. when we fail t

[Xen-devel] [PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-04 Thread Vitaly Kuznetsov
after resume. Reset drvdata in netback_changed() the same way we reset it in netfront_probe() and check for NULL in both netfront_resume() and netback_changed() to properly handle the situation. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- I apologize for sending this during the

Re: [Xen-devel] [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit

2017-04-20 Thread Vitaly Kuznetsov
Boris Ostrovsky <boris.ostrov...@oracle.com> writes: > On 04/20/2017 11:40 AM, Vitaly Kuznetsov wrote: >> Peter Zijlstra <pet...@infradead.org> writes: >> >>> On Thu, Apr 20, 2017 at 03:24:53PM +0200, Vitaly Kuznetsov wrote: >>>> In this pat

Re: [Xen-devel] [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit

2017-04-20 Thread Vitaly Kuznetsov
Peter Zijlstra <pet...@infradead.org> writes: > On Thu, Apr 20, 2017 at 03:24:53PM +0200, Vitaly Kuznetsov wrote: >> In this patch I suggest we set __max_logical_packages based on the >> max_physical_pkg_id and total_cpus, > > So my 4 socket 144 CPU system will then

[Xen-devel] [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit

2017-04-20 Thread Vitaly Kuznetsov
gement more robust") Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/kernel/smpboot.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index bd1f1ad..85f41cd 100644 --- a/arch/x86/ke

Re: [Xen-devel] linux-next: manual merge of the xen-tip tree with the tip tree

2017-04-04 Thread Vitaly Kuznetsov
Juergen Gross <jgr...@suse.com> writes: > On 29/03/17 12:06, Vitaly Kuznetsov wrote: >> Juergen Gross <jgr...@suse.com> writes: >>> I'll create another branch for-linus-4.12 based on the tip tree next >>> week which will be subject to the pull request f

Re: [Xen-devel] linux-next: manual merge of the xen-tip tree with the tip tree

2017-03-29 Thread Vitaly Kuznetsov
Juergen Gross writes: > On 29/03/17 10:59, Ingo Molnar wrote: >> >> * Juergen Gross wrote: >> >>> On 29/03/17 05:35, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the xen-tip tree got a conflict in:

Re: [Xen-devel] [PATCH v3 00/21] x86/xen: untangle PV and PVHVM guest support code

2017-03-28 Thread Vitaly Kuznetsov
Juergen Gross <jgr...@suse.com> writes: > On 14/03/17 18:35, Vitaly Kuznetsov wrote: >> Changes since v2: ... > > Series pushed to kernel/git/xen/tip.git for-linus-4.12 with one fixup > patch added: smp_pv.c had a duplicate xen_call_function_interrupt() > defined but n

[Xen-devel] [PATCH v2 1/2] libxl: preserve console tty across soft reset

2017-03-22 Thread Vitaly Kuznetsov
M guests serial console through QEMU is usually in use and for PVH we don't have it. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v1: - Use libxl__xs_read_mandatory() instead of xs_read() [Wei Liu] Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- tools/

[Xen-devel] [PATCH v2 0/2] libxl: fix soft reset for PVHv2 guests

2017-03-22 Thread Vitaly Kuznetsov
libxl__xs_read_mandatory() instead of xs_read() [Wei Liu] - Follow-up PATCH2 added to make do_domain_soft_reset () consistent. Vitaly Kuznetsov (2): libxl: preserve console tty across soft reset libxl: use libxl__xs_read_checked() instead or raw xs_read() in do_domain_soft_reset() tools

[Xen-devel] [PATCH v2 2/2] libxl: use libxl__xs_read_checked() instead or raw xs_read() in do_domain_soft_reset()

2017-03-22 Thread Vitaly Kuznetsov
Replace raw xs_read() calls with libxl__xs_read_checked() and bail on error. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- tools/libxl/libxl_create.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tools/libxl/libxl_create.c b

Re: [Xen-devel] [PATCH 0/2] libxl: fix soft reset for PVHv2 guests

2017-03-22 Thread Vitaly Kuznetsov
Wei Liu <wei.l...@citrix.com> writes: > On Mon, Mar 20, 2017 at 07:03:09PM +0100, Vitaly Kuznetsov wrote: >> Vitaly Kuznetsov (2): >> libxl: don't try to rename dm save file for PVH > > I've pushed this patch. > >> libxl: preserve console tty across s

Re: [Xen-devel] [RFC] xen/pvh: detect PVH after kexec

2017-03-21 Thread Vitaly Kuznetsov
Boris Ostrovsky <boris.ostrov...@oracle.com> writes: > On 03/21/2017 10:44 AM, Vitaly Kuznetsov wrote: >> Vitaly Kuznetsov <vkuzn...@redhat.com> writes: >> >>> Roger Pau Monne <roger@citrix.com> writes: >>> >>>> On Tue, Mar 21

Re: [Xen-devel] [RFC] xen/pvh: detect PVH after kexec

2017-03-21 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Roger Pau Monne <roger@citrix.com> writes: > >> On Tue, Mar 21, 2017 at 10:21:52AM +0100, Vitaly Kuznetsov wrote: >>> Boris Ostrovsky <boris.ostrov...@oracle.com> writes: >>> >>> >

Re: [Xen-devel] [RFC] xen/pvh: detect PVH after kexec

2017-03-21 Thread Vitaly Kuznetsov
Boris Ostrovsky <boris.ostrov...@oracle.com> writes: > On 03/21/2017 08:13 AM, Roger Pau Monne wrote: >> On Tue, Mar 21, 2017 at 12:53:07PM +0100, Vitaly Kuznetsov wrote: >>> Roger Pau Monne <roger@citrix.com> writes: >>> >>>> On Tue, Mar 2

Re: [Xen-devel] [RFC] xen/pvh: detect PVH after kexec

2017-03-21 Thread Vitaly Kuznetsov
Roger Pau Monne <roger@citrix.com> writes: > On Tue, Mar 21, 2017 at 10:21:52AM +0100, Vitaly Kuznetsov wrote: >> Boris Ostrovsky <boris.ostrov...@oracle.com> writes: >> >> > On 03/20/2017 02:20 PM, Vitaly Kuznetsov wrote: >> >> PVH guests a

Re: [Xen-devel] [RFC] xen/pvh: detect PVH after kexec

2017-03-21 Thread Vitaly Kuznetsov
Boris Ostrovsky <boris.ostrov...@oracle.com> writes: > On 03/20/2017 02:20 PM, Vitaly Kuznetsov wrote: >> PVH guests after kexec boot like normal HVM guests and we're not entering >> xen_prepare_pvh() > > Is it not? Aren't we going via xen_hvm_shutdown() and then > S

[Xen-devel] [RFC] xen/pvh: detect PVH after kexec

2017-03-20 Thread Vitaly Kuznetsov
or something like that? Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/enlighten.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index ec1d5c4..4a30886 100644 --- a/arch/x86/xen/enlighten.c +++ b/ar

[Xen-devel] [PATCH 2/2] libxl: preserve console tty across soft reset

2017-03-20 Thread Vitaly Kuznetsov
M guests serial console through QEMU is usually in use and for PVH we don't have it. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- tools/libxl/libxl_console.c | 5 - tools/libxl/libxl_create.c | 8 +++- tools/libxl/libxl_internal.h | 1 + 3 files changed, 12 insertions(+),

[Xen-devel] [PATCH 1/2] libxl: don't try to rename dm save file for PVH

2017-03-20 Thread Vitaly Kuznetsov
Guests with LIBXL_DEVICE_MODEL_VERSION_NONE don't have a device model running so there is no save file to rename. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- tools/libxl/libxl_create.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools

[Xen-devel] [PATCH 0/2] libxl: fix soft reset for PVHv2 guests

2017-03-20 Thread Vitaly Kuznetsov
(); + /* Detect PVH booting after kexec */ + xen_detect_pvh(); + xen_hvm_init_shared_info(); xen_panic_handler_init(); With the hack I was able to do kdump on a PVHv2 guest. I'll start a separate mail thread to discuss how we should do it right. Vitaly Kuznetsov (2): libxl: don't

[Xen-devel] [PATCH v3 14/21] x86/xen: split suspend.c for PV and PVHVM guests

2017-03-14 Thread Vitaly Kuznetsov
Slit the code in suspend.c into suspend_pv.c and suspend_hvm.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- Changes since v2: #include added to suspend_pv.c [kbuild test robot] --- arch/x86/xen/Makefile | 3 ++-

[Xen-devel] [PATCH v3 19/21] xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds

2017-03-14 Thread Vitaly Kuznetsov
xen_create_contiguous_region()/xen_create_contiguous_region() are PV-only, they both contain xen_feature(XENFEAT_auto_translated_physmap) check and bail in the very beginning. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- inc

[Xen-devel] [PATCH v3 18/21] xen/balloon: decorate PV-only parts with #ifdef CONFIG_XEN_PV

2017-03-14 Thread Vitaly Kuznetsov
Balloon driver uses several PV-only concepts (xen_start_info, xen_extra_mem,..) and it seems the simpliest solution to make HVM-only build happy is to decorate these parts with #ifdefs. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com>

[Xen-devel] [PATCH v3 21/21] x86/xen: rename some PV-only functions in smp_pv.c

2017-03-14 Thread Vitaly Kuznetsov
After code split between PV and HVM some functions in xen_smp_ops have xen_pv_ prefix and some only xen_ which makes them look like they're common for both PV and HVM while they're not. Rename all the rest to have xen_pv_ prefix. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Re

[Xen-devel] [PATCH v3 15/21] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV

2017-03-14 Thread Vitaly Kuznetsov
xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 6 +++--- arch/x86/xen/pmu.h

[Xen-devel] [PATCH v3 16/21] x86/xen: define startup_xen for XEN PV only

2017-03-14 Thread Vitaly Kuznetsov
startup_xen references PV-only code, decorate it with #ifdef CONFIG_XEN_PV to make PV-free builds possible. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/xen-head.S | 4 1 file changed, 4 insertions(+) diff

[Xen-devel] [PATCH v3 10/21] x86/xen: split off smp_hvm.c

2017-03-14 Thread Vitaly Kuznetsov
Move PVHVM related code to smp_hvm.c. Drop 'static' qualifier from xen_smp_send_reschedule(), xen_smp_send_call_function_ipi(), xen_smp_send_call_function_single_ipi(), these functions will be moved to common smp code when smp_pv.c is split. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.

[Xen-devel] [PATCH v3 20/21] x86/xen: enable PVHVM-only builds

2017-03-14 Thread Vitaly Kuznetsov
Now everything is in place and we can move PV-only code under CONFIG_XEN_PV. CONFIG_XEN_PV_SMP is created to support the change. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/Kconfig | 4 arch/x86/xen/

[Xen-devel] [PATCH v3 00/21] x86/xen: untangle PV and PVHVM guest support code

2017-03-14 Thread Vitaly Kuznetsov
patches are rather big but this is mostly just moving code around, no functional changes intended. I smoke tested it with PV-only and PVHVM-only builds, booted and did save/restore test. I also tried the newly introduced PVHv2 guest, it even worked! Vitaly Kuznetsov (21): x86/xen: separate PV

[Xen-devel] [PATCH v3 12/21] x86/xen: split off mmu_hvm.c

2017-03-14 Thread Vitaly Kuznetsov
Move PVHVM related code to mmu_hvm.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/Makefile | 2 +- arch/x86/xen/mmu.c | 74 -- arch/x86/xen/mm

[Xen-devel] [PATCH v3 06/21] x86/xen: split off enlighten_pv.c

2017-03-14 Thread Vitaly Kuznetsov
Basically, enlighten.c is renamed to enlighten_pv.c and some code moved out to common enlighten.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- Changes since v2: xen_pin_vcpu() left in enlighten.c --- arch/x86/xen/Makefile

[Xen-devel] [PATCH v3 11/21] x86/xen: split off smp_pv.c

2017-03-14 Thread Vitaly Kuznetsov
Basically, smp.c is renamed to smp_pv.c and some code moved out to common smp.c. struct xen_common_irq delcaration ended up in smp.h. Reviewed-by: Juergen Gross <jgr...@suse.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile | 2 +- arch/x86/xen/sm

[Xen-devel] [PATCH v3 17/21] x86/xen: create stubs for HVM-only builds in page.h

2017-03-14 Thread Vitaly Kuznetsov
-table.c but only if !xen_feature(XENFEAT_auto_translated_physmap). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/xen/page.h | 25 + 1 file changed, 25 insertions(+) diff --git a/arch

[Xen-devel] [PATCH v3 03/21] x86/xen: add CONFIG_XEN_PV to Kconfig

2017-03-14 Thread Vitaly Kuznetsov
All code to support Xen PV will get under this new option. For the beginning, check for it in the common code. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v2: select XEN_HAVE_PVMMU moved to config XEN_PV [Juergen Gross] --- arch/x86/kernel/cpu/hypervisor.

[Xen-devel] [PATCH v3 02/21] x86/xen: globalize have_vcpu_info_placement

2017-03-14 Thread Vitaly Kuznetsov
have_vcpu_info_placement applies to both PV and HVM and as we're going to split the code we need to make it global. Rename to xen_have_vcpu_info_placement. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/enli

[Xen-devel] [PATCH v3 09/21] x86/xen: split xen_cpu_die()

2017-03-14 Thread Vitaly Kuznetsov
Split xen_cpu_die() into xen_pv_cpu_die() and xen_hvm_cpu_die() to support further splitting of smp.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/smp.c | 26 -- 1 file changed, 20 inse

[Xen-devel] [PATCH v3 07/21] x86/xen: split xen_smp_intr_init()/xen_smp_intr_free()

2017-03-14 Thread Vitaly Kuznetsov
xen_smp_intr_init() and xen_smp_intr_free() have PV-specific code and as a praparatory change to splitting smp.c we need to split these fucntions. Create xen_smp_intr_init_pv()/xen_smp_intr_free_pv(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gros

[Xen-devel] [PATCH v3 08/21] x86/xen: split xen_smp_prepare_boot_cpu()

2017-03-14 Thread Vitaly Kuznetsov
Split xen_smp_prepare_boot_cpu() into xen_pv_smp_prepare_boot_cpu() and xen_hvm_smp_prepare_boot_cpu() to support further splitting of smp.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xe

[Xen-devel] [PATCH v3 05/21] x86/xen: split off enlighten_hvm.c

2017-03-14 Thread Vitaly Kuznetsov
Move PVHVM related code to enlighten_hvm.c. Three functions: xen_cpuhp_setup(), xen_reboot(), xen_emergency_restart() are shared, drop static qualifier from them. These functions will go to common code once it is split from enlighten.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.

[Xen-devel] [PATCH v3 01/21] x86/xen: separate PV and HVM hypervisors

2017-03-14 Thread Vitaly Kuznetsov
_cpu_dead_pv() and xen_cpu_dead_pv_hvm() Add two parameters to xen_cpuhp_setup() to pass proper cpu_up_prepare and cpu_dead hooks. xen_set_cpu_features() is now PV-only so the redundant xen_pv_domain() check can be dropped. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v2:

[Xen-devel] [PATCH v3 04/21] x86/xen: split off enlighten_pvh.c

2017-03-14 Thread Vitaly Kuznetsov
Create enlighten_pvh.c by splitting off PVH related code from enlighten.c, put it under CONFIG_XEN_PVH. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> --- Changes since v2: #include added [kbuild test robot] --- arch/x86/

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-03-13 Thread Vitaly Kuznetsov
Michal Hocko <mho...@kernel.org> writes: > On Mon 13-03-17 14:42:37, Vitaly Kuznetsov wrote: >> > >> > What is the API those guests ask for the memory? And who is actually >> > responsible to ask for that memory? Is it a kernel or userspace >>

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-03-13 Thread Vitaly Kuznetsov
Michal Hocko <mho...@kernel.org> writes: > On Mon 13-03-17 13:54:59, Vitaly Kuznetsov wrote: >> Michal Hocko <mho...@kernel.org> writes: >> >> > On Mon 13-03-17 11:55:54, Igor Mammedov wrote: >> >> > > >> >> &g

Re: [Xen-devel] [PATCH v2 00/21] x86/xen: untangle PV and PVHVM guest support code

2017-03-13 Thread Vitaly Kuznetsov
Boris Ostrovsky <boris.ostrov...@oracle.com> writes: > On 03/02/2017 12:53 PM, Vitaly Kuznetsov wrote: >> Changes since v1: >> - Patches 1,2 and 3 were split and reordered to avoid adding temporary >>#ifdefs [Juergen Gross] >> - Juergen's R-b added to what is

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-03-13 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Mon 13-03-17 11:55:54, Igor Mammedov wrote: >> > > >> > >- suggested RFC is not acceptable from virt point of view >> > > as it regresses guests on top of x86 kvm/vmware which >> > > both use ACPI based memory hotplug. >> >

[Xen-devel] [PATCH v2 06/21] x86/xen: split off enlighten_pv.c

2017-03-02 Thread Vitaly Kuznetsov
Basically, enlighten.c is renamed to enlighten_pv.c and some code moved out to common enlighten.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile |4 +- arch/x86/xen/enlighten.c| 1626 ++- arch/x

[Xen-devel] [PATCH v2 17/21] x86/xen: create stubs for HVM-only builds in page.h

2017-03-02 Thread Vitaly Kuznetsov
-table.c but only if !xen_feature(XENFEAT_auto_translated_physmap). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/include/asm/xen/page.h | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/a

[Xen-devel] [PATCH v2 20/21] x86/xen: enable PVHVM-only builds

2017-03-02 Thread Vitaly Kuznetsov
Now everything is in place and we can move PV-only code under CONFIG_XEN_PV. CONFIG_XEN_PV_SMP is created to support the change. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Kconfig | 4 arch/x86/xen/Makefile | 9 + 2 files changed, 9 insertions

[Xen-devel] [PATCH v2 18/21] xen/balloon: decorate PV-only parts with #ifdef CONFIG_XEN_PV

2017-03-02 Thread Vitaly Kuznetsov
Balloon driver uses several PV-only concepts (xen_start_info, xen_extra_mem,..) and it seems the simpliest solution to make HVM-only build happy is to decorate these parts with #ifdefs. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/xen/balloon.

[Xen-devel] [PATCH v2 21/21] x86/xen: rename some PV-only functions in smp_pv.c

2017-03-02 Thread Vitaly Kuznetsov
After code split between PV and HVM some functions in xen_smp_ops have xen_pv_ prefix and some only xen_ which makes them look like they're common for both PV and HVM while they're not. Rename all the rest to have xen_pv_ prefix. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.

[Xen-devel] [PATCH v2 14/21] x86/xen: split suspend.c for PV and PVHVM guests

2017-03-02 Thread Vitaly Kuznetsov
Slit the code in suspend.c into suspend_pv.c and suspend_hvm.c. Reviewed-by: Juergen Gross <jgr...@suse.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile | 3 ++- arch/x86/xen/suspend.c | 54 --

[Xen-devel] [PATCH v2 11/21] x86/xen: split off smp_pv.c

2017-03-02 Thread Vitaly Kuznetsov
Basically, smp.c is renamed to smp_pv.c and some code moved out to common smp.c. struct xen_common_irq delcaration ended up in smp.h. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile | 2 +- arch/x86/xen/smp.c

[Xen-devel] [PATCH v2 12/21] x86/xen: split off mmu_hvm.c

2017-03-02 Thread Vitaly Kuznetsov
Move PVHVM related code to mmu_hvm.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile | 2 +- arch/x86/xen/mmu.c | 74 -- arch/x86/xen/mmu_hvm.c | 79 ++ 3

[Xen-devel] [PATCH v2 16/21] x86/xen: define startup_xen for XEN PV only

2017-03-02 Thread Vitaly Kuznetsov
startup_xen references PV-only code, decorate it with #ifdef CONFIG_XEN_PV to make PV-free builds possible. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/xen-head.S | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-

[Xen-devel] [PATCH v2 19/21] xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds

2017-03-02 Thread Vitaly Kuznetsov
xen_create_contiguous_region()/xen_create_contiguous_region() are PV-only, they both contain xen_feature(XENFEAT_auto_translated_physmap) check and bail in the very beginning. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- include/xen/xen-ops.h | 14 ++ 1 file chang

[Xen-devel] [PATCH v2 04/21] x86/xen: split off enlighten_pvh.c

2017-03-02 Thread Vitaly Kuznetsov
Create enlighten_pvh.c by splitting off PVH related code from enlighten.c, put it under CONFIG_XEN_PVH. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile| 2 + arch/x86/xen/enlighten.c | 110 - arch/x

[Xen-devel] [PATCH v2 15/21] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV

2017-03-02 Thread Vitaly Kuznetsov
xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Reviewed-by: Juergen Gross <jgr...@suse.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 6 +++--- arch/x86/xen/pmu.h

[Xen-devel] [PATCH v2 07/21] x86/xen: split xen_smp_intr_init()/xen_smp_intr_free()

2017-03-02 Thread Vitaly Kuznetsov
xen_smp_intr_init() and xen_smp_intr_free() have PV-specific code and as a praparatory change to splitting smp.c we need to split these fucntions. Create xen_smp_intr_init_pv()/xen_smp_intr_free_pv(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/enlighten_pv.

[Xen-devel] [PATCH v2 09/21] x86/xen: split xen_cpu_die()

2017-03-02 Thread Vitaly Kuznetsov
Split xen_cpu_die() into xen_pv_cpu_die() and xen_hvm_cpu_die() to support further splitting of smp.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/smp.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/arch/x86/xen/s

[Xen-devel] [PATCH v2 02/21] x86/xen: globalize have_vcpu_info_placement

2017-03-02 Thread Vitaly Kuznetsov
have_vcpu_info_placement applies to both PV and HVM and as we're going to split the code we need to make it global. Rename to xen_have_vcpu_info_placement. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/enlighten.c | 12 ++-- arch/x86/xen/xen-ops.h | 2

[Xen-devel] [PATCH v2 05/21] x86/xen: split off enlighten_hvm.c

2017-03-02 Thread Vitaly Kuznetsov
Move PVHVM related code to enlighten_hvm.c. Three functions: xen_cpuhp_setup(), xen_reboot(), xen_emergency_restart() are shared, drop static qualifier from them. These functions will go to common code once it is split from enlighten.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.

[Xen-devel] [PATCH v2 03/21] x86/xen: add CONFIG_XEN_PV to Kconfig

2017-03-02 Thread Vitaly Kuznetsov
All code to supprot Xen PV will get under this new option. For the beginning, check for it in the common code. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/kernel/cpu/hypervisor.c | 4 +++- arch/x86/kernel/process_64.c | 2 +- arch/x86/xen/Kconfig

[Xen-devel] [PATCH v2 08/21] x86/xen: split xen_smp_prepare_boot_cpu()

2017-03-02 Thread Vitaly Kuznetsov
Split xen_smp_prepare_boot_cpu() into xen_pv_smp_prepare_boot_cpu() and xen_hvm_smp_prepare_boot_cpu() to support further splitting of smp.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/smp.c | 49 ++--- 1 file chang

[Xen-devel] [PATCH v2 10/21] x86/xen: split off smp_hvm.c

2017-03-02 Thread Vitaly Kuznetsov
Move PVHVM related code to smp_hvm.c. Drop 'static' qualifier from xen_smp_send_reschedule(), xen_smp_send_call_function_ipi(), xen_smp_send_call_function_single_ipi(), these functions will be moved to common smp code when smp_pv.c is split. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.

[Xen-devel] [PATCH v2 01/21] x86/xen: separate PV and HVM hypervisors

2017-03-02 Thread Vitaly Kuznetsov
_cpu_dead_pv() and xen_cpu_dead_pv_hvm() Add two parameters to xen_cpuhp_setup() to pass proper cpu_up_prepare and cpu_dead hooks. xen_set_cpu_features() is now PV-only so the redundant xen_pv_domain() check can be dropped. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/includ

[Xen-devel] [PATCH v2 00/21] x86/xen: untangle PV and PVHVM guest support code

2017-03-02 Thread Vitaly Kuznetsov
support. Some patches are rather big but this is mostly just moving code around, no functional changes intended. I smoke tested it with PV-only and PVHVM-only builds, booted and did save/restore test. I also tried the newly introduced PVHv2 guest, it even worked! Vitaly Kuznetsov (21): x86/xen

Re: [Xen-devel] [PATCH 1/5] x86/xen: start untangling PV and PVHVM guest support code

2017-03-01 Thread Vitaly Kuznetsov
Juergen Gross <jgr...@suse.com> writes: > On 24/02/17 17:14, Vitaly Kuznetsov wrote: >> Introduce CONFIG_XEN_PV config option and split enlighten.c into >> 4 files. Temporary add #ifdef CONFIG_XEN_PV to smp.c and mmu.c to >> not break the build and not

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Michal Hocko <mho...@kernel.org> writes: > On Mon 27-02-17 11:49:43, Vitaly Kuznetsov wrote: >> Michal Hocko <mho...@kernel.org> writes: >> >> > On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote: >> > [...] >> >> I don't have anything new

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Heiko Carstens <heiko.carst...@de.ibm.com> writes: > On Mon, Feb 27, 2017 at 11:02:09AM +0100, Vitaly Kuznetsov wrote: >> A couple of other thoughts: >> 1) Having all newly added memory online ASAP is probably what people >> want for all virtual machines. S

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Michal Hocko <mho...@kernel.org> writes: > On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote: > [...] >> I don't have anything new to add to the discussion happened last week >> but I'd like to summarize my arguments against this change: >> >> 1) This patch do

Re: [Xen-devel] [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Vitaly Kuznetsov
Michal Hocko writes: > From: Michal Hocko > > This knob has been added by 31bc3858ea3e ("memory-hotplug: add automatic > onlining policy for the newly added memory") mainly to cover memory > hotplug based balooning solutions currently implemented for HyperV >

[Xen-devel] [PATCH 4/5] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV

2017-02-24 Thread Vitaly Kuznetsov
xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 5 +++-- arch/x86/xen/pmu.h| 5 + 3 files changed, 9 insertions(+), 3 del

[Xen-devel] [PATCH 2/5] x86/xen: split smp.c for PV and PVHVM guests

2017-02-24 Thread Vitaly Kuznetsov
More or less mechanically split smp.c into 3 files. XEN_PV_SMP and XEN_PVHVM_SMP config options added to support the change. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Kconfig| 8 + arch/x86/xen/Makefile | 3 + arch/x86/xen/enlighten_pv.c

[Xen-devel] [PATCH 0/5] x86/xen: untangle PV and PVHVM guest support code

2017-02-24 Thread Vitaly Kuznetsov
and did save/restore test. I also tried the newly introduced PVHv2 guest, it even worked! Vitaly Kuznetsov (5): x86/xen: start untangling PV and PVHVM guest support code x86/xen: split smp.c for PV and PVHVM guests x86/xen: put setup.c, mmu.c and p2m.c under CONFIG_XEN_PV x86/xen: put

[Xen-devel] [PATCH 5/5] x86/xen: split suspend.c for PV and PVHVM guests

2017-02-24 Thread Vitaly Kuznetsov
Get read of #ifdefs in suspend.c by splitting the code into suspend_pv.c and suspend_hvm.c. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/xen/Makefile | 4 ++-- arch/x86/xen/suspend.c | 58 -- arch/x86/xen/suspend

[Xen-devel] [PATCH 1/5] x86/xen: start untangling PV and PVHVM guest support code

2017-02-24 Thread Vitaly Kuznetsov
-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/include/asm/hypervisor.h |3 +- arch/x86/kernel/cpu/hypervisor.c |7 +- arch/x86/kernel/process_64.c |2 +- arch/x86/xen/Kconfig | 23 +- arch/x86/xen/Makefile | 10 +- arch/x

[Xen-devel] [PATCH KERNEL] xen/events: use xen_vcpu_id mapping for EVTCHNOP_status

2016-11-23 Thread Vitaly Kuznetsov
EVTCHNOP_status hypercall returns Xen's idea of vcpu id so we need to compare it against xen_vcpu_id mapping, not the Linux cpu id. Suggested-by: Radim Krcmar <rkrc...@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/xen/events/events_base.c | 2 +- 1 fil

Re: [Xen-devel] [RFC PATCH KERNEL 1/4] x86/xen: start untangling PV and PVHVM guest support code

2016-11-15 Thread Vitaly Kuznetsov
David Vrabel <david.vra...@citrix.com> writes: > On 14/11/16 17:17, Vitaly Kuznetsov wrote: >> Introduce CONFIG_XEN_PV config option and split enlighten.c into >> 3 files. Temporary add #ifdef CONFIG_XEN_PV to smp.c and mmu.c to >> not break the build and not

Re: [Xen-devel] [RFC PATCH KERNEL 0/4] x86/xen: untangle PV and PVHVM guest support code

2016-11-15 Thread Vitaly Kuznetsov
Boris Ostrovsky <boris.ostrov...@oracle.com> writes: > On 11/14/2016 01:21 PM, David Vrabel wrote: >> On 14/11/16 17:17, Vitaly Kuznetsov wrote: >>> Hi, >>> >>> I have a long-standing idea to separate PV and PVHVM code in kernel and >>> intr

  1   2   3   4   >