I am still a kernel newbie, and I am still not very much aware about
the GPL vs. Non-GPL drivers debate. I personally think it'd be better
that all drivers should be GPL'd but if that's the case, what would be
the legal position of such vendors as ATI or NVIDIA who supply closed
source drivers? Wo
this value which causes
network problems.
Reported-by: Chen Shi
Signed-off-by: Mohammed Gamal
---
drivers/net/xen-netback/interface.c | 2 +-
drivers/net/xen-netfront.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netback/interface.c
b/drivers
ich is compatible
with is according to spec.
Reported-by: Bo Yang
Signed-off-by: Mohammed Gamal
---
drivers/net/vmxnet3/vmxnet3_defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_defs.h
b/drivers/net/vmxnet3/vmxnet3_defs.h
index c3a3164..4ad905a
2016 hosts, while
keeping the changes from 0cf7378 for Win2016 and higher hosts.
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc.c | 19 +--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
ind
Split each of the functions into two for each of send/recv buffers
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc.c | 35 +++
1 file changed, 27 insertions(+), 8 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
or tearing down send and receive buffers individally. The second
patch
uses the finer grained functions to implement the teardown sequence according to
the host's version. We keep the behavior introduced in 0cf737808ae7 for Windows
2016 hosts, while we re-introduce the old sequence for earlie
On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote:
> On Tue, 23 Jan 2018 10:34:04 +0100
> Mohammed Gamal wrote:
>
> > Split each of the functions into two for each of send/recv buffers
> >
> > Signed-off-by: Mohammed Gamal
>
> Splitting these funct
On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote:
> On Wed, 31 Jan 2018 12:16:49 +0100
> Mohammed Gamal wrote:
>
> > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote:
> > > On Tue, 23 Jan 2018 10:34:04 +0100
> > > Mohammed Gamal wrote:
&
On Thu, 2018-02-01 at 09:37 +0100, Mohammed Gamal wrote:
> On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote:
> > On Wed, 31 Jan 2018 12:16:49 +0100
> > Mohammed Gamal wrote:
> >
> > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote:
> > &g
Commit 009f766 intended to filter multicast/broadcast, however
the NDIS filter wasn't set properly in non-promiscuous modes,
which resulted in issues like DHCP timeouts.
This patch sets the filter flags correctly.
Fixes: 009f766 ("hv_netvsc: filter multicast/broadcast")
Signed-o
() before they're allocated on calling
netvsc_device_add()
The patch fixes this problem by checking the channel state and returning
ENODEV if not yet opened. We also move the call to hv_ringbuf_avail_percent()
which may access the uninitialized ring buffer.
Signed-off-by: Mohammed
On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote:
> On Tue, 13 Mar 2018 20:06:50 +0100
> Mohammed Gamal wrote:
>
> > Dring high network traffic changes to network interface parameters
> > such as number of channels or MTU can cause a kernel panic with a
> > N
The callers to netvsc_revoke_*_buf() and netvsc_teardown_*_gpadl()
already have their net_device instances. Pass them as a paramaeter to
the function instead of obtaining them from netvsc_device struct
everytime
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc.c | 37
older versions")
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc.c | 46 +
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index d65b7fc..f4df5de 100644
--- a/d
ith WS2016 guests.
Hence we use Windows version directly to differentiate them.
Fixes: 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions")
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
restoring the first mentioned message
sequence
for older hosts
Fixes: 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions")
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
/1/23/111 on top of latest upstream
Fixes: 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions")
Mohammed Gamal (4):
hv_netvsc: Use Windows version instead of NVSP version on GPAD
teardown
hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()
hv
On Tue, 2019-03-12 at 18:02 +, Haiyang Zhang wrote:
>
>
> > -Original Message-
> > From: Mohammed Gamal
> > Sent: Thursday, March 7, 2019 1:32 PM
> > To: Michael Kelley ; linux-hyp...@vger.kern
> el.org;
> > kimbrownkd
> > Cc: Sas
On Fri, 2021-01-15 at 16:08 -0800, Jim Mattson wrote:
> On Thu, Sep 3, 2020 at 7:12 AM Mohammed Gamal
> wrote:
> >
> > This patch exposes allow_smaller_maxphyaddr to the user as a module
> > parameter.
> >
> > Since smaller physical address spaces are only
hv_get_bytes_to_read/write() could be vulnerable to the race condition
discussed in https://lkml.org/lkml/2018/10/18/779
This race is being addressed by the patch series by Kimberly Brown in
https://lkml.org/lkml/2019/2/21/1236 which is not final yet
Signed-off-by: Mohammed Gamal
---
include/linux/hyperv.h | 6
On Thu, 2019-03-07 at 17:33 +, Michael Kelley wrote:
> From: Mohammed Gamal Sent: Thursday, March 7,
> 2019 8:36 AM
> >
> > This patch adds a check for the presence of the ring buffer in
> > hv_get_bytes_to_read/write() to avoid possible NULL pointer
> > derefe
-ENODEV.
Instead of returning the device instabce, we take the exit path where
we call netif_device_attach()
Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/rndis_filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
On Wed, 2018-03-14 at 10:22 +0100, Mohammed Gamal wrote:
> On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote:
> > On Tue, 13 Mar 2018 20:06:50 +0100
> > Mohammed Gamal wrote:
> >
> > > Dring high network traffic changes to network interface
> >
-ENODEV.
Make sure we explicitly call netif_device_attach() before returning
the net_device instance to make sure the presence bit is set
Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/rndis_filter.c | 4 +++-
1 file
On Tue, 2018-05-08 at 11:13 -0700, Stephen Hemminger wrote:
> On Tue, 8 May 2018 19:40:47 +0200
> Mohammed Gamal wrote:
>
> > On older windows hosts the net_device instance is returned to
> > the caller of rndis_filter_device_add() without having the presence
> > bit
From: Paolo Bonzini
Allow vendor code to observe changes to MAXPHYADDR and start/stop
intercepting page faults.
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/cpuid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 8a294f9747aa..ea5bbf2153
From: Paolo Bonzini
Ignore non-present page faults, since those cannot have reserved
bits set.
When running access.flat with "-cpu Haswell,phys-bits=36", the
number of trapped page faults goes down from 8872644 to 3978948.
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/vmx/vmx.c | 10 +
set. On a supervisor-mode access, the EPT violation path would trigger.
However, on a user-mode access, the processor will not notice the reserved
bit and not include PFERR_RSVD_MASK in the error code.
Co-developed-by: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/vmx/
page has a reserved
bit set. On a supervisor-mode access, the EPT violation path would trigger.
However, on a user-mode access, the processor will not notice the reserved
bit and not include PFERR_RSVD_MASK in the error code.
CC: Tom Lendacky
CC: Babu Moger
Signed-off-by: Mohammed Gamal
---
arch/x
CC: Tom Lendacky
CC: Babu Moger
Signed-off-by: Mohammed Gamal
---
arch/x86/kvm/svm/svm.c | 8
arch/x86/kvm/svm/svm.h | 6 ++
2 files changed, 14 insertions(+)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 94108e6cc6da..05412818027d 100644
--- a/arch/x86/kvm
u can decide if it would ignore the -cpu ..,phys-bits=X)
CC: Tom Lendacky
CC: Babu Moger
Signed-off-by: Mohammed Gamal
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/svm/svm.c | 15 +++
arch/x86/kvm/vmx/vmx.c | 7 +++
arch/x86/kvm/x86.c |
Also no point of it being inline since it's always called through
function pointers. So remove that.
Signed-off-by: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/include/asm/kvm_host.h | 6 --
arch/x86/kvm/mmu/mmu.c | 6 ++
2 files changed, 6 insertions(
From: Paolo Bonzini
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/vmx/nested.c | 28 +---
arch/x86/kvm/vmx/vmx.c| 2 +-
arch/x86/kvm/vmx/vmx.h| 5 +
3 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vm
's
maximum physical memory and if it's exceeded, we need to add
the PFERR_RSVD_MASK bits to the PF's error code.
Also make sure the error code isn't overwritten by the page table walker.
Signed-off-by: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/mmu/mmu.c | 6 ++
From: Paolo Bonzini
We would like to introduce a callback to update the #PF intercept
when CPUID changes. Just reuse update_bp_intercept since VMX is
already using update_exception_bitmap instead of a bespoke function.
While at it, remove an unnecessary assignment in the SVM version,
which is a
: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/mmu.h | 6 ++
arch/x86/kvm/x86.c | 21 +
arch/x86/kvm/x86.h | 1 +
3 files changed, 28 insertions(+)
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index 0ad06bfe2c2c..555237dfb91c 100644
--- a/arch
ails), and thus we are
proposing a workaround (see last patch) that adds a capability that
userspace can use to decide who to deal with hosts that might have
issues supprting guest MAXPHYADDR < host MAXPHYADDR.
Mohammed Gamal (7):
KVM: x86: Add helper functions for illegal GPA checking a
On Mon, 2020-06-22 at 12:44 +0800, Yuan Yao wrote:
> On Fri, Jun 19, 2020 at 05:39:15PM +0200, Mohammed Gamal wrote:
> > This patch adds two helper functions that will be used to support
> > virtualizing
> > MAXPHYADDR in both kvm-intel.ko and kvm.ko.
> >
> &
On Fri, 2020-06-19 at 16:52 -0500, Tom Lendacky wrote:
> On 6/19/20 10:39 AM, Mohammed Gamal wrote:
> > When EPT/NPT is enabled, KVM does not really look at guest physical
> > address size. Address bits above maximum physical memory size are
> > reserved.
> > Because
quot;)
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Mohammed Gamal
---
drivers/clocksource/hyperv_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/hyperv_timer.c
b/drivers/clocksource/hyperv_timer.c
index 09aa44cb8a91d..ba04cb381cd3f 100644
--- a/
On Mon, 2020-10-05 at 13:47 +0200, Mohammed Gamal wrote:
> When selecting function_graph tracer with the command:
> # echo function_graph > /sys/kernel/debug/tracing/current_tracer
>
> The kernel crashes with the following stack trace:
>
> [69703.122389] BUG: stack
is enabled.
Also disable support by default, and let the user decide if they want to enable
it.
Signed-off-by: Mohammed Gamal
---
arch/x86/kvm/vmx/vmx.c | 15 ++-
arch/x86/kvm/vmx/vmx.h | 3 +++
arch/x86/kvm/x86.c | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff
From: Paolo Bonzini
Allow vendor code to observe changes to MAXPHYADDR and start/stop
intercepting page faults.
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/cpuid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 8a294f9747aa..ea5bbf2153
Also no point of it being inline since it's always called through
function pointers. So remove that.
Signed-off-by: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/include/asm/kvm_host.h | 6 --
arch/x86/kvm/mmu/mmu.c | 6 ++
2 files changed, 6 insertions(
: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/mmu.h | 6 ++
arch/x86/kvm/x86.c | 21 +
arch/x86/kvm/x86.h | 1 +
3 files changed, 28 insertions(+)
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index 444bb9c54548..59930231d5d5 100644
--- a/arch
d add PFERR_RSVD_MASK
error code to the page fault if needed.
Changes from v2:
- Drop support for this feature on AMD processors after discussion with AMD
Mohammed Gamal (5):
KVM: x86: Add helper functions for illegal GPA checking and page fault
injection
KVM: x86: mmu: Move translate_gpa() to
set. On a supervisor-mode access, the EPT violation path would trigger.
However, on a user-mode access, the processor will not notice the reserved
bit and not include PFERR_RSVD_MASK in the error code.
Co-developed-by: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/vmx/
From: Paolo Bonzini
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/vmx/nested.c | 28 +---
arch/x86/kvm/vmx/vmx.c| 2 +-
arch/x86/kvm/vmx/vmx.h| 5 +
3 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vm
u can decide if it would ignore the -cpu ..,phys-bits=X)
CC: Tom Lendacky
CC: Babu Moger
Signed-off-by: Mohammed Gamal
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/svm/svm.c | 15 +++
arch/x86/kvm/vmx/vmx.c | 7 +++
arch/x86/kvm/x86.c |
From: Paolo Bonzini
We would like to introduce a callback to update the #PF intercept
when CPUID changes. Just reuse update_bp_intercept since VMX is
already using update_exception_bitmap instead of a bespoke function.
While at it, remove an unnecessary assignment in the SVM version,
which is a
From: Paolo Bonzini
Ignore non-present page faults, since those cannot have reserved
bits set.
When running access.flat with "-cpu Haswell,phys-bits=36", the
number of trapped page faults goes down from 8872644 to 3978948.
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/vmx/vmx.c | 10 +
's
maximum physical memory and if it's exceeded, we need to add
the PFERR_RSVD_MASK bits to the PF's error code.
Also make sure the error code isn't overwritten by the page table walker.
Signed-off-by: Mohammed Gamal
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/mmu/mmu.c | 6 ++
c_cs+0x10/0x10
[69703.123068] ? sched_clock+0x5/0x10
Setting the notrace attribute for read_hv_sched_clock_msr() and
read_hv_sched_clock_tsc() fixes it
Fixes: bd00cd52d5be ("clocksource/drivers/hyperv: Add Hyper-V specific
sched clock function")
Signed-off-by: Vitaly Kuznetsov
Sign
This condition already uses an object of type ipv6hdr in the line above.
Use the object directly instead of calling ipv6_hdr
Signed-off-by: Mohammed Gamal
---
drivers/net/hyperv/netvsc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b
- Original Message -
> On Wed, 19 Jul 2017 15:19:28 +0200
> Mohammed Gamal wrote:
>
> > This condition already uses an object of type ipv6hdr in the line above.
> > Use the object directly instead of calling ipv6_hdr
> >
> > Signed-off-by: Mohamme
55 matches
Mail list logo