There will be more places other than vmbus where we need to calculate
the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to
hyperv generic header.
Signed-off-by: Boqun Feng
Reviewed-by: Michael Kelley
---
drivers/hv/channel.c | 13 -
include/linux/hyperv.h | 15
When a guest communicate with the hypervisor, it must use HV_HYP_PAGE to
calculate PFN, so introduce a few hvpfn helper functions as the
counterpart of the page helper functions. This is the preparation for
supporting guest whose PAGE_SIZE is not 4k.
Signed-off-by: Boqun Feng
Reviewed-by
HV_HYP_PAGE_SIZE).
Signed-off-by: Boqun Feng
Reviewed-by: Michael Kelley
---
drivers/hv/channel.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 3ebda7707e46..4d0f8e5a88d6 100644
--- a/drivers/hv/channel.c
+++ b
PAGE_SIZE = 4k.
Signed-off-by: Boqun Feng
Cc: Jiri Kosina
Cc: Michael Kelley
---
Michael and Jiri,
I change the code because of a problem I found:
https://lore.kernel.org/lkml/20200914084600.ga45...@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net/
, so I drop your
PAGE_SIZE = 4k.
Signed-off-by: Boqun Feng
Cc: Michael Kelley
Cc: Dmitry Torokhov
---
Michael and Dmitry,
I change the code because of a problem I found:
https://lore.kernel.org/lkml/20200914084600.ga45...@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net/
, so I drop
PAGE_SIZE = 4k.
Signed-off-by: Boqun Feng
Cc: Michael Kelley
---
Michael,
I drop your Reviewed-by tag because of the page align issue. Could you
review this updated version? Thanks!
Regards,
Boqun
drivers/hv/hv_util.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff
le this special case, we need the types of GPADL
to differ different guest memory usage for GPADL.
Type enum is introduced along with several general interfaces to
describe the differences between normal buffer GPADL and ringbuffer
GPADL.
Signed-off-by: Boqun Feng
Reviewed-by: Michael Kel
Both the base_*_gpa should use the guest page number in Hyper-V page, so
use HV_HYP_PAGE instead of PAGE.
Signed-off-by: Boqun Feng
Reviewed-by: Michael Kelley
---
drivers/hv/hv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index
Pure function movement, no functional changes. The move is made, because
in a later change, __vmbus_open() will rely on some static functions
afterwards, so we separate the move and the modification of
__vmbus_open() in two patches to make it easy to review.
Signed-off-by: Boqun Feng
Reviewed-by
convert pages in the sglist of scsi_cmnd
into Hyper-V pages in vmbus_packet_mpb_array.
This patch does the conversion by dividing pages in sglist into Hyper-V
pages, offset and indexes in vmbus_packet_mpb_array are recalculated
accordingly.
Signed-off-by: Boqun Feng
Reviewed-by: Michael Kelley
mber.
In order to support guest whose page size is not 4k, we need to make
hv_netvsc always use HV_HYP_PAGE_SIZE for Hyper-V communication.
Signed-off-by: Boqun Feng
Reviewed-by: Michael Kelley
---
drivers/net/hyperv/netvsc.c | 2 +-
drivers/net/hyperv/netv
ing worked fine ;-)
Looking forwards to comments and suggestions!
Regards,
Boqun
[1]:
https://lore.kernel.org/lkml/1598287583-71762-1-git-send-email-mikel...@microsoft.com/
Boqun Feng (11):
Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl
Drivers: hv: vmbus: Move __vmbus_open(
On Mon, Sep 14, 2020 at 09:30:16AM +, Wei Liu wrote:
> On Mon, Sep 14, 2020 at 04:46:00PM +0800, Boqun Feng wrote:
> > On Thu, Sep 10, 2020 at 10:34:52PM +0800, Boqun Feng wrote:
> > > When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at
> > >
On Thu, Sep 10, 2020 at 10:34:52PM +0800, Boqun Feng wrote:
> When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at
> least 2 * PAGE_SIZE: one page for the header and at least one page of
> the data part (because of the alignment requirement for double mapping).
>
le this special case, we need the types of GPADL
to differ different guest memory usage for GPADL.
Type enum is introduced along with several general interfaces to
describe the differences between normal buffer GPADL and ringbuffer
GPADL.
Signed-off-by: Boqun Feng
---
drivers/
's better to have it fixed in the
Hyper-V). I also have done a build and boot test on x86, everything
worked well.
Looking forwards to comments and suggestions!
Regards,
Boqun
[1]:
https://lore.kernel.org/lkml/1598287583-71762-1-git-send-email-mikel...@microsoft.com/
Boqun Feng (11):
Both the base_*_gpa should use the guest page number in Hyper-V page, so
use HV_HYP_PAGE instead of PAGE.
Signed-off-by: Boqun Feng
---
drivers/hv/hv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 7499079f4077..8ac8bbf5b5aa
Pure function movement, no functional changes. The move is made, because
in a later change, __vmbus_open() will rely on some static functions
afterwards, so we separate the move and the modification of
__vmbus_open() in two patches to make it easy to review.
Signed-off-by: Boqun Feng
Reviewed-by
HV_HYP_PAGE_SIZE).
Signed-off-by: Boqun Feng
---
drivers/hv/channel.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 3ebda7707e46..4d0f8e5a88d6 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -22,9
There will be more places other than vmbus where we need to calculate
the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to
hyperv generic header.
Signed-off-by: Boqun Feng
---
drivers/hv/channel.c | 13 -
include/linux/hyperv.h | 15 +++
2 files
mber.
In order to support guest whose page size is not 4k, we need to make
hv_netvsc always use HV_HYP_PAGE_SIZE for Hyper-V communication.
Signed-off-by: Boqun Feng
---
drivers/net/hyperv/netvsc.c | 2 +-
drivers/net/hyperv/netvsc_drv.c | 46 +++
dri
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/hyperv-keyboard.c
b/drivers/input/serio/hyperv-keyboard.c
index df4e9f6f4529..6ebc61e2d
convert pages in the sglist of scsi_cmnd
into Hyper-V pages in vmbus_packet_mpb_array.
This patch does the conversion by dividing pages in sglist into Hyper-V
pages, offset and indexes in vmbus_packet_mpb_array are recalculated
accordingly.
Signed-off-by: Boqun Feng
---
drivers/scsi/storvsc_drv.c
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
Acked-by: Jiri Kosina
---
Hi Jiri,
Thanks for your acked-by. I make a small change in this version (casting
2 * PAGE_SIZE into int to avoid compiler warnings), and it make no
functional change. If the change is inappropri
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
drivers/hv/hv_util.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index a4e8d96513c2..3996c16568a3 100644
--- a/drivers/hv/hv_util.c
++
When a guest communicate with the hypervisor, it must use HV_HYP_PAGE to
calculate PFN, so introduce a few hvpfn helper functions as the
counterpart of the page helper functions. This is the preparation for
supporting guest whose PAGE_SIZE is not 4k.
Signed-off-by: Boqun Feng
---
include/linux
On Sat, Sep 05, 2020 at 12:30:48AM +, Michael Kelley wrote:
> From: Boqun Feng Sent: Tuesday, September 1, 2020 8:01
> PM
[...]
> > struct rndis_request {
> > struct list_head list_ent;
> > struct completion wait_event;
> > @@ -215,18 +215,18 @@ static
On Sat, Sep 05, 2020 at 12:19:08AM +, Michael Kelley wrote:
[...]
> >
> > @@ -462,7 +576,13 @@ static int __vmbus_open(struct vmbus_channel
> > *newchannel,
> > open_msg->openid = newchannel->offermsg.child_relid;
> > open_msg->child_relid = newchannel->offermsg.child_relid;
> > o
On Sat, Sep 05, 2020 at 02:55:48AM +, Michael Kelley wrote:
> From: Boqun Feng Sent: Tuesday, September 1, 2020 8:01
> PM
> >
> > Hyper-V always use 4k page size (HV_HYP_PAGE_SIZE), so when
> > communicating with Hyper-V, a guest should always use HV_HYP_PAGE_SIZE
Both the base_*_gpa should use the guest page number in Hyper-V page, so
use HV_HYP_PAGE instead of PAGE.
Signed-off-by: Boqun Feng
---
drivers/hv/hv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 7499079f4077..8ac8bbf5b5aa
naligned firmware data, but it's better to have it fixed in the
Hyper-V). I also have done a build and boot test on x86, everything
worked well.
Looking forwards to comments and suggestions!
Regards,
Boqun
[1]:
https://lore.kernel.org/lkml/1598287583-71762-1-git-send-email-mikel...@microsoft.c
le this special case, we need the types of GPADL
to differ different guest memory usage for GPADL.
Type enum is introduced along with several general interfaces to
describe the differences between normal buffer GPADL and ringbuffer
GPADL.
Signed-off-by: Boqun Feng
---
drivers/
Pure function movement, no functional changes. The move is made, because
in a later change, __vmbus_open() will rely on some static functions
afterwards, so we sperate the move and the modification of
__vmbus_open() in two patches to make it easy to review.
Signed-off-by: Boqun Feng
Reviewed-by
mber.
In order to support guest whose page size is not 4k, we need to make
hv_netvsc always use HV_HYP_PAGE_SIZE for Hyper-V communication.
Signed-off-by: Boqun Feng
---
drivers/net/hyperv/netvsc.c | 2 +-
drivers/net/hyperv/netvsc_drv.c | 46 +++
dri
convert pages in the sglist of scsi_cmnd
into Hyper-V pages in vmbus_packet_mpb_array.
This patch does the conversion by dividing pages in sglist into Hyper-V
pages, offset and indexes in vmbus_packet_mpb_array are recalculated
accordingly.
Signed-off-by: Boqun Feng
---
drivers/scsi/storvsc_drv.c
There will be more places other than vmbus where we need to calculate
the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to
hyperv generic header.
Signed-off-by: Boqun Feng
---
drivers/hv/channel.c | 13 -
include/linux/hyperv.h | 15 +++
2 files
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
drivers/hv/hv_util.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index 92ee0fe4c919..73a77bead2be 100644
--- a/drivers/hv/hv_util.c
++
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
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 0b6ee1dee625..dff032f17ad0 100644
--- a/drivers/hid/hid-hyperv.c
++
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/hyperv-keyboard.c
b/drivers/input/serio/hyperv-keyboard.c
index df4e9f6f4529..77ba57ba2
When a guest communicate with the hypervisor, it must use HV_HYP_PAGE to
calculate PFN, so introduce a few hvpfn helper functions as the
counterpart of the page helper functions. This is the preparation for
supporting guest whose PAGE_SIZE is not 4k.
Signed-off-by: Boqun Feng
---
include/linux
HV_HYP_PAGE_SIZE).
Signed-off-by: Boqun Feng
---
drivers/hv/channel.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 3ebda7707e46..4d0f8e5a88d6 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -22,9
On Thu, Jul 23, 2020 at 02:26:00AM +, Michael Kelley wrote:
> From: boqun.f...@gmail.com Sent: Wednesday, July 22,
> 2020 6:52 PM
> >
> > On Thu, Jul 23, 2020 at 12:13:07AM +, Michael Kelley wrote:
> > > From: Boqun Feng Sent: Monday, July 20, 2020 6:42
>
On Thu, Jul 23, 2020 at 12:13:07AM +, Michael Kelley wrote:
> From: Boqun Feng Sent: Monday, July 20, 2020 6:42 PM
> >
> > Hyper-V always use 4k page size (HV_HYP_PAGE_SIZE), so when
> > communicating with Hyper-V, a guest should always use HV_HYP_PAGE_SIZE
> > a
On Wed, Jul 22, 2020 at 11:36:15PM +, Michael Kelley wrote:
> From: Boqun Feng Sent: Monday, July 20, 2020 6:42 PM
> >
> > When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at
> > least 2 * PAGE_SIZE: one page for the header and at least one p
On Wed, Jul 22, 2020 at 11:25:18PM +, Michael Kelley wrote:
> From: Boqun Feng Sent: Monday, July 20, 2020 6:41 PM
> >
> > This patch introduces two types of GPADL: HV_GPADL_{BUFFER, RING}. The
> > types of GPADL are purely the concept in the guest, IOW the hypervisor
On Tue, Jul 21, 2020 at 03:22:18PM +, Wei Liu wrote:
> On Tue, Jul 21, 2020 at 09:41:25AM +0800, Boqun Feng wrote:
> > Since the hypervisor always uses 4K as its page size, the size of PFNs
> > used for gpadl should be HV_HYP_PAGE_SIZE rather than PAGE_SIZE, so
> > adjus
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
drivers/input/serio/hyperv-keyboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/hyperv-keyboard.c
b/drivers/input/serio/hyperv-keyboard.c
index df4e9f6f4529..77ba57ba2
le this special case, we need the types of GPADL
to differ different guest memory usage for GPADL.
Type enum is introduced along with several general interfaces to
describe the differences between normal buffer GPADL and ringbuffer
GPADL.
Signed-off-by: Boqun Feng
---
drivers/
Both the base_*_gpa should use the guest page number in Hyper-V page, so
use HV_HYP_PAGE instead of PAGE.
Signed-off-by: Boqun Feng
---
drivers/hv/hv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 41b2ee06cc2f..e4f50dcdc46c
When a guest communicate with the hypervisor, it must use HV_HYP_PAGE to
calculate PFN, so introduce a few hvpfn helper functions as the
counterpart of the page helper functions. This is the preparation for
supporting guest whose PAGE_SIZE is not 4k.
Signed-off-by: Boqun Feng
---
include/linux
Pure function movement, no functional changes. The move is made, because
in a later change, __vmbus_open() will rely on some static functions
afterwards, so we sperate the move and the modification of
__vmbus_open() in two patches to make it easy to review.
Signed-off-by: Boqun Feng
---
drivers
Since the hypervisor always uses 4K as its page size, the size of PFNs
used for gpadl should be HV_HYP_PAGE_SIZE rather than PAGE_SIZE, so
adjust this accordingly as the preparation for supporting 16K/64K page
size guests.
Signed-off-by: Boqun Feng
---
drivers/hv/channel.c | 13 +
1
There will be more places other than vmbus where we need to calculate
the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to
hyperv generic header.
Signed-off-by: Boqun Feng
---
drivers/hv/channel.c | 13 -
include/linux/hyperv.h | 15 +++
2 files
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
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 0b6ee1dee625..36c5e157c691 100644
--- a/drivers/hid/hid-hyperv.c
++
ing vmbus_open() to establish the vmbus connection.
Signed-off-by: Boqun Feng
---
drivers/hv/hv_util.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index 92ee0fe4c919..73a77bead2be 100644
--- a/drivers/hv/hv_util.c
++
mber.
In order to support guest whose page size is not 4k, we need to make
hv_netvsc always use HV_HYP_PAGE_SIZE for Hyper-V communication.
Signed-off-by: Boqun Feng
---
drivers/net/hyperv/netvsc.c | 2 +-
drivers/net/hyperv/netvsc_drv.c | 46 +++
dri
ks yet ;-) (I could observe an error caused
by unaligned firmware data, but it's better to have it fixed in the
Hyper-V).
Looking forwards to comments and suggestions!
Regards,
Boqun
[1]:
https://lore.kernel.org/lkml/1584200119-18594-1-git-send-email-mikel...@microsoft.com/
Boqun Feng (11
convert pages in the sglist of scsi_cmnd
into Hyper-V pages in vmbus_packet_mpb_array.
This patch does the conversion by dividing pages in sglist into Hyper-V
pages, offset and indexes in vmbus_packet_mpb_array are recalculated
accordingly.
Signed-off-by: Boqun Feng
---
drivers/scsi/storvsc_drv.c
arch-specific
> arch_spin_unlock_wait().
>
> Signed-off-by: Paul E. McKenney
> Cc: Benjamin Herrenschmidt
> Cc: Paul Mackerras
> Cc: Michael Ellerman
> Cc:
> Cc: Will Deacon
> Cc: Peter Zijlstra
> Cc: Alan Stern
> Cc: Andrea Parri
> Cc: Linus Torvalds
Acked-by:
On Fri, Nov 25, 2016 at 01:44:04PM +0100, Peter Zijlstra wrote:
> On Fri, Nov 25, 2016 at 01:40:44PM +0100, Peter Zijlstra wrote:
> > #define SINGLE_LOAD(x) \
> > {( \
> > compiletime_assert_at
definitions of all the{cmp,}xchg variants. Therefore, we should
privatize the inclusions of asm/cmpxchg.h to keep it only included in
arch/* and replace the inclusions outside with linux/atomic.h
Acked-by: Will Deacon
Signed-off-by: Boqun Feng
---
v1 --> v2:
1. rebase on current mas
definitions of all the{cmp,}xchg variants. Therefore, we should
privatize the inclusions of asm/cmpxchg.h to keep it only included in
arch/* and replace the inclusions outside with linux/atomic.h
Acked-by: Will Deacon
Signed-off-by: Boqun Feng
---
Documentation/atomic_ops.txt| 4
62 matches
Mail list logo