From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
WeiLiu <wl@xen.org>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"George Dunlap" <George.Dunlap@eu.citrix.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Ian Jackson" <Ian.Jackson@eu.citrix.com>,
"Roger Pau Monné" <roger.pau@cirix.com>,
"Tim Deegan" <tim@xen.org>,
"Roger Pau Monne" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v2 2/4] PCI: move pdev_list field to common structure
Date: Tue, 4 Jun 2019 13:55:10 +0100 [thread overview]
Message-ID: <4c58c2b3-4d47-1a47-59f6-dda8b3077d9d@arm.com> (raw)
In-Reply-To: <5CF667500200007800235116@prv1-mh.provo.novell.com>
Hi,
On 6/4/19 1:42 PM, Jan Beulich wrote:
> Its management shouldn't be arch-specific, and in particular there
> should be no need for special precautions when creating the special
> domains.
>
> At this occasion
> - correct parenthesization of for_each_pdev(),
> - stop open-coding for_each_pdev() in vPCI code.
From an Arm POV, this makes sense. With one comment below.
> @@ -476,8 +474,6 @@ struct arch_domain
> #define has_pirq(d) (!!((d)->arch.emulation_flags & X86_EMU_USE_PIRQ))
> #define has_vpci(d) (!!((d)->arch.emulation_flags & X86_EMU_VPCI))
>
> -#define has_arch_pdevs(d) (!list_empty(&(d)->arch.pdev_list))
> -
> #define gdt_ldt_pt_idx(v) \
> ((v)->vcpu_id >> (PAGETABLE_ORDER - GDT_LDT_VCPU_SHIFT))
> #define pv_gdt_ptes(v) \
> --- a/xen/include/xen/pci.h
> +++ b/xen/include/xen/pci.h
> @@ -121,7 +121,9 @@ struct pci_dev {
> };
>
> #define for_each_pdev(domain, pdev) \
> - list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)
> + list_for_each_entry(pdev, &(domain)->pdev_list, domain_list)
> +
> +#define has_arch_pdevs(d) (!list_empty(&(d)->pdev_list))
This feels a bit strange to keep "arch" in the macro name when the code
is now generic. How about "domain_has_pdevs"?
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-06-04 12:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 12:30 [Xen-devel] [PATCH v2 0/4] adjust special domain creation Jan Beulich
2019-06-04 12:41 ` [Xen-devel] [PATCH v2 1/4] x86/PV: tighten page table ownership check in emul-priv-op.c:read_cr() Jan Beulich
2019-06-05 10:19 ` Roger Pau Monné
2019-06-04 12:42 ` [Xen-devel] [PATCH v2 2/4] PCI: move pdev_list field to common structure Jan Beulich
2019-06-04 12:55 ` Julien Grall [this message]
2019-06-04 13:03 ` Jan Beulich
2019-06-04 13:05 ` Julien Grall
2019-06-04 13:14 ` Jan Beulich
2019-06-04 13:42 ` Julien Grall
2019-06-04 13:50 ` Andrew Cooper
2019-06-04 12:43 ` [Xen-devel] [PATCH v2 3/4] adjust special domain creation (and call it earlier on x86) Jan Beulich
2019-06-04 13:35 ` Andrew Cooper
2019-06-04 14:21 ` Jan Beulich
2019-06-06 8:40 ` Julien Grall
2019-06-04 12:44 ` [Xen-devel] [PATCH v2 4/4] dom_cow is needed for mem-sharing only Jan Beulich
2019-06-04 13:39 ` Andrew Cooper
2019-06-06 8:41 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c58c2b3-4d47-1a47-59f6-dda8b3077d9d@arm.com \
--to=julien.grall@arm.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=roger.pau@cirix.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.