Message ID | 5df03dc2-6bbd-6f5f-e2f8-18ed2062eb0f@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] x86/PVH: PHYSDEVOP_pci_mmcfg_reserved should not blindly register a region | expand |
On Mon, May 11, 2020 at 04:50:47PM +0200, Jan Beulich wrote: > The op has a "is reserved" flag, and hence registration shouldn't > happen unilaterally. > > Fixes: eb3dd90e4089 ("x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0") > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Thanks, Roger.
--- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -557,7 +557,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H ret = pci_mmcfg_reserved(info.address, info.segment, info.start_bus, info.end_bus, info.flags); - if ( !ret && has_vpci(currd) ) + if ( !ret && has_vpci(currd) && (info.flags & XEN_PCI_MMCFG_RESERVED) ) { /* * For HVM (PVH) domains try to add the newly found MMCFG to the
The op has a "is reserved" flag, and hence registration shouldn't happen unilaterally. Fixes: eb3dd90e4089 ("x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0") Signed-off-by: Jan Beulich <jbeulich@suse.com> --- v2: Don't treat XEN_PCI_MMCFG_RESERVED clear as an unregistration request.