lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 Dec 2011 20:22:01 +0900
From:	Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>
To:	Liu Ping Fan <kernelfans@...il.com>
CC:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org, avi@...hat.com,
	aliguori@...ibm.com, gleb@...hat.com, mtosatti@...hat.com,
	xiaoguangrong.eric@...il.com, jan.kiszka@....de,
	Takuya Yoshikawa <takuya.yoshikawa@...il.com>
Subject: Re: [PATCH v6] kvm: make vcpu life cycle separated from kvm instance

(2011/12/27 17:38), Liu Ping Fan wrote:
> From: Liu Ping Fan<pingfank@...ux.vnet.ibm.com>
> 
> Currently, vcpu can be destructed only when kvm instance destroyed.
> Change this to vcpu's destruction before kvm instance, so vcpu MUST
> and CAN be destroyed before kvm's destroy.

I really don't understand why this big change can be justified by only
3 lines.

> 
> Signed-off-by: Liu Ping Fan<pingfank@...ux.vnet.ibm.com>
> ---
>   arch/x86/kvm/i8254.c     |   10 +++--
>   arch/x86/kvm/i8259.c     |   17 +++++--
>   arch/x86/kvm/x86.c       |   53 +++++++++++-----------
>   include/linux/kvm_host.h |   20 +++-----
>   virt/kvm/irq_comm.c      |    6 ++-
>   virt/kvm/kvm_main.c      |  110 +++++++++++++++++++++++++++++++++++-----------
>   6 files changed, 140 insertions(+), 76 deletions(-)
> 

You are introducing kvm_arch_vcpu_zap().

Then, apart from the "zap" naming issue I mentioned last time,
what about other architectures than x86?


> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 900c763..b88d418d 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -117,6 +117,7 @@ enum {
> 
>   struct kvm_vcpu {
>   	struct kvm *kvm;
> +	struct list_head list;
>   #ifdef CONFIG_PREEMPT_NOTIFIERS
>   	struct preempt_notifier preempt_notifier;
>   #endif
> @@ -251,12 +252,14 @@ struct kvm {
>   	struct mm_struct *mm; /* userspace tied to this vm */
>   	struct kvm_memslots *memslots;
>   	struct srcu_struct srcu;
> +	struct srcu_struct srcu_vcpus;
> +

Another srcu.  This alone is worth explaining in the changelog IMO.

	Takuya

>   #ifdef CONFIG_KVM_APIC_ARCHITECTURE
>   	u32 bsp_vcpu_id;
>   #endif
> -	struct kvm_vcpu *vcpus[KVM_MAX_VCPUS];
> +	struct list_head vcpus;
>   	atomic_t online_vcpus;
> -	int last_boosted_vcpu;
> +	int last_boosted_vcpu_id;
>   	struct list_head vm_list;
>   	struct mutex lock;
>   	struct kvm_io_bus *buses[KVM_NR_BUSES];
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists