ltyker...@gmail.com writes:
> From: Tianyu Lan
>
> Current code initializes clock event data structure for syn timer
> even when it's unavailable. Fix it.
>
> Signed-off-by: Tianyu Lan
> ---
> Change since v1:
> Update title and commit log.
>
> drivers/hv/hv.c | 15 +--
> 1 f
ltyker...@gmail.com writes:
> From: Tianyu Lan
>
> Current code initializes clock event data structure for syn timer
> even when it's not available. Fix it.
>
> Signed-off-by: Tianyu Lan
> ---
> - Fix the wrong title.
The new one is ... weird too :-)
I think it was supposed to be something lik
(/home/glider/llvm/clang
>> 80fee25776c2fb61e74c1ecb1a523375c2500b69)
>> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1095467660
>> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1752fe0a600000
>>
>> The bug was bisected to:
>>
>
Peter Zijlstra writes:
>
> I know you probably can't change the HV interface, but I'm thinking its
> rather daft you have to specify a CPU at all for this. The HV can just
> pick one and send the notification there, who cares.
Generally speaking, hypervisor can't know if the CPU is offline (or
e
Dmitry Safonov writes:
> On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote:
>> Peter Zijlstra writes:
>>
>>> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void))
>>> struct hv_reenlightenment_control re_ctrl = {
>>>
Peter Zijlstra writes:
> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void))
> struct hv_reenlightenment_control re_ctrl = {
> .vector = HYPERV_REENLIGHTENMENT_VECTOR,
> .enabled = 1,
> - .target_vp = hv_vp_index[smp_processor_id()]
> +
Thomas Gleixner writes:
> On Wed, 12 Jun 2019, Vitaly Kuznetsov wrote:
>> Dmitry Safonov writes:
>> > diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
>> > index 1608050e9df9..0bdd79ecbff8 100644
>> > --- a/arch/x86/hyperv/hv_init.c
gt; Cc: Cathy Avery
>> Cc: Haiyang Zhang
>> Cc: "H. Peter Anvin"
>> Cc: Ingo Molnar
>> Cc: "K. Y. Srinivasan"
>> Cc: "Michael Kelley (EOSG)"
>> Cc: Mohammed Gamal
>> Cc: Paolo Bonzini
>> Cc: Radim Krčmář
>>
; Cc: "K. Y. Srinivasan"
> Cc: "Michael Kelley (EOSG)"
> Cc: Mohammed Gamal
> Cc: Paolo Bonzini
> Cc: Radim Krčmář
> Cc: Roman Kagan
> Cc: Sasha Levin
> Cc: Stephen Hemminger
> Cc: Thomas Gleixner
> Cc: Vitaly Kuznetsov
>
> Cc: de...@linuxd
Maya Nakamura writes:
> Remove a duplicate definition of VP set (hv_vp_set) and use the common
> definition (hv_vpset) that is used in other places.
>
> Change the order of the members in struct hv_pcibus_device so that the
> declaration of retarget_msi_interrupt_params is the last member. Struct
Maya Nakamura writes:
> Remove the duplicate implementation of cpumask_to_vpset() and use the
> shared implementation. Export hv_max_vp_index, which is required by
> cpumask_to_vpset().
>
> Apply changes to hv_irq_unmask() based on feedback.
>
I just noticed an issue with this patch, sorry I've
Kairui Song writes:
> When hypercalls is used for sending IPIs, kexec will fail with a kernel
> panic like this:
>
> kexec_core: Starting new kernel
> BUG: unable to handle kernel NULL pointer dereference at
> PGD 800057995067 P4D 800057995067 PUD 57990067 PMD 0
> Oops: 0
Maya Nakamura writes:
> Remove a duplicate definition of VP set (hv_vp_set) and use the common
> definition (hv_vpset) that is used in other places.
>
> Signed-off-by: Maya Nakamura
> ---
> drivers/pci/controller/pci-hyperv.c | 25 -
> 1 file changed, 12 insertions(+), 1
Dan Carpenter writes:
> On Mon, Jan 07, 2019 at 07:38:20PM +0100, Vitaly Kuznetsov wrote:
>> (I remember Greg disliked when people were tagging patches for stable@
>> themselves, he prefered maintainers deciding if the particular commit
>> deserves stable@ or not - but as y
David Hildenbrand writes:
> On 07.01.19 14:44, Vitaly Kuznetsov wrote:
>> David Hildenbrand writes:
>>
...
>>> On 04.01.19 15:19, Vitaly Kuznetsov wrote:
>>>>if (start_pfn > has->start_pfn &&
>>>>
Sasha Levin writes:
> On Mon, Jan 07, 2019 at 02:44:30PM +0100, Vitaly Kuznetsov wrote:
>>P.S. I still think about bringing mem_hotplug_begin()/done() to
>>hv_balloon but that's going to be a separate discussion, here I want to
>>have a small fix backportable to stable
David Hildenbrand writes:
> On 04.01.19 15:19, Vitaly Kuznetsov wrote:
>> Hyper-V memory hotplug protocol has 2M granularity and in Linux x86 we use
>> 128M. To deal with it we implement partial section onlining by registering
>> custom page onlining callback (hv_online_page
ds inspecting
struct pages and checks sections instead. But in Hyper-V balloon driver we
do PageReserved(pfn_to_page()) check and this is now wrong.
Switch to checking online_section_nr() instead.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 10 ++
1 file changed
k...@linuxonhyperv.com writes:
> +
> +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page
> *tsc_pg,
> +u64 *cur_tsc)
> +{
> + u64 scale, offset;
> + u32 sequence;
> +
> + /*
> + * The protocol for reading Hyper-V TSC
t's kobj name,
>> not
>> the slot->number. This patch corrects the netvsc driver, so the VF device
>> can be
>> successfully paired with synthetic NIC.
>>
>> Fixes: 00d7ddba1143 ("hv_netvsc: pair VF based on serial number")
>> S
Andy Lutomirski writes:
> On Thu, Oct 4, 2018 at 9:43 AM Marcelo Tosatti wrote:
>>
>> On Wed, Oct 03, 2018 at 03:32:08PM -0700, Andy Lutomirski wrote:
>> > On Wed, Oct 3, 2018 at 12:01 PM Marcelo Tosatti
>> > wrote:
>> > >
>> > > On Tue, Oct 02, 2018 at 10:15:49PM -0700, Andy Lutomirski wrote:
Marcelo Tosatti writes:
> On Wed, Oct 03, 2018 at 11:22:58AM +0200, Vitaly Kuznetsov wrote:
>>
>> There is a very long history of different (hardware) issues Marcelo was
>> fighting with and the current code is the survived Frankenstein.
>
> Right, the code has to
Dave Hansen writes:
> On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote:
>> It is more than just memmaps (e.g. forking udev process doing memory
>> onlining also needs memory) but yes, the main idea is to make the
>> onlining synchronous with hotplug.
>
> That's a g
Michal Hocko writes:
> On Wed 03-10-18 15:38:04, Vitaly Kuznetsov wrote:
>> David Hildenbrand writes:
>>
>> > On 02/10/2018 15:47, Michal Hocko wrote:
>> ...
>> >>
>> >> Why do you need a generic hotplug rule in the first place? Why don
David Hildenbrand writes:
> On 02/10/2018 15:47, Michal Hocko wrote:
...
>>
>> Why do you need a generic hotplug rule in the first place? Why don't you
>> simply provide different set of rules for different usecases? Let users
>> decide which usecase they prefer rather than try to be clever whic
!spin_is_locked(&dm_device.ha_lock));
> + lockdep_assert_held(&dm_device.ha_lock);
> dm_device.num_pages_onlined++;
> }
Reviewed-by: Vitaly Kuznetsov
However,
lockdep_assert_held() is a no-op when !CONFIG_LOCKDEP but this doesn't
really matter: hv_page_online_one() is stati
Andy Lutomirski writes:
>> On Oct 3, 2018, at 2:22 AM, Vitaly Kuznetsov wrote:
>>
>> Andy Lutomirski writes:
>>
>>> Hi Vitaly, Paolo, Radim, etc.,
>>>
>> The notification you're talking about exists, it is called
>>
Andy Lutomirski writes:
> Hi Vitaly, Paolo, Radim, etc.,
>
> On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote:
>>
>> Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime()
>> implementation, which extended the clockid switch case and added yet
>> another slightly different copy
Thomas Gleixner writes:
> Runtime validate the VCLOCK_MODE in clocksource::archdata and disable
> VCLOCK if invalid, which disables the VDSO but keeps the system running.
>
> Signed-off-by: Thomas Gleixner
> ---
> arch/x86/Kconfig |1 +
> arch/x86/kernel/time.c | 16
Thomas Gleixner writes:
> Dereferencing gtod->cycle_last all over the place and foing the cycles <
> last comparison in the vclock read functions generates horrible code. Doing
> it at the call site is much better and gains a few cycles both for TSC and
> pvclock.
>
> Caveat: This adds the compar
'error' variable is left uninitialized in case we see an unknown operation.
As we don't immediately return and proceed to pwrite() we need to set it
to something, HV_E_FAIL sounds good enough.
Signed-off-by: Vitaly Kuznetsov
---
tools/hv/hv_fcopy_daemon.c | 1 +
1 file chang
k...@linuxonhyperv.com writes:
> From: Stephen Hemminger
>
> For unsupported device types, the vmbus channel ringbuffer is never
> initialized, and therefore reading the sysfs files will return garbage
> or cause a kernel OOPS.
>
> Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info")
>
> Sig
"Michael Kelley (EOSG)" writes:
> From: Vitaly Kuznetsov Sent: Wednesday, August 1, 2018
> 2:26 AM
>
>> > I was trying to decide if there are any arguments in favor of one
>> > approach vs. the other: a per-cpu flag in memory or checking
>> >
-1178,6 +1178,9 @@ static ssize_t vmbus_chan_attr_show(struct kobject
> *kobj,
> if (!attribute->show)
> return -EIO;
>
> + if (chan->state != CHANNEL_OPENED_STATE)
> + return -EINVAL;
> +
>
"Michael Kelley (EOSG)" writes:
> From: Vitaly Kuznetsov Sent: Tuesday, July 31, 2018
> 4:20 AM
>>
>> Alternatively, we can get rid of synic_initialized flag altogether:
>> hv_synic_init() never fails in the first place but we can always
>&
3df 100644
> --- a/drivers/hv/hyperv_vmbus.h
> +++ b/drivers/hv/hyperv_vmbus.h
> @@ -202,6 +202,8 @@ enum {
> struct hv_per_cpu_context {
> void *synic_message_page;
> void *synic_event_page;
> + bool synic_initialized;
> +
> /*
>* buffer
Yidong Ren writes:
>> From: Yidong Ren
>> Sent: Monday, July 23, 2018 6:26 PM
>> +pcpu_sum = kvmalloc(sizeof(struct netvsc_ethtool_pcpu_stats) *
>> +num_present_cpus(), GFP_KERNEL);
>
> Since there is no plan for CPU hotplug in Hyper-V in short term, it is fine
> to use
issue in 4.18 but I can definitely prepare fixes for it if you think
this is needed.
Vitaly Kuznetsov (2):
x86/hyper-v: check cpumask_to_vpset() return value in
hyperv_flush_tlb_others_ex()
x86/hyper-v: check for VP_INVAL in hyperv_flush_tlb_others()
arch/x86/hyperv/mmu.c | 7 ++
d0c474a ("x86/hyper-v: Fix the circular dependency in IPI
enlightenment")
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/mmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c
index 0d90e515ec98..453d2355cd61 100644
--- a/arch/x86/
dependency in IPI
enlightenment")
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/mmu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c
index 453d2355cd61..1147e1fed7ff 100644
--- a/arch/x86/hyperv/mmu.c
+++ b/arch/x86/hyperv/mmu.c
@@
k...@linuxonhyperv.com writes:
> From: "K. Y. Srinivasan"
>
> The IPI hypercalls depend on being able to map the Linux notion of CPU ID
> to the hypervisor's notion of the CPU ID. The array hv_vp_index[] provides
> this mapping. Code for populating this array depends on the IPI functionality.
> B
Vitaly Kuznetsov writes:
> Wanpeng Li writes:
>
>> Hi Vitaly, (fix my reply mess this time)
>> On Sat, 23 Jun 2018 at 01:09, Vitaly Kuznetsov wrote:
>>>
>>> When reviewing my "x86/hyper-v: use cheaper HVCALL_FLUSH_VIRTUAL_ADDRESS_
>>> {L
Wanpeng Li writes:
> Hi Vitaly, (fix my reply mess this time)
> On Sat, 23 Jun 2018 at 01:09, Vitaly Kuznetsov wrote:
>>
>> When reviewing my "x86/hyper-v: use cheaper HVCALL_FLUSH_VIRTUAL_ADDRESS_
>> {LIST,SPACE} hypercalls when possible" patch Michael suggest
Wanpeng Li writes:
> Hi Vitaly, (fix my reply mess this time)
> On Sat, 23 Jun 2018 at 01:09, Vitaly Kuznetsov wrote:
>>
>> When reviewing my "x86/hyper-v: use cheaper HVCALL_FLUSH_VIRTUAL_ADDRESS_
>> {LIST,SPACE} hypercalls when possible" patch Michael suggest
Trace Hyper-V PV IPIs the same way we do PV TLB flush.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/hv_apic.c | 4
arch/x86/include/asm/trace/hyperv.h | 15 +++
2 files changed, 19 insertions(+)
diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv
(passing parameters through registers). Use that too.
This series can collide with my "KVM: x86: hyperv: PV IPI support for
Windows guests" series as I rename ipi_arg_non_ex/ipi_arg_ex structures
there. Depending on which one gets in first we may need to do tiny
adjustments.
Vital
When there is no need to send an IPI to a CPU with VP number > 64
we can do the job with fast HVCALL_SEND_IPI hypercall.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/hv_apic.c | 29 -
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/arch/
Implement 'Fast' hypercall with two 64-bit input parameter. This is
going to be used for HvCallSendSyntheticClusterIpi hypercall.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include/asm/mshyperv.h | 34 ++
1 file changed, 34 insertions(+)
diff --git
Current Hyper-V TLFS (v5.0b) claims that HvCallSendSyntheticClusterIpi
hypercall can't be 'fast' (passing parameters through registers) but
apparently this is not true, Windows always uses 'fast' version. We can
do the same in Linux too.
Signed-off-by: Vitaly Kuznet
Fast TSC calibration failed" error
> on their CentOS 7.4(3.10.0-693.11.6.el7) VM.
Hi Alma,
I think the following upstream commit would help:
commit 71c2a2d0a81f096a2932fccb39a500116fece554
Author: Vitaly Kuznetsov
Date: Thu Jun 22 18:07:30 2017 +0800
x86/hyperv: Read TSC frequency
.
Nothing stops us from being equally 'smart' in Linux too. Switch to
doing cheaper hypercalls whenever possible.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Michael Kelley
---
Changes since v1:
- Re-worded comment about the optimization in hyperv_flush_tlb_others()
[Thomas Gl
KY Srinivasan writes:
>> -Original Message-
>> From: Michael Kelley (EOSG)
>> Sent: Tuesday, June 19, 2018 10:57 AM
>> To: Vitaly Kuznetsov ; x...@kernel.org
>> Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; KY
>> Srinivasan ;
"Michael Kelley (EOSG)" writes:
>> -Original Message-
>> From: linux-kernel-ow...@vger.kernel.org
>> On Behalf
>> Of Vitaly Kuznetsov
>> Sent: Friday, June 15, 2018 9:30 AM
>> To: x...@kernel.org
>> Cc: de...@linuxdriverproj
Thomas Gleixner writes:
> On Tue, 19 Jun 2018, Vitaly Kuznetsov wrote:
>> Thomas Gleixner writes:
>>
>> > On Fri, 15 Jun 2018, Vitaly Kuznetsov wrote:
>> >> * Fills in gva_list starting from offset. Returns the number of items
>> >&
Thomas Gleixner writes:
> On Fri, 15 Jun 2018, Vitaly Kuznetsov wrote:
>> * Fills in gva_list starting from offset. Returns the number of items
>> added.
>> @@ -93,10 +95,19 @@ static void hyperv_flush_tlb_others(const struct cpumask
>> *cpus,
>> if (cpu
.
Nothing stops us from being equally 'smart' in Linux too. Switch to
doing cheaper hypercalls whenever possible.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/mmu.c | 68 ---
1 file changed, 27 insertions(+), 41 deletions(-)
diff
Olaf Hering writes:
> Python3 changed the way how 'print' works.
> Adjust the code to a syntax that is understood by python2 and python3.
>
> Signed-off-by: Olaf Hering
What are the odds that we decide to send the same patch on the same day?
:-)
http://driverdev.linuxdriverproject.org/pipermai
ailure.
Fixes: ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop")
Signed-off-by: Vitaly Kuznetsov
---
tools/hv/hv_vss_daemon.c | 65 +---
1 file changed, 61 insertions(+), 4 deletions(-)
diff --git a/tools/hv/hv_vss_daemo
Use '2to3' tool to make lsvmbus work with both Python2 and Python3.
Signed-off-by: Vitaly Kuznetsov
---
tools/hv/lsvmbus | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus
index 353e56768df8..c184aac33d5c 100644
---
Haiyang Zhang writes:
> From: Haiyang Zhang
>
> This patch adds range checking for rx packet offset and length.
> It may only happen if there is a host side bug.
>
> Signed-off-by: Haiyang Zhang
> ---
> drivers/net/hyperv/hyperv_net.h | 1 +
> drivers/net/hyperv/netvsc.c | 17
the data comes from.
Vitaly Kuznetsov (4):
hv_balloon: fix printk loglevel
hv_balloon: simplify hv_online_page()/hv_page_online_one()
hv_balloon: fix bugs in num_pages_onlined accounting
hv_balloon: trace post_status
drivers/hv/Makefile | 1 +
drivers/hv/hv_b
s: 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page
count")
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 82 +
1 file changed, 69 insertions(+), 13 deletions(-)
diff --git a/drivers/hv/hv_balloon.c b/driv
We have a mix of different ideas of which loglevel should be used. Unify
on the following:
- pr_info() for normal operation
- pr_warn() for 'strange' host behavior
- pr_err() for all errors.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 12 ++--
1 file
Instead of doing pfn_to_page() and continuosly casting page to unsigned
long just cache the pfn of the page with page_to_pfn().
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 27 +--
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/drivers/hv
Hyper-V balloon driver makes non-trivial calculations to convert Linux's
representation of free/used memory to what Hyper-V host expects to see. Add
a tracepoint to see what's being sent and where the data comes from.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/Makefile
without any Hyper-V devices of have a CPU with no assigned channels.
Reassign reenlightenment notifications to some other active CPU when
the CPU which is assigned to get them goes offline.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Thomas Gleixner
---
arch/x86/hyperv/hv_init.c | 22
vent.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Paolo Bonzini
---
v3 -> v4:
add static to kvm_hyperv_tsc_notifier() [kbuild robot]
---
arch/x86/kvm/x86.c | 45 +
1 file changed, 45 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x
dd support for it in KVM.
The only non-trivial change in the patch is in vgettsc(): when updating
our gtod copy we now need to get both the clockread and tsc value.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Paolo Bonzini
---
arch/x86/kvm/
This is going to be used from KVM code where we need to get both
TSC and TSC page value.
Nobody is supposed to use the function when Hyper-V code is compiled out,
just BUG().
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/hv_init.c | 1 +
arch/x86/include/asm/mshyperv.h | 23
as of v5.0b) wrongly specifies
EAX:BIT(12) of CPUID:0x4009 as the feature identification bit. The
right one to check is EAX:BIT(13) of CPUID:0x4003. I was assured that
the fix in on the way.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Thomas Gleixner
---
v3 -> v4:
- drop 'include
Hyper-V reenlightenment interrupts arrive when the VM is migrated, we're
not supposed to see many of them. However, it may be important to know
that the event has happened in case we have L2 nested guests.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Thomas Gleixner
---
arch/x86/h
gs the required support.
Making KVM work with TSC page clocksource is relatively easy, it is done in
PATCH 6 of the series. All the rest is required to support L1 migration
when TSC frequency changes, we use a special feature from Hyper-V to do
the job.
Vitaly Kuznetsov (7):
x86/hyper-v: check for re
In hyperv_init() we presume we always have access to VP index and hypercall
MSRs while according to the specification we should check if we're allowed
to access the corresponding MSRs before accessing them.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Thomas Gleixner
---
arch/x86/h
low 12 bits of AddressSpace should be 0 in
long mode). The flush hypercalls flush all PCIDs for the specified
AddressSpace."
With this, PCID can be enabled.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/mmu.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
d
"Michael Kelley (EOSG)" writes:
> Vitaly Kuznetsov writes:
>>
>> > "Michael Kelley (EOSG)" writes:
>> >
>> >> On Fri, 19 Jan 2018, Thomas Gleixner wrote:
>> >>
>> >>>
>> >>> You added '#i
Vitaly Kuznetsov writes:
> "Michael Kelley (EOSG)" writes:
>
>> On Fri, 19 Jan 2018, Thomas Gleixner wrote:
>>
>>>
>>> You added '#include ' to mshyperv.h which is included in
>>> vclock_gettime.c and pulls in
"Michael Kelley (EOSG)" writes:
> On Fri, 19 Jan 2018, Thomas Gleixner wrote:
>
>> -Original Message-
>> From: Thomas Gleixner [mailto:t...@linutronix.de]
>> Sent: Friday, January 19, 2018 11:48 PM
>> To: Vitaly Kuznetsov
>> Cc
Thomas Gleixner writes:
> On Fri, 19 Jan 2018, Vitaly Kuznetsov wrote:
>> kbuild test robot writes:
>>
>> > Hi Vitaly,
>> >
>> > Thank you for the patch! Perhaps something to improve:
>> >
>> > [auto build test WARNING on tip/
applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Vitaly-Kuznetsov/x86-kvm-hyperv-stable-clocksorce-for-L2-guests-when-running-nested-KVM-on-Hyper-V/20180119-160814
> config: x86_64-allmodconfig
dd support for it in KVM.
The only non-trivial change in the patch is in vgettsc(): when updating
our gtod copy we now need to get both the clockread and tsc value.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Paolo Bonzini
---
arch/x86/kvm/
vent.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Paolo Bonzini
---
arch/x86/kvm/x86.c | 45 +
1 file changed, 45 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f14e0129c8f5..94f28e6002b2 100644
--- a/arch/x86/kvm/x86.c
+++
This is going to be used from KVM code where we need to get both
TSC and TSC page value.
Nobody is supposed to use the function when Hyper-V code is compiled out,
just BUG().
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/hv_init.c | 1 +
arch/x86/include/asm/mshyperv.h | 23
without any Hyper-V devices of have a CPU with no assigned channels.
Reassign reenlightenment notifications to some other active CPU when
the CPU which is assigned to get them goes offline.
Signed-off-by: Vitaly Kuznetsov
---
v2-> v3:
- Drop spinlock protection from hv_cpu_die() as cpu hotplug
Hyper-V reenlightenment interrupts arrive when the VM is migrated, we're
not supposed to see many of them. However, it may be important to know
that the event has happened in case we have L2 nested guests.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/hyperv/hv_init.c | 2 ++
arc
as of v5.0b) wrongly specifies
EAX:BIT(12) of CPUID:0x4009 as the feature identification bit. The
right one to check is EAX:BIT(13) of CPUID:0x4003. I was assured that
the fix in on the way.
Signed-off-by: Vitaly Kuznetsov
---
v2 -> v3:
- add __visible and __irq_entry [Thomas Gleixn
In hyperv_init() we presume we always have access to VP index and hypercall
MSRs while according to the specification we should check if we're allowed
to access the corresponding MSRs before accessing them.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Thomas Gleixner
---
arch/x86/h
frequency changes, we use a special feature from Hyper-V to do
the job.
Vitaly Kuznetsov (7):
x86/hyper-v: check for required priviliges in hyperv_init()
x86/hyper-v: add a function to read both TSC and TSC page value
simulateneously
x86/hyper-v: reenlightenment notifications suppor
Thomas Gleixner writes:
> On Wed, 13 Dec 2017, Vitaly Kuznetsov wrote:
>
>> This is going to be used from KVM code where we need to get both
>> TSC and TSC page value.
>>
>> When Hyper-V code is compiled out just return rdtsc(), this will allow us
>> to a
Thomas Gleixner writes:
> On Wed, 13 Dec 2017, Vitaly Kuznetsov wrote:
>> +static int hv_cpu_die(unsigned int cpu)
>> +{
>> +struct hv_reenlightenment_control re_ctrl;
>> +int i;
>> +static DEFINE_SPINLOCK(lock);
>> +
>> +if (hv_reenl
Vitaly Kuznetsov writes:
> Paolo Bonzini writes:
>>
>> Patches 5-7 are
>>
>> Acked-by: Paolo Bonzini
>>
>> I would appreciate if the Hyper-V folks can provide a topic branch to be
>> merged in both HV and KVM trees.
>>
>
> There
Paolo Bonzini writes:
> On 21/12/2017 13:50, Vitaly Kuznetsov wrote:
>> I'm back with (somewhat frustrating) results (E5-2603):
>
> v4 (that would be Broadwell)?
>
Sorry, v3, actually. Haswell. (the first one supporting vmcs shadowing afaiu).
>> 1) Windows on Hype
Paolo Bonzini writes:
> On 19/12/2017 13:25, Vitaly Kuznetsov wrote:
>>
>>> At this point in time, I don't think you can just blithely change the
>>> virtual VMCS layout and revision number. Existing VMs using the old
>>> layout and revision number
Vitaly Kuznetsov writes:
> Paolo Bonzini writes:
>
>> On 18/12/2017 18:17, Vitaly Kuznetsov wrote:
>>> The original author of these patches does no longer work at Red Hat, I
>>> agreed to take this over and send upstream. Here is his original
>>> descrip
Paolo Bonzini writes:
> On 18/12/2017 18:17, Vitaly Kuznetsov wrote:
>> The original author of these patches does no longer work at Red Hat, I
>> agreed to take this over and send upstream. Here is his original
>> description:
>>
>> "Makes KVM implement th
Jim Mattson writes:
> At this point in time, I don't think you can just blithely change the
> virtual VMCS layout and revision number. Existing VMs using the old
> layout and revision number must continue to work on versions of kvm
> past this point. You could tie the layout and revision number c
KVM_CAP_HYPERV_ENLIGHTENED_VMCS. The version is to
be advertised to the nested hypervisor, currently done via a cpuid
leaf for Hyper-V.
Signed-off-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/svm.c | 9
arch/x86/kvm
ver going to be true if
enlightened_vmcs_enabled is not set.
Signed-off-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 60 ++
1 file changed, 52 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/
uot;
Note that we choose to not modify our VMREAD, VMWRITE, and VMPTRLD
handlers. They will not cause any explicit failure but may not have
the intended effect.
Signed-off-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 28
1 file changed, 28
From: Ladi Prosek
These non-synthetic VMCS fields were not supported by KVM thus far. The
layout is according to Hyper-V TLFS 5.0b, the physical encoding according
to the Intel SDM.
Signed-off-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include/asm/vmx.h | 4
arch/x86
enlightened VMCS versions.
Signed-off-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
[Vitaly]: Update VMCS12_REVISION to some new arbitrary number.
---
arch/x86/kvm/vmx.c | 321 +++--
1 file changed, 187 insertions(+), 134 deletions(-)
diff --git
1 - 100 of 975 matches
Mail list logo