On 2015/06/15 22:58, Stefan Hajnoczi wrote: > On Fri, May 29, 2015 at 01:42:30PM +0900, Tetsuya Mukawa wrote: >> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c >> index 3af6faf..7fbb306 100644 >> --- a/hw/net/virtio-net.c >> +++ b/hw/net/virtio-net.c >> @@ -366,6 +366,17 @@ static int peer_has_ufo(VirtIONet *n) >> return n->has_ufo; >> } >> >> +static uint64_t peer_backend_features(VirtIONet *n) >> +{ >> + if (!peer_has_vnet_hdr(n)) >> + return 0; > QEMU coding style always uses {} even for single statement if bodies: > > if (!peer_has_vnet_hdr(n)) { > return 0; > } > >> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c >> index 4d7e3ba..d847ea5 100644 >> --- a/hw/virtio/vhost-user.c >> +++ b/hw/virtio/vhost-user.c >> @@ -307,6 +307,13 @@ static int vhost_user_call(struct vhost_dev *dev, >> unsigned long int request, >> error_report("Received bad msg size."); >> goto close; >> } >> + if (dev->backend_features != (dev->backend_features & msg.u64)) >> { >> + error_report("Lack of backend features. " >> + "Expected 0x%llx, but receives 0x%lx", > Please use PRIx64 for msg.u64 to avoid compiler errors on 32-bit hosts. >> + dev->backend_features, msg.u64); >> + goto close; > QEMU uses 4-space indentation.
I will fix above 3 issues in next patches. Regards, Tetsuya