Re: [PATCH v3 03/12] KVM: s390: add the GIB and its related life-cyle functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Nov 2018 13:27:51 +0100
Michael Mueller <mimu@xxxxxxxxxxxxx> wrote:

> On 28.11.18 11:44, Cornelia Huck wrote:
> > On Wed, 28 Nov 2018 11:19:34 +0100
> > Michael Mueller <mimu@xxxxxxxxxxxxx> wrote:
> >  
> >> The GIB (Guest Information Block) links the GISA of all guests
> >> that have adapter interrupts pending. These interrupts cannot be
> >> delivered because no vcpu of these guests is currently running in
> >> SIE context. Instead, a GIB alert is issued on the host to schedule
> >> these guests to run.
> >>
> >> This mechanism allows to process adapter interrupts for currently
> >> not running guests.
> >>
> >> The GIB is created during host initialization and associated with
> >> the Adapter Interruption Facility in case an Adapter Interruption
> >> Virtualization Facility is available.
> >>
> >> Signed-off-by: Michael Mueller <mimu@xxxxxxxxxxxxx>
> >> Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> >> Reviewed-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> >> ---
> >>   arch/s390/include/asm/kvm_host.h | 10 ++++++++++
> >>   arch/s390/kvm/interrupt.c        | 37 +++++++++++++++++++++++++++++++++++++
> >>   arch/s390/kvm/kvm-s390.c         |  1 +
> >>   arch/s390/kvm/kvm-s390.h         |  2 ++
> >>   4 files changed, 50 insertions(+)
> >>
> >> +int kvm_s390_gib_init(u8 nisc)
> >> +{
> >> +	if (!css_general_characteristics.aiv) {
> >> +		KVM_EVENT(3, "%s", "gib not initialized, no AIV facility");
> >> +		return 0;
> >> +	}
> >> +
> >> +	gib = (struct kvm_s390_gib *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
> >> +	if (!gib) {
> >> +		KVM_EVENT(3, "gib 0x%pK memory allocation failed", gib);  
> > Just noticed this... isn't the dbf torn down again if kvm init failed,
> > rendering this message inaccessible? Do we need different logging for
> > fatal errors?
> >
> > (The code is not wrong, but this logging looks a bit useless.)  
> 
> That's why I added the last sentence of the commit message. But it seems
> a little more tricky dependent of the module being build into the kernel
> or loaded.
> 
> When build-in, there is no indication that kvm_init() failed except the 
> missing
> /dev/kvm device. In the module load case, the s390dbf does not seem to be
> able to recycle the /sys/.../kvm-trace/ directory. So the feature shall be
> unregistered on kvm_init() failures.

Having kvm as a module might actually be the more common case for
people using a distro.

> 
> There should be either an additional generic message from kvm_init()
> displaying the rc of kvm_arch_init() or kernel messages of the failing
> routines in kvm_arch_init().

I think the memory allocation problem is sufficiently reflected by
-ENOMEM (if you can't even get a single page, you're in trouble
anyway); the failed gib association probably should be logged into the
syslog (although it is unclear if the user can do anything about it).



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux