[PATCH v2] x86/kvmclock : convert to SPDX identifiers

2018-11-01 Thread Peng Hao
From: Peng Hao This patch updates license to use SPDX-License-Identifier instead of verbose license text Signed-off-by: Peng Hao --- arch/x86/kernel/kvmclock.c | 15 +-- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel

[PATCH] kvmclock : convert to SPDX identifiers

2018-10-31 Thread Peng Hao
From: Peng Hao This patch updates license to use SPDX-License-Identifier instead of verbose license text Signed-off-by: Peng Hao --- arch/x86/kernel/kvmclock.c | 15 +-- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel

[PATCH V3 2/5] misc/pvpanic : convert to SPDX license tags

2018-10-28 Thread Peng Hao
This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c index fd86dab

[PATCH V3 1/5] pvpanic: move pvpanic to misc as common driver

2018-10-28 Thread Peng Hao
move pvpanic.c from drivers/platform/x86 to drivers/misc. following patches will use pvpanic device in arm64. Signed-off-by: Peng Hao --- drivers/misc/Kconfig | 7 +++ drivers/misc/Makefile | 1 + drivers/misc/pvpanic.c | 124

[PATCH 5/5] dt-bindings/misc/pvpanic :add document for pvpanic-mmio

2018-10-28 Thread Peng Hao
Add dt-bindings document for "qemu:pvpanic-mmio". Signed-off-by: Peng Hao --- .../devicetree/bindings/misc/pvpanic-mmio.txt | 29 ++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/pvpanic-mmio.txt diff --git a/Doc

[PATCH V4 4/5] misc/pvpanic: add support to get pvpanic device info by FDT

2018-10-28 Thread Peng Hao
By default, when ACPI tables and FDT coexist for ARM64, current kernel takes precedence over FDT to get device information. Virt machine in qemu provides both FDT and ACPI table. This patch increases the way to get information through FDT. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 63

[PATCH V3 3/5] misc/pvpanic: add MMIO support

2018-10-28 Thread Peng Hao
On some architectures (e.g. arm64), it's preferable to use MMIO, since this can be used standalone. Add MMIO support to the pvpanic driver. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH] kvm/x86 : remove unused struct definition

2018-10-24 Thread Peng Hao
structure svm_init_data is never used. So remove it. Signed-off-by: Peng Hao --- arch/x86/kvm/svm.c | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 61ccfb1..5c7dc8b 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -675,11 +675,6

[PATCH V2 1/4] misc/pvpanic: move pvpanic to misc as common driver

2018-10-24 Thread Peng Hao
move pvpanic.c from drivers/platform/x86 to drivers/misc. following patches will use pvpanic device in arm64. Signed-off-by: Peng Hao --- drivers/misc/Kconfig | 7 +++ drivers/misc/Makefile | 1 + drivers/misc/pvpanic.c | 124

[PATCH V2 3/4] misc/pvpanic: add support to pvpanic device information by using FDT

2018-10-24 Thread Peng Hao
By default, when ACPI tables and FDT coexist for ARM64, current kernel takes precedence over FDT to get device information. This patch increases the way to get information through FDT. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 69 +- 1

[PATCH V2 4/4] misc/pvpanic : pvpanic: add document for pvpanic-mmio DT

2018-10-24 Thread Peng Hao
Signed-off-by: Peng Hao --- .../devicetree/bindings/arm/pvpanic-mmio.txt | 29 ++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/pvpanic-mmio.txt diff --git a/Documentation/devicetree/bindings/arm/pvpanic-mmio.txt b

[PATCH V2 2/4] misc/pvpanic: add MMIO support

2018-10-24 Thread Peng Hao
On some architectures (e.g. arm64), it's preferable to use MMIO, since this can be used standalone. Add MMIO support to the pvpanic driver. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 4/4] pvpanic: add document for pvpanic-mmio DT

2018-10-23 Thread Peng Hao
Signed-off-by: Peng Hao --- .../devicetree/bindings/arm/pvpanic-mmio.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/pvpanic-mmio.txt diff --git a/Documentation/devicetree/bindings/arm/pvpanic-mmio.txt b

[PATCH 3/4] pvpanic: add access to pvpanic device information by using FDT

2018-10-23 Thread Peng Hao
By default, when ACPI tables and FDT coexist for ARM64, kernel takes precedence over FDT to get device information. This patch increases the way to get information through FDT. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 69 +- 1 file

[PATCH 2/4] pvpanic: add pvpanic support for arm64

2018-10-23 Thread Peng Hao
pvpanic device is a qemu-specific emulation device. Pvpanic devices are now available for ARM64. This patch supports the APCI way to get device information. Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 22 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git

[PATCH 1/4] pvpanic: move pvpanic to misc as common driver

2018-10-23 Thread Peng Hao
move pvpanic.c from drivers/platform/x86 to drivers/misc. following patches will use pvpanic device in arm64. Signed-off-by: Peng Hao --- drivers/misc/Kconfig | 7 +++ drivers/misc/Makefile | 1 + drivers/misc/pvpanic.c | 124

[PATCH] sched/fair : modify comment of fbq_type description

2018-10-19 Thread Peng Hao
From: Peng Hao for type 'all', the comment 'there is no distinction' is vague. make it clearer. Signed-off-by: Peng Hao --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f808ddf..

[RESEND PATCH V6 1/5] target/i386 : add coalesced pio support

2018-10-18 Thread Peng Hao
add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. Signed-off-by: Peng Hao --- accel/kvm/kvm-all.c | 4 ++-- linux-headers/linux/kvm.h | 11 +-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 79

[PATCH V7 3/5] target-i386: add rtc 0x70 port as coalesced_pio

2018-10-18 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/timer/mc146818rtc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index acee47d..961ef74 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -34,6 +34,7 @@ #include "qapi/qapi-com

[PATCH] arm64/pvpanic-mmio : add pvpanic mmio device

2018-10-16 Thread Peng Hao
Add a platform device driver, pvpanic-mmio that is similar to x86's pvpanic device. Signed-off-by: Peng Hao --- drivers/platform/Kconfig| 3 + drivers/platform/Makefile | 1 + drivers/platform/arm/Kconfig| 6 ++ drivers/platform/arm/Makefile

[PATCH] arm64/pvpanic-mmio : add pvpanic mmio device

2018-10-16 Thread Peng Hao
From: 彭浩10096742 Add a platform device driver, pvpanic-mmio that is similar to x86's pvpanic device. Signed-off-by: Peng Hao --- drivers/platform/Kconfig| 3 + drivers/platform/Makefile | 1 + drivers/platform/arm/Kconfig| 6 ++ drivers/platfor

[PATCH v2] kvm:x86 :remove unnecessary recalculate_apic_map

2018-10-15 Thread Peng Hao
In the previous code, the variable sw_apic_disabled influences recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map" (commit:3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a), the access to sw_apic_disabled in recalculate_apic_map has been deleted. Signed-off-by: Peng Hao --- ar

[PATCH v2] sched/dl: Reduce push_dl_task() retries

2018-10-15 Thread Peng Hao
Improve push_dl_task() by propagating the double_lock_balance() usage from find_lock_later_rq(), thereby reducing the number of cases where we have to assume rq->lock was dropped. Signed-off-by: Peng Hao --- kernel/sched/deadline.c | 6 -- 1 file changed, 4 insertions(+), 2 deleti

[PATCH v4] sched/rt : Reduce push_rt_task() retries

2018-10-15 Thread Peng Hao
ity tasks are restricted to run on two cpus. Thanks for Steven Rostedt's advice. Signed-off-by: Peng Hao --- kernel/sched/rt.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 2e2955a..be0fc43 100644 --- a/kernel/sched/rt

[PATCH] mm/sparse: remove a check that compare if unsigned variable is negative

2018-10-13 Thread Peng Hao
From: Peng Hao In all use locations for for_each_present_section_nr, variable section_nr is unsigned. It is unnecessary to test if it is negative. Signed-off-by: Peng Hao --- mm/sparse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/sparse.c b/mm/sparse.c index

[PATCH V5 0/3] introduce coalesced pio support

2018-10-13 Thread Peng Hao
% 0.41us65.44us 0.66us (+- 10.55%) Peng Hao (3): kvm/x86 : add coalesced pio support kvm/x86 : add document for coalesced mmio kvm/x86 : add document for coalesced pio Documentation/virtual/kvm/api.txt | 28 +++ include/uapi/linux/kvm.h

[PATCH V5 3/3] kvm/x86 : add document for coalesced pio

2018-10-13 Thread Peng Hao
Signed-off-by: Peng Hao --- Documentation/virtual/kvm/api.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 9615b9e..d3a0497 100644 --- a/Documentation/virtual/kvm/api.txt +++ b

