[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v4 3/6] xen: add process_pending_softirqs_norcu() for keyhandlers
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Jürgen Groß <jgross@xxxxxxxx>
- Date: Wed, 11 Mar 2020 10:27:14 +0100
- Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 11 Mar 2020 09:27:18 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11.03.20 10:25, Jan Beulich wrote:
On 11.03.2020 07:07, Jürgen Groß wrote:
On 10.03.20 18:02, Jan Beulich wrote:
On 10.03.2020 08:28, Juergen Gross wrote:
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -587,7 +587,7 @@ static void amd_dump_p2m_table_level(struct page_info* pg,
int level,
struct amd_iommu_pte *pde = &table_vaddr[index];
if ( !(index % 2) )
- process_pending_softirqs();
+ process_pending_softirqs_norcu();
At the example of this - the property of holding an RCU lock is
entirely invisible here, as it's the generic
iommu_dump_p2m_table() which acquires it. This suggest to me that
going forward breaking this is going to be very likely. Couldn't
process_pending_softirqs() exclude RCU handling when finding
preempt_count() to return non-zero?
This can be done, but then the non-debug build would require to have
non-empty rcu lock functions.
I guess I don't understand - I see only one version of them:
#define rcu_read_lock(x) ({ ((void)(x)); preempt_disable(); })
#define rcu_read_unlock(x) ({ ((void)(x)); preempt_enable(); })
Same for the preempt count adjustment operations.
See patch 5.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|