diff options
author | Feng Wu <feng.wu@intel.com> | 2015-09-18 10:29:45 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-01 09:06:48 -0400 |
commit | 6ef1522f7ecc063317dfb5ca63da6e47130a4c50 (patch) | |
tree | 13e4946ea863746d59b11884a9ecec4b8e4a7cec | |
parent | f70c20aaf141adb715a2d750c55154073b02a9c3 (diff) |
KVM: Extend struct pi_desc for VT-d Posted-Interrupts
Extend struct pi_desc for VT-d Posted-Interrupts.
Signed-off-by: Feng Wu <feng.wu@intel.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/vmx.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6f3f97f6e248..4ebdccd882c8 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -446,8 +446,24 @@ struct nested_vmx { | |||
446 | /* Posted-Interrupt Descriptor */ | 446 | /* Posted-Interrupt Descriptor */ |
447 | struct pi_desc { | 447 | struct pi_desc { |
448 | u32 pir[8]; /* Posted interrupt requested */ | 448 | u32 pir[8]; /* Posted interrupt requested */ |
449 | u32 control; /* bit 0 of control is outstanding notification bit */ | 449 | union { |
450 | u32 rsvd[7]; | 450 | struct { |
451 | /* bit 256 - Outstanding Notification */ | ||
452 | u16 on : 1, | ||
453 | /* bit 257 - Suppress Notification */ | ||
454 | sn : 1, | ||
455 | /* bit 271:258 - Reserved */ | ||
456 | rsvd_1 : 14; | ||
457 | /* bit 279:272 - Notification Vector */ | ||
458 | u8 nv; | ||
459 | /* bit 287:280 - Reserved */ | ||
460 | u8 rsvd_2; | ||
461 | /* bit 319:288 - Notification Destination */ | ||
462 | u32 ndst; | ||
463 | }; | ||
464 | u64 control; | ||
465 | }; | ||
466 | u32 rsvd[6]; | ||
451 | } __aligned(64); | 467 | } __aligned(64); |
452 | 468 | ||
453 | static bool pi_test_and_set_on(struct pi_desc *pi_desc) | 469 | static bool pi_test_and_set_on(struct pi_desc *pi_desc) |