From patchwork Thu Jun 4 14:40:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 480755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5AA961401F6 for ; Fri, 5 Jun 2015 00:42:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=vSg0FkvD; dkim-atps=neutral Received: from localhost ([::1]:42728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0WLY-0001Lw-9n for incoming@patchwork.ozlabs.org; Thu, 04 Jun 2015 10:42:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0WLI-00015T-4J for qemu-devel@nongnu.org; Thu, 04 Jun 2015 10:42:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0WLD-0008S9-VS for qemu-devel@nongnu.org; Thu, 04 Jun 2015 10:42:00 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:36658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0WLD-0008S3-Ou for qemu-devel@nongnu.org; Thu, 04 Jun 2015 10:41:55 -0400 Received: by wibdq8 with SMTP id dq8so127261394wib.1 for ; Thu, 04 Jun 2015 07:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id; bh=xk2Et9/EFtSHLqdCjIU0RB/d4MLKVwt3GcRxN7KL77U=; b=vSg0FkvD92ilYH7fPltHIONWTOzGIbJuWqjD+h09rrSRzycgXZaQ+1jttsutbFGpIv UI6PuWeus7pmUO+vJ6b+wjAKKMvvNM79BM8IFwDoQdwOPOp0QvxebU1Xp8TS4wV4+5N9 ++OVxO6zal/iBoFoA2KrcmnBLJdTTO2FUpTb0eK5l+0gOw05KkUnJHzCKlEBzLwnJKPp G2h1DRqi/ENVDG0N0j9cr9jb6KRY6iqLp/tdpA4SuUzE4BVAgC3IuKCBFX24dMvQQNXy FxGmMBMJ+3X6PnbLTPfg6lpnNkNttkjFl3GFvXNIcRpEJAAQH9kJ5RtXNZVG4od11ZZc 6e6Q== X-Received: by 10.180.39.147 with SMTP id p19mr52764896wik.15.1433428915120; Thu, 04 Jun 2015 07:41:55 -0700 (PDT) Received: from 640k.localdomain (dynamic-adsl-94-39-129-53.clienti.tiscali.it. [94.39.129.53]) by mx.google.com with ESMTPSA id i6sm6067629wjf.29.2015.06.04.07.41.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jun 2015 07:41:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 4 Jun 2015 16:40:42 +0200 Message-Id: <1433428842-22445-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::232 Subject: [Qemu-devel] [PATCH] update Linux headers from kvm/next X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org (Actually this is still kvm/queue, but I will push it to kvm/next tomorrow as soon as automated testing is done). Signed-off-by: Paolo Bonzini --- include/standard-headers/linux/virtio_ring.h | 2 +- linux-headers/asm-x86/kvm.h | 14 +++++++++++++- linux-headers/linux/kvm.h | 7 ++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/include/standard-headers/linux/virtio_ring.h b/include/standard-headers/linux/virtio_ring.h index cc647d6..6fe276f 100644 --- a/include/standard-headers/linux/virtio_ring.h +++ b/include/standard-headers/linux/virtio_ring.h @@ -155,7 +155,7 @@ static inline unsigned vring_size(unsigned int num, unsigned long align) } /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ -/* Assuming a given event_idx value from the other size, if +/* Assuming a given event_idx value from the other side, if * we have just incremented index from old to new_idx, * should we trigger an event? */ static inline int vring_need_event(uint16_t event_idx, uint16_t new_idx, uint16_t old) diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index d7dcef5..a4ae82e 100644 --- a/linux-headers/asm-x86/kvm.h +++ b/linux-headers/asm-x86/kvm.h @@ -106,6 +106,8 @@ struct kvm_ioapic_state { #define KVM_IRQCHIP_IOAPIC 2 #define KVM_NR_IRQCHIPS 3 +#define KVM_RUN_X86_SMM (1 << 0) + /* for KVM_GET_REGS and KVM_SET_REGS */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ @@ -281,6 +283,7 @@ struct kvm_reinject_control { #define KVM_VCPUEVENT_VALID_NMI_PENDING 0x00000001 #define KVM_VCPUEVENT_VALID_SIPI_VECTOR 0x00000002 #define KVM_VCPUEVENT_VALID_SHADOW 0x00000004 +#define KVM_VCPUEVENT_VALID_SMM 0x00000008 /* Interrupt shadow states */ #define KVM_X86_SHADOW_INT_MOV_SS 0x01 @@ -309,7 +312,13 @@ struct kvm_vcpu_events { } nmi; __u32 sipi_vector; __u32 flags; - __u32 reserved[10]; + struct { + __u8 smm; + __u8 pending; + __u8 smm_inside_nmi; + __u8 latched_init; + } smi; + __u32 reserved[9]; }; /* for KVM_GET/SET_DEBUGREGS */ @@ -345,4 +354,7 @@ struct kvm_xcrs { struct kvm_sync_regs { }; +#define KVM_QUIRK_LINT0_REENABLED (1 << 0) +#define KVM_QUIRK_CD_NW_CLEARED (1 << 1) + #endif /* _ASM_X86_KVM_H */ diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index b96d978..fad9e5c 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -202,7 +202,7 @@ struct kvm_run { __u32 exit_reason; __u8 ready_for_interrupt_injection; __u8 if_flag; - __u8 padding2[2]; + __u16 flags; /* in (pre_kvm_run), out (post_kvm_run) */ __u64 cr8; @@ -814,6 +814,9 @@ struct kvm_ppc_smmu_info { #define KVM_CAP_S390_INJECT_IRQ 113 #define KVM_CAP_S390_IRQ_STATE 114 #define KVM_CAP_PPC_HWRNG 115 +#define KVM_CAP_DISABLE_QUIRKS 116 +#define KVM_CAP_X86_SMM 117 +#define KVM_CAP_MULTI_ADDRESS_SPACE 118 #ifdef KVM_CAP_IRQ_ROUTING @@ -1199,6 +1202,8 @@ struct kvm_s390_ucas_mapping { /* Available with KVM_CAP_S390_IRQ_STATE */ #define KVM_S390_SET_IRQ_STATE _IOW(KVMIO, 0xb5, struct kvm_s390_irq_state) #define KVM_S390_GET_IRQ_STATE _IOW(KVMIO, 0xb6, struct kvm_s390_irq_state) +/* Available with KVM_CAP_X86_SMM */ +#define KVM_SMI _IO(KVMIO, 0xb7) #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)