All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Clone data inconsistency in hammer
From: Bartłomiej Święcki @ 2016-12-22 12:33 UTC (permalink / raw)
  To: dillaman-H+wXaHxf7aLQT0dZR+AlfA; +Cc: ceph-devel, ceph-users
In-Reply-To: <20161222101009.32e14565-Q8zpDM2kqfNz3UrvHfEF4cXErentcBXJSavXxUIaH7I@public.gmane.org>

Hi,

I have problems runnign Kraken tools on Hammer/Jewel cluster (official 11.1.0 debs),
it asserts:

/build/ceph-11.1.0/src/mon/MonMap.cc: In function 'void MonMap::sanitize_mons(std::map<std::basic_string<char>, entity_addr_t>&)' thread 7fffd37fe700 time 2016-12-22 12:26:23.457058
/build/ceph-11.1.0/src/mon/MonMap.cc: 70: FAILED assert(mon_info.count(p.first))

I tried to debug it a bit and it looks like mon_info has temporary mon names:

(gdb) p mon_info
$1 = std::map with 3 elements = {["noname-a"] = {name = "noname-a", .....

while it checks for a correct one:

(gdb) p p
$2 = {first = "mon-01-690d38c0-2567-447b-bdfb-0edd137183db", ....


Anyway, I was thinking about the missing image problem - maybe it would be easier
to recreate removed image? Would restoring rbd_header object be enough?


P.S. Adding ceph-devel

On Thu, 22 Dec 2016 10:10:09 +0100
Bartłomiej Święcki <bartlomiej.swiecki@corp.ovh.com> wrote:

> Hi Jason,
> 
> I'll test kraken tools since it happened on production, everything works there
> since the clone is flattened after being created and the production equivalent
> of "test" user can access the image only after it has been flattened.
> 
> The issue happened when someone accidentally removed not-yet-flattened image
> using the user with weaker permissions. Good to hear this has been spotted
> already.
> 
> Thanks for help,
> Bartek
> 
> 
> 
> On Wed, 21 Dec 2016 11:53:57 -0500
> Jason Dillaman <jdillama@redhat.com> wrote:
> 
> > You are unfortunately the second person today to hit an issue where
> > "rbd remove" incorrectly proceeds when it hits a corner-case error.
> > 
> > First things first, when you configure your new user, you needed to
> > give it "rx" permissions to the parent image's pool. If you attempted
> > the clone operation using the "test" user, the clone would have
> > immediately failed due to this issue.
> > 
> > Second, unless this is a test cluster where you can delete the
> > "rbd_children" object in the "rbd" pool (i.e. you don't have any
> > additional clones in the rbd pool) via the rados CLI, you will need to
> > use the Kraken release candidate (or master branch) version of the
> > rados CLI to manually manipulate the "rbd_children" object to remove
> > the dangling reference to the deleted image.
> > 
> > On Wed, Dec 21, 2016 at 6:57 AM, Bartłomiej Święcki
> > <bartlomiej.swiecki@corp.ovh.com> wrote:
> > > Hi,
> > >
> > > I'm currently investigating a case where Ceph cluster ended up with inconsistent clone information.
> > >
> > > Here's a what I did to quickly reproduce:
> > > * Created new cluster (tested in hammer 0.94.6 and jewel 10.2.3)
> > > * Created two pools: test and rbd
> > > * Created base image in pool test, created snapshot, protected it and created clone of this snapshot in pool rbd:
> > >         # rbd -p test create --size 10 --image-format 2 base
> > >         # rbd -p test snap create base@base
> > >         # rbd -p test snap protect base@base
> > >         # rbd clone test/base@base rbd/destination
> > > * Created new user called "test" with rwx permissions to rbd pool only:
> > >         caps: [mon] allow r
> > >         caps: [osd] allow class-read object_prefix rbd_children, allow rwx pool=rbd
> > > * Using this newly creted user I removed the cloned image in rbd pool, had errors but finally removed the image:
> > >         # rbd --id test -p rbd rm destination
> > >         2016-12-21 11:50:03.758221 7f32b7459700 -1 librbd::image::OpenRequest: failed to retreive name: (1) Operation not permitted
> > >         2016-12-21 11:50:03.758288 7f32b6c58700 -1 librbd::image::RefreshParentRequest: failed to open parent image: (1) Operation not permitted
> > >         2016-12-21 11:50:03.758312 7f32b6c58700 -1 librbd::image::RefreshRequest: failed to refresh parent image: (1) Operation not permitted
> > >         2016-12-21 11:50:03.758333 7f32b6c58700 -1 librbd::image::OpenRequest: failed to refresh image: (1) Operation not permitted
> > >         2016-12-21 11:50:03.759366 7f32b6c58700 -1 librbd::ImageState: failed to open image: (1) Operation not permitted
> > >         Removing image: 100% complete...done.
> > >
> > > At this point there's no cloned image but the original snapshot still has reference to it:
> > >
> > > # rbd -p test snap unprotect base@base
> > > 2016-12-21 11:53:47.359060 7fee037fe700 -1 librbd::SnapshotUnprotectRequest: cannot unprotect: at least 1 child(ren) [29b0238e1f29] in pool 'rbd'
> > > 2016-12-21 11:53:47.359678 7fee037fe700 -1 librbd::SnapshotUnprotectRequest: encountered error: (16) Device or resource busy
> > > 2016-12-21 11:53:47.359691 7fee037fe700 -1 librbd::SnapshotUnprotectRequest: 0x7fee39ae9340 should_complete_error: ret_val=-16
> > > 2016-12-21 11:53:47.360627 7fee037fe700 -1 librbd::SnapshotUnprotectRequest: 0x7fee39ae9340 should_complete_error: ret_val=-16
> > > rbd: unprotecting snap failed: (16) Device or resource busy
> > >
> > > # rbd -p test children base@base
> > > rbd: listing children failed: (2) No such file or directory2016-12-21
> > > 11:53:08.716987 7ff2b2eaad80 -1 librbd: Error looking up name for image
> > > id 29b0238e1f29 in pool rbd
> > >
> > >
> > > Any ideas on how this could be fixed?
> > >
> > >
> > > Thanks,
> > > Bartek
> > > _______________________________________________
> > > ceph-users mailing list
> > > ceph-users@lists.ceph.com
> > > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
> > 
> > 
> > 
> > -- 
> > Jason
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

^ permalink raw reply

* Re: [PATCH 03/15] hyperv: use standard bitops
From: Paolo Bonzini @ 2016-12-22 12:33 UTC (permalink / raw)
  To: Roman Kagan, Olaf Hering, Radim Krčmář,
	K. Y. Srinivasan, Vitaly Kuznetsov, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, Haiyang Zhang, kvm, linux-kernel, devel,
	Denis V . Lunev
In-Reply-To: <20161221132337.GA16492@rkaganb.sw.ru>



On 21/12/2016 14:23, Roman Kagan wrote:
> On Wed, Dec 21, 2016 at 01:00:44PM +0100, Olaf Hering wrote:
>> On Tue, Dec 20, Roman Kagan wrote:
>>
>> Reverting commit 22356585712d ("staging: hv: use sync_bitops when
>> interacting with the hypervisor") is save because .......
>>
>>> -		sync_set_bit(channel->monitor_bit,
>>> +		set_bit(channel->monitor_bit,
> 
> It isn't indeed.  I didn't realize there was a UP case where it made a
> difference, and failed to locate the commit where it changed.
> 
> I'll drop this part, thanks.

Perhaps the sync_bitops should be renamed to virt_bitops.  This would
match virt_* memory barriers and would make their usage much more obvious.

Paolo

^ permalink raw reply

* Re: [Qemu-devel] Strange/wrong behavior with iSCSI Tape devices in QEMU 2.8.0-rc4
From: Holger Schranz @ 2016-12-22 12:33 UTC (permalink / raw)
  To: Fam Zheng; +Cc: mueller-ralf, John Snow, qemu-devel
In-Reply-To: <20161222062200.GB12950@lemon>

Hi Fam,

You win !!!

I have installed an RH 7.7 based on kernel 3.10 and a SuSE LEAP 42.2 which
is based on kernel 4.4. Both system see the tape devices and can work.
Than I restart in the same session the VM with SLES11 SP4 (kernel 3.0.101)
and an older RH based on kernel 2.6. This both system can't see the tape 
drives.
But all 5 VM guest systems are registered in iscsi and show the UUID of the
guest system.

Please, what should I do as a next step please?

Best regards

Holger

Am 22.12.2016 um 07:22 schrieb Fam Zheng:
> On Wed, 12/21 05:44, Holger Schranz wrote:
>> Hi Fam,
>>
>> meanwhile I have sent the requested QEMU CLI direct to John. Your request
>> I will try after the reinstall with the released version.So please wait
>> for a while.
> I don't see the command line, but looking at the other info, the question to ask
> is why guest cannot see the controller.. Maybe it's a driver issue? Do other
> types of guest work for you?
>
> Fam
>

^ permalink raw reply

* Question: Packet drop criterion
From: Ferran Quer i Guerrero @ 2016-12-22 12:34 UTC (permalink / raw)
  To: linux-wireless

Hello everyone,

I would like to modify the retry threshold for dropping a packet using
mesh mode. I tried with iw

    iw phy <phyname> set retry [short <limit>] [long <limit>]

with short and long limits equal to 10 first and later 5, but I couldn't
tell any effect. I'm checking by adding a printk in `status.c` and
manually shutting down (ifdown) the mesh-peered interface to cause
packet retries. It turns out that the tx report only appears when
`retry_count` is 28 (after many continued drops, it also appears at 23,
24, 25 or retries).=20

    void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb=
)
    {
        /* ... */
                if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) {
                        ieee80211_handle_filtered_frame(local, sta, skb);=

                        rcu_read_unlock();
                        return;
                } else {
                        if (!acked)
                                sta->tx_retry_failed++;
                        sta->tx_retry_count +=3D retry_count;
                        /* Dirty debugging */
                        printk("Packet dropped. Retry count: %d",
retry_count);
                }

                rate_control_tx_status(local, sband, sta, skb);
                if (ieee80211_vif_is_mesh(&sta->sdata->vif))
                        ieee80211s_update_metric(local, sta, skb);
        /* ... */
    }

I'm using linux backports v3.12.8, ath9k wifi dongles, and interfaces on
mesh point mode.

Did I get wrong the iw command?
Is it Minstrel who decides the retry trheshold?
Is it Atheros driver?
Does it have anything to do with mesh mode?

I'm trying to find the responsible at the source code, but haven't
succeeded yet, so I decided to write to yo.

Thank you very much
Ferran Quer

^ permalink raw reply

* Re: [PATCH 1/2] jump_labels: API for flushing deferred jump label updates
From: Paolo Bonzini @ 2016-12-22 12:35 UTC (permalink / raw)
  To: Peter Zijlstra, David Matlack
  Cc: kvm, linux-kernel, rkrcmar, haokexin, mpe, yongjun_wei, rusty,
	jbaron
In-Reply-To: <20161219145819.GJ3107@twins.programming.kicks-ass.net>



On 19/12/2016 15:58, Peter Zijlstra wrote:
> On Fri, Dec 16, 2016 at 02:30:35PM -0800, David Matlack wrote:
>> Modules that use static_key_deferred need a way to synchronize with
>> any delayed work that is still pending when the module is unloaded.
>> Introduce static_key_deferred_flush() which flushes any pending
>> jump label updates.
> 
> Makes sense I suppose.
> 
> It also appears I forgot to provide new style APIs for this
> functionality as I completely forgot about it for it lives in its own
> file :-/
> 
> In any case,
> 
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Thanks, I'll merge these through the KVM tree.

Paolo

^ permalink raw reply

* [Buildroot] [git commit] iperf3: bump to version 3.1.4
From: Peter Korsgaard @ 2016-12-22 12:36 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=77c6476feabead9b0bef736e7615514494a7a97c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/iperf3/iperf3.hash | 4 ++--
 package/iperf3/iperf3.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/iperf3/iperf3.hash b/package/iperf3/iperf3.hash
index 1accccd..0cac1e3 100644
--- a/package/iperf3/iperf3.hash
+++ b/package/iperf3/iperf3.hash
@@ -1,2 +1,2 @@
-# From http://software.es.net/iperf/news.html#security-issue-iperf-3-1-3-iperf-3-0-12-released
-sha256  60d8db69b1d74a64d78566c2317c373a85fef691b8d277737ee5d29f448595bf  iperf-3.1.3.tar.gz
+# From http://software.es.net/iperf/news.html
+sha256  db61d70ac62003ebe0bf15496bd8c4b3c4b728578a44d0a1a88fcf8afc0e8f76  iperf-3.1.4.tar.gz
diff --git a/package/iperf3/iperf3.mk b/package/iperf3/iperf3.mk
index 3d2a708..7623786 100644
--- a/package/iperf3/iperf3.mk
+++ b/package/iperf3/iperf3.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IPERF3_VERSION = 3.1.3
+IPERF3_VERSION = 3.1.4
 IPERF3_SITE = http://downloads.es.net/pub/iperf
 IPERF3_SOURCE = iperf-$(IPERF3_VERSION).tar.gz
 IPERF3_LICENSE = BSD-3c, BSD-2c, MIT

^ permalink raw reply related

* Re: elbling1 (was Re: [xen-unstable test] 103788: regressions - trouble: broken/fail/pass)
From: Andrew Cooper @ 2016-12-22 12:36 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Jan Beulich
In-Reply-To: <22619.50379.409632.405555@mariner.uk.xensource.com>

On 22/12/16 12:19, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [Xen-devel] elbling1 (was Re: [xen-unstable test] 103788: regressions - trouble: broken/fail/pass)"):
>> No.  No similar problems I am aware of anywhere in XenRT (which haven't
>> ended up being down to human intervention in the firmware)
> Indeed.  I asked some XenRT folks about a while ago and they said they
> hadn't seen it.
>
>>> , I wonder whether either the physical machine setup
>>> is (somewhat) unusual for some or all of the machines, or
>>> whether there's something being run which with not too small a
>>> likelihood causes the problem (and it being run often enough
>>> simply guarantees the problem to surface every once in a while).
>> Is anything playing with EFI variables?  This seems like the most likely
>> option.
> We're basically using entirely BIOS booting, not EFI.

If the hardware supports EFI, then legacy BIOS will most likely be 
implemented by CSM, meaning that the EFI variables in NVRAM are probably 
still present in an E820 reserved region.

Another alternative is via IPMI.  Lots of IPMI controllers these days 
support a one-time setting of the next-boot device.  This can be either 
externally on the iDRAC/iLO/other interface, or internally via the 
impi_* kernel modules.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply

* [Buildroot] [PATCH] iperf3: bump to version 3.1.4
From: Peter Korsgaard @ 2016-12-22 12:36 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <32a5ed2fdbbae94398d8fa4b5149edc9f2c980ae.1482406322.git.baruch@tkos.co.il>

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* Re: [PATCH 23/28] net/ixgbe: use eal I/O device memory read/write API
From: Santosh Shukla @ 2016-12-22 12:36 UTC (permalink / raw)
  To: Jianbo Liu
  Cc: Jerin Jacob, dev, Ananyev, Konstantin, Thomas Monjalon,
	Bruce Richardson, Jan Viktorin, Helin Zhang
In-Reply-To: <20161216044017.GA29607@santosh-Latitude-E5530-non-vPro>

Hi Jiangbo,

On Thu, Dec 15, 2016 at 08:40:19PM -0800, Santosh Shukla wrote:
> On Thu, Dec 15, 2016 at 04:37:12PM +0800, Jianbo Liu wrote:
> > On 14 December 2016 at 09:55, Jerin Jacob
> > <jerin.jacob@caviumnetworks.com> wrote:
> > > From: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > >
> > 
> > memory barrier operation is put inside IXGBE_PCI_REG_READ/WRITE in
> > your change, but I found rte_*mb is called before these macros in some
> > places.
> > Can you remove all these redundant calls? And please do the same
> > checking for other drivers.
> >
> 
> Ok.
> 
> Thinking of adding _relaxed_rd/wr style macro agnostic to arch for ixgbe case 
> in particular. Such that for those code incident:
> x86 case> first default barrier + relaxed call.
> arm case> first default barrier + relaxed call.
> 
> Does that make sense to you? If so then will take care in v2.
> 
> Santosh.

We spend time looking at drivers code where double barrier
may happen. Most of them are in driver init path,
configuration/control path code. So keeping double
barrier won't impact performance. 

We plan to replace only fast path code with _relaxed
style API's. That way we won't impact each driver
performance and we'll have the clean port. 

Does it make sense? Thought?

> 
> > >  #define IXGBE_PCI_REG_ADDR(hw, reg) \
> > >         ((volatile uint32_t *)((char *)(hw)->hw_addr + (reg)))
> > > --
> > > 2.5.5
> > >

^ permalink raw reply

* Re: [Qemu-devel] [PATCH] x86: implement la57 paging mode
From: Kirill A. Shutemov @ 2016-12-22 12:37 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Kirill A. Shutemov, Richard Henderson, Eduardo Habkost,
	qemu-devel
In-Reply-To: <f27cbdb8-73a5-d043-5033-0a7870b77c64@redhat.com>

On Fri, Dec 16, 2016 at 01:59:36PM +0100, Paolo Bonzini wrote:
> 
> 
> On 15/12/2016 01:13, Kirill A. Shutemov wrote:
> > The new paging more is extension of IA32e mode with more additional page
> > table level.
> > 
> > It brings support of 57-bit vitrual address space (128PB) and 52-bit
> > physical address space (4PB).
> > 
> > The structure of new page table level is identical to pml4.
> > 
> > The feature is enumerated with CPUID.(EAX=07H, ECX=0):ECX[bit 16].
> > 
> > CR4.LA57[bit 12] need to be set when pageing enables to activate 5-level
> > paging mode.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> 
> Looks good, thanks!  The target-i386/translate.c bits are not necessary,
> but I guess they can also be removed on commit.

Is there anything else I need to do to make it applied?

-- 
 Kirill A. Shutemov

^ permalink raw reply

* [PATCH v2] stmmac: CSR clock configuration fix
From: Joao Pinto @ 2016-12-22 12:38 UTC (permalink / raw)
  To: peppe.cavallaro, davem, seraphin.bonnaffe
  Cc: hock.leong.kweh, niklas.cassel, pavel, linux-kernel, netdev,
	Joao Pinto

When testing stmmac with my QoS reference design I checked a problem in the
CSR clock configuration that was impossibilitating the phy discovery, since
every read operation returned 0x0000ffff. This patch fixes the issue.

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
changes v1->v2 (David Miller)
- DWMAC100 and DWMAC1000 csr clocks masks should also be fixed for the patch
to make sense

 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c  | 2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c    | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
index b21d03f..94223c8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
@@ -539,7 +539,7 @@ struct mac_device_info *dwmac1000_setup(void __iomem *ioaddr, int mcbins,
 	mac->mii.reg_shift = 6;
 	mac->mii.reg_mask = 0x000007C0;
 	mac->mii.clk_csr_shift = 2;
-	mac->mii.clk_csr_mask = 0xF;
+	mac->mii.clk_csr_mask = GENMASK(4, 2);
 
 	/* Get and dump the chip ID */
 	*synopsys_id = stmmac_get_synopsys_id(hwid);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
index a1d582f..8a40e69 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
@@ -197,7 +197,7 @@ struct mac_device_info *dwmac100_setup(void __iomem *ioaddr, int *synopsys_id)
 	mac->mii.reg_shift = 6;
 	mac->mii.reg_mask = 0x000007C0;
 	mac->mii.clk_csr_shift = 2;
-	mac->mii.clk_csr_mask = 0xF;
+	mac->mii.clk_csr_mask = GENMASK(4, 2);
 
 	/* Synopsys Id is not available on old chips */
 	*synopsys_id = 0;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 23322fd..fda01f7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -81,8 +81,8 @@ static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg)
 	value |= (phyaddr << priv->hw->mii.addr_shift)
 		& priv->hw->mii.addr_mask;
 	value |= (phyreg << priv->hw->mii.reg_shift) & priv->hw->mii.reg_mask;
-	value |= (priv->clk_csr & priv->hw->mii.clk_csr_mask)
-		<< priv->hw->mii.clk_csr_shift;
+	value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift)
+		& priv->hw->mii.clk_csr_mask;
 	if (priv->plat->has_gmac4)
 		value |= MII_GMAC4_READ;
 
@@ -122,8 +122,8 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,
 		& priv->hw->mii.addr_mask;
 	value |= (phyreg << priv->hw->mii.reg_shift) & priv->hw->mii.reg_mask;
 
-	value |= ((priv->clk_csr & priv->hw->mii.clk_csr_mask)
-		<< priv->hw->mii.clk_csr_shift);
+	value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift)
+		& priv->hw->mii.clk_csr_mask;
 	if (priv->plat->has_gmac4)
 		value |= MII_GMAC4_WRITE;
 
-- 
2.9.3

^ permalink raw reply related

* Re: [Qemu-devel] [PATCH] x86: implement la57 paging mode
From: Paolo Bonzini @ 2016-12-22 12:38 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Kirill A. Shutemov, Richard Henderson, Eduardo Habkost,
	qemu-devel
In-Reply-To: <20161222123735.GA27861@node.shutemov.name>



On 22/12/2016 13:37, Kirill A. Shutemov wrote:
> On Fri, Dec 16, 2016 at 01:59:36PM +0100, Paolo Bonzini wrote:
>>
>>
>> On 15/12/2016 01:13, Kirill A. Shutemov wrote:
>>> The new paging more is extension of IA32e mode with more additional page
>>> table level.
>>>
>>> It brings support of 57-bit vitrual address space (128PB) and 52-bit
>>> physical address space (4PB).
>>>
>>> The structure of new page table level is identical to pml4.
>>>
>>> The feature is enumerated with CPUID.(EAX=07H, ECX=0):ECX[bit 16].
>>>
>>> CR4.LA57[bit 12] need to be set when pageing enables to activate 5-level
>>> paging mode.
>>>
>>> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>>
>> Looks good, thanks!  The target-i386/translate.c bits are not necessary,
>> but I guess they can also be removed on commit.
> 
> Is there anything else I need to do to make it applied?

No, but 2.8 was only released a couple days ago so we were in freeze.

Paolo

^ permalink raw reply

* Re: [PATCH 2/3] drm/i915: Don't clflush before release phys object
From: Joonas Lahtinen @ 2016-12-22 12:40 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: drm-intel-fixes
In-Reply-To: <20161222120007.28590-2-chris@chris-wilson.co.uk>

On to, 2016-12-22 at 12:00 +0000, Chris Wilson wrote:
> When we teardown the backing storage for the phys object, we copy from
> the coherent contiguous block back to the shmemfs object, clflushing as
> we go. Trying to clflush the invalid sg beforehand just oops and would
> be redundant (due to it already being coherent, and clflushed
> afterwards).
> 
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <drm-intel-fixes@lists.freedesktop.org>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply

* Re: [PATCH V6 0/2] Add ACPI support for HiSilicon SoCs Host Controllers
From: Ming Lei @ 2016-12-22 12:40 UTC (permalink / raw)
  To: Dongdong Liu
  Cc: helgaas, Arnd Bergmann, Rafael J. Wysocki, Lorenzo Pieralisi, tn,
	wangzhou1, Pratyush Anand Thakur, linux-pci@vger.kernel.org,
	Linux ACPI, Linux Kernel Mailing List, Jon Masters,
	gabriele.paoloni, charles.chenxin, Hanjun Guo, linuxarm
In-Reply-To: <0acc4062-cc05-f1b5-7e5d-a06a5f299d97@huawei.com>

Hi Dongdong,

On Thu, Dec 22, 2016 at 8:30 PM, Dongdong Liu <liudongdong3@huawei.com> wro=
te:
> Hi Ming
>
> The latest patchset is [PATCH v11 00/15] PCI: ARM64 ECAM quirks
> You can get them from
> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git (pci/ecam=
)

OK, thanks, looks it has been in linus tree.

Thanks,
Ming

>
> Thanks
> Dongdong
>
> =E5=9C=A8 2016/12/22 16:31, Ming Lei =E5=86=99=E9=81=93:
>>
>> Hi Dongdong,
>>
>> On Tue, Nov 22, 2016 at 8:08 PM, Dongdong Liu <liudongdong3@huawei.com>
>> wrote:
>>>
>>> This patchset adds ACPI support for the HiSilicon Hip05/Hip06/Hip07 SoC
>>> PCIe controllers.
>>> The two patches respectively:
>>>         - provides the common function acpi_get_rc_resources() for ARM6=
4
>>>           platform.
>>>         - adds the HiSilicon ACPI specific quirks.
>>>
>>> This patchset is based on branch pci/ecam-v6
>>> It can be found here:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git(pci/eca=
m-v6)
>>>
>>> This patchset has been tested on HiSilicon D03 board.
>>> The dmesg log, /proc/iomem, and ACPI table information can be found:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=3D187961
>>>
>>> v5 -> v6:
>>> - change the config option to CONFIG_PCI_ECAM_QUIRKS.
>>> - fix some commets about acpi_get_rc_resources().
>>
>>
>> Could you post out v7 for fixing conflicts against current linus tree?
>>
>> BTW, I tried to fix the conflicts by myself, but still caues the followi=
ng
>> build failure:
>>
>> [tom@linux-2.6-vm]$make -j4 CROSS_COMPILE=3Daarch64-linux-gnu-
>> ARCH=3Darm64 drivers/pci/host/pcie-hisi-acpi.o
>>   CHK     include/config/kernel.release
>>   CHK     include/generated/uapi/linux/version.h
>>   CHK     include/generated/utsrelease.h
>>   CHK     include/generated/timeconst.h
>>   CHK     include/generated/bounds.h
>>   CHK     include/generated/asm-offsets.h
>>   CALL    scripts/checksyscalls.sh
>>   CC      drivers/pci/host/pcie-hisi-acpi.o
>> In file included from drivers/pci/host/pcie-hisi-acpi.c:16:0:
>> drivers/pci/host/../pci.h:357:18: error: conflicting types for
>> =E2=80=98acpi_get_rc_resources=E2=80=99
>>  struct resource *acpi_get_rc_resources(const char *hid, u16 segment);
>>                   ^
>> drivers/pci/host/../pci.h:352:5: note: previous declaration of
>> =E2=80=98acpi_get_rc_resources=E2=80=99 was here
>>  int acpi_get_rc_resources(struct device *dev, const char *hid, u16
>> segment,
>>      ^
>> scripts/Makefile.build:293: recipe for target
>> 'drivers/pci/host/pcie-hisi-acpi.o' failed
>> make[1]: *** [drivers/pci/host/pcie-hisi-acpi.o] Error 1
>> Makefile:1640: recipe for target 'drivers/pci/host/pcie-hisi-acpi.o'
>> failed
>> make: *** [drivers/pci/host/pcie-hisi-acpi.o] Error 2
>>
>>
>> Thanks,
>> Ming
>>
>>>
>>> v4 -> v5:
>>> - obtain rc base addresses from PNP0C02 at the root of the ACPI
>>>   namespace (under \_SB) instead of from sub-device under the RC.
>>> - merge the rewrited get rc resources code by Tomasz.
>>> - delete unused code.
>>> - drop the PATCH V4 1/2, will rework late as a separate patch.
>>>
>>> v3 -> v4:
>>> - rebase on pci/ecam-v6.
>>> - delete the unnecessary link_up check code.
>>>
>>> v2 -> v3:
>>> - rebase against 4.9-rc1 and add Tomasz quirks V6 pathcset.
>>> - obtain rc base addresses from PNP0C02 as subdevice of PNP0A03 instead
>>> of
>>>   hardcode the addresses.
>>> - modify hisi_pcie_acpi_rd_conf/hisi_pcie_acpi_wr_conf() according to
>>>   Arnd comments.
>>>
>>> v1 -> v2:
>>> - rebase against Tomasz RFC V5 quirk mechanism
>>> - add ACPI support for the HiSilicon Hip07 SoC PCIe controllers.
>>>
>>> Dongdong Liu (2):
>>>   PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform
>>>   PCI/ACPI: hisi: Add ACPI support for HiSilicon SoCs Host Controllers
>>>
>>>  MAINTAINERS                       |   1 +
>>>  drivers/acpi/pci_mcfg.c           |  13 +++++
>>>  drivers/pci/host/Kconfig          |   7 +++
>>>  drivers/pci/host/Makefile         |   1 +
>>>  drivers/pci/host/pcie-hisi-acpi.c | 119
>>> ++++++++++++++++++++++++++++++++++++++
>>>  drivers/pci/pci-acpi.c            |  69 ++++++++++++++++++++++
>>>  drivers/pci/pci.h                 |   4 ++
>>>  include/linux/pci-ecam.h          |   5 ++
>>>  8 files changed, 219 insertions(+)
>>>  create mode 100644 drivers/pci/host/pcie-hisi-acpi.c
>>>
>>> --
>>> 1.9.1
>>>
>>
>>
>>
>



--=20
Ming Lei

^ permalink raw reply

* Re: [PATCH V6 0/2] Add ACPI support for HiSilicon SoCs Host Controllers
From: Ming Lei @ 2016-12-22 12:40 UTC (permalink / raw)
  To: Dongdong Liu
  Cc: helgaas, Arnd Bergmann, Rafael J. Wysocki, Lorenzo Pieralisi, tn,
	wangzhou1, Pratyush Anand Thakur, linux-pci@vger.kernel.org,
	Linux ACPI, Linux Kernel Mailing List, Jon Masters,
	gabriele.paoloni, charles.chenxin, Hanjun Guo, linuxarm
In-Reply-To: <0acc4062-cc05-f1b5-7e5d-a06a5f299d97@huawei.com>

Hi Dongdong,

On Thu, Dec 22, 2016 at 8:30 PM, Dongdong Liu <liudongdong3@huawei.com> wrote:
> Hi Ming
>
> The latest patchset is [PATCH v11 00/15] PCI: ARM64 ECAM quirks
> You can get them from
> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git (pci/ecam)

OK, thanks, looks it has been in linus tree.

Thanks,
Ming

>
> Thanks
> Dongdong
>
> 在 2016/12/22 16:31, Ming Lei 写道:
>>
>> Hi Dongdong,
>>
>> On Tue, Nov 22, 2016 at 8:08 PM, Dongdong Liu <liudongdong3@huawei.com>
>> wrote:
>>>
>>> This patchset adds ACPI support for the HiSilicon Hip05/Hip06/Hip07 SoC
>>> PCIe controllers.
>>> The two patches respectively:
>>>         - provides the common function acpi_get_rc_resources() for ARM64
>>>           platform.
>>>         - adds the HiSilicon ACPI specific quirks.
>>>
>>> This patchset is based on branch pci/ecam-v6
>>> It can be found here:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git(pci/ecam-v6)
>>>
>>> This patchset has been tested on HiSilicon D03 board.
>>> The dmesg log, /proc/iomem, and ACPI table information can be found:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=187961
>>>
>>> v5 -> v6:
>>> - change the config option to CONFIG_PCI_ECAM_QUIRKS.
>>> - fix some commets about acpi_get_rc_resources().
>>
>>
>> Could you post out v7 for fixing conflicts against current linus tree?
>>
>> BTW, I tried to fix the conflicts by myself, but still caues the following
>> build failure:
>>
>> [tom@linux-2.6-vm]$make -j4 CROSS_COMPILE=aarch64-linux-gnu-
>> ARCH=arm64 drivers/pci/host/pcie-hisi-acpi.o
>>   CHK     include/config/kernel.release
>>   CHK     include/generated/uapi/linux/version.h
>>   CHK     include/generated/utsrelease.h
>>   CHK     include/generated/timeconst.h
>>   CHK     include/generated/bounds.h
>>   CHK     include/generated/asm-offsets.h
>>   CALL    scripts/checksyscalls.sh
>>   CC      drivers/pci/host/pcie-hisi-acpi.o
>> In file included from drivers/pci/host/pcie-hisi-acpi.c:16:0:
>> drivers/pci/host/../pci.h:357:18: error: conflicting types for
>> ‘acpi_get_rc_resources’
>>  struct resource *acpi_get_rc_resources(const char *hid, u16 segment);
>>                   ^
>> drivers/pci/host/../pci.h:352:5: note: previous declaration of
>> ‘acpi_get_rc_resources’ was here
>>  int acpi_get_rc_resources(struct device *dev, const char *hid, u16
>> segment,
>>      ^
>> scripts/Makefile.build:293: recipe for target
>> 'drivers/pci/host/pcie-hisi-acpi.o' failed
>> make[1]: *** [drivers/pci/host/pcie-hisi-acpi.o] Error 1
>> Makefile:1640: recipe for target 'drivers/pci/host/pcie-hisi-acpi.o'
>> failed
>> make: *** [drivers/pci/host/pcie-hisi-acpi.o] Error 2
>>
>>
>> Thanks,
>> Ming
>>
>>>
>>> v4 -> v5:
>>> - obtain rc base addresses from PNP0C02 at the root of the ACPI
>>>   namespace (under \_SB) instead of from sub-device under the RC.
>>> - merge the rewrited get rc resources code by Tomasz.
>>> - delete unused code.
>>> - drop the PATCH V4 1/2, will rework late as a separate patch.
>>>
>>> v3 -> v4:
>>> - rebase on pci/ecam-v6.
>>> - delete the unnecessary link_up check code.
>>>
>>> v2 -> v3:
>>> - rebase against 4.9-rc1 and add Tomasz quirks V6 pathcset.
>>> - obtain rc base addresses from PNP0C02 as subdevice of PNP0A03 instead
>>> of
>>>   hardcode the addresses.
>>> - modify hisi_pcie_acpi_rd_conf/hisi_pcie_acpi_wr_conf() according to
>>>   Arnd comments.
>>>
>>> v1 -> v2:
>>> - rebase against Tomasz RFC V5 quirk mechanism
>>> - add ACPI support for the HiSilicon Hip07 SoC PCIe controllers.
>>>
>>> Dongdong Liu (2):
>>>   PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform
>>>   PCI/ACPI: hisi: Add ACPI support for HiSilicon SoCs Host Controllers
>>>
>>>  MAINTAINERS                       |   1 +
>>>  drivers/acpi/pci_mcfg.c           |  13 +++++
>>>  drivers/pci/host/Kconfig          |   7 +++
>>>  drivers/pci/host/Makefile         |   1 +
>>>  drivers/pci/host/pcie-hisi-acpi.c | 119
>>> ++++++++++++++++++++++++++++++++++++++
>>>  drivers/pci/pci-acpi.c            |  69 ++++++++++++++++++++++
>>>  drivers/pci/pci.h                 |   4 ++
>>>  include/linux/pci-ecam.h          |   5 ++
>>>  8 files changed, 219 insertions(+)
>>>  create mode 100644 drivers/pci/host/pcie-hisi-acpi.c
>>>
>>> --
>>> 1.9.1
>>>
>>
>>
>>
>



-- 
Ming Lei

^ permalink raw reply

* [PATCH 0/8] qedr: cumulative fixes for user verbs
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani

This patch series introduces eight fixes for the various verbs.

Ram Amrani (8):
  qedr: configure the number of CQEs on CQ creation
  qedr: return error if destroy CQ failed
  qedr: return correct value on modify qp
  qedr: modify QP state to error when destroying it
  qedr: ignore inline flag in read verbs
  qedr: post_send/recv according to QP state
  qedr: clear the vendor error field in the work completion
  qedr: Always notify the verb consumer of flushed CQEs

 drivers/infiniband/hw/qedr/verbs.c | 35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH 1/8] qedr: configure the number of CQEs on CQ creation
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

Configure ibcq->cqe when a CQ is created.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index a615142..3762ba1 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -888,6 +888,8 @@ struct ib_cq *qedr_create_cq(struct ib_device *ibdev,
 
 		pbl_ptr = cq->q.pbl_tbl->pa;
 		page_cnt = cq->q.pbl_info.num_pbes;
+
+		cq->ibcq.cqe = chain_entries;
 	} else {
 		cq->cq_type = QEDR_CQ_TYPE_KERNEL;
 
@@ -903,6 +905,7 @@ struct ib_cq *qedr_create_cq(struct ib_device *ibdev,
 
 		page_cnt = qed_chain_get_page_cnt(&cq->pbl);
 		pbl_ptr = qed_chain_get_pbl_phys(&cq->pbl);
+		cq->ibcq.cqe = cq->pbl.capacity;
 	}
 
 	qedr_init_cq_params(cq, ctx, dev, vector, chain_entries, page_cnt,
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 2/8] qedr: return error if destroy CQ failed
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 3762ba1..068dfa6 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -983,8 +983,13 @@ int qedr_destroy_cq(struct ib_cq *ibcq)
 
 	/* GSIs CQs are handled by driver, so they don't exist in the FW */
 	if (cq->cq_type != QEDR_CQ_TYPE_GSI) {
+		int rc;
+
 		iparams.icid = cq->icid;
-		dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams, &oparams);
+		rc = dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams,
+					       &oparams);
+		if (rc)
+			return rc;
 		dev->ops->common->chain_free(dev->cdev, &cq->pbl);
 	}
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 3/8] qedr: return correct value on modify qp
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 068dfa6..247c407 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1968,7 +1968,7 @@ int qedr_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 
 	if (attr_mask & IB_QP_STATE) {
 		if ((qp->qp_type != IB_QPT_GSI) && (!udata))
-			qedr_update_qp_state(dev, qp, qp_params.new_state);
+			rc = qedr_update_qp_state(dev, qp, qp_params.new_state);
 		qp->state = qp_params.new_state;
 	}
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 4/8] qedr: modify QP state to error when destroying it
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

