diff options
| author | Stefano Stabellini | 2012-04-17 19:04:18 +0200 |
|---|---|---|
| committer | Stefano Stabellini | 2012-04-17 20:04:26 +0200 |
| commit | 8688e0652dc4fde816316fbd10869e3e33411968 (patch) | |
| tree | 690adf1d362a7109c42951e6d92a436afafce483 | |
| parent | qemu-timer.c: Remove 250us timeouts (diff) | |
| download | qemu-8688e0652dc4fde816316fbd10869e3e33411968.tar.gz qemu-8688e0652dc4fde816316fbd10869e3e33411968.tar.xz qemu-8688e0652dc4fde816316fbd10869e3e33411968.zip | |
xen,configure: detect Xen 4.2
Xen 4.2 is the first to support xc_hvm_inject_msi: use it to determine
if we are running on it.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
| -rwxr-xr-x | configure | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1398,6 +1398,31 @@ int main(void) { xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); xc_gnttab_open(NULL, 0); xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + return 0; +} +EOF + compile_prog "" "$xen_libs" + ) ; then + xen_ctrl_version=420 + xen=yes + + elif ( + cat > $TMPC <<EOF +#include <xenctrl.h> +#include <xs.h> +#include <stdint.h> +#include <xen/hvm/hvm_info_table.h> +#if !defined(HVM_MAX_VCPUS) +# error HVM_MAX_VCPUS not defined +#endif +int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc = xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); return 0; } EOF |
