04 Feb, 2008

3 commits

  • A reset function solves three problems:

    1) It allows us to renegotiate features, eg. if we want to upgrade a
    guest driver without rebooting the guest.

    2) It gives us a clean way of shutting down virtqueues: after a reset,
    we know that the buffers won't be used by the host, and

    3) It helps the guest recover from messed-up drivers.

    So we remove the ->shutdown hook, and the only way we now remove
    feature bits is via reset.

    We leave it to the driver to do the reset before it deletes queues:
    the balloon driver, for example, needs to chat to the host in its
    remove function.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • It seems that virtio_net wants to disable callbacks (interrupts) before
    calling netif_rx_schedule(), so we can't use the return value to do so.

    Rename "restart" to "cb_enable" and introduce "cb_disable" hook: callback
    now returns void, rather than a boolean.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Previously we used a type/len pair within the config space, but this
    seems overkill. We now simply define a structure which represents the
    layout in the config space: the config space can now only be extended
    at the end.

    The main driver-visible changes:
    1) We indicate what fields are present with an explicit feature bit.
    2) Virtqueues are explicitly numbered, and not in the config space.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

31 Jan, 2008

2 commits

  • drivers/lguest/x86/core.c: In function ‘copy_in_guest_info’:
    drivers/lguest/x86/core.c:97: error: ‘struct x86_hw_tss’ has no member named ‘esp1’

    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (27 commits)
    lguest: use __PAGE_KERNEL instead of _PAGE_KERNEL
    lguest: Use explicit includes rateher than indirect
    lguest: get rid of lg variable assignments
    lguest: change gpte_addr header
    lguest: move changed bitmap to lg_cpu
    lguest: move last_pages to lg_cpu
    lguest: change last_guest to last_cpu
    lguest: change spte_addr header
    lguest: per-vcpu lguest pgdir management
    lguest: make pending notifications per-vcpu
    lguest: makes special fields be per-vcpu
    lguest: per-vcpu lguest task management
    lguest: replace lguest_arch with lg_cpu_arch.
    lguest: make registers per-vcpu
    lguest: make emulate_insn receive a vcpu struct.
    lguest: map_switcher_in_guest() per-vcpu
    lguest: per-vcpu interrupt processing.
    lguest: per-vcpu lguest timers
    lguest: make hypercalls use the vcpu struct
    lguest: make write() operation smp aware
    ...

    Manual conflict resolved (maybe even correctly, who knows) in
    drivers/lguest/x86/core.c

    Linus Torvalds
     

30 Jan, 2008

26 commits


26 Jan, 2008

1 commit

  • Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use
    get_online_cpus and put_online_cpus instead as it highlights the
    refcount semantics in these operations.

    The new API guarantees protection against the cpu-hotplug operation, but
    it doesn't guarantee serialized access to any of the local data
    structures. Hence the changes needs to be reviewed.

    In case of pseries_add_processor/pseries_remove_processor, use
    cpu_maps_update_begin()/cpu_maps_update_done() as we're modifying the
    cpu_present_map there.

    Signed-off-by: Gautham R Shenoy
    Signed-off-by: Ingo Molnar

    Gautham R Shenoy
     

20 Jan, 2008

1 commit


19 Jan, 2008

1 commit

  • There's currently no way to turn on Lguest guest support; the planned
    Kconfig virtualization reorg didn't get into 2.6.25.

    This was unnoticed because if you already had CONFIG_LGUEST_GUEST=y in
    your config, it worked. Too bad about new users...

    Also, the Kconfig help was wrong now the virtio drivers are merged.

    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

19 Nov, 2007

1 commit

  • The virtio code never hooked through the ->remove callback. Although
    noone supports device removal at the moment, this code is already
    needed for module unloading.

    This of course also revealed bugs in virtio_blk, virtio_net and lguest
    unloading paths.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

15 Nov, 2007

1 commit


12 Nov, 2007

1 commit

  • The virtio descriptor rings of size N-1 were nicely set up to be
    aligned to an N-byte boundary. But as Anthony Liguori points out, the
    free-running indices used by virtio require that the sizes be a power
    of 2, otherwise we get problems on wrap (demonstrated with lguest).

    So we replace the clever "2^n-1" scheme with a simple "align to page
    boundary" scheme: this means that all virtio rings take at least two
    pages, but it's safer than guessing cache alignment.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

25 Oct, 2007

3 commits