diff options
-rw-r--r-- | samples/client.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/samples/client.c b/samples/client.c index 9a793dd..925335d 100644 --- a/samples/client.c +++ b/samples/client.c @@ -542,6 +542,18 @@ int main(int argc, char *argv[]) } /* + * XXX VFIO_USER_REGION_READ and VFIO_USER_REGION_WRITE + * + * BAR0 in the server does not support memory mapping so it must be accessed + * via explicit messages. + */ + ret = access_bar0(sock); + if (ret < 0) { + fprintf(stderr, "failed to access BAR0: %s\n", strerror(-ret)); + exit(EXIT_FAILURE); + } + + /* * XXX VFIO_USER_DEVICE_GET_IRQ_INFO and VFIO_IRQ_SET_ACTION_TRIGGER * Query interrupts, configure an eventfd to be associated with INTx, and * finally wait for the server to fire the interrupt. @@ -559,18 +571,6 @@ int main(int argc, char *argv[]) } /* - * XXX VFIO_USER_REGION_READ and VFIO_USER_REGION_WRITE - * - * BAR0 in the server does not support memory mapping so it must be accessed - * via explicit messages. - */ - ret = access_bar0(sock); - if (ret < 0) { - fprintf(stderr, "failed to access BAR0: %s\n", strerror(-ret)); - exit(EXIT_FAILURE); - } - - /* * FIXME now that region read/write works, change the server implementation * to trigger an interrupt after N seconds, where N is the value written to * BAR0 by the client. |