[Xen-devel] [PATCH v7 01/10] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-05-27 Thread Vitaly Kuznetsov
. This operation is not supported for PV domains including the hardware domain. Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 6 ++ xen/include/public/sched.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c

[Xen-devel] [PATCH v7 06/10] libxc: support XEN_DOMCTL_soft_reset operation

2015-05-27 Thread Vitaly Kuznetsov
Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov --- Changes in v7: - XENMEM_soft_reset -> XEN_DOMCTL_soft_reset. - xc_memory_soft_reset -> xc_domain_soft_reset --- tools/libxc/include/xenctrl.h | 4 tools/libxc/xc_do

[Xen-devel] [PATCH v7 09/10] libxc: add XC_DEVICE_MODEL_SAVE_FILE

2015-05-27 Thread Vitaly Kuznetsov
Use this in libxl_dm instead of hard-coding. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/include/xenguest.h | 1 + tools/libxl/libxl_dm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index

[Xen-devel] [PATCH v7 07/10] libxc: introduce soft reset for HVM domains

2015-05-27 Thread Vitaly Kuznetsov
MCTL_soft_reset; - Restore HVM context, HVM params, seed grant table for the new domain. When the operation succeeds the source domain is being destroyed and the destination domain is ready to proceed from where the source was stopped. Signed-off-by: Vitaly Kuznetsov --- Changes in v7: - check that xc

[Xen-devel] [PATCH v7 04/10] xen: Introduce XEN_DOMCTL_soft_reset

2015-05-27 Thread Vitaly Kuznetsov
New operation reassigns all memory pages from source domain to the destination domain mapping them at exactly the same GFNs. Pages mapped more than once (e.g. grants) are being copied. Signed-off-by: Vitaly Kuznetsov --- Changes in v7: - is_soft_reset flag added to struct domain to preserve

[Xen-devel] [PATCH v7 05/10] xsm: add XEN_DOMCTL_soft_reset support

2015-05-27 Thread Vitaly Kuznetsov
sible to trasfer memory from source domain to destination domain. The default policy requires their contexts to match. Signed-off-by: Vitaly Kuznetsov --- Changes in v7: - Add reset_transfer vector to FLASK [Daniel De Graaf] - XENMEM_soft_reset -> XEN_DOMCTL_soft_reset - Add a comment on why we

[Xen-devel] [PATCH v7 00/10] toolstack-based approach to pvhvm guest kexec

2015-05-27 Thread Vitaly Kuznetsov
org/archives/html/xen-devel/2015-05/msg01613.html v5 and all the history of the series is available here: http://lists.xenproject.org/archives/html/xen-devel/2014-12/msg01312.html Vitaly Kuznetsov (10): xen: introduce SHUTDOWN_soft_reset shutdown reason libxl: support SHUTDOWN_soft_reset shutd

[Xen-devel] [PATCH v7 02/10] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-05-27 Thread Vitaly Kuznetsov
Use letter 'S' to indicate a domain in such state. Signed-off-by: Vitaly Kuznetsov --- Changes in v7: - Remove LIBXL_HAVE_SHUTDWON_REASON_SOFT_RESET, the functionality will be advertised with LIBXL_HAVE_SOFT_RESET with the implementation [Wei Liu] --- tools/libxl/libxl_types.idl

[Xen-devel] [PATCH v7 03/10] xen: introduce DOMDYING_locked state

2015-05-27 Thread Vitaly Kuznetsov
domain is dying (so its mappings are locked and do not change) but the cleanup procedure has not being started yet. It will be set from outside of the domain_kill() function. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 1 + xen/include/xen/sched.h | 3 ++- 2 files changed, 3

[Xen-devel] [PATCH] x86/arm/mm: use gfn instead of pfn in p2m_get_mem_access/p2m_set_mem_access

2015-05-26 Thread Vitaly Kuznetsov
n' parameter passed to gfn_lock/gfn_unlock is not defined. This code compiles only because of a coincidence: gfn_lock/gfn_unlock are currently macros which don't use their second argument. Signed-off-by: Vitaly Kuznetsov --- - This patch is a successor of '[PATCH] x86/mm: use existin

Re: [Xen-devel] [PATCH v6 04/10] xen: Introduce XENMEM_soft_reset operation

2015-05-26 Thread Vitaly Kuznetsov
Tim Deegan writes: > At 12:06 +0200 on 25 May (143265), Vitaly Kuznetsov wrote: >> Tim Deegan writes: >> >> > At 17:26 +0100 on 22 May (1432315574), Jan Beulich wrote: >> >> >>> On 22.05.15 at 17:36, wrote: >> >> >>>>&g

[Xen-devel] [PATCH] x86/mm: use existing 'pfn' in p2m_get_mem_access

2015-05-26 Thread Vitaly Kuznetsov
'gfn' is not defined in p2m_get_mem_access() and this code compiles only because of a coincidence: gfn_lock/gfn_unlock are currently macros which don't use their second argument. Signed-off-by: Vitaly Kuznetsov --- xen/arch/x86/mm/p2m.c | 4 ++-- 1 file changed, 2 insertions(

[Xen-devel] [PATCH] xen: fix xen_domctl_monitor_op_t definition

2015-05-25 Thread Vitaly Kuznetsov
It seems xen_domctl_monitor_op_t was supposed to be a typedef for struct xen_domctl_monitor_op and not the non-existent xen_domctl__op. Signed-off-by: Vitaly Kuznetsov --- xen/include/public/domctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/public/domctl.h

Re: [Xen-devel] [PATCH v6 04/10] xen: Introduce XENMEM_soft_reset operation

