diff options
author | Sheng Yang <sheng@linux.intel.com> | 2010-05-14 07:39:33 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-07-22 19:45:35 -0400 |
commit | bee6ab53e652a414af20392899879b58cd80d033 (patch) | |
tree | 96351c583984ec497feae270f09f445a4703a676 /drivers/xen | |
parent | 18f19aa62a267f2f759e278018f1032adf4c3774 (diff) |
x86: early PV on HVM features initialization.
Initialize basic pv on hvm features adding a new Xen HVM specific
hypervisor_x86 structure.
Don't try to initialize xen-kbdfront and xen-fbfront when running on HVM
because the backends are not available.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 3479332113e9..d96fa75b45ec 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -56,6 +56,8 @@ | |||
56 | #include <xen/events.h> | 56 | #include <xen/events.h> |
57 | #include <xen/page.h> | 57 | #include <xen/page.h> |
58 | 58 | ||
59 | #include <xen/hvm.h> | ||
60 | |||
59 | #include "xenbus_comms.h" | 61 | #include "xenbus_comms.h" |
60 | #include "xenbus_probe.h" | 62 | #include "xenbus_probe.h" |
61 | 63 | ||
@@ -805,11 +807,24 @@ static int __init xenbus_probe_init(void) | |||
805 | if (xen_initial_domain()) { | 807 | if (xen_initial_domain()) { |
806 | /* dom0 not yet supported */ | 808 | /* dom0 not yet supported */ |
807 | } else { | 809 | } else { |
810 | if (xen_hvm_domain()) { | ||
811 | uint64_t v = 0; | ||
812 | err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v); | ||
813 | if (err) | ||
814 | goto out_error; | ||
815 | xen_store_evtchn = (int)v; | ||
816 | err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v); | ||
817 | if (err) | ||
818 | goto out_error; | ||
819 | xen_store_mfn = (unsigned long)v; | ||
820 | xen_store_interface = ioremap(xen_store_mfn << PAGE_SHIFT, PAGE_SIZE); | ||
821 | } else { | ||
822 | xen_store_evtchn = xen_start_info->store_evtchn; | ||
823 | xen_store_mfn = xen_start_info->store_mfn; | ||
824 | xen_store_interface = mfn_to_virt(xen_store_mfn); | ||
825 | } | ||
808 | xenstored_ready = 1; | 826 | xenstored_ready = 1; |
809 | xen_store_evtchn = xen_start_info->store_evtchn; | ||
810 | xen_store_mfn = xen_start_info->store_mfn; | ||
811 | } | 827 | } |
812 | xen_store_interface = mfn_to_virt(xen_store_mfn); | ||
813 | 828 | ||
814 | /* Initialize the interface to xenstore. */ | 829 | /* Initialize the interface to xenstore. */ |
815 | err = xs_init(); | 830 | err = xs_init(); |