[PATCH V5 1/3] kvm/x86 : add coalesced pio support

2018-10-13 Thread Peng Hao
add coalesced pio support. Signed-off-by: Peng Hao --- include/uapi/linux/kvm.h | 11 +-- virt/kvm/coalesced_mmio.c | 12 +--- virt/kvm/kvm_main.c | 2 ++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h

[PATCH V5 2/3] kvm/x86 : add document for coalesced mmio

2018-10-13 Thread Peng Hao
Signed-off-by: Peng Hao --- Documentation/virtual/kvm/api.txt | 24 1 file changed, 24 insertions(+) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 647f941..9615b9e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b

[PATCH] selftests: fix warning: "_GNU_SOURCE" redefined

2018-10-11 Thread Peng Hao
Makefile contains -D_GNU_SOURCE. remove define "_GNU_SOURCE" in c files. Signed-off-by: Peng Hao --- tools/testing/selftests/proc/fd-001-lookup.c | 2 +- tools/testing/selftests/proc/fd-003-kthread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing

[tip:timers/core] tick/sched : Remove redundant cpu_online() check

2018-10-10 Thread tip-bot for Peng Hao
Commit-ID: d59e0ba19481c0046d2ea2bd0e5344eeaf45aace Gitweb: https://git.kernel.org/tip/d59e0ba19481c0046d2ea2bd0e5344eeaf45aace Author: Peng Hao AuthorDate: Tue, 9 Oct 2018 11:43:35 -0400 Committer: Thomas Gleixner CommitDate: Wed, 10 Oct 2018 11:47:20 +0200 tick/sched : Remove

[PATCH] tick/sched : remove redundancy cpu_online check

2018-10-09 Thread Peng Hao
From: Peng Hao in can_stop_idle_tick cpu_online() was called earlier and if cpu offline it will return. so it don't need to call cpu_online() again. Signed-off-by: Peng Hao --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time

[PATCH] sched/dl : return accurate release rq lock info

2018-10-05 Thread Peng Hao
find_lock_later_rq may or not releease rq lock when return later_rq=NULL, but it is fuzzy. If not releasing rq lock, it is unnecessary to re-call pick_next_pushable_dl_task. Signed-off-by: Peng Hao --- kernel/sched/deadline.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH v3] sched/rt : return accurate release rq lock info

2018-10-05 Thread Peng Hao
different rt priority tasks run on limited two cpus. Thanks for Steven Rostedt's advice. Signed-off-by: Peng Hao --- kernel/sched/rt.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 2e2955a..be0fc43 100644 --- a/kernel/sched

[PATCH] kvm/x86 : avoid shifting signed 32-bit value by 31 bits

2018-10-04 Thread Peng Hao
From: Peng Hao modify AVIC_LOGICAL_ID_ENTRY_VALID_MASK to unsigned Signed-off-by: Peng Hao --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index d96092b..bf1ded4 100644 --- a/arch/x86/kvm/svm.c +++ b/arch

[PATCH] drm/gvt : fix error message typo

2018-10-04 Thread Peng Hao
From: Peng Hao gvt_err message typo. Signed-off-by: Peng Hao --- drivers/gpu/drm/i915/gvt/gvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c index 46c8b72..31d6809 100644 --- a/drivers/gpu/drm/i915/gvt

[PATCH] kvm/x86 : fix some typo

2018-10-04 Thread Peng Hao
From: Peng Hao Signed-off-by: Peng Hao --- arch/x86/kvm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d7e9bce..281e20e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4546,7 +4546,7 @@ static void

[PATCH v2] sched/rt : return accurate release rq lock info

2018-10-02 Thread Peng Hao
-off-by: Peng Hao --- kernel/sched/rt.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 2e2955a..7c5382a 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1718,6 +1718,7 @@ static int find_lowest_rq(struct task_struct

[PATCH] sched/rt : return accurate release rq lock info

2018-10-01 Thread Peng Hao
find_lock_lowest_rq may or not releease rq lock, but it is fuzzy. If not releasing rq lock, it is unnecessary to re-call pick_next_oushable_task. Signed-off-by: Peng Hao --- kernel/sched/rt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index

[tip:timers/core] tick/broadcast: Remove redundant check

2018-09-28 Thread tip-bot for Peng Hao
Commit-ID: dc6253108f0fbff4a634055d5b8a91958ec2af81 Gitweb: https://git.kernel.org/tip/dc6253108f0fbff4a634055d5b8a91958ec2af81 Author: Peng Hao AuthorDate: Fri, 28 Sep 2018 12:03:28 -0400 Committer: Thomas Gleixner CommitDate: Fri, 28 Sep 2018 22:29:35 +0200 tick/broadcast: Remove

[PATCH] kvm/x86 : set meaningful return value

2018-09-28 Thread Peng Hao
From: Peng Hao kvm_irq_delivery_to_apic_fast()--> kvm_apic_map_get_dest_lapic()--> kvm_apic_disabled_lapic_found() kvm_apic_map_get_dest_lapic return with bitmap==0 and dst[i]==NULL, then (*r == -1) will be returned to qemu and "KVM: injection failed, MSI lost(Op

[PATCH] tick: remove unnecssary check

2018-09-28 Thread Peng Hao
From: Peng Hao tick_device_is_functional() has been called in the front of tick_broadcast_control, so don't need call it again. Signed-off-by: Peng Hao --- kernel/time/tick-broadcast.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/time/tick-broadcas

[PATCH RESEND] kvm/x86: propagate fetch fault into guest

2018-09-18 Thread Peng Hao
From: Peng Hao When handling ept misconfig exit, it will call emulate instruction with insn_len = 0. The decode instruction function may return a fetch fault and should propagate to guest. The problem will result to emulation fail. KVM internal error. Suberror: 1 emulation failure EAX

[PATCH V4 1/2] kvm/x86 : add coalesced pio support

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao --- include/uapi/linux/kvm.h | 11 +-- virt/kvm/coalesced_mmio.c | 12 +--- virt/kvm/kvm_main.c | 2 ++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index b6270a3..a44e08e

[PATCH V4 0/2] introduce coalesced pio support

2018-08-30 Thread Peng Hao
Time% Min Time Max Time Avg time 0x70:POUT 10632.02%29.47%0us 10us 1.57us (+- 7.38%) 0xcf8:POUT 10651.67% 0.28% 0.41us65.44us 0.66us (+- 10.55%) Peng Hao (2): kvm/x86 : add coalesced pio support kvm/x86 : add document for coalesce

[PATCH V4 2/2] kvm/x86 : add document for coalesced pio

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao --- Documentation/virtual/kvm/00-INDEX | 2 ++ Documentation/virtual/kvm/coalesced-pio.txt | 15 +++ 2 files changed, 17 insertions(+) create mode 100644 Documentation/virtual/kvm/coalesced-pio.txt diff --git a/Documentation/virtual/kvm/00-INDEX b

[PATCH V3 2/2] kvm/x86 : add document for coalesced pio

2018-08-23 Thread Peng Hao
Signed-off-by: Peng Hao --- Documentation/virtual/kvm/00-INDEX | 2 ++ Documentation/virtual/kvm/coalesced-pio.txt | 14 ++ 2 files changed, 16 insertions(+) create mode 100644 Documentation/virtual/kvm/coalesced-pio.txt diff --git a/Documentation/virtual/kvm/00-INDEX b

[PATCH V3 0/2] introduce coalesced pio support

2018-08-23 Thread Peng Hao
l and qemu together.So maybe another patch does it. Peng Hao (2): kvm/x86 : add coalesced pio support kvm/x86 : add document for coalesced pio Documentation/virtual/kvm/00-INDEX | 4 Documentation/virtual/kvm/coalesced-pio.txt | 14 ++ include/uapi/l

[PATCH V3 1/2] kvm/x86 : add coalesced pio support

2018-08-23 Thread Peng Hao
Signed-off-by: Peng Hao --- include/uapi/linux/kvm.h | 5 +++-- virt/kvm/coalesced_mmio.c | 8 +--- virt/kvm/kvm_main.c | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index b6270a3..9cc56d3 100644 --- a

[PATCH] sched/fair : fix typos

2018-08-09 Thread Peng Hao
Signed-off-by: Peng Hao --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2f0a0be..b7ab23d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3315,7 +3315,7 @@ static inline void

[PATCH] kvm/x86: propagate fetch fault into guest

2018-07-22 Thread Peng Hao
CR0=80050033 CR2=b757d000 CR3=35d31000 CR4=001406d0 Signed-off-by: Peng Hao Reviewed-by: Jiang Biao --- arch/x86/kvm/emulate.c | 7 +-- arch/x86/kvm/x86.c | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[PATCH v2] kvmclock: fix nested guest always in tsc_early clocksource

2018-07-14 Thread Peng Hao
advice. Signed-off-by: Peng Hao --- arch/x86/kernel/kvmclock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 8b26c9e..fc1562e 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c @@ -138,6 +138,7 @@ stati

[PATCH] x86: tsc: fix L2 guest always in tsc_early clocksource

2018-04-23 Thread Peng Hao
In L2 guest tsc_read_refs always return ULLONG_MAX, and that will call tsc_refine_calibration_work periodly. So L2 guest will read acpi timer port 0x608 periodly. The patch will let it out of "if(tsc_start == -1){}" infinite loop. Signed-off-by: Peng Hao --- arch/x86/kernel/tsc.c |

[PATCH] selftests:vm: add include file

2018-04-14 Thread Peng Hao
userfaultfd.c: In function ‘hugetlb_release_pages’: userfaultfd.c:145:25: error: ‘FALLOC_FL_PUNCH_HOLE’ undeclared (first use in this function) Signed-off-by: Peng Hao --- tools/testing/selftests/vm/userfaultfd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/vm

[PATCH] kvm: selftests: add -std=gnu99 cflags

2018-04-12 Thread Peng Hao
lib/kvm_util.c: In function ‘kvm_memcmp_hva_gva’: lib/kvm_util.c:332:2: error: ‘for’ loop initial declarations are only allowed in C99 mode So add -std=gnu99 to CFLAGS Signed-off-by: Peng Hao --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] kvm: x86: fix a prototype warning

2018-04-06 Thread Peng Hao
warning: no previous prototype for ‘vmx_enable_tdp’ Signed-off-by: Peng Hao --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f0fd50b..86681bc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c

[PATCH] kvm: x86 : fix a compile warning

2018-04-01 Thread Peng Hao
fix a "warning: no previous prototype". Signed-off-by: Peng Hao --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 18b5ca7..6621319 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -7754

[PATCH] kvm : arm/arm64 : fix some warningg

2018-04-01 Thread Peng Hao
fix some "warning: no previous prototype". Signed-off-by: Peng Hao --- virt/kvm/arm/vgic/vgic-its.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 4650953..881494b 100644 --- a/virt/kvm/arm

[PATCH] KVM: arm/armv4 : merge the same case handler

2018-03-26 Thread Peng Hao
The two switch cases have the same handler, so merge them. Signed-off-by: Peng Hao --- virt/kvm/arm/vgic/vgic-its.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 4650953..aa41b29 100644 --- a/virt/kvm/arm/vgic/vgic-its.c

[PATCH v3] KVM: arm/arm64 : add lpi info in vgic-debug

2018-03-23 Thread Peng Hao
Add lpi debug info to vgic-stat. The printed info like this: SPI 287 0 0100 0 160 -1 LPI 8192 2 00010000 0 160 -1 Signed-off-by: Peng Hao --- virt/kvm/arm/vgic/vgic-debug.c | 59 ++ virt

[PATCH v2] KVM: arm/arm64 : add lpi info in vgic-debug

2018-03-23 Thread Peng Hao
Add lpi debug info to vgic-stat. the printed info like this: SPI 287 0 0100 0 160 -1 LPI 8192 2 00010000 0 160 -1 Signed-off-by: Peng Hao --- virt/kvm/arm/vgic/vgic-debug.c | 56 ++ 1

[PATCH] KVM: arm/arm64 : add lpi info in vgic-debug

2018-03-22 Thread Peng Hao
Add lpi debug info to vgic-stat. the printed info like this: SPI 287 0 0100 0 160 -1 LPI 8192 2 00010000 0 160 -1 Signed-off-by: Peng Hao --- virt/kvm/arm/vgic/vgic-debug.c | 61 ++ 1

[PATCH] irqchip: irq-gic-v4: return real error code

2018-03-18 Thread Peng Hao
__irq_domain_alloc_irqs will return some different error code, so we should return real error code in its_alloc_vcpu_irqs. Signed-off-by: Peng Hao --- drivers/irqchip/irq-gic-v4.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers

[PATCH] KVM: arm/arm64: replacing per-VM's per-CPU variable

2018-03-13 Thread Peng Hao
Using a global per-CPU variable instead of per-VM's per-CPU variable. Signed-off-by: Peng Hao --- arch/arm/include/asm/kvm_host.h | 3 --- arch/arm64/include/asm/kvm_host.h | 3 --- virt/kvm/arm/arm.c| 26 ++ 3 files changed, 6 insertions(+

[PATCH] KVM:arm/arm64: dcache need be coherent unconditionally

2018-03-09 Thread Peng Hao
For emulation devices just like vga, keeping coherent dcache between guest and host timely is needed. Now the display of vnc-viewer will not update continuously and the patch can fix up. Signed-off-by: Peng Hao --- virt/kvm/arm/mmu.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH v3] hwmon: g762: handle cleanup with devm_add_action

2018-02-28 Thread Peng Hao
Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao --- drivers/hwmon/g762.c | 58 +--- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index 6d1208b

[PATCH v2] hwmon: g762: handle cleanup with devm_add_action

2018-02-28 Thread Peng Hao
Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao --- drivers/hwmon/g762.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index 6d1208b..49046b4 100644

[PATCH] hwmon: g762: handle cleanup with devm_add_action

2018-02-27 Thread Peng Hao
Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao --- drivers/hwmon/g762.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index 6d1208b..48e60d8 100644 --- a

[PATCH] KVM: X86: fix a bad_page bug_on path

2017-10-13 Thread Peng Hao
When poweroff L1 Guest with L2 guset on L1, it exists a path to trigger a bad_page bug_on. !page_count(pfn_to_page(pfn)) Warning in mmu_spte_clear_track_bits will appear before,then it may set A/D bit for the freed page and trigger a bad_page bug_on. Signed-off-by: Peng Hao --- arch/x86/kvm

[PATCH] KVM:X86 simply update A/D bits route

2017-10-12 Thread Peng Hao
update_accessed_dirty_bits return 0 when dirty/accessed bits are not supported. So walk_addr_generic just call update_accessed_dirty_bits with supporting dirty/accessed bits. Signed-off-by: Peng Hao --- arch/x86/kvm/paging_tmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] KVM: X86: clear page flags when freeing kvm mmapping page

2017-10-10 Thread Peng Hao
: 2110 R15: 7f68cab157b8 Signed-off-by: Peng Hao --- arch/x86/kvm/x86.c| 5 - virt/kvm/coalesced_mmio.c | 8 ++-- virt/kvm/kvm_main.c | 5 - 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cd17b7d

[PATCH] KVM: VMX: add encapsulation kvm_vcpu_pi_need_handle

2017-09-21 Thread Peng Hao
use kvm_vcpu_pi_need_handle encapsulation simply coede Signed-off-by: Peng Hao --- arch/x86/kvm/vmx.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4253ade..26b99f4 100644 --- a/arch/x86/kvm/vmx.c

[RFC PATCH V2] kvm: x86: reduce rtc 0x70 access vm-exit time

2017-08-13 Thread Peng Hao
Samples Samples% Time% Min Time Max Time Avg time 0x70:POUT 10632.02%29.47%0us 10us 1.57us (+- 7.38%) the patch is a part of optimizing rtc 0x70 port access. Another is in qemu. Signed-off-by: Peng Hao --- Documentation/virtual/kvm/00-INDEX | 2

[RFC PATCH] kvm: x86: reduce rtc 0x70 access vm-exit time

2017-08-11 Thread Peng Hao
Samples Samples% Time% Min Time Max Time Avg time 0x70:POUT 10632.02%29.47%0us 10us 1.57us (+- 7.38%) the patch is a part of optimizing rtc 0x70 port access. Another is in qemu. Signed-off-by: Peng Hao --- virt/kvm/coalesced_mmio.c | 14 +++--- 1 file

[PATCH] kvm: x86: reduce rtc 0x70 access vm-exit time

2017-08-02 Thread Peng Hao
29us10.75us (+- 3.41%) with my patch IO Port Access Samples Samples% Time% Min Time Max Time Avg time 0x70:POUT 10632.02%29.47%0us 10us 1.57us (+- 7.38%) the patch is a part of optimizing rtc 0x70 port access.another is in qemu. Signed-off-by: Peng Hao

[PATCH] kvm: x86: fix a race condition result to lost INIT

2017-07-30 Thread Peng Hao
ate according to userspace's info. Signed-off-by: Peng Hao --- arch/x86/kvm/x86.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6c7266f..393a7b7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3157,12

<    1   2