[PATCH v4 05/11] Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header

2020-09-15 Thread Boqun Feng
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

[PATCH v4 06/11] hv: hyperv.h: Introduce some hvpfn helper functions

2020-09-15 Thread Boqun Feng
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

[PATCH v4 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-09-15 Thread Boqun Feng
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

[PATCH v4 09/11] HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Boqun Feng
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

[PATCH v4 08/11] Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Boqun Feng
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

[PATCH v4 10/11] Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Boqun Feng
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

[PATCH v4 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-09-15 Thread Boqun Feng
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

[PATCH v4 04/11] Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()

2020-09-15 Thread Boqun Feng
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

[PATCH v4 02/11] Drivers: hv: vmbus: Move __vmbus_open()

2020-09-15 Thread Boqun Feng
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

[PATCH v4 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-09-15 Thread Boqun Feng
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

[PATCH v4 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-09-15 Thread Boqun Feng
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

[PATCH v4 00/11] Hyper-V: Support PAGE_SIZE larger than 4K

2020-09-15 Thread Boqun Feng
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(

Re: [PATCH v3 08/11] Input: hyperv-keyboard: Make ringbuffer at least take two pages

2020-09-14 Thread Boqun Feng
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 > > >

Re: [PATCH v3 08/11] Input: hyperv-keyboard: Make ringbuffer at least take two pages

2020-09-14 Thread Boqun Feng
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). >

[PATCH v3 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-09-10 Thread Boqun Feng
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/

[PATCH v3 00/11] Hyper-V: Support PAGE_SIZE larger than 4K

2020-09-10 Thread Boqun Feng
'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):

[PATCH v3 04/11] Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()

2020-09-10 Thread Boqun Feng
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

[PATCH v3 02/11] Drivers: hv: vmbus: Move __vmbus_open()

2020-09-10 Thread Boqun Feng
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

[PATCH v3 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-09-10 Thread Boqun Feng
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

[PATCH v3 05/11] Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header

2020-09-10 Thread Boqun Feng
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

[PATCH v3 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-09-10 Thread Boqun Feng
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

[PATCH v3 08/11] Input: hyperv-keyboard: Make ringbuffer at least take two pages

2020-09-10 Thread Boqun Feng
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

[PATCH v3 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-09-10 Thread Boqun Feng
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

[PATCH v3 09/11] HID: hyperv: Make ringbuffer at least take two pages

2020-09-10 Thread Boqun Feng
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

[PATCH v3 10/11] Driver: hv: util: Make ringbuffer at least take two pages

2020-09-10 Thread Boqun Feng
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 ++

[PATCH v3 06/11] hv: hyperv.h: Introduce some hvpfn helper functions

2020-09-10 Thread Boqun Feng
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

Re: [RFC v2 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-09-06 Thread Boqun Feng
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

Re: [RFC v2 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-09-05 Thread Boqun Feng
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

Re: [RFC v2 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-09-05 Thread Boqun Feng
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

[RFC v2 04/11] Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()

2020-09-01 Thread Boqun Feng
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

[RFC v2 00/11] Hyper-V: Support PAGE_SIZE larger than 4K

2020-09-01 Thread Boqun Feng
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

[RFC v2 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-09-01 Thread Boqun Feng
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/

[RFC v2 02/11] Drivers: hv: vmbus: Move __vmbus_open()

2020-09-01 Thread Boqun Feng
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

[RFC v2 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-09-01 Thread Boqun Feng
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

[RFC v2 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-09-01 Thread Boqun Feng
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

[RFC v2 05/11] Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header

2020-09-01 Thread Boqun Feng
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

[RFC v2 10/11] Driver: hv: util: Make ringbuffer at least take two pages

2020-09-01 Thread Boqun Feng
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 ++

[RFC v2 09/11] HID: hyperv: Make ringbuffer at least take two pages

2020-09-01 Thread Boqun Feng
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 ++

[RFC v2 08/11] Input: hyperv-keyboard: Make ringbuffer at least take two pages

2020-09-01 Thread Boqun Feng
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

[RFC v2 06/11] hv: hyperv.h: Introduce some hvpfn helper functions

2020-09-01 Thread Boqun Feng
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

[RFC v2 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-09-01 Thread Boqun Feng
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

Re: [RFC 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-07-22 Thread Boqun Feng
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 >

Re: [RFC 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-07-22 Thread boqun . feng
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

Re: [RFC 09/11] HID: hyperv: Make ringbuffer at least take two pages

2020-07-22 Thread boqun . feng
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

Re: [RFC 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-07-22 Thread Boqun Feng
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

Re: [RFC 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-07-22 Thread Boqun Feng
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

[RFC 08/11] Input: hyperv-keyboard: Make ringbuffer at least take two pages

2020-07-20 Thread Boqun Feng
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

[RFC 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-07-20 Thread Boqun Feng
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/

[RFC 04/11] Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()

2020-07-20 Thread Boqun Feng
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

[RFC 06/11] hv: hyperv.h: Introduce some hvpfn helper functions

2020-07-20 Thread Boqun Feng
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

[RFC 02/11] Drivers: hv: vmbus: Move __vmbus_open()

2020-07-20 Thread Boqun Feng
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

[RFC 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-07-20 Thread Boqun Feng
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

[RFC 05/11] Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header

2020-07-20 Thread Boqun Feng
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

[RFC 09/11] HID: hyperv: Make ringbuffer at least take two pages

2020-07-20 Thread Boqun Feng
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 ++

[RFC 10/11] Driver: hv: util: Make ringbuffer at least take two pages

2020-07-20 Thread Boqun Feng
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 ++

[RFC 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-07-20 Thread Boqun Feng
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

[RFC 00/11] Hyper-V: Support PAGE_SIZE larger than 4K

2020-07-20 Thread Boqun Feng
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

[RFC 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-07-20 Thread Boqun Feng
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

Re: [PATCH RFC 21/26] powerpc: Remove spin_unlock_wait() arch-specific definitions

2017-07-01 Thread Boqun Feng
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:

Re: [PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()

2016-11-25 Thread Boqun Feng
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

[PATCH v2] atomics,cmpxchg: Privatize the inclusion of asm/cmpxchg.h

2015-09-08 Thread Boqun Feng
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

[PATCH] atomics,cmpxchg: Privatize the inclusion of asm/cmpxchg.h

2015-08-26 Thread Boqun Feng
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