Re: [Xen-devel] [PATCH 3/7] xen/hvm: Xen PV extension of HVMinitialization

From: Ian Campbell
Date: Tue Mar 02 2010 - 04:22:42 EST


On Tue, 2010-03-02 at 01:38 +0000, Sheng Yang wrote:
>
> A annoy thing in pv drivers is that it would test if the domain type
> is _NOT_ XEN_NATIVE. So set the domain to XEN_HVM_DOMAIN would result
> in PV driver initialization then probably panic.

What _actually_ panics?

Registration of the frontend devices should be completely harmless
(apart from a little wasted RAM) unless a xenbus driver manages to come
up and enumerate the xen bus and cause the ->probe function run.

You should be gating the xenbus startup on the availability of PV
functionality not the individual driver registrations. This keeps the
test in a single easy to maintain place.

Compare with pci_register_driver and all of the callers of that function
-- not a single one of them has an "is_pci_available" test anywhere.

Ian.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/