2015-05-25 Thread Vitaly Kuznetsov
Tim Deegan writes: > At 17:26 +0100 on 22 May (1432315574), Jan Beulich wrote: >> >>> On 22.05.15 at 17:36, wrote: >> > On 13.05.15 at 11:49, wrote: >> >>> +if ( !source_d->is_dying ) >> >>> +{ >> >>> +/* >> >>> + * Make sure no allocation/remapping for the source do

Re: [Xen-devel] [PATCH v6 04/10] xen: Introduce XENMEM_soft_reset operation

2015-05-22 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 13.05.15 at 11:49, wrote: >> --- a/xen/common/memory.c >> +++ b/xen/common/memory.c >> @@ -580,6 +580,234 @@ static long >> memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg) >> return rc; >> } >> >> +static long >> memory_soft_reset(XEN_GU

Re: [Xen-devel] [PATCH v6 05/10] xsm: add XENMEM_soft_reset support

2015-05-22 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 13.05.15 at 11:49, wrote: >> --- a/xen/include/xsm/dummy.h >> +++ b/xen/include/xsm/dummy.h >> @@ -193,6 +193,13 @@ static XSM_INLINE int >> xsm_memory_exchange(XSM_DEFAULT_ARG struct domain *d) >> return xsm_default_action(action, current->domain, d); >> } >

Re: [Xen-devel] [PATCH v6 10/10] (lib)xl: soft reset support

2015-05-22 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Perform soft reset when a domain did SHUTDOWN_soft_reset. Migrate the > content with xc_domain_soft_reset(), reload dm and toolstack. > ..skip.. > +void libxl__xc_domain_soft_reset(libxl__egc *egc, > + libxl__domain_cr

Re: [Xen-devel] [PATCH v6 05/10] xsm: add XENMEM_soft_reset support

2015-05-21 Thread Vitaly Kuznetsov
Daniel De Graaf writes: > On 05/13/2015 05:49 AM, Vitaly Kuznetsov wrote: >> Dummy policy just checks that the current domain is privileged, >> in flask policy soft_reset is added to create_domain. >> >> Signed-off-by: Vitaly Kuznetsov > > I think the FLASK pol

Re: [Xen-devel] [PATCH v6 07/10] libxc: introduce soft reset for HVM domains

2015-05-20 Thread Vitaly Kuznetsov
Julien Grall writes: > Hi Vitaly, > > On 13/05/15 10:49, Vitaly Kuznetsov wrote: >> +int xc_domain_soft_reset(xc_interface *xch, uint32_t source_dom, >> + uint32_t dest_dom, domid_t console_domid, >> + unsigned

[Xen-devel] Status of soft reset for PVHVM (Was: Xen 4.6 Development Update (four months reminder))

2015-05-13 Thread Vitaly Kuznetsov
writes: > * toolstack-based approach to pvhvm guest kexec (fair) >also contains hypervisor side change > - Vitaly Kuznetsov > > * Toolstack-based approach to pvhvm guest kexec (ok) > v4 posted > - Vitaly Kuznetsov v6 was jus

[Xen-devel] [PATCH v6 10/10] (lib)xl: soft reset support

2015-05-13 Thread Vitaly Kuznetsov
Perform soft reset when a domain did SHUTDOWN_soft_reset. Migrate the content with xc_domain_soft_reset(), reload dm and toolstack. Signed-off-by: Vitaly Kuznetsov --- docs/man/xl.cfg.pod.5| 12 + tools/libxl/libxl.c | 4 ++ tools/libxl/libxl.h | 6 +++ tools

[Xen-devel] [PATCH v6 06/10] libxc: support XENMEM_soft_reset operation

2015-05-13 Thread Vitaly Kuznetsov
Introduce xc_domain_memory_soft_reset() function supporting XENMEM_soft_reset. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/include/xenctrl.h | 5 + tools/libxc/xc_domain.c | 18 ++ 2 files changed, 23 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b

[Xen-devel] [PATCH v6 08/10] xl: introduce enum domain_restart_type

2015-05-13 Thread Vitaly Kuznetsov
As a preparation before adding new restart type (soft reset) put all restart types into an enum. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/xl.h | 6 ++ tools/libxl/xl_cmdimpl.c | 23 ++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a

[Xen-devel] [PATCH v6 07/10] libxc: introduce soft reset for HVM domains

2015-05-13 Thread Vitaly Kuznetsov
eset; - Destroy the original domain; - Restore HVM context, HVM params, seed grant table for the new domain. After that the new domain resumes execution from where SHUTDOWN_soft_reset was called by the original domain. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/Makefile | 1

[Xen-devel] [PATCH v6 02/10] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-05-13 Thread Vitaly Kuznetsov
Use letter 'S' to indicate a domain in such state. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl.h | 7 +++ tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 2 +- tools/python/xen/lowlevel/xl/xl.c | 1 + 4 files changed, 10 insert

[Xen-devel] [PATCH v6 09/10] libxc: add XC_DEVICE_MODEL_SAVE_FILE

2015-05-13 Thread Vitaly Kuznetsov
Use this in libxl_dm instead of hard-coding. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/include/xenguest.h | 1 + tools/libxl/libxl_dm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index

[Xen-devel] [PATCH v6 03/10] xen: introduce DOMDYING_locked state

2015-05-13 Thread Vitaly Kuznetsov
domain is dying (so its mappings are locked and do not change) but the cleanup procedure has not being started yet. It will be set from outside of the domain_kill() function. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 1 + xen/include/xen/sched.h | 3 ++- 2 files changed, 3

[Xen-devel] [PATCH v6 05/10] xsm: add XENMEM_soft_reset support

2015-05-13 Thread Vitaly Kuznetsov
Dummy policy just checks that the current domain is privileged, in flask policy soft_reset is added to create_domain. Signed-off-by: Vitaly Kuznetsov --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- xen/common/memory.c | 4 xen/include/xsm/dummy.h

[Xen-devel] [PATCH v6 04/10] xen: Introduce XENMEM_soft_reset operation

2015-05-13 Thread Vitaly Kuznetsov
New operation reassigns all memory pages from source domain to the destination domain mapping them at exactly the same GFNs. Pages mapped more than once (e.g. grants) are being copied. Signed-off-by: Vitaly Kuznetsov --- xen/common/memory.c | 232

[Xen-devel] [PATCH v6 01/10] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-05-13 Thread Vitaly Kuznetsov
. This operation is not supported for PV domains including the hardware domain. Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 6 ++ xen/include/public/sched.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c

[Xen-devel] [PATCH v6 00/10] toolstack-based approach to pvhvm guest kexec

2015-05-13 Thread Vitaly Kuznetsov
e v5. I'd like to apologize for all that. v5 and all the history of the series is available here: http://lists.xenproject.org/archives/html/xen-devel/2014-12/msg01312.html Vitaly Kuznetsov (10): xen: introduce SHUTDOWN_soft_reset shutdown reason libxl: support SHUTDOWN_soft_reset shutdown reason xe

[Xen-devel] [PATCH v2] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Vitaly Kuznetsov
ted, kexec for the HW domain is being performed,...). Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index 94d4c53..923dffe 100644 --- a/xen/com

Re: [Xen-devel] [PATCH] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 23.04.15 at 12:39, wrote: >> --- a/xen/common/shutdown.c >> +++ b/xen/common/shutdown.c >> @@ -37,46 +37,36 @@ void hwdom_shutdown(u8 reason) >> switch ( reason ) >> { >> case SHUTDOWN_poweroff: >> -{ >> -printk("Domain 0 halted: halting m

[Xen-devel] [PATCH] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Vitaly Kuznetsov
hwdom_shutdown() operates with hardware domains, use the proper wording. Eliminate pointless braces from switch cases. Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/xen/common/shutdown.c b/xen

Re: [Xen-devel] [PATCH v9 10/15] tools/libxc: x86 HVM save code

2015-04-13 Thread Vitaly Kuznetsov
Andrew Cooper writes: > Save the x86 HVM specific parts of the domain. This is considerably simpler > than an x86 PV domain. Only the HVM_CONTEXT and HVM_PARAMS records are > needed. > > There is no need for any page normalisation. > > Signed-off-by: Andrew Cooper > CC: Ian Campbell > CC: Ian

Re: [Xen-devel] Redhat 6 VM crash on Xen when cpu number reaches 64

2015-03-26 Thread Vitaly Kuznetsov
"Ouyang Zhaowei (Charles)" writes: > Hi all: > > Now a days, we tested Redhat 6.2(6.4) on Xen(version 4.1.2). > If we config the cpu number more than 32, it'll show 32 in > the VM, and if we config it 64 cpus, the VM will crash and > the log is list below. > > Can someone tell us why is this happ

Re: [Xen-devel] Using kexec-crashdump with recent Xen and Linux HVM

2015-03-11 Thread Vitaly Kuznetsov
Stefan Bader writes: > After being asked about this I started to play around with Xen-4.4.1/4.5 > together with HVM Linux guest running 3.13/3.16/3.19. With mixed success. > Usually rather failing. > > From a bit of research most activity to enable things were back in 2011. There > was a bit of a

Re: [Xen-devel] Xen 4.6 Development Update

2015-02-16 Thread Vitaly Kuznetsov
writes: > Hi all > > We are now one month into 4.6 development window. This is an email to keep > track of all the patch series I gathered. It is by no means complete and / or > acurate. Feel free to reply this email with new projects or correct my > misunderstanding. Hi Wei, I have my "[PATCH

Re: [Xen-devel] support for more than 32 VCPUs when migrating PVHVM guest

2015-02-03 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: > On Mon, Feb 02, 2015 at 12:03:28PM +0100, Vitaly Kuznetsov wrote: >> Andrew Cooper writes: >> >> > On 02/02/15 10:47, Vitaly Kuznetsov wrote: >> >> Hi Konrad, >> >> >> >> I just hit an issue with PVHV

Re: [Xen-devel] support for more than 32 VCPUs when migrating PVHVM guest

2015-02-02 Thread Vitaly Kuznetsov
Andrew Cooper writes: > On 02/02/15 10:47, Vitaly Kuznetsov wrote: >> Hi Konrad, >> >> I just hit an issue with PVHVM guests after save/restore (or migration), >> if a PVHVM guest has > 32 VCPUs it hangs. Turns out, you saw it almost a >> yea

[Xen-devel] support for more than 32 VCPUs when migrating PVHVM guest

2015-02-02 Thread Vitaly Kuznetsov
Hi Konrad, I just hit an issue with PVHVM guests after save/restore (or migration), if a PVHVM guest has > 32 VCPUs it hangs. Turns out, you saw it almost a year ago and even wrote patches to call VCPUOP_register_vcpu_info after resume. Unfortunately these patches never made it to xen/kernel. Do y

Re: [Xen-devel] [PATCH 3/6] xen/arm: kernel: Move kernel loading code in init section

2015-01-16 Thread Vitaly Kuznetsov
Julien Grall writes: > The code to load the kernel is only used when Xen builds dom0. It > happens during the boot. I suppose we don't have dom0 kexec for ARM now or this code is not (won't be) required? -- Vitaly ___ Xen-devel mailing list Xen-de

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 13.01.15 at 17:17, wrote: >> Ian Campbell writes: >>> An alternative approach to this might be to walk the guest p2m (with >>> appropriate continuations) and move each domheap page (this would also >>> help us preserve super page mappings). It would also have the a

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Vitaly Kuznetsov
Ian Campbell writes: > On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: >> +gmfn = mfn_to_gmfn(d, mfn); > > (I haven't thought about it super hard, but I'm taking it as given that > this approach to kexec is going to be needed for ARM to

Re: [Xen-devel] [PATCH v5 0/9] toolstack-based approach to pvhvm guest kexec

2015-01-07 Thread Vitaly Kuznetsov
"Jan Beulich" writes: >>>> On 07.01.15 at 11:41, wrote: >> On 07/01/15 09:10, Olaf Hering wrote: >>> On Mon, Jan 05, Vitaly Kuznetsov wrote: >>> >>>> Wei Liu writes: >>>> >>>>> Olaf mentioned his concern abo

Re: [Xen-devel] [PATCH v5 0/9] toolstack-based approach to pvhvm guest kexec

2015-01-07 Thread Vitaly Kuznetsov
Olaf Hering writes: > On Mon, Jan 05, Vitaly Kuznetsov wrote: > >> Wei Liu writes: >> >> > Olaf mentioned his concern about handling ballooned pages in >> > <20141211153029.ga1...@aepfle.de>. Is that point moot now? >> >> Well, the l

[Xen-devel] [PATCH v2] x86/xen: avoid freeing static 'name' when kasprintf() fails

2015-01-05 Thread Vitaly Kuznetsov
ixed length string inside struct xen_clock_event_device. 16 bytes should be enough. Suggested-by: Laszlo Ersek Signed-off-by: Vitaly Kuznetsov --- Changes from v1 (David Vrabel): - add 'struct xen_clock_event_device *xevt' for covenience - sizeof(xevt->name) in snprintf() call - Sugges

[Xen-devel] [PATCH] x86/xen: avoid freeing static 'name' when kasprintf() fails

2015-01-05 Thread Vitaly Kuznetsov
ixed length string inside struct xen_clock_event_device. 16 bytes should be enough. The issue was discovered by Laszlo Ersek. Signed-off-by: Vitaly Kuznetsov --- arch/x86/xen/time.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/x86/xen/time.c b/arch/x86

Re: [Xen-devel] [PATCH v5 0/9] toolstack-based approach to pvhvm guest kexec

2015-01-05 Thread Vitaly Kuznetsov
Wei Liu writes: > Olaf mentioned his concern about handling ballooned pages in > <20141211153029.ga1...@aepfle.de>. Is that point moot now? Well, the limitation is real and some guest-side handling will be required in case we want to support kexec with ballooning. But as David validly mentioned

[Xen-devel] [PATCH v5 8/9] libxl: soft reset support

2014-12-11 Thread Vitaly Kuznetsov
Perform soft reset when a domain did SHUTDOWN_soft_reset. Migrate the content with xc_domain_soft_reset(), reload dm and toolstack. Signed-off-by: Vitaly Kuznetsov --- docs/man/xl.cfg.pod.5| 12 + tools/libxl/libxl.h | 6 +++ tools/libxl/libxl_create.c | 103

[Xen-devel] [PATCH v5 0/9] toolstack-based approach to pvhvm guest kexec

2014-12-11 Thread Vitaly Kuznetsov
*/ #define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */ +#define SHUTDOWN_soft_reset 5 /* Soft-reset for kexec. */ #endif /* __XEN_PUBLIC_SCHED_H__ */ Vitaly Kuznetsov (9): xen: introduce DOMDYING_locked state xen: introduce SHUTDOWN_soft_reset shutd

[Xen-devel] [PATCH v5 5/9] libxc: support XEN_DOMCTL_devour

2014-12-11 Thread Vitaly Kuznetsov
Introduce new xc_domain_devour() function to support XEN_DOMCTL_devour. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/include/xenctrl.h | 14 ++ tools/libxc/xc_domain.c | 13 + 2 files changed, 27 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools

[Xen-devel] [PATCH v5 6/9] libxl: add libxl__domain_soft_reset_destroy()

2014-12-11 Thread Vitaly Kuznetsov
structure to support the change. The original libxl_domain_destroy() function could be easily modified to support new flag but I'm trying to avoid that as it is part of public API. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl.c | 33 -

[Xen-devel] [PATCH v5 1/9] xen: introduce DOMDYING_locked state

2014-12-11 Thread Vitaly Kuznetsov
New dying state is requred to indicate that a particular domain is dying but cleanup procedure wasn't started. This state can be set from outside of domain_kill(). Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 1 + xen/include/xen/sched.h | 3 ++- 2 files changed, 3 inser

[Xen-devel] [PATCH v5 7/9] libxc: introduce soft reset for HVM domains

2014-12-11 Thread Vitaly Kuznetsov
estore HVM context, HVM params, seed grant table. After that the domain resumes execution from where SHUTDOWN_soft_reset was called. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/Makefile | 1 + tools/libxc/include/xenguest.h | 20 +++ tools/libxc/xc_domain_soft_res

[Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2014-12-11 Thread Vitaly Kuznetsov
New operation sets the 'recipient' domain which will receive all memory pages from a particular domain and kills the original domain. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 3 +++ xen/common/domctl.c | 33 +

[Xen-devel] [PATCH v5 3/9] libxl: support SHUTDOWN_soft_reset shutdown reason

2014-12-11 Thread Vitaly Kuznetsov
Use letter 't' to indicate a domain in such state. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 2 +- tools/python/xen/lowlevel/xl/xl.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/t

[Xen-devel] [PATCH v5 2/9] xen: introduce SHUTDOWN_soft_reset shutdown reason

2014-12-11 Thread Vitaly Kuznetsov
Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 7 +++ xen/include/public/sched.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index 94d4c53..5c3a158 100644 --- a/xen/common/shutdown.c +++ b/xen/common

[Xen-devel] [PATCH v5 9/9] xsm: add XEN_DOMCTL_devour support

2014-12-11 Thread Vitaly Kuznetsov
Signed-off-by: Vitaly Kuznetsov --- xen/common/domctl.c | 6 ++ xen/include/xsm/dummy.h | 6 ++ xen/include/xsm/xsm.h | 6 ++ xen/xsm/dummy.c | 1 + xen/xsm/flask/hooks.c | 17 + xen/xsm

[Xen-devel] [PATCH v2] xen/blkfront: remove redundant flush_op

2014-12-09 Thread Vitaly Kuznetsov
flush_op is unambiguously defined by feature_flush: REQ_FUA | REQ_FLUSH -> BLKIF_OP_WRITE_BARRIER REQ_FLUSH -> BLKIF_OP_FLUSH_DISKCACHE 0 -> 0 and thus can be removed. This is just a cleanup. The patch was suggested by Boris Ostrovsky. Signed-off-by: Vitaly Kuznetsov --

[Xen-devel] [PATCH] xen/blkfront: remove redundant flush_op

2014-12-08 Thread Vitaly Kuznetsov
flush_op is unambiguously defined by feature_flush: REQ_FUA | REQ_FLUSH -> BLKIF_OP_WRITE_BARRIER REQ_FLUSH -> BLKIF_OP_FLUSH_DISKCACHE 0 -> 0 and thus can be removed. This is just a cleanup. The patch was suggested by Boris Ostrovsky. Signed-off-by: Vitaly Kuznetsov ---

Re: [Xen-devel] [PATCH v4 8/9] libxl: soft reset support

2014-12-05 Thread Vitaly Kuznetsov
Wei Liu writes: > (I've skipped the internal implementation since I don't know what's > required to fulfil soft reset.) > > On Wed, Dec 03, 2014 at 06:16:20PM +0100, Vitaly Kuznetsov wrote: > [...] >> + libxl__domain_

Re: [Xen-devel] [PATCH v4 4/9] xen: introduce XEN_DOMCTL_devour

2014-12-04 Thread Vitaly Kuznetsov
Julien Grall writes: > Hi Vitaly, > > On 03/12/2014 17:16, Vitaly Kuznetsov wrote: >> New operation sets the 'recipient' domain which will recieve all > > s/recieve/receive/ > >> memory pages from a particular domain and kills the original domai

Re: [Xen-devel] [PATCH v4 4/9] xen: introduce XEN_DOMCTL_devour

2014-12-04 Thread Vitaly Kuznetsov
Julien Grall writes: > On 03/12/2014 17:16, Vitaly Kuznetsov wrote: >> diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h >> index a42d0b8..552e4a3 100644 >> --- a/xen/include/xen/sched.h >> +++ b/xen/include/xen/sched.h >> @@ -366,6 +366,8

Re: [Xen-devel] [PATCH v4 0/9] toolstack-based approach to pvhvm guest kexec

2014-12-04 Thread Vitaly Kuznetsov
Wei Liu writes: > On Wed, Dec 03, 2014 at 06:16:12PM +0100, Vitaly Kuznetsov wrote: >> Changes from RFCv3: >> This is the first non-RFC series as no major concerns were expressed. I'm >> trying >> to address Jan's comments. Changes are: >&

Re: [Xen-devel] [PATCH v4 0/9] toolstack-based approach to pvhvm guest kexec

2014-12-04 Thread Vitaly Kuznetsov
Olaf Hering writes: > On Wed, Dec 03, Vitaly Kuznetsov wrote: > >> Original description: >> >> When a PVHVM linux guest performs kexec there are lots of things which >> require taking care of: >> - shared info, vcpu_info >> - grants >> - event ch

[Xen-devel] [PATCH v4 2/9] xen: introduce SHUTDOWN_soft_reset shutdown reason

2014-12-03 Thread Vitaly Kuznetsov
Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 7 +++ xen/include/public/sched.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index 94d4c53..5c3a158 100644 --- a/xen/common/shutdown.c +++ b/xen/common

[Xen-devel] [PATCH v4 6/9] libxl: add libxl__domain_soft_reset_destroy_old()

2014-12-03 Thread Vitaly Kuznetsov
libxl__domain_destroy_state structure to support the change. The original libxl_domain_destroy() function could be easily modified to support new flag but I'm trying to avoid that as it is part of public API. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl.c | 32 +++-

[Xen-devel] [PATCH v4 5/9] libxc: support XEN_DOMCTL_devour

2014-12-03 Thread Vitaly Kuznetsov
Introduce new xc_domain_devour() function to support XEN_DOMCTL_devour. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/include/xenctrl.h | 14 ++ tools/libxc/xc_domain.c | 13 + 2 files changed, 27 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools

[Xen-devel] [PATCH v4 9/9] xsm: add XEN_DOMCTL_devour support

2014-12-03 Thread Vitaly Kuznetsov
Signed-off-by: Vitaly Kuznetsov --- xen/common/domctl.c | 6 ++ xen/include/xsm/dummy.h | 6 ++ xen/include/xsm/xsm.h | 6 ++ xen/xsm/dummy.c | 1 + xen/xsm/flask/hooks.c | 17 + xen/xsm

[Xen-devel] [PATCH v4 4/9] xen: introduce XEN_DOMCTL_devour

2014-12-03 Thread Vitaly Kuznetsov
New operation sets the 'recipient' domain which will recieve all memory pages from a particular domain and kills the original domain. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 3 +++ xen/common/domctl.c | 33 +

[Xen-devel] [PATCH v4 0/9] toolstack-based approach to pvhvm guest kexec

2014-12-03 Thread Vitaly Kuznetsov
time expired. */ +#define SHUTDOWN_soft_reset 5 /* Soft-reset for kexec. */ #endif /* __XEN_PUBLIC_SCHED_H__ */ Vitaly Kuznetsov (9): xen: introduce DOMDYING_locked state xen: introduce SHUTDOWN_soft_reset shutdown reason libxl: support SHUTDOWN_soft_reset sh

[Xen-devel] [PATCH v4 1/9] xen: introduce DOMDYING_locked state

2014-12-03 Thread Vitaly Kuznetsov
New dying state is requred to indicate that a particular domain is dying but cleanup procedure wasn't started. This state can be set from outside of domain_kill(). Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c | 1 + xen/include/xen/sched.h | 3 ++- 2 files changed, 3 inser

[Xen-devel] [PATCH v4 7/9] libxc: introduce soft reset for HVM domains

2014-12-03 Thread Vitaly Kuznetsov
estore HVM context, HVM params, seed grant table. After that the domain resumes execution from where SHUTDOWN_soft_reset was called. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/Makefile | 1 + tools/libxc/include/xenguest.h | 20 +++ tools/libxc/xc_domain_soft_res

[Xen-devel] [PATCH v4 3/9] libxl: support SHUTDOWN_soft_reset shutdown reason

2014-12-03 Thread Vitaly Kuznetsov
Use letter 't' to indicate a domain in such state. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 2 +- tools/python/xen/lowlevel/xl/xl.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/t

[Xen-devel] [PATCH v4 8/9] libxl: soft reset support

2014-12-03 Thread Vitaly Kuznetsov
Perform soft reset when a domain did SHUTDOWN_soft_reset. Migrate the content with xc_domain_soft_reset(), reload dm and toolstack. Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl.h | 6 +++ tools/libxl/libxl_create.c | 103 +++ tools

Re: [Xen-devel] [PATCH RESEND] xen/blkfront: improve protection against issuing unsupported REQ_FUA

2014-12-03 Thread Vitaly Kuznetsov
Boris Ostrovsky writes: > On 12/01/2014 08:01 AM, Vitaly Kuznetsov wrote: >> Guard against issuing unsupported REQ_FUA and REQ_FLUSH was introduced >> in d11e61583 and was factored out into blkif_request_flush_valid() in >> 0f1ca65ee. However: >> 1) This chec

[Xen-devel] [PATCH] libxc: check in xc_get_tot_pages() that the proper domain is reported

2014-12-02 Thread Vitaly Kuznetsov
case the requested domain was destroyed it will report first domain with domid > requested domid which is apparently misleading as there is no way xc_get_tot_pages() callers can figure out that they got tot_pages for some other domain. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/xc_private.c |

[Xen-devel] [PATCH RESEND] xen/blkfront: improve protection against issuing unsupported REQ_FUA

2014-12-01 Thread Vitaly Kuznetsov
issues. This patch is based on the original patch by Laszlo Ersek and a comment by Jeff Moyer. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Laszlo Ersek --- drivers/block/xen-blkfront.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/block/xen-blkfront.c

Re: [Xen-devel] [PATCH RFCv3 3/8] xen: introduce XEN_DOMCTL_set_recipient

2014-11-25 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 25.11.14 at 16:41, wrote: >> "Jan Beulich" writes: >> On 07.10.14 at 15:10, wrote: @@ -1764,11 +1765,28 @@ void free_domheap_pages(struct page_info *pg, unsigned int order) scrub = 1; } -if ( unlik

Re: [Xen-devel] [PATCH RFCv3 3/8] xen: introduce XEN_DOMCTL_set_recipient

2014-11-25 Thread Vitaly Kuznetsov
"Jan Beulich" writes: Thanks for the review! On 07.10.14 at 15:10, wrote: >> New operation sets the 'recipient' domain which will recieve all >> memory pages from a particular domain when these pages are freed. > >> --- a/xen/common/domctl.c >> +++ b/xen/common/domctl.c >> @@ -1152,6 +1152

<    1   2   3   4