Re: [Xen-devel] [PATCH] xen/pvhvm: add soft reset on kexec/kdump support

2015-09-25 Thread Vitaly Kuznetsov
Boris Ostrovsky writes: > On 09/25/2015 09:59 AM, Konrad Rzeszutek Wilk wrote: >> On Fri, Sep 25, 2015 at 11:59:52AM +0200, Vitaly Kuznetsov wrote: >>> Currently there is a number of issues preventing PVHVM Xen guests from >>> doing successful kexec/kdump:

[Xen-devel] [PATCH] xen/pvhvm: add soft reset on kexec/kdump support

2015-09-25 Thread Vitaly Kuznetsov
obably OK as by default all unknown shutdown reasons cause domain destroy with a message in toolstack log: 'Unknown shutdown reason code 5. Destroying domain.' which gives a clue to what the problem is and eliminates false expectations. Signed-off-by: Vitaly Kuznetsov --- arch/x86/

[Xen-devel] [PATCH v12 0/1] toolstack-assisted approach to PVHVM guest kexec

2015-09-21 Thread Vitaly Kuznetsov
v11 of the 'toolstack-assisted approach to pvhvm guest kexec' is available here: http://lists.xenproject.org/archives/html/xen-devel/2015-09/msg00547.html Vitaly Kuznetsov (1): (lib)xl: soft reset support docs/man/xl.cfg.pod.5| 8 +- tools/libxl/libxl.c

[Xen-devel] [PATCH v12 1/1] (lib)xl: soft reset support

2015-09-21 Thread Vitaly Kuznetsov
Use existing create/restore path to perform 'soft reset' for HVM domains. Tear everything down, e.g. destroy domain's device model, remove the domain from xenstore, save toolstack record and start over. Signed-off-by: Vitaly Kuznetsov --- Changes since v11: - Minor descri

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

2015-09-14 Thread Vitaly Kuznetsov
Wei Liu writes: > Sorry for the delay. > > FYI all other patches of this series were applied by Jan. You only need > to resend this one. Cool, I will. > > See below for a few comments. > > On Fri, Sep 04, 2015 at 03:39:51PM +0200, Vitaly Kuznetsov wrote: >> Use e

[Xen-devel] [PATCH v11 10/11] libxl: add LIBXL_DEVICE_MODEL_SAVE_FILE

2015-09-04 Thread Vitaly Kuznetsov
Use this in libxl_dm instead of hard-coding. Signed-off-by: Vitaly Kuznetsov Acked-by: Ian Campbell --- Changes since v10: - s,XC,LIBXL,g to meet the XC_DEVICE_MODEL_RESTORE_FILE -> LIBXL_DEVICE_MODEL_RESTORE_FILE change. --- tools/libxl/libxl_dm.c | 2 +- tools/libxl/libxl_interna

[Xen-devel] [PATCH v11 03/11] xl: introduce enum domain_restart_type

2015-09-04 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 Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk --- Changes since v10: - None. --- tools/libxl/xl.h | 6 ++ tools/libxl/xl_cmdimpl.c | 23

[Xen-devel] [PATCH v11 07/11] flask: DOMCTL_soft_reset support

2015-09-04 Thread Vitaly Kuznetsov
Add new soft_reset vector to domain2 class, add it to create_domain in the default policy. Signed-off-by: Vitaly Kuznetsov Acked-by: Daniel De Graaf --- Changes since v10: - None. --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- xen/xsm/flask/hooks.c| 3 +++ xen

