* [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers @ 2016-01-21 14:04 Andrey Smetanin 2016-01-23 15:20 ` Eduardo Habkost 2016-02-23 14:39 ` Paolo Bonzini 0 siblings, 2 replies; 6+ messages in thread From: Andrey Smetanin @ 2016-01-21 14:04 UTC (permalink / raw) To: qemu-devel Cc: Eduardo Habkost, kvm, Marcelo Tosatti, Roman Kagan, Denis V. Lunev, Paolo Bonzini, Andreas Färber, Richard Henderson Add Hyper-V VMBus hypercalls blank handlers which just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. Changes v2: * use KVM_EXIT_HYPERV exit type Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Richard Henderson <rth@twiddle.net> CC: Eduardo Habkost <ehabkost@redhat.com> CC: "Andreas Färber" <afaerber@suse.de> CC: Marcelo Tosatti <mtosatti@redhat.com> CC: Roman Kagan <rkagan@virtuozzo.com> CC: Denis V. Lunev <den@openvz.org> CC: kvm@vger.kernel.org --- target-i386/hyperv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target-i386/hyperv.c b/target-i386/hyperv.c index e79b173..d3f3059 100644 --- a/target-i386/hyperv.c +++ b/target-i386/hyperv.c @@ -43,6 +43,18 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) return -1; } return 0; + case KVM_EXIT_HYPERV_HCALL: { + uint16_t code; + + code = exit->u.hcall.input & 0xffff; + switch (code) { + case HV_X64_HCALL_POST_MESSAGE: + case HV_X64_HCALL_SIGNAL_EVENT: + default: + exit->u.hcall.result = HV_STATUS_INVALID_HYPERCALL_CODE; + return 0; + } + } default: return -1; } -- 2.4.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers 2016-01-21 14:04 [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers Andrey Smetanin @ 2016-01-23 15:20 ` Eduardo Habkost 2016-01-23 17:20 ` Paolo Bonzini 2016-02-23 14:39 ` Paolo Bonzini 1 sibling, 1 reply; 6+ messages in thread From: Eduardo Habkost @ 2016-01-23 15:20 UTC (permalink / raw) To: Andrey Smetanin Cc: kvm, Marcelo Tosatti, qemu-devel, Roman Kagan, Paolo Bonzini, Denis V. Lunev, Andreas Färber, Richard Henderson On Thu, Jan 21, 2016 at 05:04:20PM +0300, Andrey Smetanin wrote: > Add Hyper-V VMBus hypercalls blank handlers which > just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. > > Changes v2: > * use KVM_EXIT_HYPERV exit type > Paolo, this needs a linux-headers update. Should I let you update the headers in your tree and apply this patch, or can I run update-linux-headers.sh on my x86 branch? -- Eduardo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers 2016-01-23 15:20 ` Eduardo Habkost @ 2016-01-23 17:20 ` Paolo Bonzini 0 siblings, 0 replies; 6+ messages in thread From: Paolo Bonzini @ 2016-01-23 17:20 UTC (permalink / raw) To: Eduardo Habkost Cc: kvm, Marcelo Tosatti, qemu-devel, Roman Kagan, Andrey Smetanin, Denis V. Lunev, Andreas Färber, Richard Henderson ----- Original Message ----- > From: "Eduardo Habkost" <ehabkost@redhat.com> > To: "Andrey Smetanin" <asmetanin@virtuozzo.com> > Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, "Marcelo Tosatti" <mtosatti@redhat.com>, "Roman Kagan" > <rkagan@virtuozzo.com>, "Denis V. Lunev" <den@openvz.org>, "Paolo Bonzini" <pbonzini@redhat.com>, "Andreas Färber" > <afaerber@suse.de>, "Richard Henderson" <rth@twiddle.net> > Sent: Saturday, January 23, 2016 4:20:13 PM > Subject: Re: [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers > > On Thu, Jan 21, 2016 at 05:04:20PM +0300, Andrey Smetanin wrote: > > Add Hyper-V VMBus hypercalls blank handlers which > > just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. > > > > Changes v2: > > * use KVM_EXIT_HYPERV exit type > > > > Paolo, this needs a linux-headers update. Should I let you update > the headers in your tree and apply this patch, or can I run > update-linux-headers.sh on my x86 branch? This patch's dependency is not even in any upstream KVM branch, so it will take some time. For now, just apply it with the linux-headers changes, and don't "graduate" it from x86-next to x86 until the headers are updated. Paolo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers 2016-01-21 14:04 [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers Andrey Smetanin 2016-01-23 15:20 ` Eduardo Habkost @ 2016-02-23 14:39 ` Paolo Bonzini 2016-02-24 10:22 ` [Qemu-devel] [PATCH v3 1/2] headers: KVM Hyper-V VMBus hypercalls defines and exit Andrey Smetanin 1 sibling, 1 reply; 6+ messages in thread From: Paolo Bonzini @ 2016-02-23 14:39 UTC (permalink / raw) To: Andrey Smetanin, qemu-devel Cc: Eduardo Habkost, kvm, Marcelo Tosatti, Roman Kagan, Denis V. Lunev, Andreas Färber, Richard Henderson On 21/01/2016 15:04, Andrey Smetanin wrote: > Add Hyper-V VMBus hypercalls blank handlers which > just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. > > Changes v2: > * use KVM_EXIT_HYPERV exit type > > Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> > Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> > CC: Paolo Bonzini <pbonzini@redhat.com> > CC: Richard Henderson <rth@twiddle.net> > CC: Eduardo Habkost <ehabkost@redhat.com> > CC: "Andreas Färber" <afaerber@suse.de> > CC: Marcelo Tosatti <mtosatti@redhat.com> > CC: Roman Kagan <rkagan@virtuozzo.com> > CC: Denis V. Lunev <den@openvz.org> > CC: kvm@vger.kernel.org > > --- > target-i386/hyperv.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/target-i386/hyperv.c b/target-i386/hyperv.c > index e79b173..d3f3059 100644 > --- a/target-i386/hyperv.c > +++ b/target-i386/hyperv.c > @@ -43,6 +43,18 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) > return -1; > } > return 0; > + case KVM_EXIT_HYPERV_HCALL: { > + uint16_t code; > + > + code = exit->u.hcall.input & 0xffff; > + switch (code) { > + case HV_X64_HCALL_POST_MESSAGE: > + case HV_X64_HCALL_SIGNAL_EVENT: > + default: > + exit->u.hcall.result = HV_STATUS_INVALID_HYPERCALL_CODE; > + return 0; > + } > + } > default: > return -1; > } > This is okay BTW, but I'm waiting for the header file update. Paolo ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH v3 1/2] headers: KVM Hyper-V VMBus hypercalls defines and exit 2016-02-23 14:39 ` Paolo Bonzini @ 2016-02-24 10:22 ` Andrey Smetanin 2016-02-24 10:22 ` [Qemu-devel] [PATCH v3 2/2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers Andrey Smetanin 0 siblings, 1 reply; 6+ messages in thread From: Andrey Smetanin @ 2016-02-24 10:22 UTC (permalink / raw) To: qemu-devel Cc: Eduardo Habkost, kvm, Marcelo Tosatti, Roman Kagan, Denis V. Lunev, Paolo Bonzini, Andreas Färber, Richard Henderson This patch brings in the necessary changes from the corresponding kernel patchset. It's included only for completeness; ideally these changes should arrive via the standard kernel header pull. Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Richard Henderson <rth@twiddle.net> CC: Eduardo Habkost <ehabkost@redhat.com> CC: "Andreas Färber" <afaerber@suse.de> CC: Marcelo Tosatti <mtosatti@redhat.com> CC: Roman Kagan <rkagan@virtuozzo.com> CC: Denis V. Lunev <den@openvz.org> CC: kvm@vger.kernel.org --- include/standard-headers/asm-x86/hyperv.h | 4 +++- linux-headers/linux/kvm.h | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/standard-headers/asm-x86/hyperv.h b/include/standard-headers/asm-x86/hyperv.h index acb119d..47b38fb 100644 --- a/include/standard-headers/asm-x86/hyperv.h +++ b/include/standard-headers/asm-x86/hyperv.h @@ -226,7 +226,9 @@ (~((1ull << HV_X64_MSR_HYPERCALL_PAGE_ADDRESS_SHIFT) - 1)) /* Declare the various hypercall operations. */ -#define HV_X64_HV_NOTIFY_LONG_SPIN_WAIT 0x0008 +#define HVCALL_NOTIFY_LONG_SPIN_WAIT 0x0008 +#define HVCALL_POST_MESSAGE 0x005c +#define HVCALL_SIGNAL_EVENT 0x005d #define HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE 0x00000001 #define HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT 12 diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 4e20262..08e652e 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -157,6 +157,7 @@ struct kvm_s390_skeys { struct kvm_hyperv_exit { #define KVM_EXIT_HYPERV_SYNIC 1 +#define KVM_EXIT_HYPERV_HCALL 2 __u32 type; union { struct { @@ -165,6 +166,11 @@ struct kvm_hyperv_exit { __u64 evt_page; __u64 msg_page; } synic; + struct { + __u64 input; + __u64 result; + __u64 params[2]; + } hcall; } u; }; -- 2.4.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH v3 2/2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers 2016-02-24 10:22 ` [Qemu-devel] [PATCH v3 1/2] headers: KVM Hyper-V VMBus hypercalls defines and exit Andrey Smetanin @ 2016-02-24 10:22 ` Andrey Smetanin 0 siblings, 0 replies; 6+ messages in thread From: Andrey Smetanin @ 2016-02-24 10:22 UTC (permalink / raw) To: qemu-devel Cc: Eduardo Habkost, kvm, Marcelo Tosatti, Roman Kagan, Denis V. Lunev, Paolo Bonzini, Andreas Färber, Richard Henderson Add Hyper-V VMBus hypercalls blank handlers which just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. Changes v3: * use HVCALL_* defines Changes v2: * use KVM_EXIT_HYPERV exit type Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Richard Henderson <rth@twiddle.net> CC: Eduardo Habkost <ehabkost@redhat.com> CC: "Andreas Färber" <afaerber@suse.de> CC: Marcelo Tosatti <mtosatti@redhat.com> CC: Roman Kagan <rkagan@virtuozzo.com> CC: Denis V. Lunev <den@openvz.org> CC: kvm@vger.kernel.org --- target-i386/hyperv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target-i386/hyperv.c b/target-i386/hyperv.c index 6b519c3..c4d6a9b 100644 --- a/target-i386/hyperv.c +++ b/target-i386/hyperv.c @@ -44,6 +44,18 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) return -1; } return 0; + case KVM_EXIT_HYPERV_HCALL: { + uint16_t code; + + code = exit->u.hcall.input & 0xffff; + switch (code) { + case HVCALL_POST_MESSAGE: + case HVCALL_SIGNAL_EVENT: + default: + exit->u.hcall.result = HV_STATUS_INVALID_HYPERCALL_CODE; + return 0; + } + } default: return -1; } -- 2.4.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-24 10:23 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-21 14:04 [Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers Andrey Smetanin 2016-01-23 15:20 ` Eduardo Habkost 2016-01-23 17:20 ` Paolo Bonzini 2016-02-23 14:39 ` Paolo Bonzini 2016-02-24 10:22 ` [Qemu-devel] [PATCH v3 1/2] headers: KVM Hyper-V VMBus hypercalls defines and exit Andrey Smetanin 2016-02-24 10:22 ` [Qemu-devel] [PATCH v3 2/2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers Andrey Smetanin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).