Current code didn't modify the QP state to error because it queried the
QP state as a bitmap while it isn't. So the code never got executed.
This patch fixes this and queries for each QP state respectively and not
at once via a bitmask.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 247c407..e95b19f 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -2072,8 +2072,10 @@ int qedr_destroy_qp(struct ib_qp *ibqp)
 	DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp type=%d\n",
 		 qp, qp->qp_type);
 
-	if (qp->state != (QED_ROCE_QP_STATE_RESET | QED_ROCE_QP_STATE_ERR |
-			  QED_ROCE_QP_STATE_INIT)) {
+	if ((qp->state != QED_ROCE_QP_STATE_RESET) &&
+	    (qp->state != QED_ROCE_QP_STATE_ERR) &&
+	    (qp->state != QED_ROCE_QP_STATE_INIT)) {
+
 		attr.qp_state = IB_QPS_ERR;
 		attr_mask |= IB_QP_STATE;
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 5/8] qedr: ignore inline flag in read verbs
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

In the current implementation a read verb with IB_SEND_INLINE may be
illegally configured.
In this fix we ignore the inline bit in the case of a read verb.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index e95b19f..16bbdfe 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -2630,7 +2630,9 @@ static u32 qedr_prepare_sq_rdma_data(struct qedr_dev *dev,
 	rwqe2->r_key = cpu_to_le32(rdma_wr(wr)->rkey);
 	DMA_REGPAIR_LE(rwqe2->remote_va, rdma_wr(wr)->remote_addr);
 
-	if (wr->send_flags & IB_SEND_INLINE) {
+	if (wr->send_flags & IB_SEND_INLINE &&
+	    (wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM ||
+	     wr->opcode == IB_WR_RDMA_WRITE)) {
 		u8 flags = 0;
 
 		SET_FIELD2(flags, RDMA_SQ_RDMA_WQE_1ST_INLINE_FLG, 1);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 6/8] qedr: post_send/recv according to QP state
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

Enable posting to SQ only in RTS, ERR and SQD QP state.
Enable posting to RQ in ERR QP state.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 16bbdfe..18341ed 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -2983,8 +2983,9 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 
 	spin_lock_irqsave(&qp->q_lock, flags);
 
-	if ((qp->state == QED_ROCE_QP_STATE_RESET) ||
-	    (qp->state == QED_ROCE_QP_STATE_ERR)) {
+	if ((qp->state != QED_ROCE_QP_STATE_RTS) &&
+	    (qp->state != QED_ROCE_QP_STATE_ERR) &&
+	    (qp->state != QED_ROCE_QP_STATE_SQD)) {
 		spin_unlock_irqrestore(&qp->q_lock, flags);
 		*bad_wr = wr;
 		DP_DEBUG(dev, QEDR_MSG_CQ,
@@ -3042,8 +3043,7 @@ int qedr_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
 
 	spin_lock_irqsave(&qp->q_lock, flags);
 
-	if ((qp->state == QED_ROCE_QP_STATE_RESET) ||
-	    (qp->state == QED_ROCE_QP_STATE_ERR)) {
+	if (qp->state == QED_ROCE_QP_STATE_RESET) {
 		spin_unlock_irqrestore(&qp->q_lock, flags);
 		*bad_wr = wr;
 		return -EINVAL;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 7/8] qedr: clear the vendor error field in the work completion
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

We clear the vendor error field in the work completion so that if
a work completion is erroneous  the field won't confuse the caller.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 18341ed..2c4496f 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -3185,6 +3185,7 @@ static int process_req(struct qedr_dev *dev, struct qedr_qp *qp,
 
 		/* fill WC */
 		wc->status = status;
+		wc->vendor_err = 0;
 		wc->wc_flags = 0;
 		wc->src_qp = qp->id;
 		wc->qp = &qp->ibqp;
@@ -3374,6 +3375,7 @@ static void __process_resp_one(struct qedr_dev *dev, struct qedr_qp *qp,
 
 	/* fill WC */
 	wc->status = wc_status;
+	wc->vendor_err = 0;
 	wc->src_qp = qp->id;
 	wc->qp = &qp->ibqp;
 	wc->wr_id = wr_id;
@@ -3402,6 +3404,7 @@ static int process_resp_flush(struct qedr_qp *qp, struct qedr_cq *cq,
 	while (num_entries && qp->rq.wqe_cons != hw_cons) {
 		/* fill WC */
 		wc->status = IB_WC_WR_FLUSH_ERR;
+		wc->vendor_err = 0;
 		wc->wc_flags = 0;
 		wc->src_qp = qp->id;
 		wc->byte_len = 0;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 8/8] qedr: Always notify the verb consumer of flushed CQEs
From: Ram Amrani @ 2016-12-22 12:40 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
In-Reply-To: <1482410440-2297-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 2c4496f..db2e875 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -3237,7 +3237,7 @@ static int qedr_poll_cq_req(struct qedr_dev *dev,
 		       "Error: POLL CQ with RDMA_CQE_REQ_STS_WORK_REQUEST_FLUSHED_ERR. CQ icid=0x%x, QP icid=0x%x\n",
 		       cq->icid, qp->icid);
 		cnt = process_req(dev, qp, cq, num_entries, wc, req->sq_cons,
-				  IB_WC_WR_FLUSH_ERR, 0);
+				  IB_WC_WR_FLUSH_ERR, 1);
 		break;
 	default:
 		/* process all WQE before the cosumer */
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH] drm/i915: Prevent timeline updates whilst performing reset
From: Mika Kuoppala @ 2016-12-22 12:41 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: drm-intel-fixes
In-Reply-To: <20161219145643.15850-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> As the fence may be signaled concurrently from an interrupt on another
> device, it is possible for the list of requests on the timeline to be
> modified as we walk it. Take both (the context's timeline and the global
> timeline) locks to prevent such modifications.
>
> Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: <drm-intel-fixes@lists.freedesktop.org>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 2d736442c6ab..d94df127d9f6 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2725,6 +2725,7 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine)
>  	struct drm_i915_gem_request *request;
>  	struct i915_gem_context *incomplete_ctx;
>  	struct intel_timeline *timeline;
> +	unsigned long flags;
>  	bool ring_hung;
>  
>  	if (engine->irq_seqno_barrier)
> @@ -2768,13 +2769,20 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine)
>  	if (i915_gem_context_is_default(incomplete_ctx))
>  		return;
>  
> +	timeline = i915_gem_context_lookup_timeline(incomplete_ctx, engine);
> +
> +	spin_lock_irqsave(&engine->timeline->lock, flags);
> +	spin_lock(&timeline->lock);
> +
>  	list_for_each_entry_continue(request, &engine->timeline->requests, link)
>  		if (request->ctx == incomplete_ctx)
>  			reset_request(request);
>  
> -	timeline = i915_gem_context_lookup_timeline(incomplete_ctx, engine);
>  	list_for_each_entry(request, &timeline->requests, link)
>  		reset_request(request);
> +
> +	spin_unlock(&timeline->lock);
> +	spin_unlock_irqrestore(&engine->timeline->lock, flags);
>  }
>  
>  void i915_gem_reset(struct drm_i915_private *dev_priv)
> -- 
> 2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.