Re: [PATCH v2] perf vendor events: Initial json/events list for power10 platform

2021-04-19 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 19, 2021 at 10:38:46PM +1000, Michael Ellerman escreveu: > Kajol Jain writes: > > Patch adds initial json/events for POWER10. > > Acked-by: Michael Ellerman Thanks, applied. - Arnaldo > cheers > > > Signed-off-by: Kajol Jain > > Tested-by: Paul A. Clarke > > Reviewed-by:

Re: [PATCH] f2fs: fix to cover allocate_segment() with lock

2021-04-19 Thread Jaegeuk Kim
On 04/14, Chao Yu wrote: > As we did for other cases, in fix_curseg_write_pointer(), let's > change as below: > - use callback function s_ops->allocate_segment() instead of > raw function allocate_segment_by_default(); > - cover allocate_segment() with curseg_lock and sentry_lock. > >

Re: [PATCH] staging: wfx: silence symbol 'wfx_get_ps_timeout' was not declared warning

2021-04-19 Thread Ashish Kalra
On Mon, Apr 19, 2021 at 05:55:34PM +0200, Jérôme Pouiller wrote: > On Monday 19 April 2021 17:33:48 CEST Ashish Kalra wrote: > > > > Upon running sparse, "warning: symbol 'wfx_get_ps_timeout' was not declared. > > Should it be static?" and "warning: symbol 'wfx_update_pm' was not declared. > >

Re: [PATCH v4 4/5] mm/memcg: Save both reclaimable & unreclaimable bytes in object stock

2021-04-19 Thread Johannes Weiner
On Sun, Apr 18, 2021 at 08:00:31PM -0400, Waiman Long wrote: > Currently, the object stock structure caches either reclaimable vmstat > bytes or unreclaimable vmstat bytes in its object stock structure. The > hit rate can be improved if both types of vmstat data can be cached > especially for

Re: [RFC Part2 PATCH 04/30] x86/mm: split the physmap when adding the page in RMP table

2021-04-19 Thread Borislav Petkov
On Mon, Apr 19, 2021 at 10:25:01AM -0500, Brijesh Singh wrote: > To my understanding, we don't group 512 4K entries into a 2M for the > kernel address range. We do this for the userspace address through > khugepage daemon. If page tables get out of sync then it will cause an > RMP violation, the

[PATCH v2] sched,fair: skip newidle_balance if a wakeup is pending

2021-04-19 Thread Rik van Riel
The try_to_wake_up function has an optimization where it can queue a task for wakeup on its previous CPU, if the task is still in the middle of going to sleep inside schedule(). Once schedule() re-enables IRQs, the task will be woken up with an IPI, and placed back on the runqueue. If we have

Re: [RFCv2 06/13] x86/realmode: Share trampoline area if KVM memory protection enabled

2021-04-19 Thread Dave Hansen
On 4/16/21 8:40 AM, Kirill A. Shutemov wrote: > /* > - * If SME is active, the trampoline area will need to be in > - * decrypted memory in order to bring up other processors > + * If SME or KVM memory protection is active, the trampoline area will > + * need to be in

Re: [PATCH] sched,fair: skip newidle_balance if a wakeup is pending

2021-04-19 Thread Rik van Riel
On Mon, 2021-04-19 at 12:22 +0100, Valentin Schneider wrote: > On 18/04/21 22:17, Rik van Riel wrote: > > @@ -10661,7 +10669,8 @@ static int newidle_balance(struct rq > > *this_rq, struct rq_flags *rf) > >* Stop searching for tasks to pull if there are > >* now

Re: [PATCH 05/15] x86: Implement function_nocfi

2021-04-19 Thread Joao Moreira
Why not? In particular, I'd really like somebody to answer the question "why not just store a cookie before each address-taken or external-linkage function?". FWIIW, this was done before (at least twice): First with grsecurity/PaX RAP (https://grsecurity.net/rap_faq) then with kCFI

[rcu:dev.2021.04.17a] BUILD SUCCESS 42acbce403e4f1ed583e49c44961c58ece27f933

2021-04-19 Thread kernel test robot
mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a003-20210419 i386

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-19 Thread Christophe Leroy
Le 19/04/2021 à 16:00, Steven Price a écrit : On 19/04/2021 14:14, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: To be

Re: [RFCv2 13/13] KVM: unmap guest memory using poisoned pages

2021-04-19 Thread Kirill A. Shutemov
On Mon, Apr 19, 2021 at 04:01:46PM +, Sean Christopherson wrote: > On Mon, Apr 19, 2021, Kirill A. Shutemov wrote: > > On Fri, Apr 16, 2021 at 05:30:30PM +, Sean Christopherson wrote: > > > I like the idea of using "special" PTE value to denote guest private > > > memory, > > > e.g. in

Re: [PATCH] block: fix io hung by block throttle

2021-04-19 Thread Junxiao Bi
On 4/18/21 11:09 PM, Junxiao Bi wrote: - finish_wait(>wait, ); +    mutex_lock(>throttle_mutex); +    wait_event(rqw->wait, acquire_inflight_cb(rqw, private_data)); +    mutex_unlock(>throttle_mutex); This will break the throttle? There is a inflight io limitation. With this change, there

Re: [PATCH v4 2/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-19 Thread Johannes Weiner
On Sun, Apr 18, 2021 at 08:00:29PM -0400, Waiman Long wrote: > Before the new slab memory controller with per object byte charging, > charging and vmstat data update happen only when new slab pages are > allocated or freed. Now they are done with every kmem_cache_alloc() > and kmem_cache_free().

Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-19 Thread Christian König
Am 19.04.21 um 18:11 schrieb Michal Hocko: On Mon 19-04-21 17:44:13, Christian König wrote: Am 19.04.21 um 17:19 schrieb peter.enderb...@sony.com: On 4/19/21 5:00 PM, Michal Hocko wrote: On Mon 19-04-21 12:41:58, peter.enderb...@sony.com wrote: On 4/19/21 2:16 PM, Michal Hocko wrote: On

[PATCH] net: sunrpc: xprt.c: fix shift-out-of-bounds in xprt_calc_majortimeo

2021-04-19 Thread Kurt Manucredo
Fix shift-out-of-bounds in xprt_calc_majortimeo(). UBSAN: shift-out-of-bounds in net/sunrpc/xprt.c:658:14 shift exponent 536871232 is too large for 64-bit type 'long u Reported-by: syzbot+ba2e91df8f7480941...@syzkaller.appspotmail.com Signed-off-by: Kurt Manucredo --- net/sunrpc/xprt.c | 5

[PATCH 5/5] power: supply: bq256xx: add kerneldoc for structure members

2021-04-19 Thread Krzysztof Kozlowski
Document members of structure to fix W=1 warnings like: drivers/power/supply/bq256xx_charger.c:240: warning: Function parameter or member 'charger' not described in 'bq256xx_device' Signed-off-by: Krzysztof Kozlowski --- drivers/power/supply/bq256xx_charger.c | 2 ++ 1 file changed, 2

[PATCH 4/5] power: supply: act8945a: correct kerneldoc

2021-04-19 Thread Krzysztof Kozlowski
Remove incorrect kerneldoc marker to fix W=1 warning: drivers/power/supply/act8945a_charger.c:22: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Krzysztof Kozlowski ---

[PATCH 2/5] power: supply: max17040: handle device_property_read_u8_array() failure

2021-04-19 Thread Krzysztof Kozlowski
The device_property_read_u8_array() call should not fail because it is preceded with device_property_count_u8() and check for number of readable u8 values. However the code is more obvious and easier to read if the return value of device_property_read_u8_array() is checked. Otherwise reader needs

[PATCH 3/5] power: supply: max17040: remove unneeded double cast

2021-04-19 Thread Krzysztof Kozlowski
There is no need for double explicit cast from of_device_get_match_data() (uintptr_t and then to target enum) because implicit conversion from uintptr_t to enum is straightforward (uintptr_t is a integer type). Signed-off-by: Krzysztof Kozlowski --- gcc v9.3.0 W=1 does not complain after

[PATCH 1/5] power: supply: max14577: remove unneeded variable initialization

2021-04-19 Thread Krzysztof Kozlowski
The local 'current_bits' variable does not have to be initialized because all cases in following switch() either return or initialize it. Addresses-Coverity: Unused value Signed-off-by: Krzysztof Kozlowski --- drivers/power/supply/max14577_charger.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] KVM: Boost vCPU candidiate in user mode which is delivering interrupt

2021-04-19 Thread Sean Christopherson
On Mon, Apr 19, 2021, Wanpeng Li wrote: > On Sat, 17 Apr 2021 at 21:09, Paolo Bonzini wrote: > > > > On 16/04/21 05:08, Wanpeng Li wrote: > > > From: Wanpeng Li > > > > > > Both lock holder vCPU and IPI receiver that has halted are condidate for > > > boost. However, the PLE handler was

Re: [PATCH v2 1/3] iommu: io-pgtable: add DART pagetable format

2021-04-19 Thread Will Deacon
On Fri, Apr 09, 2021 at 09:38:15PM +0200, Arnd Bergmann wrote: > On Fri, Apr 9, 2021 at 6:56 PM Sven Peter wrote: > > On Wed, Apr 7, 2021, at 12:44, Will Deacon wrote: > > > On Sun, Mar 28, 2021 at 09:40:07AM +0200, Sven Peter wrote: > > > > > > > + cfg->pgsize_bitmap &= SZ_16K; > > > > + if

Re: RPi4 DWC2 gadget doesn't copy data to a buffer in ep0 SETUP + DATA OUT transaction

2021-04-19 Thread Minas Harutyunyan
Hi Pavel, On 4/19/2021 5:22 PM, Pavel Hofman wrote: > > Dne 11. 02. 21 v 12:21 Minas Harutyunyan napsal(a): >> Hi Ruslan, >> >> On 2/1/2021 3:44 AM, Ruslan Bilovol wrote: >>> Hi Minas and other USB experts, >>> >>> I'm currently developing new features for UAC1/UAC2 audio gadgets >>> like

Re: linux-next: Tree for Apr 19 (bcache)

2021-04-19 Thread Coly Li
On 4/19/21 11:40 PM, Randy Dunlap wrote: > On 4/19/21 3:23 AM, Stephen Rothwell wrote: >> Hi all, >> >> Changes since 20210416: >> > > on x86_64: > > when > # CONFIG_BLK_DEV is not set > > > WARNING: unmet direct dependencies detected for LIBNVDIMM > Depends on [n]: PHYS_ADDR_T_64BIT [=y] &&

Re: [PATCH net-next v3 2/5] mm: add a signature in struct page

2021-04-19 Thread Shakeel Butt
On Mon, Apr 19, 2021 at 8:43 AM Ilias Apalodimas wrote: > [...] > > Pages mapped into the userspace have their refcnt elevated, so the > > page_ref_count() check by the drivers indicates to not reuse such > > pages. > > > > When tcp_zerocopy_receive() is invoked it will call >

Re: [PATCH v4 1/5] mm/memcg: Move mod_objcg_state() to memcontrol.c

2021-04-19 Thread Waiman Long
On 4/19/21 11:21 AM, Waiman Long wrote: On 4/19/21 11:14 AM, Johannes Weiner wrote: On Sun, Apr 18, 2021 at 08:00:28PM -0400, Waiman Long wrote: The mod_objcg_state() function is moved from mm/slab.h to mm/memcontrol.c so that further optimization can be done to it in later patches without

Re: [PATCH] Fix set apic mode from x2apic enabled bit patch

2021-04-19 Thread Mike Travis
Hi Thomas, Thanks for pointing that out, though Boris did highlight the same problem. I still do all the patches in quilt but I've created an automated conversion to take those patch(es) and use git send mail to send them upstream. The platform information used to be included but it's not

[PATCH v3 2/2] phy: nxp-c45: add driver for tja1103

2021-04-19 Thread Radu Pirea (NXP OSS)
Add driver for tja1103 driver and for future NXP C45 PHYs. Signed-off-by: Radu Pirea (NXP OSS) --- MAINTAINERS | 6 + drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/nxp-c45-tja11xx.c | 588

[PATCH v3 1/2] net: phy: add genphy_c45_pma_suspend/resume

2021-04-19 Thread Radu Pirea (NXP OSS)
Add generic PMA suspend and resume callback functions for C45 PHYs. Signed-off-by: Radu Pirea (NXP OSS) Reviewed-by: Andrew Lunn --- drivers/net/phy/phy-c45.c | 43 +++ include/linux/phy.h | 2 ++ 2 files changed, 45 insertions(+) diff --git

[PATCH v3 0/2] TJA1103 driver

2021-04-19 Thread Radu Pirea (NXP OSS)
Hi, This small series adds the TJA1103 PHY driver. Changes in v3: - use phy_read_mmd_poll_timeout instead of spin_until_cond - changed the phy name from a generic one to something specific - minor indentation change Changes in v2: - implemented genphy_c45_pma_suspend/genphy_c45_pma_suspend

Re: [PATCH v6 02/10] arm64: perf: Enable PMU counter direct access for perf event

2021-04-19 Thread Will Deacon
On Thu, Apr 08, 2021 at 01:38:17PM -0500, Rob Herring wrote: > On Thu, Apr 8, 2021 at 6:08 AM Mark Rutland wrote: > > On Wed, Apr 07, 2021 at 01:44:37PM +0100, Will Deacon wrote: > > > On Thu, Apr 01, 2021 at 02:45:21PM -0500, Rob Herring wrote: > > > > On Wed, Mar 31, 2021 at 11:01 AM Will

Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-19 Thread Suzuki K Poulose
On 19/04/2021 14:21, Yicong Yang wrote: On 2021/4/19 19:17, Suzuki K Poulose wrote: On 17/04/2021 11:17, Yicong Yang wrote: [RESEND with perf and coresight folks Cc'ed] HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex integrated Endpoint (RCiEP) device, providing the

Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-19 Thread Michal Hocko
On Mon 19-04-21 17:44:13, Christian König wrote: > Am 19.04.21 um 17:19 schrieb peter.enderb...@sony.com: > > On 4/19/21 5:00 PM, Michal Hocko wrote: > > > On Mon 19-04-21 12:41:58, peter.enderb...@sony.com wrote: > > > > On 4/19/21 2:16 PM, Michal Hocko wrote: > > > > > On Sat 17-04-21 12:40:32,

[PATCH] scsi: core: Cap initial sdev queue depth at shost.can_queue

2021-04-19 Thread John Garry
Function sdev_store_queue_depth() enforces that the sdev queue depth cannot exceed shost.can_queue. However, the LLDD may still set cmd_per_lun > can_queue, which leads to an initial sdev queue depth greater than can_queue. Stop this happened by capping initial sdev queue depth at can_queue.

Re: [PATCH 1/3] arm64: dts: xilinx: Add the clock nodes for zynqmp

2021-04-19 Thread Jan Kiszka
On 19.04.21 17:14, Michal Simek wrote: > > > On 4/19/21 1:48 PM, Jan Kiszka wrote: >> On 19.04.21 12:52, Michal Simek wrote: >>> Hi Jan, >>> >>> On 4/18/21 2:12 PM, Jan Kiszka wrote: On 01.04.21 16:52, Jan Kiszka wrote: > On 01.04.21 13:42, Michal Simek wrote: >> Hi Jan, >> >>

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-19 Thread Christian Brauner
On Mon, Apr 19, 2021 at 07:25:14AM -0500, Serge Hallyn wrote: > cap_setfcap is required to create file capabilities. > > Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a > process running as uid 0 but without cap_setfcap is able to work around > this as follows: unshare a new

Re: [PATCH] libnvdimm.h: Remove duplicate struct declaration

2021-04-19 Thread Ira Weiny
On Mon, Apr 19, 2021 at 07:27:25PM +0800, Wan Jiabing wrote: > struct device is declared at 133rd line. > The declaration here is unnecessary. Remove it. > > Signed-off-by: Wan Jiabing > --- > include/linux/libnvdimm.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH][next] bcache: Set error return err to -ENOMEM on allocation failure

2021-04-19 Thread Coly Li
On 4/19/21 8:56 PM, Colin King wrote: > From: Colin Ian King > > Currently when ns fails to be allocated the error return path returns > an uninitialized return code in variable 'err'. Fix this by setting > err to -ENOMEM. > > Addresses-Coverity: ("Uninitialized scalar variable") > Fixes:

[PATCH 16/30] KVM: x86: hyper-v: Honor HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_CRASH_P0 ... HV_X64_MSR_CRASH_P4, HV_X64_MSR_CRASH_CTL are only available to guest when HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/hyperv.c

[PATCH 28/30] KVM: selftests: move Hyper-V MSR definitions to hyperv.h

2021-04-19 Thread Vitaly Kuznetsov
These defines can be shared by multiple tests, move them to a dedicated header. Signed-off-by: Vitaly Kuznetsov --- .../selftests/kvm/include/x86_64/hyperv.h | 19 +++ .../selftests/kvm/x86_64/hyperv_clock.c | 8 +--- 2 files changed, 20 insertions(+), 7

[PATCH 29/30] KVM: selftests: Move evmcs.h to x86_64/

2021-04-19 Thread Vitaly Kuznetsov
evmcs.h is x86_64 only thing, move it to x86_64/ subdirectory. Signed-off-by: Vitaly Kuznetsov --- tools/testing/selftests/kvm/include/{ => x86_64}/evmcs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tools/testing/selftests/kvm/include/{ => x86_64}/evmcs.h (99%) diff --git

[PATCH 30/30] KVM: selftests: Introduce hyperv_features test

2021-04-19 Thread Vitaly Kuznetsov
The initial implementation of the test only tests that access to Hyper-V MSRs and hypercalls is in compliance with guest visible CPUID feature bits. Signed-off-by: Vitaly Kuznetsov --- tools/testing/selftests/kvm/.gitignore| 1 + tools/testing/selftests/kvm/Makefile | 1 +

[PATCH 27/30] KVM: x86: hyper-v: Honor HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED bit

2021-04-19 Thread Vitaly Kuznetsov
Hypercalls which use extended processor masks are only available when HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED privilege bit is exposed (and 'RECOMMENDED' is rather a misnomer). Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 25/30] KVM: x86: hyper-v: Honor HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED bit

2021-04-19 Thread Vitaly Kuznetsov
Hyper-V partition must possess 'HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED' privilege ('recommended' is rather a misnomer) to issue HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST/SPACE hypercalls. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 26/30] KVM: x86: hyper-v: Honor HV_X64_CLUSTER_IPI_RECOMMENDED bit

2021-04-19 Thread Vitaly Kuznetsov
Hyper-V partition must possess 'HV_X64_CLUSTER_IPI_RECOMMENDED' privilege ('recommended' is rather a misnomer) to issue HVCALL_SEND_IPI hypercalls. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/hyperv.c

[PATCH 24/30] KVM: x86: hyper-v: Honor HV_DEBUGGING privilege bit

2021-04-19 Thread Vitaly Kuznetsov
Hyper-V partition must possess 'HV_DEBUGGING' privilege to issue HVCALL_POST_DEBUG_DATA/HVCALL_RETRIEVE_DEBUG_DATA/ HVCALL_RESET_DEBUG_SESSION hypercalls. Note, when SynDBG is disabled hv_check_hypercall_access() returns 'true' (like for any other unknown hypercall) so the result will be

[PATCH 21/30] KVM: x86: hyper-v: Check access to HVCALL_NOTIFY_LONG_SPIN_WAIT hypercall

2021-04-19 Thread Vitaly Kuznetsov
TLFS6.0b states that partition issuing HVCALL_NOTIFY_LONG_SPIN_WAIT must posess 'UseHypercallForLongSpinWait' privilege but there's no corresponding feature bit. Instead, we have "Recommended number of attempts to retry a spinlock failure before notifying the hypervisor about the failures.

[PATCH 22/30] KVM: x86: hyper-v: Honor HV_POST_MESSAGES privilege bit

2021-04-19 Thread Vitaly Kuznetsov
Hyper-V partition must possess 'HV_POST_MESSAGES' privilege to issue HVCALL_POST_MESSAGE hypercalls. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index bd424f2d4294..ff86c00d1396

[PATCH 23/30] KVM: x86: hyper-v: Honor HV_SIGNAL_EVENTS privilege bit

2021-04-19 Thread Vitaly Kuznetsov
Hyper-V partition must possess 'HV_SIGNAL_EVENTS' privilege to issue HVCALL_SIGNAL_EVENT hypercalls. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index ff86c00d1396..523f63287636

[PATCH 20/30] KVM: x86: hyper-v: Prepare to check access to Hyper-V hypercalls

2021-04-19 Thread Vitaly Kuznetsov
Introduce hv_check_hypercallr_access() to check if the particular hypercall should be available to guest, this will be used with KVM_CAP_HYPERV_ENFORCE_CPUID mode. No functional change intended. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 11 +++ 1 file changed, 11

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-19 Thread Christian Brauner
On Mon, Apr 19, 2021 at 05:52:39PM +0200, Giuseppe Scrivano wrote: > ebied...@xmission.com (Eric W. Biederman) writes: > > > Guiseppe can you take a look at this? > > > > This is a second attempt at tightening up the semantics of writing to > > file capabilities from a user namespace. > > > > The

[PATCH 19/30] KVM: x86: hyper-v: Honor HV_STIMER_DIRECT_MODE_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
Synthetic timers can only be configured in 'direct' mode when HV_STIMER_DIRECT_MODE_AVAILABLE bit was exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index

[PATCH 17/30] KVM: x86: hyper-v: Honor HV_FEATURE_DEBUG_MSRS_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
Synthetic debugging MSRs (HV_X64_MSR_SYNDBG_CONTROL, HV_X64_MSR_SYNDBG_STATUS, HV_X64_MSR_SYNDBG_SEND_BUFFER, HV_X64_MSR_SYNDBG_RECV_BUFFER, HV_X64_MSR_SYNDBG_PENDING_BUFFER, HV_X64_MSR_SYNDBG_OPTIONS) are only available to guest when HV_FEATURE_DEBUG_MSRS_AVAILABLE bit is exposed. Signed-off-by:

[PATCH 18/30] KVM: x86: hyper-v: Inverse the default in hv_check_msr_access()

2021-04-19 Thread Vitaly Kuznetsov
Access to all MSRs is now properly checked. To avoid 'forgetting' to properly check access to new MSRs in the future change the default to 'false' meaning 'no access'. No functional change intended. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 2 +- 1 file changed, 1

[PATCH 15/30] KVM: x86: hyper-v: Honor HV_ACCESS_REENLIGHTENMENT privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_REENLIGHTENMENT_CONTROL/HV_X64_MSR_TSC_EMULATION_CONTROL/ HV_X64_MSR_TSC_EMULATION_STATUS are only available to guest when HV_ACCESS_REENLIGHTENMENT bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 14/30] KVM: x86: hyper-v: Honor HV_ACCESS_FREQUENCY_MSRS privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_TSC_FREQUENCY/HV_X64_MSR_APIC_FREQUENCY are only available to guest when HV_ACCESS_FREQUENCY_MSRS bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index

[PATCH 12/30] KVM: x86: hyper-v: Honor HV_MSR_SYNTIMER_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
Synthetic timers MSRs (HV_X64_MSR_STIMER[0-3]_CONFIG, HV_X64_MSR_STIMER[0-3]_COUNT) are only available to guest when HV_MSR_SYNTIMER_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 13/30] KVM: x86: hyper-v: Honor HV_MSR_APIC_ACCESS_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_EOI, HV_X64_MSR_ICR, HV_X64_MSR_TPR, and HV_X64_MSR_VP_ASSIST_PAGE are only available to guest when HV_MSR_APIC_ACCESS_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kvm/hyperv.c

[PATCH 11/30] KVM: x86: hyper-v: Honor HV_MSR_SYNIC_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
SynIC MSRs (HV_X64_MSR_SCONTROL, HV_X64_MSR_SVERSION, HV_X64_MSR_SIEFP, HV_X64_MSR_SIMP, HV_X64_MSR_EOM, HV_X64_MSR_SINT0 ... HV_X64_MSR_SINT15) are only available to guest when HV_MSR_SYNIC_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 8 1 file

[PATCH 10/30] KVM: x86: hyper-v: Honor HV_MSR_REFERENCE_TSC_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_REFERENCE_TSC is only available to guest when HV_MSR_REFERENCE_TSC_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index affc6e0cda09..be6156a27bd7

[PATCH 07/30] KVM: x86: hyper-v: Honor HV_MSR_TIME_REF_COUNT_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_TIME_REF_COUNT is only available to guest when HV_MSR_TIME_REF_COUNT_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index

[PATCH 09/30] KVM: x86: hyper-v: Honor HV_MSR_RESET_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_RESET is only available to guest when HV_MSR_RESET_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 0f3f30f6ca69..affc6e0cda09 100644 ---

[PATCH 08/30] KVM: x86: hyper-v: Honor HV_MSR_VP_INDEX_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_VP_INDEX is only available to guest when HV_MSR_VP_INDEX_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 0b2261a50ee8..0f3f30f6ca69 100644

[PATCH 06/30] KVM: x86: hyper-v: Honor HV_MSR_VP_RUNTIME_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_VP_RUNTIME is only available to guest when HV_MSR_VP_RUNTIME_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 13011803ebbd..152d991ed033

Re: [RFCv2 13/13] KVM: unmap guest memory using poisoned pages

2021-04-19 Thread Sean Christopherson
On Mon, Apr 19, 2021, Kirill A. Shutemov wrote: > On Fri, Apr 16, 2021 at 05:30:30PM +, Sean Christopherson wrote: > > I like the idea of using "special" PTE value to denote guest private memory, > > e.g. in this RFC, HWPOISON. But I strongly dislike having KVM involved in > > the > >

Re: [PATCH 0/5] Bring the BusLogic host bus adapter driver up to Y2021

2021-04-19 Thread Maciej W. Rozycki
On Mon, 19 Apr 2021, Khalid Aziz wrote: > On 4/18/21 2:21 PM, Ondrej Zary wrote: > > > > Found the 3000763 document here: > > https://doc.lagout.org/science/0_Computer Science/0_Computer > > History/old-hardware/buslogic/3000763_PCI_EISA_Wide_SCSI_Tech_Ref_Dec94.pdf > > > > There's also

[PATCH 04/30] KVM: x86: hyper-v: Prepare to check access to Hyper-V MSRs

2021-04-19 Thread Vitaly Kuznetsov
Introduce hv_check_msr_access() to check if the particular MSR should be accessible by guest, this will be used with KVM_CAP_HYPERV_ENFORCE_CPUID mode. No functional change intended. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 18 ++ 1 file changed, 18

[PATCH 02/30] KVM: x86: hyper-v: Introduce KVM_CAP_HYPERV_ENFORCE_CPUID

2021-04-19 Thread Vitaly Kuznetsov
Modeled after KVM_CAP_ENFORCE_PV_FEATURE_CPUID, the new capability allows for limiting Hyper-V features to those exposed to the guest in Hyper-V CPUIDs (0x4003, 0x4004, ...). Signed-off-by: Vitaly Kuznetsov --- Documentation/virt/kvm/api.rst | 11 +++

[PATCH 03/30] KVM: x86: hyper-v: Cache guest CPUID leaves determining features availability

2021-04-19 Thread Vitaly Kuznetsov
Limiting exposed Hyper-V features requires a fast way to check if the particular feature is exposed in guest visible CPUIDs or not. To aboid looping through all CPUID entries on every hypercall/MSR access cache the required leaves on CPUID update. Signed-off-by: Vitaly Kuznetsov ---

[PATCH 05/30] KVM: x86: hyper-v: Honor HV_MSR_HYPERCALL_AVAILABLE privilege bit

2021-04-19 Thread Vitaly Kuznetsov
HV_X64_MSR_GUEST_OS_ID/HV_X64_MSR_HYPERCALL are only available to guest when HV_MSR_HYPERCALL_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/hyperv.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index

[PATCH 01/30] asm-generic/hyperv: add HV_STATUS_ACCESS_DENIED definition

2021-04-19 Thread Vitaly Kuznetsov
>From TLFSv6.0b, this status means: "The caller did not possess sufficient access rights to perform the requested operation." Signed-off-by: Vitaly Kuznetsov Acked-by: Wei Liu --- include/asm-generic/hyperv-tlfs.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 00/30] KVM: x86: hyper-v: Fine-grained access check to Hyper-V hypercalls and MSRs

2021-04-19 Thread Vitaly Kuznetsov
Changes since RFC: - KVM_CAP_HYPERV_ENFORCE_CPUID introduced. Turns out that at least QEMU is not doing a great job setting Hyper-V CPUID entries for various configurations (when not all enlightenments are enabled). - Added a selftest. - Add Wei's A-b tag to PATCH1. Currently, all implemented

Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-19 Thread Peter.Enderborg
On 4/19/21 5:00 PM, Michal Hocko wrote: > On Mon 19-04-21 12:41:58, peter.enderb...@sony.com wrote: >> On 4/19/21 2:16 PM, Michal Hocko wrote: >>> On Sat 17-04-21 12:40:32, Peter Enderborg wrote: This adds a total used dma-buf memory. Details can be found in debugfs, however it is not

Re: [External] [PATCH v4 5/5] mm/memcg: Improve refill_obj_stock() performance

2021-04-19 Thread Waiman Long
On 4/19/21 2:06 AM, Muchun Song wrote: On Mon, Apr 19, 2021 at 8:01 AM Waiman Long wrote: There are two issues with the current refill_obj_stock() code. First of all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to atomically flush out remaining bytes to obj_cgroup, clear

Re: [PATCH] staging: wfx: silence symbol 'wfx_get_ps_timeout' was not declared warning

2021-04-19 Thread Jérôme Pouiller
On Monday 19 April 2021 17:33:48 CEST Ashish Kalra wrote: > > Upon running sparse, "warning: symbol 'wfx_get_ps_timeout' was not declared. > Should it be static?" and "warning: symbol 'wfx_update_pm' was not declared. > Should it be static?" is brought to notice for this file. static keyword >

Re: [PATCH] rtl8xxxu: Fix device info for RTL8192EU devices

2021-04-19 Thread Pascal Terjan
On Mon, 19 Apr 2021 at 12:53, Jes Sorensen wrote: > > On 3/23/21 3:36 PM, Pascal Terjan wrote: > > Based on 2001:3319 and 2357:0109 which I used to test the fix and > > 0bda:818b and 2357:0108 for which I found efuse dumps online. > > > > == 2357:0109 == > > === Before === > > Vendor: Realtek > >

Re: [PATCH v8 net-next 2/2] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-19 Thread Stephen Hemminger
On Fri, 16 Apr 2021 13:11:59 -0700 Dexuan Cui wrote: > Add a VF driver for Microsoft Azure Network Adapter (MANA) that will be > available in the future. > > Co-developed-by: Haiyang Zhang > Signed-off-by: Haiyang Zhang > Co-developed-by: Shachar Raindel > Signed-off-by: Shachar Raindel >

Re: [PATCH v8 net-next 1/2] hv_netvsc: Make netvsc/VF binding check both MAC and serial number

2021-04-19 Thread Stephen Hemminger
On Fri, 16 Apr 2021 13:11:58 -0700 Dexuan Cui wrote: > Currently the netvsc/VF binding logic only checks the PCI serial number. > > The upcoming Microsoft Azure Network Adapter (MANA) supports multiple > net_device interfaces (each such interface is called a "vPort", and has > its unique MAC

[PATCH bpf-next v5 1/6] bpf: Factorize bpf_trace_printk and bpf_seq_printf

2021-04-19 Thread Florent Revest
Two helpers (trace_printk and seq_printf) have very similar implementations of format string parsing and a third one is coming (snprintf). To avoid code duplication and make the code easier to maintain, this moves the operations associated with format string parsing (validation and argument

[PATCH bpf-next v5 6/6] selftests/bpf: Add a series of tests for bpf_snprintf

2021-04-19 Thread Florent Revest
The "positive" part tests all format specifiers when things go well. The "negative" part makes sure that incorrect format strings fail at load time. Signed-off-by: Florent Revest --- .../selftests/bpf/prog_tests/snprintf.c | 125 ++ .../selftests/bpf/progs/test_snprintf.c

[PATCH bpf-next v5 3/6] bpf: Add a bpf_snprintf helper

2021-04-19 Thread Florent Revest
The implementation takes inspiration from the existing bpf_trace_printk helper but there are a few differences: To allow for a large number of format-specifiers, parameters are provided in an array, like in bpf_seq_printf. Because the output string takes two arguments and the array of parameters

[PATCH bpf-next v5 5/6] libbpf: Introduce a BPF_SNPRINTF helper macro

2021-04-19 Thread Florent Revest
Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an array of u64, making it more natural to call the bpf_snprintf helper. Signed-off-by: Florent Revest Acked-by: Andrii Nakryiko --- tools/lib/bpf/bpf_tracing.h | 18 ++ 1 file changed, 18 insertions(+) diff

[PATCH bpf-next v5 4/6] libbpf: Initialize the bpf_seq_printf parameters array field by field

2021-04-19 Thread Florent Revest
When initializing the __param array with a one liner, if all args are const, the initial array value will be placed in the rodata section but because libbpf does not support relocation in the rodata section, any pointer in this array will stay NULL. Fixes: c09add2fbc5a ("tools/libbpf: Add

[PATCH bpf-next v5 2/6] bpf: Add a ARG_PTR_TO_CONST_STR argument type

2021-04-19 Thread Florent Revest
This type provides the guarantee that an argument is going to be a const pointer to somewhere in a read-only map value. It also checks that this pointer is followed by a zero character before the end of the map value. Signed-off-by: Florent Revest Acked-by: Andrii Nakryiko ---

[PATCH bpf-next v5 0/6] Add a snprintf eBPF helper

2021-04-19 Thread Florent Revest
We have a usecase where we want to audit symbol names (if available) in callback registration hooks. (ex: fentry/nf_register_net_hook) A few months back, I proposed a bpf_kallsyms_lookup series but it was decided in the reviews that a more generic helper, bpf_snprintf, would be more useful. This

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-19 Thread Giuseppe Scrivano
ebied...@xmission.com (Eric W. Biederman) writes: > Guiseppe can you take a look at this? > > This is a second attempt at tightening up the semantics of writing to > file capabilities from a user namespace. > > The first attempt was reverted with 3b0c2d3eaa83 ("Revert 95ebabde382c >

[PATCH 3/3] powerpc/irq: Enhance readability of trap types

2021-04-19 Thread Christophe Leroy
This patch makes use of trap types in irq.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 1 + arch/powerpc/kernel/irq.c| 13 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/interrupt.h

[PATCH 1/3] powerpc/8xx: Enhance readability of trap types

2021-04-19 Thread Christophe Leroy
This patch makes use of trap types in head_8xx.S Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 29 arch/powerpc/kernel/head_8xx.S | 49 ++-- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git

[PATCH 2/3] powerpc/32s: Enhance readability of trap types

2021-04-19 Thread Christophe Leroy
This patch makes use of trap types in head_book3s_32.S Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 6 arch/powerpc/kernel/head_book3s_32.S | 43 ++-- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git

[PATCH net-next v2 1/2] dt-bindings: net: mediatek: add optional GMAC labels

2021-04-19 Thread Ilya Lipnitskiy
Document the mediatek ethernet driver change that adds support for custom labels and provide an example. Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH net-next v2 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
The MAC device name can now be set within DTS file instead of always being "ethX". This is helpful for DSA to clearly label the DSA master device and distinguish it from DSA slave ports. For example, some devices, such as the Ubiquiti EdgeRouter X, may have ports labeled ethX. Labeling the master

[PATCH net-next v2 0/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
Add support for specifying GMAC label via DTS. Useful when it is desired to use a master DSA interface name that is different from the "eth%d" pattern. v2: - Use alloc_netdev instead of alloc_etherdev followed by rename Ilya Lipnitskiy (2): dt-bindings: net: mediatek: add optional GMAC

Re: [PATCH] MIPS: Fix cmdline "mem=" parameter parsing

2021-04-19 Thread kernel test robot
Hi Youling, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.12-rc8 next-20210419] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

Re: [PATCH 1/1] of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses

2021-04-19 Thread Rob Herring
On Fri, Apr 16, 2021 at 3:58 PM Leonardo Bras wrote: > > Hello Rob, thanks for this feedback! > > On Thu, 2021-04-15 at 13:59 -0500, Rob Herring wrote: > > +PPC and PCI lists > > > > On Thu, Apr 15, 2021 at 1:01 PM Leonardo Bras wrote: > > > > > > Many other resource flag parsers already add

Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-19 Thread Christian König
Am 19.04.21 um 17:19 schrieb peter.enderb...@sony.com: On 4/19/21 5:00 PM, Michal Hocko wrote: On Mon 19-04-21 12:41:58, peter.enderb...@sony.com wrote: On 4/19/21 2:16 PM, Michal Hocko wrote: On Sat 17-04-21 12:40:32, Peter Enderborg wrote: This adds a total used dma-buf memory. Details can

Re: [PATCH net-next v3 2/5] mm: add a signature in struct page

2021-04-19 Thread Ilias Apalodimas
Hi Shakeel, On Mon, Apr 19, 2021 at 07:57:03AM -0700, Shakeel Butt wrote: > On Sun, Apr 18, 2021 at 10:12 PM Ilias Apalodimas > wrote: > > > > On Wed, Apr 14, 2021 at 01:09:47PM -0700, Shakeel Butt wrote: > > > On Wed, Apr 14, 2021 at 12:42 PM Jesper Dangaard Brouer > > > wrote: > > > > > > >

Re: [PATCH v9] USB: serial: cp210x: Add support for GPIOs on CP2108

2021-04-19 Thread Johan Hovold
On Thu, Apr 08, 2021 at 05:36:07PM +0700, Pho Tran wrote: > From: Pho Tran > > Similar to other CP210x devices, GPIO interfaces (gpiochip) should be > supported for CP2108. > > CP2108 has 4 serial interfaces but only 1 set of GPIO pins are shared > to all of those interfaces. So, just need to

Re: linux-next: Tree for Apr 19 (bcache)

2021-04-19 Thread Randy Dunlap
On 4/19/21 3:23 AM, Stephen Rothwell wrote: > Hi all, > > Changes since 20210416: > on x86_64: when # CONFIG_BLK_DEV is not set WARNING: unmet direct dependencies detected for LIBNVDIMM Depends on [n]: PHYS_ADDR_T_64BIT [=y] && HAS_IOMEM [=y] && BLK_DEV [=n] Selected by [y]: -

[PATCH] staging: wfx: silence symbol 'wfx_get_ps_timeout' was not declared warning

2021-04-19 Thread Ashish Kalra
Upon running sparse, "warning: symbol 'wfx_get_ps_timeout' was not declared. Should it be static?" and "warning: symbol 'wfx_update_pm' was not declared. Should it be static?" is brought to notice for this file. static keyword should be added to prevent this warning. let's add it to make it

<    1   2   3   4   5   6   7   8   9   10   >