[PATCH] hyperv: Fix struct hv_message_header ordering

2021-07-29 Thread Siddharth Chandrasekaran
e are adding more message types in our VSM implementation) so fix it to reflect the specification. Signed-off-by: Siddharth Chandrasekaran --- include/hw/hyperv/hyperv-proto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/hyperv/hyperv-proto.h b/include/hw/h

Re: [PATCH 5/6] kvm/i386: Add support for user space MSR filtering

2021-06-25 Thread Siddharth Chandrasekaran
On Tue, Jun 08, 2021 at 12:53:17PM +0200, Siddharth Chandrasekaran wrote: > On Tue, Jun 08, 2021 at 10:48:53AM +0200, Alexander Graf wrote: > > On 24.05.21 22:01, Siddharth Chandrasekaran wrote: > > > Check and enable user space MSR filtering capability and handle new

[PATCH v2 4/6] kvm/i386: Avoid multiple calls to check_extension(KVM_CAP_HYPERV)

2021-06-25 Thread Siddharth Chandrasekaran
KVM_CAP_HYPERV is a VM ioctl and can be cached at kvm_arch_init() instead of performing an ioctl each time in hyperv_enabled() which is called foreach vCPU. Apart from that, this variable will come in handy in a subsequent patch. Signed-off-by: Siddharth Chandrasekaran --- target/i386/kvm/kvm.c

[PATCH v2 5/6] kvm/i386: Add support for user space MSR filtering

2021-06-25 Thread Siddharth Chandrasekaran
Check and enable user space MSR filtering capability and handle new exit reason KVM_EXIT_X86_WRMSR. This will be used in a follow up patch to implement hyper-v overlay pages. Signed-off-by: Siddharth Chandrasekaran --- target/i386/kvm/kvm.c | 67 +++ 1

[PATCH v2 6/6] hyper-v: Handle hypercall code page as an overlay page

2021-06-25 Thread Siddharth Chandrasekaran
bounce back control KVM. This bounce back is needed as KVM may have to write data into the newly overlaid page. Signed-off-by: Siddharth Chandrasekaran --- hw/hyperv/hyperv.c | 10 - include/hw/hyperv/hyperv.h | 5 +++ target/i386/kvm/hyperv.c | 91

[PATCH v2 1/6] hyper-v: Overlay abstraction for synic event and msg pages

2021-06-25 Thread Siddharth Chandrasekaran
the checks for this bit is moved into the unified overlaying method hyperv_overlay_update() so the caller does not need to care about it. Signed-off-by: Siddharth Chandrasekaran --- hw/hyperv/hyperv.c | 103 - include/hw/hyperv/hyperv.h | 9 targe

[PATCH v2 2/6] hyper-v: Use -1 as invalid overlay address

2021-06-25 Thread Siddharth Chandrasekaran
: Siddharth Chandrasekaran --- hw/hyperv/hyperv.c | 15 +-- include/hw/hyperv/hyperv.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 8d09206702..ac45e8e139 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv

[PATCH v2 3/6] kvm/i386: Stop using cpu->kvm_msr_buf in kvm_put_one_msr()

2021-06-25 Thread Siddharth Chandrasekaran
off-by: Siddharth Chandrasekaran --- target/i386/kvm/kvm.c | 12 target/i386/kvm/kvm_i386.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index c676ee8b38..03202bd06b 100644 --- a/target/i386/kvm/kvm.c +++ b/targe

[PATCH v2 0/6] Handle hypercall code overlay page in userspace

2021-06-25 Thread Siddharth Chandrasekaran
call page set when guest_os_id is not set. - Address Alex's comments: - Move filtering logic to 6/6 so we don't break bisection. - Reword comment on filters - Provide a default RDMSR handler - Set run->msr.error = 1 to retain existing behaviour Siddharth Cha

Re: [PATCH 6/6] hyper-v: Handle hypercall code page as an overlay page

2021-06-08 Thread Siddharth Chandrasekaran
On Tue, Jun 08, 2021 at 11:02:45AM +0200, Alexander Graf wrote: > On 24.05.21 22:02, Siddharth Chandrasekaran wrote: > > Hypercall code page is specified in the Hyper-V TLFS to be an overlay > > page, ie., guest chooses a GPA and the host _places_ a page at that > > location,

Re: [PATCH 5/6] kvm/i386: Add support for user space MSR filtering

