Signed-off-by: Asias He <asias.hejun@xxxxxxxxx> --- tools/kvm/virtio-console.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/virtio-console.c b/tools/kvm/virtio-console.c index 9675090..aa9b1bd 100644 --- a/tools/kvm/virtio-console.c +++ b/tools/kvm/virtio-console.c @@ -163,6 +163,8 @@ static bool virtio_console_pci_io_out(struct kvm *self, uint16_t port, void *dat unsigned long offset = port - IOPORT_VIRTIO_CONSOLE; bool ret = true; + mutex_lock(&console_device.mutex); + switch (offset) { case VIRTIO_PCI_GUEST_FEATURES: console_device.guest_features = ioport__read32(data); -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html