[Xen-devel] [PATCH v11 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-09-04 Thread Vitaly Kuznetsov
New domctl resets state for a domain allowing it to 'start over': register vcpu_info, switch to FIFO ABI for event channels. Still active grants are being logged to help debugging misbehaving backends. Signed-off-by: Vitaly Kuznetsov Acked-by: Jan Beulich --- Changes since v10: - r

[Xen-devel] [PATCH v11 09/11] libxc: support XEN_DOMCTL_soft_reset operation

2015-09-04 Thread Vitaly Kuznetsov
Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov Acked-by: Wei Liu Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Ian Jackson --- Changes since v10: - None. --- tools/libxc/include/xenctrl.h | 3 +++ tools/libxc/xc_domain.c | 9

[Xen-devel] [PATCH v11 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-09-04 Thread Vitaly Kuznetsov
ckends can cause a domain to crash right after the soft reset operation and 'g' option won't be available in this case. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Jan Beulich --- Changes since v10: - None. --- xen/commo

[Xen-devel] [PATCH v11 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-09-04 Thread Vitaly Kuznetsov
This special type of shutdown is supposed to be used by PVHVM guests when they want to perform some sort of kexec/kdump. Signed-off-by: Vitaly Kuznetsov Acked-by: Jan Beulich Reviewed-by: Konrad Rzeszutek Wilk --- Changes since v10: - None --- xen/common/shutdown.c | 6 ++ xen

[Xen-devel] [PATCH v11 11/11] (lib)xl: soft reset support

2015-09-04 Thread Vitaly Kuznetsov
Use existing create/restore path to perform 'soft reset' for HVM domains. Tear everything down, e.g. destroy domain's device model, remove the domain from xenstore, save toolstack record and start over. Signed-off-by: Vitaly Kuznetsov --- Changes since v10: - Adapt to 'm

[Xen-devel] [PATCH v11 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-09-04 Thread Vitaly Kuznetsov
x86-specific hook cleans up the pirq-emuirq mappings, destroys all ioreq servers and and replaces the shared_info frame with an empty page to support subsequent XENMAPSPACE_shared_info call. ARM-specific hook is -ENOSYS for now. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk

[Xen-devel] [PATCH v11 02/11] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-09-04 Thread Vitaly Kuznetsov
Use letter 'S' to indicate a domain in such state. Introduce new 'on_soft_reset' action and default it to 'restart' for now. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu --- Changes since v10: - Add Acked-by: Wei Liu - Add

[Xen-devel] [PATCH v11 04/11] xen: evtchn: make evtchn_reset() ready for soft reset

2015-09-04 Thread Vitaly Kuznetsov
We need to close all event channel so the domain performing soft reset will be able to open them back. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Jan Beulich --- Changes since v10: - None. --- xen/common/event_channel.c | 43

[Xen-devel] [PATCH v11 00/11] toolstack-assisted approach to PVHVM guest kexec

2015-09-04 Thread Vitaly Kuznetsov
aware of this special page. grant_table_warn_active_grants() is required to find possible misbehaving backends in future. v10 of the 'toolstack-assisted approach to pvhvm guest kexec' is available here: http://lists.xen.org/archives/html/xen-devel/2015-07/msg05054.html Vitaly

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

2015-09-01 Thread Vitaly Kuznetsov
Wei Liu writes: > [...] >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl >> index 9f6ec00..87d8255 100644 >> --- a/tools/libxl/libxl_types.idl >> +++ b/tools/libxl/libxl_types.idl >> @@ -138,6 +138,8 @@ libxl_action_on_shutdown = >> Enumeration("action_on_shutdown", [ >>

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

2015-09-01 Thread Vitaly Kuznetsov
Wei Liu writes: [skip] >> >> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c >> index ff0d616..5f5559b 100644 >> --- a/tools/libxl/libxl.c >> +++ b/tools/libxl/libxl.c >> @@ -1478,6 +1478,7 @@ void libxl__domain_destroy(libxl__egc *egc, >> libxl__domain_destroy_state *dds) >>

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

2015-08-14 Thread Vitaly Kuznetsov
"Ouyangzhaowei (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 w

Re: [Xen-devel] Failure to boot HVM guest with more than 32 VCPUS

2015-08-13 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: > On August 13, 2015 4:20:11 AM EDT, Vitaly Kuznetsov > wrote: >>"Hao, Xudong" writes: >> >>>> -Original Message- >>>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >>>> Sent: Wedn

Re: [Xen-devel] Failure to boot HVM guest with more than 32 VCPUS

2015-08-13 Thread Vitaly Kuznetsov
"Hao, Xudong" writes: > > Attach the Fedora22 log, a different issue. > Here is the crash: [ 6399.814801] xen_netfront: Initialising Xen virtual ethernet driver [ 6399.814838] [drm] Initialized drm 1.1.0 20060810 [ 6399.838500] xen_netfront: can't alloc rx grant refs [ 6399.838504] net eth0: on

Re: [Xen-devel] Failure to boot HVM guest with more than 32 VCPUS

2015-08-13 Thread Vitaly Kuznetsov
"Hao, Xudong" writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Wednesday, August 12, 2015 5:40 PM >> To: Hao, Xudong >> Cc: xen-devel@lists.xen.org >> Subject: Re: [Xen-devel] Failure to boot HV

Re: [Xen-devel] Failure to boot HVM guest with more than 32 VCPUS

2015-08-12 Thread Vitaly Kuznetsov
"Hao, Xudong" writes: > Hi, > > In X86_64 platform, we noticed an issue that Xen boot a RHEL6u6 or > Fedora22 guest, when configure the VCPU more than 32, the guest will > fail to boot up. The issue is well-known for RHEL6.6 (and is fixed in 6.7 and in 6.6.z) but Fedora22 should boot. The log b

Re: [Xen-devel] [PATCH v10 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-08-12 Thread Vitaly Kuznetsov
"Jan Beulich" writes: >>>> On 11.08.15 at 21:57, wrote: >> On Tue, Jul 28, 2015 at 03:28:11PM +0200, Vitaly Kuznetsov wrote: >>> @@ -1038,6 +1045,32 @@ void domain_unpause_except_self(struct domain *d) >>> domain_unpause(d); >>&g

Re: [Xen-devel] [RFC for-4.7] Switching to a single qemu tree each per qemu-xen and qemu-trad

2015-07-30 Thread Vitaly Kuznetsov
Ian Campbell writes: > (CC-ing 2x QEMU maintainers and stable release manager) > > The separate trees are a holdover from mercurial, which didn't (at the > time) have a good in-repo branching model. > > I propose that Xen 4.6 should be the last release which uses these split > trees and that inst

[Xen-devel] [PATCH v10 02/11] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-07-28 Thread Vitaly Kuznetsov
Use letter 'S' to indicate a domain in such state. Introduce new 'on_soft_reset' action and default it to 'restart' for now. Signed-off-by: Vitaly Kuznetsov --- Changes since v9: - None --- docs/man/xl.cfg.pod.5 | 5 + tools/libxl/libxl_types.

[Xen-devel] [PATCH v10 10/11] libxc: add XC_DEVICE_MODEL_SAVE_FILE

2015-07-28 Thread Vitaly Kuznetsov
Use this in libxl_dm instead of hard-coding. Signed-off-by: Vitaly Kuznetsov Acked-by: Ian Campbell --- Changes since v9: - None --- tools/libxc/include/xenguest.h | 2 ++ tools/libxl/libxl_dm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxc/include

[Xen-devel] [PATCH v10 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-07-28 Thread Vitaly Kuznetsov
ckends can cause a domain to crash right after the soft reset operation and 'g' option won't be available in this case. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Jan Beulich --- Changes since v9: - Add Reviewed-by: [Konrad Rzeszutek Wilk] - Do not

[Xen-devel] [PATCH v10 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-28 Thread Vitaly Kuznetsov
x86-specific hook cleans up the pirq-emuirq mappings, destroys all ioreq servers and and replaces the shared_info frame with an empty page to support subsequent XENMAPSPACE_shared_info call. ARM-specific hook is -ENOSYS for now. Signed-off-by: Vitaly Kuznetsov --- Changes since v9

[Xen-devel] [PATCH v10 03/11] xl: introduce enum domain_restart_type

2015-07-28 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 Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk --- Changes since v9: - None. --- tools/libxl/xl.h | 6 ++ tools/libxl/xl_cmdimpl.c | 23

[Xen-devel] [PATCH v10 11/11] (lib)xl: soft reset support

2015-07-28 Thread Vitaly Kuznetsov
Use existing create/restore path to perform 'soft reset' for HVM domains. Tear everything down, e.g. destroy domain's device model, remove the domain from xenstore, save toolstack record and start over. Signed-off-by: Vitaly Kuznetsov --- Changes since v9: - s,reset,Reset,

[Xen-devel] [PATCH v10 09/11] libxc: support XEN_DOMCTL_soft_reset operation

2015-07-28 Thread Vitaly Kuznetsov
Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov Acked-by: Wei Liu Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Ian Jackson --- Changes since v9: - None. --- tools/libxc/include/xenctrl.h | 3 +++ tools/libxc/xc_domain.c | 9

[Xen-devel] [PATCH v10 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-07-28 Thread Vitaly Kuznetsov
New domctl resets state for a domain allowing it to 'start over': register vcpu_info, switch to FIFO ABI for event channels. Still active grants are being logged to help debugging misbehaving backends. Signed-off-by: Vitaly Kuznetsov Acked-by: Jan Beulich --- Changes since v9

[Xen-devel] [PATCH v10 04/11] xen: evtchn: make evtchn_reset() ready for soft reset

2015-07-28 Thread Vitaly Kuznetsov
We need to close all event channel so the domain performing soft reset will be able to open them back. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Jan Beulich --- Changes since v9: - Add Reviewed-by: [Konrad Rzeszutek Wilk] - Add Acked-by: [Jan Beulich

[Xen-devel] [PATCH v10 00/11] toolstack-assisted approach to PVHVM guest kexec

2015-07-28 Thread Vitaly Kuznetsov
est kexec' is available here: http://lists.xen.org/archives/html/xen-devel/2015-07/msg03377.html Vitaly Kuznetsov (11): xen: introduce SHUTDOWN_soft_reset shutdown reason libxl: support SHUTDOWN_soft_reset shutdown reason xl: introduce enum domain_restart_type xen: evtchn: make evtchn_r

[Xen-devel] [PATCH v10 07/11] flask: DOMCTL_soft_reset support

2015-07-28 Thread Vitaly Kuznetsov
Add new soft_reset vector to domain2 class, add it to create_domain in the default policy. Signed-off-by: Vitaly Kuznetsov Acked-by: Daniel De Graaf --- Changes since v9: - None. --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- xen/xsm/flask/hooks.c| 3 +++ xen

[Xen-devel] [PATCH v10 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-07-28 Thread Vitaly Kuznetsov
This special type of shutdown is supposed to be used by PVHVM guests when they want to perform some sort of kexec/kdump. Signed-off-by: Vitaly Kuznetsov Acked-by: Jan Beulich Reviewed-by: Konrad Rzeszutek Wilk --- Changes since v9: - add Reviewed-by: [Konrad Rzeszutek Wilk] - minor comment

Re: [Xen-devel] [PATCH v9 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-24 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 16.07.15 at 18:27, wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -704,6 +704,90 @@ void arch_domain_unpause(struct domain *d) >> viridian_time_ref_count_thaw(d); >> } >> >> +int arch_domain_soft_reset(struct domain *d) >> +{

Re: [Xen-devel] [PATCH v9 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-07-17 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: >> >> @@ -1010,6 +1017,29 @@ int domain_unpause_by_systemcontroller(struct domain >> *d) >> return 0; >> } >> >> +int domain_soft_reset(struct domain *d) >> +{ >> +struct vcpu *v; >> +int rc; >> + >> +spin_lock(&d->shutdown_lock); >> +for_e

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

2015-07-17 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: ... >> +return AO_CREATE_FAIL(ERROR_FAIL); >> +} >> + >> +/* >> + * On the domain creation path it will be introduced to xenstore > > What is 'it'? > The domain :-) >> + * with (probably) different store/console channels so we need to >> +

[Xen-devel] [PATCH v9 11/11] (lib)xl: soft reset support

2015-07-16 Thread Vitaly Kuznetsov
Use existing create/restore path to perform 'soft reset' for HVM domains. Tear everything down, e.g. destroy domain's device model, remove the domain from xenstore, save toolstack record and start over. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Pause/unpase the do

[Xen-devel] [PATCH v9 10/11] libxc: add XC_DEVICE_MODEL_SAVE_FILE

2015-07-16 Thread Vitaly Kuznetsov
Use this in libxl_dm instead of hard-coding. Signed-off-by: Vitaly Kuznetsov Acked-by: Ian Campbell --- Changes since v8: - None --- tools/libxc/include/xenguest.h | 2 ++ tools/libxl/libxl_dm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxc/include

[Xen-devel] [PATCH v9 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-16 Thread Vitaly Kuznetsov
x86-specific hook cleans up the pirq-emuirq mappings, destroys all ioreq servers and and replaces the shared_info frame with an empty page to support subsequent XENMAPSPACE_shared_info call. ARM-specific hook is -ENOSYS for now. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Comments

[Xen-devel] [PATCH v9 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-07-16 Thread Vitaly Kuznetsov
New domctl resets state for a domain allowing it to 'start over': register vcpu_info, switch to FIFO ABI for event channels. Still active grants are being logged to help debugging misbehaving backends. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Introduce vcpu_info_rese

[Xen-devel] [PATCH v9 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-07-16 Thread Vitaly Kuznetsov
This special type of shutdown is supposed to be used by PVHVM guests when they want to perform some sort of kexec/kdump. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - describe the expected behavior for 'soft reset' [Ian Jackson] --- xen/common/shutdown.c | 6 ++ x

[Xen-devel] [PATCH v9 09/11] libxc: support XEN_DOMCTL_soft_reset operation

2015-07-16 Thread Vitaly Kuznetsov
Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov Acked-by: Wei Liu Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Ian Jackson --- Changes since v8: - Add Wei's A-b. - Add Konrad's R-b. - Add Ian J A-b. --- tools/libxc/include

[Xen-devel] [PATCH v9 03/11] xl: introduce enum domain_restart_type

2015-07-16 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 Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk --- Changes since v8: - add Konrad's R-b Changes since v7: - s,restarter,restarted, [Ian Cam

[Xen-devel] [PATCH v9 00/11] toolstack-assisted approach to PVHVM guest kexec

2015-07-16 Thread Vitaly Kuznetsov
d to find possible misbehaving backends in future. v8 of the 'toolstack-assisted approach to pvhvm guest kexec' is available here: http://lists.xen.org/archives/html/xen-devel/2015-06/msg03632.html Vitaly Kuznetsov (11): xen: introduce SHUTDOWN_soft_reset shutdown reason libxl:

[Xen-devel] [PATCH v9 07/11] flask: DOMCTL_soft_reset support

2015-07-16 Thread Vitaly Kuznetsov
Add new soft_reset vector to domain2 class, add it to create_domain in the default policy. Signed-off-by: Vitaly Kuznetsov Acked-by: Daniel De Graaf --- Changes since v8: - Add Daniel's A-b. --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- xen/xsm/flask/ho

[Xen-devel] [PATCH v9 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-07-16 Thread Vitaly Kuznetsov
ckends can cause a domain to crash right after the soft reset operation and 'g' option won't be available in this case. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Use WARN_GRANT_MAX define instead of hardcoded 10 [Konrad Rzeszutek Wilk] - Update commit message explaining

[Xen-devel] [PATCH v9 04/11] xen: evtchn: make evtchn_reset() ready for soft reset

2015-07-16 Thread Vitaly Kuznetsov
We need to close all event channel so the domain performing soft reset will be able to open them back. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Check !d->controller_pause_count instead of pausing/unpausing the domain in evtchn_reset(). [Konrad Rzeszutek Wilk] --- xen/com

[Xen-devel] [PATCH v9 02/11] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-07-16 Thread Vitaly Kuznetsov
Use letter 'S' to indicate a domain in such state. Introduce new 'on_soft_reset' action and default it to 'restart' for now. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Introduce on_soft_reset here (moved from PATCH 11) [Ian Jackson] --- docs/man

Re: [Xen-devel] [PATCH v8 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-16 Thread Vitaly Kuznetsov
Julien Grall writes: > Hi Vitaly, > > On 23/06/2015 18:11, Vitaly Kuznetsov wrote: >> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c >> index 24b8938..c112afa 100644 >> --- a/xen/arch/arm/domain.c >> +++ b/xen/arch/arm/domain.c >> @@ -653,6 +65

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

2015-07-15 Thread Vitaly Kuznetsov
Ian Jackson writes: > Vitaly Kuznetsov writes ("[PATCH v8 11/11] (lib)xl: soft reset support"): >> Use existing create/restore path to perform 'soft reset' for HVM domains. >> Tear everything down, e.g. destroy domain's device model, remove the domain >

Re: [Xen-devel] [PATCH v8 02/11] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-07-15 Thread Vitaly Kuznetsov
Ian Jackson writes: > Konrad Rzeszutek Wilk writes ("Re: [PATCH v8 02/11] libxl: support > SHUTDOWN_soft_reset shutdown reason"): >> On Tue, Jun 23, 2015 at 06:11:44PM +0200, Vitaly Kuznetsov wrote: >> > Use letter 'S' to indicate a domain in suc

Re: [Xen-devel] [PATCH v8 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-07-15 Thread Vitaly Kuznetsov
Ian Jackson writes: > Konrad Rzeszutek Wilk writes ("Re: [PATCH v8 01/11] xen: introduce > SHUTDOWN_soft_reset shutdown reason"): >> On Tue, Jun 23, 2015 at 06:11:43PM +0200, Vitaly Kuznetsov wrote: >> > This special type of shutdown is supposed to be used by PVHV

Re: [Xen-devel] [PATCH v8 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-14 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: > On Tue, Jul 14, 2015 at 05:52:44PM +0200, Vitaly Kuznetsov wrote: >> Konrad Rzeszutek Wilk writes: >> >> > On Tue, Jun 23, 2015 at 06:11:50PM +0200, Vitaly Kuznetsov wrote: >> >> ... >> >> &g

Re: [Xen-devel] [PATCH v8 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-14 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: > On Tue, Jun 23, 2015 at 06:11:50PM +0200, Vitaly Kuznetsov wrote: >> ... >> >> +int arch_domain_soft_reset(struct domain *d) >> +{ >> +struct page_info *page = virt_to_page(d->shared_info), *new_page; >> +

Re: [Xen-devel] [PATCH v8 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-07-13 Thread Vitaly Kuznetsov
Konrad Rzeszutek Wilk writes: > On Tue, Jun 23, 2015 at 06:11:47PM +0200, Vitaly Kuznetsov wrote: >> Log first 10 active grants of a domain. This function is going to be used >> for soft reset, active grants on this path usually mean misbehaving backends >> refusing to rele

Re: [Xen-devel] [PATCH v8 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-07-13 Thread Vitaly Kuznetsov
"Jan Beulich" writes: >>>> On 13.07.15 at 11:08, wrote: >> On Mon, 2015-07-13 at 09:45 +0100, Jan Beulich wrote: >>> >>> On 10.07.15 at 18:24, wrote: >>> > On Tue, Jun 23, 2015 at 06:11:47PM +0200, Vitaly Kuznetsov wrote: >>> &

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

2015-07-02 Thread Vitaly Kuznetsov
mem_access on ARM) interfaces to using gft_t instead of unsigned long and update all users of these functions. There is also an issue in p2m_get_mem_access on x86: 'gfn' parameter passed to gfn_lock/gfn_unlock is not defined. This code compiles only because of a coincidence: gfn_lock/gfn

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

2015-07-02 Thread Vitaly Kuznetsov
George Dunlap writes: > On 07/02/2015 12:25 PM, Tim Deegan wrote: >> At 12:09 +0100 on 02 Jul (1435838956), Andrew Cooper wrote: >>> On 02/07/15 11:48, George Dunlap wrote: Now in p2m_set_mem_access(), rather than just using an unsigned long in the loop iterating over gfns, you do this

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

2015-06-29 Thread Vitaly Kuznetsov
mem_access on ARM) interfaces to using gft_t instead of unsigned long and update all users of these functions. There is also an issue in p2m_get_mem_access on x86: 'gfn' parameter passed to gfn_lock/gfn_unlock is not defined. This code compiles only because of a coincidence: gfn_lock/gfn

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

2015-06-29 Thread Vitaly Kuznetsov
Andrew Cooper writes: > On 26/06/15 16:17, Vitaly Kuznetsov wrote: >> 'pfn' and 'start_pfn' are ambiguous, both these functions expect GFNs as >> input. >> >> On x86 the interface of p2m_set_mem_access() in p2m.c doesn't match the >> dec

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

2015-06-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 --- Changes since v2: - Instead of adding start_ prefix on ARM remov

Re: [Xen-devel] Xen 4.6 Development Update (2 WEEKS TO FREEZE, important information in preamble)

2015-06-26 Thread Vitaly Kuznetsov
writes: > * toolstack-based approach to pvhvm guest kexec (fair) >also contains hypervisor side change, v6 > - Vitaly Kuznetsov it is already "[PATCH v8 00/11] toolstack-assisted approach to PVHVM guest kexec" waiting for reviews and (IMHO) 'ok' (as I

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

2015-06-23 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 26.05.15 at 15:32, wrote: >> --- a/xen/arch/arm/p2m.c >> +++ b/xen/arch/arm/p2m.c >> @@ -1709,9 +1709,9 @@ bool_t p2m_mem_access_check(paddr_t gpa, vaddr_t gla, >> const struct npfec npfec) >> >> /* >> * Set access type for a region of pfns. >> - * If start_pf

[Xen-devel] [PATCH v8 03/11] xl: introduce enum domain_restart_type

2015-06-23 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 Acked-by: Ian Campbell --- Changes since v7: - s,restarter,restarted, [Ian Campbell] --- tools/libxl/xl.h | 6 ++ tools/libxl/xl_cmdimpl.c | 23

[Xen-devel] [PATCH v8 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-06-23 Thread Vitaly Kuznetsov
Log first 10 active grants of a domain. This function is going to be used for soft reset, active grants on this path usually mean misbehaving backends refusing to release their mappings on shutdown. Signed-off-by: Vitaly Kuznetsov --- xen/common/grant_table.c | 31

[Xen-devel] [PATCH v8 04/11] xen: evtchn: make evtchn_reset() ready for soft reset

2015-06-23 Thread Vitaly Kuznetsov
We need to close all event channel so the domain performing soft reset will be able to open them back. Signed-off-by: Vitaly Kuznetsov --- xen/common/event_channel.c | 38 +++--- xen/include/xen/event.h| 3 +++ 2 files changed, 22 insertions(+), 19 deletions

[Xen-devel] [PATCH v8 09/11] libxc: support XEN_DOMCTL_soft_reset operation

2015-06-23 Thread Vitaly Kuznetsov
Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov --- tools/libxc/include/xenctrl.h | 3 +++ tools/libxc/xc_domain.c | 9 + 2 files changed, 12 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include

[Xen-devel] [PATCH v8 11/11] (lib)xl: soft reset support

2015-06-23 Thread Vitaly Kuznetsov
Use existing create/restore path to perform 'soft reset' for HVM domains. Tear everything down, e.g. destroy domain's device model, remove the domain from xenstore, save toolstack record and start over. Signed-off-by: Vitaly Kuznetsov --- Changes since 'v7' - &

[Xen-devel] [PATCH v8 10/11] libxc: add XC_DEVICE_MODEL_SAVE_FILE

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

[Xen-devel] [PATCH v8 07/11] flask: DOMCTL_soft_reset support

2015-06-23 Thread Vitaly Kuznetsov
Add new soft_reset vector to domain2 class, add it to create_domain in the default policy. Signed-off-by: Vitaly Kuznetsov --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- xen/xsm/flask/hooks.c| 3 +++ xen/xsm/flask/policy/access_vectors | 2 ++ 3 files

[Xen-devel] [PATCH v8 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-06-23 Thread Vitaly Kuznetsov
New domctl resets state for a domain allowing it to 'start over': register vcpu_info, switch to FIFO ABI for event channels. Still active grants are being logged to help debugging misbehaving backends. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c

[Xen-devel] [PATCH v8 00/11] toolstack-assisted approach to PVHVM guest kexec

2015-06-23 Thread Vitaly Kuznetsov
This patch series provides x86 PVHVM domains with an ability to perform kexec/kdump-style operations. The list of currently known issues blocking kexec (and why the series is required) is: - Bound event channels. - Registered vcpu_info. - PIRQ/emuirq mappings. - shared_info frame after XENMAPSPACE

[Xen-devel] [PATCH v8 02/11] libxl: support SHUTDOWN_soft_reset shutdown reason

2015-06-23 Thread Vitaly Kuznetsov
Use letter 'S' to indicate a domain in such state. Signed-off-by: Vitaly Kuznetsov Acked-by: Ian Campbell --- 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(-)

[Xen-devel] [PATCH v8 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-06-23 Thread Vitaly Kuznetsov
x86-specific hook cleans up the pirq-emuirq mappings, destroys all ioreq servers and and replaces the shared_info frame with an empty page to support subsequent XENMAPSPACE_shared_info call. ARM-specific hook is a noop for now. Signed-off-by: Vitaly Kuznetsov --- Changes since 'PATCH RF

[Xen-devel] [PATCH v8 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-06-23 Thread Vitaly Kuznetsov
This special type of shutdown is supposed to be used by PVHVM guests when they want to perform some sort of kexec/kdump. 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

Re: [Xen-devel] [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset

2015-06-23 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 22.06.15 at 18:24, wrote: >> "Jan Beulich" writes: >> >> On 22.06.15 at 18:00, wrote: "Jan Beulich" writes: On 03.06.15 at 15:35, wrote: >> @@ -1129,8 +1129,9 @@ void unmap_vcpu_info(struct vcpu *v) >> mfn = v->vcpu_info_mfn

Re: [Xen-devel] [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset

2015-06-22 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 22.06.15 at 18:00, wrote: >> "Jan Beulich" writes: >> >> On 03.06.15 at 15:35, wrote: @@ -1129,8 +1129,9 @@ void unmap_vcpu_info(struct vcpu *v) mfn = v->vcpu_info_mfn; unmap_domain_page_global((void *)

Re: [Xen-devel] [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset

2015-06-22 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 03.06.15 at 15:35, wrote: >> @@ -1129,8 +1129,9 @@ void unmap_vcpu_info(struct vcpu *v) >> mfn = v->vcpu_info_mfn; >> unmap_domain_page_global((void *) >> ((unsigned long)v->vcpu_info & PAGE_MASK)); >> - >> -v->vcpu_info =

Re: [Xen-devel] [PATCH RFC 4/4] xen: arch-specific hooks for domain_soft_reset()

2015-06-22 Thread Vitaly Kuznetsov
Tim Deegan writes: > At 15:35 +0200 on 03 Jun (1433345722), Vitaly Kuznetsov wrote: >> x86-specific hook cleans up the pirq-emuirq mappings and replaces the >> shared_info frame with an empty page to support subsequent >> XENMAPSPACE_shared_info call. > > That'

Re: [Xen-devel] [PATCH RFC 4/4] xen: arch-specific hooks for domain_soft_reset()

2015-06-08 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 03.06.15 at 15:35, wrote: >> +int arch_domain_soft_reset(struct domain *d) >> +{ >> +struct page_info *page = virt_to_page(d->shared_info), *new_page; >> +int ret = 0; >> +struct domain *owner; >> +unsigned long mfn, mfn_new, gfn; >> +p2m_type_t

Re: [Xen-devel] [PATCH RFC 1/4] xen: evtchn: make evtchn_reset() ready for soft reset

2015-06-08 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 03.06.15 at 15:35, wrote: >> --- a/xen/common/event_channel.c >> +++ b/xen/common/event_channel.c >> @@ -274,11 +274,13 @@ static long >> evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind) >> >> lchn->u.interdomain.remote_dom = rd; >> lchn->u.int

Re: [Xen-devel] [PATCH RFC 2/4] xen: grant_table: implement grant_table_soft_reset()

2015-06-08 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 03.06.15 at 15:35, wrote: >> When soft reset is being performed we need to replace all actively >> granted pages with empty pages to prevent possible future memory >> corruption as the newly started kernel won't be aware of these >> granted pages. >> >> We make the

[Xen-devel] [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset

2015-06-03 Thread Vitaly Kuznetsov
Reset event channels, replace grant pages with empty ones, unmount previously mounted vcpu_info. Signed-off-by: Vitaly Kuznetsov --- xen/common/domain.c| 37 + xen/common/schedule.c | 4 xen/include/public/sched.h | 7 +++ xen/include

[Xen-devel] [PATCH RFC 2/4] xen: grant_table: implement grant_table_soft_reset()

2015-06-03 Thread Vitaly Kuznetsov
need to belong to someone and we don't want to implement possible DoS by reassigning them to the grantee/anonymous domain/xen/.. (the malicious guest will be able to consume all host's memory). Signed-off-by: Vitaly Kuznetsov --- xen/common/grant

[Xen-devel] [PATCH RFC 0/4] 'reset everything' approach to PVHVM guest kexec

2015-06-03 Thread Vitaly Kuznetsov
el/2015-05/, there are no messages in May after May, 26 and this series was sent on May, 27) Vitaly Kuznetsov (4): xen: evtchn: make evtchn_reset() ready for soft reset xen: grant_table: implement grant_table_soft_reset() xen: implement SCHEDOP_soft_reset xen: arch-specific hooks for domain

[Xen-devel] [PATCH RFC 4/4] xen: arch-specific hooks for domain_soft_reset()

2015-06-03 Thread Vitaly Kuznetsov
x86-specific hook cleans up the pirq-emuirq mappings and replaces the shared_info frame with an empty page to support subsequent XENMAPSPACE_shared_info call. ARM-specific hook is a noop for now. Signed-off-by: Vitaly Kuznetsov --- xen/arch/arm/domain.c| 5 xen/arch/x86/domain.c

[Xen-devel] [PATCH RFC 1/4] xen: evtchn: make evtchn_reset() ready for soft reset

2015-06-03 Thread Vitaly Kuznetsov
blish it. Signed-off-by: Vitaly Kuznetsov --- xen/common/event_channel.c | 52 +++--- xen/include/xen/event.h| 3 +++ xen/include/xen/sched.h| 1 + 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/xen/common/event_channel.c b/xen/c

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

2015-06-02 Thread Vitaly Kuznetsov
Ian Campbell writes: > On Thu, 2015-05-28 at 15:41 +0200, Vitaly Kuznetsov wrote: >> > I.e. what you currently implement is David's model without Konrad's >> > later alternative really having been explored? Iiuc David's main >> > reservation (which I

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

2015-05-28 Thread Vitaly Kuznetsov
Tim Deegan writes: > At 15:11 +0200 on 28 May (1432825919), Vitaly Kuznetsov wrote: >> Tim Deegan writes: >> > At 13:56 +0200 on 28 May (1432821360), Vitaly Kuznetsov wrote: >> >> Tim Deegan writes: >> >> >> +

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

2015-05-28 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 28.05.15 at 14:27, wrote: >> "Jan Beulich" writes: >> >> On 27.05.15 at 17:25, wrote: This patch series provides x86 PVHVM domains with an ability to perform kexec/kdump-style operations. >>> >>> Before I get to look at this latest version, may I go

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

2015-05-28 Thread Vitaly Kuznetsov
Tim Deegan writes: > At 13:56 +0200 on 28 May (1432821360), Vitaly Kuznetsov wrote: >> Tim Deegan writes: >> >> +last_gmfn = domain_get_maximum_gpfn(source_d); >> >> +gmfn = *gmfn_start; >> >> +while ( gmfn <= last_gmfn ) >> >

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

2015-05-28 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 27.05.15 at 17:25, wrote: >> This patch series provides x86 PVHVM domains with an ability to perform >> kexec/kdump-style operations. > > Before I get to look at this latest version, may I go a step back and > ask for clarification whether all of these (seemingly fr

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

2015-05-28 Thread Vitaly Kuznetsov
Tim Deegan writes: > Hi, > > At 17:25 +0200 on 27 May (1432747540), Vitaly Kuznetsov wrote: >> 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 >>

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

2015-05-27 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 --- Changes in v7: - Save toolstack earlier. - Introduce LIBXL_HAVE_SOFT_RESET [Wei Liu] --- docs/man/xl.cfg.pod.5| 12

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

2015-05-27 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

<    1   2   3   4   >