2021-06-08 Thread Siddharth Chandrasekaran
On Tue, Jun 08, 2021 at 10:48:53AM +0200, Alexander Graf wrote: > On 24.05.21 22:01, Siddharth Chandrasekaran wrote: > > Check and enable user space MSR filtering capability and handle new exit > > reason KVM_EXIT_X86_WRMSR. This will be used in a follow up patch to > > impl

Re: [PATCH 0/6] Handle hypercall code overlay page in userspace

2021-06-07 Thread Siddharth Chandrasekaran
A reminder email to bring these up on your inboxes :). Would love to hear your thoughts on them. ~ Sid. Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: B

Re: Windows fails to boot after rebase to QEMU master

2021-05-27 Thread Siddharth Chandrasekaran
On Thu, May 27, 2021 at 01:36:37PM +0200, Claudio Fontana wrote: > Just to check whether this is actually the issue we are talking about, > Sid et al, could you try this? > > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index c496bfa1c2..810c46281b 100644 > --- a/target/i386/cpu.c > +++

[PATCH 6/6] hyper-v: Handle hypercall code page as an overlay page

2021-05-24 Thread Siddharth Chandrasekaran
bounce back control KVM. This bounce back is needed as KVM may have to write data into the newly overlaid page. Signed-off-by: Siddharth Chandrasekaran --- hw/hyperv/hyperv.c | 10 - include/hw/hyperv/hyperv.h | 5 +++ target/i386/kvm/hyperv.c | 84

[PATCH 5/6] kvm/i386: Add support for user space MSR filtering

2021-05-24 Thread Siddharth Chandrasekaran
Check and enable user space MSR filtering capability and handle new exit reason KVM_EXIT_X86_WRMSR. This will be used in a follow up patch to implement hyper-v overlay pages. Signed-off-by: Siddharth Chandrasekaran --- target/i386/kvm/kvm.c | 72 +++ 1

[PATCH 4/6] kvm/i386: Avoid multiple calls to check_extension(KVM_CAP_HYPERV)

2021-05-24 Thread Siddharth Chandrasekaran
KVM_CAP_HYPERV is a VM ioctl and can be cached at kvm_arch_init() instead of performing an ioctl each time in hyperv_enabled() which is called foreach vCPU. Apart from that, this variable will come in handy in a subsequent patch. Signed-off-by: Siddharth Chandrasekaran --- target/i386/kvm/kvm.c

[PATCH 2/6] hyper-v: Use -1 as invalid overlay address

2021-05-24 Thread Siddharth Chandrasekaran
: Siddharth Chandrasekaran --- hw/hyperv/hyperv.c | 15 +-- include/hw/hyperv/hyperv.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 8d09206702..ac45e8e139 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv

[PATCH 1/6] hyper-v: Overlay abstraction for synic event and msg pages

2021-05-24 Thread Siddharth Chandrasekaran
the checks for this bit is moved into the unified overlaying method hyperv_overlay_update() so the caller does not need to care about it. Signed-off-by: Siddharth Chandrasekaran --- hw/hyperv/hyperv.c | 103 - include/hw/hyperv/hyperv.h | 9 targe

[PATCH 3/6] kvm/i386: Stop using cpu->kvm_msr_buf in kvm_put_one_msr()

2021-05-24 Thread Siddharth Chandrasekaran
off-by: Siddharth Chandrasekaran --- target/i386/kvm/kvm.c | 12 target/i386/kvm/kvm_i386.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index d972eb4705..d19a2913fd 100644 --- a/target/i386/kvm/kvm.c +++ b/targe

[PATCH 0/6] Handle hypercall code overlay page in userspace

2021-05-24 Thread Siddharth Chandrasekaran
t was overlaid here. Additionally it does some housekeeping here and there. P.S. This is a follow up to the my initial approach of handling this in kernel, see [1] for discussions. ~ Sid. [1]: https://lore.kernel.org/kvm/20210423090333.21910-1-sid...@amazon.de/ Siddharth Chandrasekaran (6): hy

Windows fails to boot after rebase to QEMU master

2021-05-21 Thread Siddharth Chandrasekaran
After a rebase to QEMU master, I am having trouble booting windows VMs. Git bisect indicates commit f5cc5a5c1686 ("i386: split cpu accelerators from cpu.c, using AccelCPUClass") to have introduced the issue. I spent some time looking at into it yesterday without much luck. Steps to reproduce: