diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-10-27 14:43:02 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-10-27 14:43:02 +0100 |
| commit | a93ece47fd9edbd4558db24300056c9a57d3bcd4 (patch) | |
| tree | 8a331861fe314d46a9bdbe21318775dc1e1044eb /hw/xen/xen_backend.c | |
| parent | 46f63e5b8899e1639d93025a8f2d5f1239b7dcdd (diff) | |
| parent | 7cdcca725b6bfc96634c15e3f74ae4b148cf9c40 (diff) | |
| download | focaccia-qemu-a93ece47fd9edbd4558db24300056c9a57d3bcd4.tar.gz focaccia-qemu-a93ece47fd9edbd4558db24300056c9a57d3bcd4.zip | |
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20171026-tag' into staging
Xen 2017/10/26 # gpg: Signature made Thu 26 Oct 2017 23:57:16 BST # gpg: using RSA key 0x894F8F4870E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" # gpg: aka "Stefano Stabellini <sstabellini@kernel.org>" # Primary key fingerprint: D04E 33AB A51F 67BA 07D3 0AEA 894F 8F48 70E1 AE90 * remotes/sstabellini/tags/xen-20171026-tag: xen: Log errno rather than return value xen: dont try setting max grants multiple times xen: add a global indicator for grant copy being available Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/xen/xen_backend.c')
| -rw-r--r-- | hw/xen/xen_backend.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index c46cbb0759..0f849a26d2 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -44,6 +44,7 @@ BusState *xen_sysbus; /* public */ struct xs_handle *xenstore = NULL; const char *xen_protocol; +bool xen_feature_grant_copy; /* private */ static int debug; @@ -519,6 +520,8 @@ void xenstore_update_fe(char *watch, struct XenDevice *xendev) int xen_be_init(void) { + xengnttab_handle *gnttabdev; + xenstore = xs_daemon_open(); if (!xenstore) { xen_pv_printf(NULL, 0, "can't connect to xenstored\n"); @@ -532,6 +535,14 @@ int xen_be_init(void) goto err; } + gnttabdev = xengnttab_open(NULL, 0); + if (gnttabdev != NULL) { + if (xengnttab_grant_copy(gnttabdev, 0, NULL) == 0) { + xen_feature_grant_copy = true; + } + xengnttab_close(gnttabdev); + } + xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV); qdev_init_nofail(xen_sysdev); xen_sysbus = qbus_create(TYPE_XENSYSBUS, DEVICE(xen_sysdev), "xen-sysbus"); |