From patchwork Fri Mar 4 20:45:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 63606 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp281338lbc; Fri, 4 Mar 2016 12:49:03 -0800 (PST) X-Received: by 10.98.14.68 with SMTP id w65mr15142574pfi.144.1457124543248; Fri, 04 Mar 2016 12:49:03 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si7940323pfb.71.2016.03.04.12.49.02; Fri, 04 Mar 2016 12:49:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760127AbcCDUsj (ORCPT + 30 others); Fri, 4 Mar 2016 15:48:39 -0500 Received: from mail-bn1bn0100.outbound.protection.outlook.com ([157.56.110.100]:44736 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760078AbcCDUsf (ORCPT ); Fri, 4 Mar 2016 15:48:35 -0500 Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=amd.com; Received: from localhost.localdomain (124.121.8.20) by SN1PR12MB0445.namprd12.prod.outlook.com (10.162.105.139) with Microsoft SMTP Server (TLS) id 15.1.415.20; Fri, 4 Mar 2016 20:48:28 +0000 From: Suravee Suthikulpanit To: , , , , , CC: , , , , Suravee Suthikulpanit Subject: [PART1 RFC v2 01/10] KVM: x86: Misc LAPIC changes to exposes helper functions Date: Fri, 4 Mar 2016 14:45:59 -0600 Message-ID: <1457124368-2025-2-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [124.121.8.20] X-ClientProxiedBy: SINPR01CA0045.apcprd01.prod.exchangelabs.com (10.141.109.45) To SN1PR12MB0445.namprd12.prod.outlook.com (25.162.105.139) X-MS-Office365-Filtering-Correlation-Id: bb5e2170-6b42-4f62-5298-08d3446e58d0 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0445; 2:YYV6LULyhBf/PZd2ubT1DcmkKr9vTvtfQDlvbom66JdgL1+5gEkyb20PnWaG1xhCqY8HlrLu1IddULoc8dLuTKTY4eqYc1n1OVSBkZ9z70/5EX/rFGHixMFJU7c893q4sFZBQj6F0y4pKsKx9KI0Rmr8LAanFHCwppm9kjtxhuFsJd2mke4Dy8rjCtwjOfHq; 3:2UAipTvpLjDueXkP1DmTF0LAOf/O1cMVM6oqHqUgd3xcMrR9jxL/nx1kh99qqu3elM4JiAd57Ji3yiHwxk+xEit1/ShovxPowjtTUgcVz4Vw9wFunn4uzXoQSH/SMNFJ; 25:E/z63vuSv/erozNfprFGp9cyAThIzH2w2iWShBTBvbHD0dY3NiL8CiXkDETe6AZgHTkrEggF4n0cxijC0fflDoz7xAcdOSzag8ZhIDOebNXpALEXQYFqtVyqXWFgJCT/KarRyyj4lo/IVgjsjvNJYHtTY79ubwYUhH00SJHqr0odV7ddm9vMLTKs0ljsuVWXfSs+Mc/UWhWjurVJaE0HkRQCK85hFlcFwBGtwy1T7Dxihagd6sBUZs/DAqBHUQ6gD+49DJNty0MgQUR/R1Rkt5LHiTAOQ6J6E/DDok/eFqqSLhn/Y6qbBSdQ8zh4yMzLAKBtHo0b5RNn6WZX7x3tig== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0445; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0445; 20:nzl+893im5dOdJFASDRee0+ld7o94sSqNG89LN1kwCIt6E9J/wgESbr3XvcyV3dG+Jj0FBw8hpoNr+OT/YyeixtXQpkZgkQpBuAv8VcUagF03fHKLZaAckS25mfLaLeyxOtO7AzQ0jyh0aBEGQ/OYTs2fpmMkYKuVMro2ThC+f5PXYffkCQqmh8Shnj1rXMZI3p1EuC728Ii6ko5oGfIIOhPHuYKofYOMcBa61/nuHSkgKk2a2WwE5a/f1kcz6hhPQnZsbBsoyUSPym0IGS97S9uu9e5gAyDrucTEHo46YnWb0/2UgTnr3xPRBbyi7FmZMWv54bq/XkfCP7jMALK9LUEUiOQ//WwtSzNOHS8La7AAZgF5KRw7rD7iEK/Vx13NvBEpeIFxpPwq+TwLGS6PYh8dIT2EkgXq5Gk0zuy3D0nhq1RrykwRq9J1OYGhwwn6M60rHMYFipIud2jWnkbvqI4XKuu1KbiquSH/HaE6cC5M6hLsVB8G8H+xfv70ZlX; 4:vt5Q+O0HpRWmVAfSY19hhCq/1B1RTTy6O4gXiEhFE6ndb7bJumpVkNjf7TW0kDS4t0dlgG1Vk9taxrPF8tmlRk66Xq+bWTRwV11byctyGFoh9pgXiFY5jYMbbiUrKpefxeuZQLwPdwf0vXcMgfsz8cnlYSvE+PWR70DuqXDifP15ruUulnRx4Cll3Cux4z0R2sWRIdNfozd/tYJlXz3veRMoNTJ7juj/VxGjFeQrdLsqWlp4qNC4zXZ4Aj64ZHhtprOG/DKTrWS6/yhGcu3lW7pnsbVqNpOry+jOuWNax4Crjl9uEUHlMypT0xnhyLR/7n6bJ3+oaIiNQTw7oWYpbCdjMB0fBVDUuocB5w3nS3mCKHzwX17xcPSgMhzKZAU4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:SN1PR12MB0445; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0445; X-Forefront-PRVS: 0871917CDA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(77096005)(5001770100001)(87976001)(48376002)(47776003)(229853001)(36756003)(2201001)(66066001)(81166005)(50466002)(2950100001)(5004730100002)(189998001)(40100003)(50226001)(5003940100001)(122386002)(5008740100001)(19580405001)(2906002)(19580395003)(86362001)(4326007)(42186005)(50986999)(6116002)(3846002)(1096002)(92566002)(586003)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0445; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0445; 23:qRnOexKHJXuZ6ugKS1yfuU41nSCsqERg8rEiAKZcs?= =?us-ascii?Q?RRZUOYSbCmhvXsVxP0mydXYCl4A5RW+RL6obkbS4Vhqj1ces8dArLDIuC7mK?= =?us-ascii?Q?3NEi1ZuXWA3wriwDjeMdG6Yh4t+/F81jSoD50jLPBcaDouLSyJfaX/4B/D9M?= =?us-ascii?Q?27dDFMLoBKrczPVuTS9KoH0eX75KbfmxlaTF0kiX5fk8amsokU/CZKR47uAX?= =?us-ascii?Q?tlG1U2Wwm7Sl0gi8qr83igBciuiz5vaLCOfHxsdXH/zwQWc0000X/z2nPT6K?= =?us-ascii?Q?mxJVX3F802D0zfG2U2G4qua9yuDMU0ZY/K2MAen7Zm3ceP6mXmRUE2O1kDYF?= =?us-ascii?Q?AHn5k3THM2wlMWj6LK9iy8RaV5HgYjiyNOZ0a0pknfKujyboDdzQm5Wa6+1D?= =?us-ascii?Q?RckktmoRXXkmaYEcUwTuLWXoJ0Air3cAPZQ6xV2gnvl+bP3gVVWuTIFhIWdq?= =?us-ascii?Q?UVpCX3BBtPaP6+FAAoumz7OzPTEZcYYlWoPPGPFMwat6KySKXoRaCQW8sNTa?= =?us-ascii?Q?WIXfqkklaEojs2KZY4DmQ5vHQnpUHAZOHqX40zXItZHuLK2m6yntSjJMgv4z?= =?us-ascii?Q?xmriE4OtamQpXMPCCh6aDszOmcbw1pJXxAcWfGr/6WtDqr6W6cq4i0CzZlSk?= =?us-ascii?Q?k6BkM3MmmIL+CmqfOiBu44ipxUxaJlu8vBtBacskPZqGFuyb/hsUuSJFsXR3?= =?us-ascii?Q?lge/FzCyKUDCblIaeAW4qlFbfc0LjV2Ao404e7dyrbcDJDZXjSQ1abpPq5Uf?= =?us-ascii?Q?DJ1aT6b+kshxV58Eoo7gHRty02eJswcT1fNyyOxDVR/yZZkFwWLx5CYZKHzi?= =?us-ascii?Q?yYafsA/Pg02DRrK4te2MSJrvm3PJH18BSFGOjhfy7yHprRuQBJX+08LpI5vz?= =?us-ascii?Q?Ti7kM8tfbcwivtdp566c+No6yAy1y5SDQA/fDLSF4CbJjSH01M7IDm4QaTM1?= =?us-ascii?Q?GpcDDXvxbEvpKNj2XwNYLTStQ8pRZsIw+XkXrcwKw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0445; 5:xWb/043geIyfkoxKgfu8h/hqcTMn1n9w0r0t/PS0JUTObmz9oGYUfZwBqL3JZ/6bsdJS/fUFzAmym4hM0wSLOOvqW7ILC/RHnpTJLu9lX5N2OEluU5Jp5QFViHXI75b6xKyFTiBOxuV3urrcnQnixQ==; 24:mUTk5Bmhft1eJXRwoVsY+qKoePGW/q4jkDdaw6m26eEQodil5lz8R7NEx9na0Meh3LoTd9Uys7QQc0CgJ6s8EOrj/QteCnp16oEiCZXRee8=; 20:cQb5y9Y2tOFF8u2vT+UNESn7OHZIRYgbBSasNjrQs7q2JHL+qRBzercIiWn2y/m+DUS3loMRp2clWOpxFy8xPDfc3aVhzMEYI5nB8rFbANwTs+3uOI2XrZojIxF1A8FVlN0VEdLorwqBvKDT/GQiaMf2hUSoVLgl/cnzio4vIDdjcK/anK/QD2HOGBOgkyERUlTnMGdLiW7YhCG4cxO3JzG7IPTNWIt972ZeZ6c6Jb7BqT4NplxvyKCW34piOnQe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2016 20:48:28.4478 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0445 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suravee Suthikulpanit Exporting LAPIC utility functions and macros to reuse. Signed-off-by: Suravee Suthikulpanit --- arch/x86/kvm/lapic.c | 51 +++++++++++++++++++++++++++------------------------ arch/x86/kvm/lapic.h | 7 +++++++ 2 files changed, 34 insertions(+), 24 deletions(-) -- 1.9.1 diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 3a045f3..a8d91b89 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -59,9 +59,8 @@ /* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */ #define apic_debug(fmt, arg...) -#define APIC_LVT_NUM 6 /* 14 is the version for Xeon and Pentium 8.4.8*/ -#define APIC_VERSION (0x14UL | ((APIC_LVT_NUM - 1) << 16)) +#define APIC_VERSION (0x14UL | ((KVM_APIC_LVT_NUM - 1) << 16)) #define LAPIC_MMIO_LENGTH (1 << 12) /* followed define is not in apicdef.h */ #define APIC_SHORT_MASK 0xc0000 @@ -94,10 +93,11 @@ bool kvm_apic_pending_eoi(struct kvm_vcpu *vcpu, int vector) apic_test_vector(vector, apic->regs + APIC_IRR); } -static inline void apic_set_vector(int vec, void *bitmap) +void kvm_lapic_set_vector(int vec, void *bitmap) { set_bit(VEC_POS(vec), (bitmap) + REG_POS(vec)); } +EXPORT_SYMBOL_GPL(kvm_lapic_set_vector); static inline void apic_clear_vector(int vec, void *bitmap) { @@ -290,7 +290,7 @@ void kvm_apic_set_version(struct kvm_vcpu *vcpu) apic_set_reg(apic, APIC_LVR, v); } -static const unsigned int apic_lvt_mask[APIC_LVT_NUM] = { +static const unsigned int apic_lvt_mask[KVM_APIC_LVT_NUM] = { LVT_MASK , /* part LVTT mask, timer mode mask added at runtime */ LVT_MASK | APIC_MODE_MASK, /* LVTTHMR */ LVT_MASK | APIC_MODE_MASK, /* LVTPC */ @@ -351,7 +351,7 @@ EXPORT_SYMBOL_GPL(kvm_apic_update_irr); static inline void apic_set_irr(int vec, struct kvm_lapic *apic) { - apic_set_vector(vec, apic->regs + APIC_IRR); + kvm_lapic_set_vector(vec, apic->regs + APIC_IRR); /* * irr_pending must be true if any interrupt is pending; set it after * APIC_IRR to avoid race with apic_clear_irr @@ -674,6 +674,7 @@ bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, return false; } } +EXPORT_SYMBOL_GPL(kvm_apic_match_dest); bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src, struct kvm_lapic_irq *irq, int *r, unsigned long *dest_map) @@ -844,7 +845,7 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode, if (apic_test_vector(vector, apic->regs + APIC_TMR) != !!trig_mode) { if (trig_mode) - apic_set_vector(vector, apic->regs + APIC_TMR); + kvm_lapic_set_vector(vector, apic->regs + APIC_TMR); else apic_clear_vector(vector, apic->regs + APIC_TMR); } @@ -1109,7 +1110,7 @@ static inline struct kvm_lapic *to_lapic(struct kvm_io_device *dev) return container_of(dev, struct kvm_lapic, dev); } -static int apic_reg_read(struct kvm_lapic *apic, u32 offset, int len, +int kvm_lapic_reg_read(struct kvm_lapic *apic, u32 offset, int len, void *data) { unsigned char alignment = offset & 0xf; @@ -1146,6 +1147,7 @@ static int apic_reg_read(struct kvm_lapic *apic, u32 offset, int len, } return 0; } +EXPORT_SYMBOL_GPL(kvm_lapic_reg_read); static int apic_mmio_in_range(struct kvm_lapic *apic, gpa_t addr) { @@ -1163,7 +1165,7 @@ static int apic_mmio_read(struct kvm_vcpu *vcpu, struct kvm_io_device *this, if (!apic_mmio_in_range(apic, address)) return -EOPNOTSUPP; - apic_reg_read(apic, offset, len, data); + kvm_lapic_reg_read(apic, offset, len, data); return 0; } @@ -1348,7 +1350,7 @@ static void apic_manage_nmi_watchdog(struct kvm_lapic *apic, u32 lvt0_val) } } -static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) +int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) { int ret = 0; @@ -1395,7 +1397,7 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) int i; u32 lvt_val; - for (i = 0; i < APIC_LVT_NUM; i++) { + for (i = 0; i < KVM_APIC_LVT_NUM; i++) { lvt_val = kvm_apic_get_reg(apic, APIC_LVTT + 0x10 * i); apic_set_reg(apic, APIC_LVTT + 0x10 * i, @@ -1467,7 +1469,7 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) case APIC_SELF_IPI: if (apic_x2apic_mode(apic)) { - apic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff)); + kvm_lapic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff)); } else ret = 1; break; @@ -1479,6 +1481,7 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) apic_debug("Local APIC Write to read-only register %x\n", reg); return ret; } +EXPORT_SYMBOL_GPL(kvm_lapic_reg_write); static int apic_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this, gpa_t address, int len, const void *data) @@ -1508,7 +1511,7 @@ static int apic_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this, apic_debug("%s: offset 0x%x with length 0x%x, and value is " "0x%x\n", __func__, offset, len, val); - apic_reg_write(apic, offset & 0xff0, val); + kvm_lapic_reg_write(apic, offset & 0xff0, val); return 0; } @@ -1516,7 +1519,7 @@ static int apic_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this, void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu) { if (kvm_vcpu_has_lapic(vcpu)) - apic_reg_write(vcpu->arch.apic, APIC_EOI, 0); + kvm_lapic_reg_write(vcpu->arch.apic, APIC_EOI, 0); } EXPORT_SYMBOL_GPL(kvm_lapic_set_eoi); @@ -1528,10 +1531,10 @@ void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset) /* hw has done the conditional check and inst decode */ offset &= 0xff0; - apic_reg_read(vcpu->arch.apic, offset, 4, &val); + kvm_lapic_reg_read(vcpu->arch.apic, offset, 4, &val); /* TODO: optimize to just emulate side effect w/o one more write */ - apic_reg_write(vcpu->arch.apic, offset, val); + kvm_lapic_reg_write(vcpu->arch.apic, offset, val); } EXPORT_SYMBOL_GPL(kvm_apic_write_nodecode); @@ -1670,7 +1673,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event) kvm_apic_set_id(apic, vcpu->vcpu_id); kvm_apic_set_version(apic->vcpu); - for (i = 0; i < APIC_LVT_NUM; i++) + for (i = 0; i < KVM_APIC_LVT_NUM; i++) apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED); apic_update_lvtt(apic); if (kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_LINT0_REENABLED)) @@ -2073,8 +2076,8 @@ int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data) /* if this is ICR write vector before command */ if (reg == APIC_ICR) - apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32)); - return apic_reg_write(apic, reg, (u32)data); + kvm_lapic_reg_write(apic, APIC_ICR2, (u32)(data >> 32)); + return kvm_lapic_reg_write(apic, reg, (u32)data); } int kvm_x2apic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data) @@ -2091,10 +2094,10 @@ int kvm_x2apic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data) return 1; } - if (apic_reg_read(apic, reg, 4, &low)) + if (kvm_lapic_reg_read(apic, reg, 4, &low)) return 1; if (reg == APIC_ICR) - apic_reg_read(apic, APIC_ICR2, 4, &high); + kvm_lapic_reg_read(apic, APIC_ICR2, 4, &high); *data = (((u64)high) << 32) | low; @@ -2110,8 +2113,8 @@ int kvm_hv_vapic_msr_write(struct kvm_vcpu *vcpu, u32 reg, u64 data) /* if this is ICR write vector before command */ if (reg == APIC_ICR) - apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32)); - return apic_reg_write(apic, reg, (u32)data); + kvm_lapic_reg_write(apic, APIC_ICR2, (u32)(data >> 32)); + return kvm_lapic_reg_write(apic, reg, (u32)data); } int kvm_hv_vapic_msr_read(struct kvm_vcpu *vcpu, u32 reg, u64 *data) @@ -2122,10 +2125,10 @@ int kvm_hv_vapic_msr_read(struct kvm_vcpu *vcpu, u32 reg, u64 *data) if (!kvm_vcpu_has_lapic(vcpu)) return 1; - if (apic_reg_read(apic, reg, 4, &low)) + if (kvm_lapic_reg_read(apic, reg, 4, &low)) return 1; if (reg == APIC_ICR) - apic_reg_read(apic, APIC_ICR2, 4, &high); + kvm_lapic_reg_read(apic, APIC_ICR2, 4, &high); *data = (((u64)high) << 32) | low; diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 41bdb35..936fd10 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -7,6 +7,7 @@ #define KVM_APIC_INIT 0 #define KVM_APIC_SIPI 1 +#define KVM_APIC_LVT_NUM 6 struct kvm_timer { struct hrtimer timer; @@ -56,6 +57,12 @@ void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu); void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value); u64 kvm_lapic_get_base(struct kvm_vcpu *vcpu); void kvm_apic_set_version(struct kvm_vcpu *vcpu); +void kvm_lapic_set_vector(int vec, void *bitmap); +int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val); +int kvm_lapic_reg_read(struct kvm_lapic *apic, u32 offset, int len, + void *data); +bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, + int short_hand, unsigned int dest, int dest_mode); void __kvm_apic_update_irr(u32 *pir, void *regs); void kvm_apic_update_irr(struct kvm_vcpu *vcpu, u32 *pir);