Skip to content
  • Anton Nefedov's avatar
    7bb86085
    char: chardevice hotswap · 7bb86085
    Anton Nefedov authored
    
    
    This patch adds a possibility to change a char device without a frontend
    removal.
    
    Ideally, it would have to happen transparently to a frontend, i.e.
    frontend would continue its regular operation.
    However, backends are not stateless and are set up by the frontends
    via qemu_chr_fe_<> functions, and it's not (generally) possible to replay
    that setup entirely in a backend code, as different chardevs respond
    to the setup calls differently, so do frontends work differently basing
    on those setup responses.
    Moreover, some frontend can generally get and save the backend pointer
    (qemu_chr_fe_get_driver()), and it will become invalid after backend change.
    
    So, a frontend which would like to support chardev hotswap has to register
    a "backend change" handler, and redo its backend setup there.
    
    Signed-off-by: default avatarAnton Nefedov <anton.nefedov@virtuozzo.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <1499342940-56739-4-git-send-email-anton.nefedov@virtuozzo.com>
    Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    7bb86085
    char: chardevice hotswap
    Anton Nefedov authored
    
    
    This patch adds a possibility to change a char device without a frontend
    removal.
    
    Ideally, it would have to happen transparently to a frontend, i.e.
    frontend would continue its regular operation.
    However, backends are not stateless and are set up by the frontends
    via qemu_chr_fe_<> functions, and it's not (generally) possible to replay
    that setup entirely in a backend code, as different chardevs respond
    to the setup calls differently, so do frontends work differently basing
    on those setup responses.
    Moreover, some frontend can generally get and save the backend pointer
    (qemu_chr_fe_get_driver()), and it will become invalid after backend change.
    
    So, a frontend which would like to support chardev hotswap has to register
    a "backend change" handler, and redo its backend setup there.
    
    Signed-off-by: default avatarAnton Nefedov <anton.nefedov@virtuozzo.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <1499342940-56739-4-git-send-email-anton.nefedov@virtuozzo.com>
    Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading