Commit-ID: 8c3e44bde7fd1b8291515f046008225711ac7beb
Gitweb: https://git.kernel.org/tip/8c3e44bde7fd1b8291515f046008225711ac7beb
Author: Maya Nakamura
AuthorDate: Fri, 12 Jul 2019 08:21:25 +
Committer: Thomas Gleixner
CommitDate: Mon, 22 Jul 2019 11:06:45 +0200
x86/hyperv: Add
Commit-ID: 83527ef7abf7c02c33a90b00f0954db35415adbd
Gitweb: https://git.kernel.org/tip/83527ef7abf7c02c33a90b00f0954db35415adbd
Author: Maya Nakamura
AuthorDate: Fri, 12 Jul 2019 08:25:18 +
Committer: Thomas Gleixner
CommitDate: Mon, 22 Jul 2019 11:06:45 +0200
drivers: hv: vmbus
Commit-ID: fcd3f6222a4ece735d0b3ffb93f646eff693aa69
Gitweb: https://git.kernel.org/tip/fcd3f6222a4ece735d0b3ffb93f646eff693aa69
Author: Maya Nakamura
AuthorDate: Fri, 12 Jul 2019 08:14:47 +
Committer: Thomas Gleixner
CommitDate: Mon, 22 Jul 2019 11:06:44 +0200
x86/hyperv: Create
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
---
drivers/hid/hid-hyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-hyperv.c b
Replace PAGE_SIZE with HV_HYP_PAGE_SIZE because the guest page size may
not be 4096 on all architectures and Hyper-V always runs with a page
size of 4096.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
Reviewed-by: Vitaly Kuznetsov
---
drivers/hv/hyperv_vmbus.h | 8
1 file
counterparts are implemented, keeping symmetry between
architectures with potentially different guest page sizes.
Link:
https://lore.kernel.org/lkml/alpine.deb.2.21.1906272334560.32...@nanos.tec.linutronix.de/
Link: https://lore.kernel.org/lkml/87muindr9c@vitty.brq.redhat.com/
Signed-off-by: Maya
Define HV_HYP_PAGE_SHIFT, HV_HYP_PAGE_SIZE, and HV_HYP_PAGE_MASK because
the Linux guest page size and hypervisor page size concepts are
different, even though they happen to be the same value on x86.
Also, replace PAGE_SIZE with HV_HYP_PAGE_SIZE.
Signed-off-by: Maya Nakamura
Reviewed-by
2 only):
- Remove file name from the subject.
- Include prototypes of two new functions.
- Add another Link tag.
Changes in v3:
- Simplify expression for BUILD_BUG_ON() in patch 2.
- Add Link and Reviewed-by tags.
Change in v2:
- Replace patch 2 with a new one.
Maya Nakamura (5):
x86: hv
On Thu, Jun 27, 2019 at 11:38:14PM +0200, Thomas Gleixner wrote:
> Maya,
>
> On Tue, 18 Jun 2019, Maya Nakamura wrote:
>
> > diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
> > index 0e033ef11a9f..e8960a83add7 100644
> > --- a/arch/x86/hyper
Define HV_HYP_PAGE_SHIFT, HV_HYP_PAGE_SIZE, and HV_HYP_PAGE_MASK because
the Linux guest page size and hypervisor page size concepts are
different, even though they happen to be the same value on x86.
Also, replace PAGE_SIZE with HV_HYP_PAGE_SIZE.
Signed-off-by: Maya Nakamura
Reviewed-by
Replace PAGE_SIZE with HV_HYP_PAGE_SIZE because the guest page size may
not be 4096 on all architectures and Hyper-V always runs with a page
size of 4096.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
Reviewed-by: Vitaly Kuznetsov
---
drivers/hv/hyperv_vmbus.h | 8
1 file
] Simplify expression for BUILD_BUG_ON().
- Add Link and Reviewed-by tags.
Change in v2:
- [PATCH 2/5] Replace with a new patch.
Maya Nakamura (5):
x86: hv: hyperv-tlfs.h: Create and use Hyper-V page definitions
x86: hv: hv_init.c: Add functions to allocate/deallocate page for
Hyper-V
hv
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input
counterparts are implemented, keeping symmetry between
architectures with potentially different guest page sizes.
Link: https://lore.kernel.org/lkml/87muindr9c@vitty.brq.redhat.com/
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
Reviewed-by: Vitaly Kuznetsov
---
arch/x86/hyperv/hv_init.c
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
---
drivers/hid/hid-hyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-hyperv.c b
On Wed, Jun 12, 2019 at 12:36:47PM +0200, Vitaly Kuznetsov wrote:
> Maya Nakamura writes:
>
> > Introduce two new functions, hv_alloc_hyperv_page() and
> > hv_free_hyperv_page(), to allocate/deallocate memory with the size and
> > alignment that Hyper-V expects as a page.
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/hyperv-keyboard.c
b
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
---
drivers/hid/hid-hyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index
Replace PAGE_SIZE with HV_HYP_PAGE_SIZE because the guest page size may
not be 4096 on all architectures and Hyper-V always runs with a page
size of 4096.
Signed-off-by: Maya Nakamura
---
drivers/hv/hyperv_vmbus.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
counterparts are implemented, keeping symmetry between
architectures with potentially different guest page sizes.
Signed-off-by: Maya Nakamura
---
arch/x86/hyperv/hv_init.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index
Define HV_HYP_PAGE_SHIFT, HV_HYP_PAGE_SIZE, and HV_HYP_PAGE_MASK because
the Linux guest page size and hypervisor page size concepts are
different, even though they happen to be the same value on x86.
Also, replace PAGE_SIZE with HV_HYP_PAGE_SIZE.
Signed-off-by: Maya Nakamura
---
arch/x86
] Replace with a new patch.
Maya Nakamura (5):
x86: hv: hyperv-tlfs.h: Create and use Hyper-V page definitions
x86: hv: hv_init.c: Add functions to allocate/deallocate page for
Hyper-V
hv: vmbus: Replace page definition with Hyper-V specific one
HID: hv: Remove dependencies on PAGE_SIZE for
On Fri, Apr 12, 2019 at 09:52:47AM +0200, Vitaly Kuznetsov wrote:
> Maya Nakamura writes:
>
> > On Fri, Apr 05, 2019 at 01:31:02PM +0200, Vitaly Kuznetsov wrote:
> >> Maya Nakamura writes:
> >>
> >> > @@ -98,18 +99,20 @@ EXPORT_SYMBOL_GPL(hyperv_pc
On Fri, Apr 05, 2019 at 01:31:02PM +0200, Vitaly Kuznetsov wrote:
> Maya Nakamura writes:
>
> > @@ -98,18 +99,20 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg);
> > u32 hv_max_vp_index;
> > EXPORT_SYMBOL_GPL(hv_max_vp_index);
> >
> > +struct kmem_cache *c
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/hyperv-keyboard.c
b
Define the ring buffer size as a constant expression because it should
not depend on the guest page size.
Signed-off-by: Maya Nakamura
---
drivers/hid/hid-hyperv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index
Replace PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK with HV_HYP_PAGE_SHIFT,
HV_HYP_PAGE_SIZE, and HV_HYP_PAGE_MASK, respectively, because the guest
page size and hypervisor page size concepts are different, even though
they happen to be the same value on x86.
Signed-off-by: Maya Nakamura
---
arch/x86
Replace PAGE_SIZE with HV_HYP_PAGE_SIZE because the guest page size may
not be 4096 on all architectures and Hyper-V always runs with a page
size of 4096.
Signed-off-by: Maya Nakamura
---
drivers/hv/hyperv_vmbus.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
Switch from the function that allocates a single Linux guest page to a
different one to use a Hyper-V page because the guest page size and
hypervisor page size concepts are different, even though they happen to
be the same value on x86.
Signed-off-by: Maya Nakamura
---
arch/x86/hyperv/hv_init.c
Define HV_HYP_PAGE_SHIFT, HV_HYP_PAGE_SIZE, and HV_HYP_PAGE_MASK because
the Linux guest page size and hypervisor page size concepts are
different, even though they happen to be the same value on x86.
Also, replace PAGE_SIZE with HV_HYP_PAGE_SIZE.
Signed-off-by: Maya Nakamura
---
arch/x86
size.
This is the initial set of changes to the Hyper-V code, and future
patches will make additional changes using the same foundation, for
example, replace __vmalloc() and related functions when Hyper-V pages
are intended.
Maya Nakamura (6):
x86: hv: hyperv-tlfs.h: Create and use Hyper-V page
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().
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
Reviewed-by: Vitaly Kuznetsov
Tested-by: Vitaly Kuznetsov
---
Changes in v5
flexible array, is nested two levels deep in
struct hv_pcibus_device via retarget_msi_interrupt_params.
Add a comment that retarget_msi_interrupt_params should be the last
member of struct hv_pcibus_device.
Signed-off-by: Maya Nakamura
Reviewed-by: Michael Kelley
Reviewed-by: Vitaly Kuznetsov
Because Hyper-V requires that hypercall arguments be aligned on an 8
byte boundary, add __aligned(8) to struct retarget_msi_interrupt.
Link: https://lore.kernel.org/lkml/87k1hlqlby@vitty.brq.redhat.com/
Signed-off-by: Maya Nakamura
---
drivers/pci/controller/pci-hyperv.c | 2 +-
1 file
previous patches.
Maya Nakamura (3):
PCI: hv: Add __aligned(8) to struct retarget_msi_interrupt
PCI: hv: Replace hv_vp_set with hv_vpset
PCI: hv: Refactor hv_irq_unmask() to use cpumask_to_vpset()
arch/x86/hyperv/hv_init.c | 1 +
drivers/pci/controller/pci-hyperv.c | 61
k_var() because hv_irq_unmask() runs while a spinlock is
held.
Signed-off-by: Maya Nakamura
---
Changes in v4:
- Replace GFP_KERNEL with GFP_ATOMIC for alloc_cpumask_var().
- Update the commit message.
Changes in v3:
- Modify to catch all failures from cpumask_to_vpset().
- Correct the v2 c
per-V requires that hypercall arguments
be aligned on an 8 byte boundary.
Signed-off-by: Maya Nakamura
---
Changes in v4:
- Add __aligned(8) to struct retarget_msi_interrupt.
- Update the commit message.
Change in v3:
- Correct the v2 change log.
Change in v2:
- Update the commit message.
driver
ned(8) to struct
retarget_msi_interrupt because Hyper-V requires that hypercall arguments
be aligned on an 8 byte boundary.
Vitaly, thank you for finding the issues, and Lorenzo and Michael, thank
you for your guidance and support!
Maya Nakamura (2):
PCI: hv: Replace hv_vp_set with hv_vpset
PC
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.
Signed-off-by: Maya Nakamura
---
Changes in v3:
- Modify to catch all failures from
flexible array, is nested two levels deep in
struct hv_pcibus_device via retarget_msi_interrupt_params.
Add a comment that retarget_msi_interrupt_params should be the last member
of struct hv_pcibus_device.
Signed-off-by: Maya Nakamura
---
Change in v3:
- Correct the v2 change log.
Change in v2
cpumask_to_vpset(), uses
the shared implementation, and exports hv_max_vp_index, which is
required by cpumask_to_vpset().
Maya Nakamura (2):
PCI: hv: Replace hv_vp_set with hv_vpset
PCI: hv: Refactor hv_irq_unmask() to use cpumask_to_vpset()
arch/x86/hyperv/hv_init.c | 1 +
drivers/pci
On Sun, Jan 27, 2019 at 05:22:06AM +, Michael Kelley wrote:
> From: Maya Nakamura Sent: Saturday, January 26,
> 2019 12:55 AM
> >
> > @@ -953,29 +951,27 @@ static void hv_irq_unmask(struct irq_data *data)
> > */
> >
On Sun, Jan 27, 2019 at 05:11:48AM +, Michael Kelley wrote:
> From: Maya Nakamura Sent: Saturday, January 26,
> 2019 12:52 AM
> >
> > Remove a duplicate definition of VP set (hv_vp_set) and use the common
> > definition (hv_vpset) that is used in other places.
>
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.
Signed-off-by: Maya Nakamura
---
Changes in v2:
- Remove unnecessary nr_bank
flexible array, is nested two levels deep in
struct hv_pcibus_device via retarget_msi_interrupt_params.
Add a comment that retarget_msi_interrupt_params should be the last member
of struct hv_pcibus_device.
Signed-off-by: Maya Nakamura
---
Change in v2:
- None
drivers/pci/controller/pci-hyperv.c
cpumask_to_vpset(), uses
the shared implementation, and exports hv_max_vp_index, which is
required by cpumask_to_vpset().
Maya Nakamura (2):
PCI: hv: Replace hv_vp_set with hv_vpset
PCI: hv: Refactor hv_irq_unmask() to use cpumask_to_vpset()
arch/x86/hyperv/hv_init.c | 1 +
drivers/pci
On Thu, Jan 24, 2019 at 02:12:13PM +0100, Vitaly Kuznetsov wrote:
> Maya Nakamura writes:
>
> > @@ -460,12 +454,16 @@ struct hv_pcibus_device {
> > struct msi_controller msi_chip;
> > struct irq_domain *irq_domain;
> >
> > - /* hyperca
On Thu, Jan 24, 2019 at 03:29:18PM +0300, Dan Carpenter wrote:
> On Wed, Jan 23, 2019 at 01:02:12PM -0800, Maya Nakamura wrote:
> > @@ -908,12 +906,12 @@ static void hv_irq_unmask(struct irq_data *data)
> > struct retarget_msi_interrupt *params;
> > struct h
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().
Signed-off-by: Maya Nakamura
---
arch/x86/hyperv/hv_init.c | 1 +
drivers/pci/controller/pci-hyperv.c | 39
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(+), 13 deletions(-)
diff --git a/drivers
by cpumask_to_vpset().
Maya Nakamura (2):
PCI: hv: Replace hv_vp_set with hv_vpset
PCI: hv: Refactor hv_irq_unmask() to use cpumask_to_vpset()
arch/x86/hyperv/hv_init.c | 1 +
drivers/pci/controller/pci-hyperv.c | 60 ++---
2 files changed, 29 insertions
52 matches
Mail list logo