|
@@ -1599,12 +1599,13 @@ vu_set_config(VuDev *dev, VhostUserMsg *vmsg)
|
|
static bool
|
|
static bool
|
|
vu_set_postcopy_advise(VuDev *dev, VhostUserMsg *vmsg)
|
|
vu_set_postcopy_advise(VuDev *dev, VhostUserMsg *vmsg)
|
|
{
|
|
{
|
|
- dev->postcopy_ufd = -1;
|
|
|
|
#ifdef UFFDIO_API
|
|
#ifdef UFFDIO_API
|
|
struct uffdio_api api_struct;
|
|
struct uffdio_api api_struct;
|
|
|
|
|
|
dev->postcopy_ufd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
|
|
dev->postcopy_ufd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
|
|
vmsg->size = 0;
|
|
vmsg->size = 0;
|
|
|
|
+#else
|
|
|
|
+ dev->postcopy_ufd = -1;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
if (dev->postcopy_ufd == -1) {
|
|
if (dev->postcopy_ufd == -1) {
|