Re: [PATCH v7 16/17] KVM: s390: pv: add KVM_CAP_S390_PROT_REBOOT_ASYNC

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

 



On 2/7/22 16:19, Claudio Imbrenda wrote:
On Mon, 7 Feb 2022 15:37:48 +0100
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

On 2/4/22 16:53, Claudio Imbrenda wrote:
Add KVM_CAP_S390_PROT_REBOOT_ASYNC to signal that the
KVM_PV_ASYNC_DISABLE and KVM_PV_ASYNC_DISABLE_PREPARE commands for the
KVM_S390_PV_COMMAND ioctl are available.

Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
---
   arch/s390/kvm/kvm-s390.c | 3 +++
   include/uapi/linux/kvm.h | 1 +
   2 files changed, 4 insertions(+)

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index f7952cef1309..1e696202a569 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -608,6 +608,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
   	case KVM_CAP_S390_BPB:
   		r = test_facility(82);
   		break;
+	case KVM_CAP_S390_PROT_REBOOT_ASYNC:
+		r = lazy_destroy && is_prot_virt_host();

While reboot might be the best use-case for the async disable I don't
think we should name the capability this way.

KVM_CAP_S390_PROTECTED_ASYNC_DESTR ?

then maybe

KVM_CAP_S390_PROTECTED_ASYNC_DISABLE ?

Sounds good to me



It's a bit long but the initial capability didn't abbreviate the
protected part so it is what it is.


+		break;
   	case KVM_CAP_S390_PROTECTED:
   		r = is_prot_virt_host();
   		break;
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 7f574c87a6ba..c41c108f6b14 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1134,6 +1134,7 @@ struct kvm_ppc_resize_hpt {
   #define KVM_CAP_VM_GPA_BITS 207
   #define KVM_CAP_XSAVE2 208
   #define KVM_CAP_SYS_ATTRIBUTES 209
+#define KVM_CAP_S390_PROT_REBOOT_ASYNC 215
#ifdef KVM_CAP_IRQ_ROUTING






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux