All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
	Andrey Smetanin <asmetanin@virtuozzo.com>,
	Gleb Natapov <gleb@kernel.org>
Subject: Re: [PATCH 8/9] kvm/x86: add sending hyper-v crash notification to user space
Date: Wed, 1 Jul 2015 17:12:49 +0200	[thread overview]
Message-ID: <55940371.9070002@redhat.com> (raw)
In-Reply-To: <1435664007-4965-9-git-send-email-den@openvz.org>



On 30/06/2015 13:33, Denis V. Lunev wrote:
> From: Andrey Smetanin <asmetanin@virtuozzo.com>
> 
> Sending of notification is done by exiting vcpu to user space
> if KVM_REQ_HV_CRASH is enabled for vcpu. kvm_run structure
> will contains system_event with type KVM_SYSTEM_EVENT_CRASH
> and flag KVM_SYSTEM_EVENT_FL_HV_CRASH to clarify that
> crash occures inside Hyper-V based guest.

This needs to be documented in Documentation/virtual/kvm/api.txt.  Also,
please rename KVM_SYSTEM_EVENT_FL_HV_CRASH to
KVM_SYSTEM_EVENT_FLAG_HV_CRASH and move it to
arch/x86/include/uapi/asm/kvm.h.

You do not need to send the whole series again; just resend this one patch.

Paolo

> Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Gleb Natapov <gleb@kernel.org>
> ---
>  arch/x86/kvm/x86.c       | 8 ++++++++
>  include/uapi/linux/kvm.h | 2 ++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 47b7507..55a4b92 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6264,6 +6264,14 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
>  			vcpu_scan_ioapic(vcpu);
>  		if (kvm_check_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu))
>  			kvm_vcpu_reload_apic_access_page(vcpu);
> +		if (kvm_check_request(KVM_REQ_HV_CRASH, vcpu)) {
> +			vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
> +			vcpu->run->system_event.type = KVM_SYSTEM_EVENT_CRASH;
> +			vcpu->run->system_event.flags =
> +						KVM_SYSTEM_EVENT_FL_HV_CRASH;
> +			r = 0;
> +			goto out;
> +		}
>  	}
>  
>  	if (kvm_check_request(KVM_REQ_EVENT, vcpu) || req_int_win) {
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 716ad4a..eefb8b9 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -317,6 +317,8 @@ struct kvm_run {
>  		struct {
>  #define KVM_SYSTEM_EVENT_SHUTDOWN       1
>  #define KVM_SYSTEM_EVENT_RESET          2
> +#define KVM_SYSTEM_EVENT_CRASH          3
> +#define KVM_SYSTEM_EVENT_FL_HV_CRASH    (1ULL << 0)
>  			__u32 type;
>  			__u64 flags;
>  		} system_event;
> 

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: Andrey Smetanin <asmetanin@virtuozzo.com>,
	Gleb Natapov <gleb@kernel.org>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 8/9] kvm/x86: add sending hyper-v crash notification to user space
Date: Wed, 1 Jul 2015 17:12:49 +0200	[thread overview]
Message-ID: <55940371.9070002@redhat.com> (raw)
In-Reply-To: <1435664007-4965-9-git-send-email-den@openvz.org>



On 30/06/2015 13:33, Denis V. Lunev wrote:
> From: Andrey Smetanin <asmetanin@virtuozzo.com>
> 
> Sending of notification is done by exiting vcpu to user space
> if KVM_REQ_HV_CRASH is enabled for vcpu. kvm_run structure
> will contains system_event with type KVM_SYSTEM_EVENT_CRASH
> and flag KVM_SYSTEM_EVENT_FL_HV_CRASH to clarify that
> crash occures inside Hyper-V based guest.

This needs to be documented in Documentation/virtual/kvm/api.txt.  Also,
please rename KVM_SYSTEM_EVENT_FL_HV_CRASH to
KVM_SYSTEM_EVENT_FLAG_HV_CRASH and move it to
arch/x86/include/uapi/asm/kvm.h.

You do not need to send the whole series again; just resend this one patch.

Paolo

> Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Gleb Natapov <gleb@kernel.org>
> ---
>  arch/x86/kvm/x86.c       | 8 ++++++++
>  include/uapi/linux/kvm.h | 2 ++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 47b7507..55a4b92 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6264,6 +6264,14 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
>  			vcpu_scan_ioapic(vcpu);
>  		if (kvm_check_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu))
>  			kvm_vcpu_reload_apic_access_page(vcpu);
> +		if (kvm_check_request(KVM_REQ_HV_CRASH, vcpu)) {
> +			vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
> +			vcpu->run->system_event.type = KVM_SYSTEM_EVENT_CRASH;
> +			vcpu->run->system_event.flags =
> +						KVM_SYSTEM_EVENT_FL_HV_CRASH;
> +			r = 0;
> +			goto out;
> +		}
>  	}
>  
>  	if (kvm_check_request(KVM_REQ_EVENT, vcpu) || req_int_win) {
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 716ad4a..eefb8b9 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -317,6 +317,8 @@ struct kvm_run {
>  		struct {
>  #define KVM_SYSTEM_EVENT_SHUTDOWN       1
>  #define KVM_SYSTEM_EVENT_RESET          2
> +#define KVM_SYSTEM_EVENT_CRASH          3
> +#define KVM_SYSTEM_EVENT_FL_HV_CRASH    (1ULL << 0)
>  			__u32 type;
>  			__u64 flags;
>  		} system_event;
> 

  parent reply	other threads:[~2015-07-01 15:12 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 11:33 [PATCH v3 0/9] HyperV equivalent of pvpanic driver Denis V. Lunev
2015-06-30 11:33 ` [Qemu-devel] " Denis V. Lunev
2015-06-30 11:33 ` [PATCH 1/9] kvm/x86: move Hyper-V MSR's/hypercall code into hyperv.c file Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:11   ` Peter Hornyack
2015-07-01  0:11     ` [Qemu-devel] " Peter Hornyack
2015-06-30 11:33 ` [PATCH 2/9] kvm: introduce vcpu_debug = kvm_debug + vcpu context Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:12   ` Peter Hornyack
2015-07-01  0:12     ` [Qemu-devel] " Peter Hornyack
2015-06-30 11:33 ` [PATCH 3/9] kvm: add hyper-v crash msrs values Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:14   ` Peter Hornyack
2015-07-01  0:14     ` [Qemu-devel] " Peter Hornyack
2015-07-01 15:00   ` Paolo Bonzini
2015-07-01 15:00     ` [Qemu-devel] " Paolo Bonzini
2015-07-01 15:53     ` Denis V. Lunev
2015-07-01 15:53       ` [Qemu-devel] " Denis V. Lunev
2015-07-01 16:06       ` Peter Hornyack
2015-07-01 16:06         ` [Qemu-devel] " Peter Hornyack
2015-07-01 16:48         ` Paolo Bonzini
2015-07-01 16:48           ` [Qemu-devel] " Paolo Bonzini
2015-06-30 11:33 ` [PATCH 4/9] kvm/x86: added hyper-v crash msrs into kvm hyperv context Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:14   ` Peter Hornyack
2015-07-01  0:14     ` [Qemu-devel] " Peter Hornyack
2015-06-30 11:33 ` [PATCH 5/9] kvm: added KVM_REQ_HV_CRASH value to notify qemu about hyper-v crash Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:14   ` Peter Hornyack
2015-07-01  0:14     ` [Qemu-devel] " Peter Hornyack
2015-06-30 11:33 ` [PATCH 6/9] kvm/x86: mark hyper-v crash msrs as partition wide Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:15   ` Peter Hornyack
2015-07-01  0:15     ` [Qemu-devel] " Peter Hornyack
2015-06-30 11:33 ` [PATCH 7/9] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:15   ` Peter Hornyack
2015-07-01  0:15     ` [Qemu-devel] " Peter Hornyack
2015-07-01 16:47   ` Paolo Bonzini
2015-07-01 16:47     ` [Qemu-devel] " Paolo Bonzini
2015-06-30 11:33 ` [PATCH 8/9] kvm/x86: add sending hyper-v crash notification to user space Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01  0:16   ` Peter Hornyack
2015-07-01  0:16     ` [Qemu-devel] " Peter Hornyack
2015-07-01 15:12   ` Paolo Bonzini [this message]
2015-07-01 15:12     ` Paolo Bonzini
2015-06-30 11:33 ` [PATCH 9/9] qemu/kvm: kvm hyper-v based guest crash event handling Denis V. Lunev
2015-06-30 11:33   ` [Qemu-devel] " Denis V. Lunev
2015-07-01 15:07   ` Paolo Bonzini
2015-07-01 15:07     ` [Qemu-devel] " Paolo Bonzini
2015-07-02 13:19     ` Andrey Smetanin
2015-07-02 13:19       ` [Qemu-devel] " Andrey Smetanin
2015-07-02 13:30       ` Paolo Bonzini
2015-07-02 13:30         ` [Qemu-devel] " Paolo Bonzini
2015-06-30 12:26 ` [Qemu-devel] [PATCH v3 0/9] HyperV equivalent of pvpanic driver Daniel P. Berrange
2015-06-30 12:26   ` Daniel P. Berrange
2015-06-30 12:38   ` Denis V. Lunev
2015-06-30 12:38     ` Denis V. Lunev
2015-07-01 14:09 ` Paolo Bonzini
2015-07-01 14:09   ` [Qemu-devel] " Paolo Bonzini
2015-07-01 15:55   ` Denis V. Lunev
2015-07-01 15:55     ` [Qemu-devel] " Denis V. Lunev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55940371.9070002@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=asmetanin@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.