Alex,
> On Sep 11, 2015, at 11:16 AM, Alex Williamson
> wrote:
>
> RFC - Is this something we should do?
Superficially this looks pretty good. I need to think harder to be sure of the
details.
> Should we consider providing
> similar emulation through PCI sysfs to allow lspci to also make us
When determining whether a group is viable, we already allow devices
bound to pcieport. Generalize this to include any PCI bridge device.
Signed-off-by: Alex Williamson
---
drivers/vfio/vfio.c | 31 +--
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a
The PCI VPD capability operates on a set of window registers in PCI
config space. Writing to the address register triggers either a read
or write, depending on the setting of the PCI_VPD_ADDR_F bit within
the address register. The data register provides either the source
for writes or the target
If one typically only boots full disk-images, one wouldn't necessaraly
want to statically link glibc, for the guest-init feature of the
kvmtool. As statically linked glibc triggers haevy security
maintainance.
Signed-off-by: Dimitri John Ledkov
---
Changes since v1:
- rename CONFIG_HAS_LIBC to
On 11/09/15 14:35, Shannon Zhao wrote:
>
>
> On 2015/9/11 19:04, Marc Zyngier wrote:
[...]
>> Having had a chat with Will, it appears that a much better solution
>> would be to ask perf to use raw events instead of trying to map things
>> to perf events (which the guest has already done).
>>
>>
On 11 September 2015 at 13:47, Andre Przywara wrote:
> Hi Dimitri,
>
> thanks for sharing this patch and sorry for the delay.
No worries, I have a few more patches to send, polishing them for release.
>
> (CC:ing Will)
>
> On 04/09/15 13:04, Dimitri John Ledkov wrote:
>> If one typically only bo
On 2015/9/11 19:04, Marc Zyngier wrote:
On 11/09/15 09:55, Shannon Zhao wrote:
From: Shannon Zhao
When we use tools like perf on host, perf passes the event type and the
id of this event type category to kernel, then kernel will map them to
hardware event number and write this number to PMU
On 11/09/15 12:09, Marc Zyngier wrote:
> On 11/09/15 11:59, Julien Grall wrote:
>>
>>
>> On 11/09/2015 11:54, Ian Campbell wrote:
>>> On Thu, 2015-09-10 at 17:23 +0100, Julien Grall wrote:
I applied the two patches on top of linus/master and I'm able to boot
correctly on X-gene. Thank you
Hi Dimitri,
thanks for sharing this patch and sorry for the delay.
(CC:ing Will)
On 04/09/15 13:04, Dimitri John Ledkov wrote:
> If one typically only boots full disk-images, one wouldn't necessaraly
> want to statically link glibc, for the guest-init feature of the
> kvmtool. As statically link
On 25/08/2015 10:50, Feng Wu wrote:
> This patch updates the Posted-Interrupts Descriptor when vCPU
> is blocked.
>
> pre-block:
> - Add the vCPU to the blocked per-CPU list
> - Set 'NV' to POSTED_INTR_WAKEUP_VECTOR
>
> post-block:
> - Remove the vCPU from the per-CPU list
>
> Signed-off-by: F
Hi Christoffer,
(actually you are not supposed to reply during your holidays!)
On 09/09/15 09:49, Christoffer Dall wrote:
> On Tue, Sep 8, 2015 at 6:57 PM, Andre Przywara wrote:
>> Hi Eric,
>>
>> thanks for you answer.
>>
>> On 08/09/15 09:43, Eric Auger wrote:
>>> Hi Andre,
>>> On 09/07/2015 01
On 11/09/15 11:59, Julien Grall wrote:
>
>
> On 11/09/2015 11:54, Ian Campbell wrote:
>> On Thu, 2015-09-10 at 17:23 +0100, Julien Grall wrote:
>>> I applied the two patches on top of linus/master and I'm able to boot
>>> correctly on X-gene. Thank you!
>>
>> Perhaps we should replicate this appr
On 25/08/2015 10:50, Feng Wu wrote:
> Enable VT-d Posted-Interrtups and add a command line
> parameter for it.
>
> Signed-off-by: Feng Wu
> ---
> Documentation/kernel-parameters.txt | 1 +
> drivers/iommu/irq_remapping.c | 12
> 2 files changed, 9 insertions(+), 4 deletions
On 11/09/15 09:55, Shannon Zhao wrote:
> From: Shannon Zhao
>
> When we use tools like perf on host, perf passes the event type and the
> id of this event type category to kernel, then kernel will map them to
> hardware event number and write this number to PMU PMEVTYPER_EL0
> register. While we'
On 25/08/2015 10:50, Feng Wu wrote:
> Currently, we don't support urgent interrupt, all interrupts
> are recognized as non-urgent interrupt, so we cannot post
> interrupts when 'SN' is set.
>
> If the vcpu is in guest mode, it cannot have been scheduled out,
> and that's the only case when SN is
On 11/09/2015 11:54, Ian Campbell wrote:
On Thu, 2015-09-10 at 17:23 +0100, Julien Grall wrote:
I applied the two patches on top of linus/master and I'm able to boot
correctly on X-gene. Thank you!
Perhaps we should replicate this approach in Xen and get rid of
PLATFORM_QUIRK_GIC_64K_STRID
On 25/08/2015 10:50, Feng Wu wrote:
> This patch updates the Posted-Interrupts Descriptor when vCPU
> is preempted.
>
> sched out:
> - Set 'SN' to suppress furture non-urgent interrupts posted for
> the vCPU.
>
> sched in:
> - Clear 'SN'
> - Change NDST if vCPU is scheduled to a different CPU
>
On Thu, 2015-09-10 at 17:23 +0100, Julien Grall wrote:
> I applied the two patches on top of linus/master and I'm able to boot
> correctly on X-gene. Thank you!
Perhaps we should replicate this approach in Xen and get rid of
PLATFORM_QUIRK_GIC_64K_STRIDE?
Ian.
--
To unsubscribe from this list: s
On 25/08/2015 10:50, Feng Wu wrote:
> Enable irq bypass manager for vfio PCI devices.
>
> Signed-off-by: Feng Wu
> ---
> drivers/vfio/pci/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
> index 579d83b..02912f1 100644
> ---
On 25/08/2015 10:50, Feng Wu wrote:
> Make kvm_set_msi_irq() public, we can use this function outside.
>
> Signed-off-by: Feng Wu
> ---
> arch/x86/include/asm/kvm_host.h | 4
> arch/x86/kvm/irq_comm.c | 4 ++--
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/a
On 25/08/2015 10:50, Feng Wu wrote:
> Move struct kvm_irq_routing_table from irqchip.c to kvm_host.h,
> so we can use it outside of irqchip.c.
>
> Signed-off-by: Feng Wu
> ---
> include/linux/kvm_host.h | 14 ++
> virt/kvm/irqchip.c | 10 --
> 2 files changed, 14 inse
On 25/08/2015 10:50, Feng Wu wrote:
> Define an interface to get PI descriptor address from the vCPU structure.
>
> Signed-off-by: Feng Wu
See the later review, this interface and the one in patch 5 is too
low-level.
Paolo
> ---
> arch/x86/include/asm/kvm_host.h | 2 ++
> arch/x86/kvm/vmx.
On 25/08/2015 10:50, Feng Wu wrote:
> Define two weak arch callbacks so that archs that don't need
> them don't need define them.
>
> Signed-off-by: Feng Wu
> ---
> virt/kvm/eventfd.c | 10 ++
> 1 file changed, 10 insertions(+)
>
> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
On 25/08/2015 10:50, Feng Wu wrote:
> +void kvm_arch_irqfd_init(struct kvm_kernel_irqfd *irqfd)
> +{
> + irqfd->arch_update = kvm_arch_update_pi_irte;
> +}
> +
> EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_exit);
> EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_inj_virq);
> EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_page_fa
On 25/08/2015 10:50, Feng Wu wrote:
> + struct kvm_kernel_irqfd *irqfd =
> + container_of(cons, struct kvm_kernel_irqfd, consumer);
> +
> + irqfd->producer = prod;
This assignment should be under "if (kvm_x86_ops->update_pi_irte)".
> + return kvm_arch_update_pi_irte(irqf
On 25/08/2015 10:50, Feng Wu wrote:
> +int kvm_arch_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
> + uint32_t guest_irq, bool set)
Please move all of this code to a vmx.c callback instead of adding
get_pi_desc_addr. Check if this makes the pi_set_sn and pi_clear
On 11/09/15 09:55, Shannon Zhao wrote:
> From: Shannon Zhao
>
> Add reset handler which gets host value of PMCEID0 or PMCEID1. Since
> write action to PMCEID0 or PMCEID1 is ignored, add a new case for this.
>
> Signed-off-by: Shannon Zhao
> ---
> arch/arm64/kvm/sys_regs.c | 36
On 25/08/2015 10:50, Feng Wu wrote:
> This patch defines a new interface kvm_intr_is_single_vcpu(),
> which can returns whether the interrupt is for single-CPU or not.
>
> It is used by VT-d PI, since now we only support single-CPU
> interrupts, For lowest-priority interrupts, if user configures
On Fri, 11 Sep 2015 17:25:45 +0800
Jason Wang wrote:
> On 09/11/2015 03:46 PM, Cornelia Huck wrote:
> > On Fri, 11 Sep 2015 11:17:35 +0800
> > Jason Wang wrote:
> >> +
> >> + /* When length is ignored, MMIO is also put on a separate bus, for
> >> + * faster lookups.
> >> + */
> >> + if (!
On 11/09/15 09:54, Shannon Zhao wrote:
> From: Shannon Zhao
>
> Signed-off-by: Shannon Zhao
> ---
> arch/arm64/kvm/sys_regs.h | 8
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
> index d411e25..a0b3811 100644
> --- a/arch/arm6
On 25/08/2015 10:50, Feng Wu wrote:
> This patch adds some helper functions to manipulate the
> Posted-Interrupts Descriptor.
>
> Signed-off-by: Feng Wu
> ---
> arch/x86/kvm/vmx.c | 26 ++
> 1 file changed, 26 insertions(+)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x8
On 11/09/15 09:54, Shannon Zhao wrote:
> From: Shannon Zhao
>
> Signed-off-by: Shannon Zhao
> ---
> arch/arm64/kvm/sys_regs.h | 8
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
> index d411e25..a0b3811 100644
> --- a/arch/arm6
On 11/09/15 09:54, Shannon Zhao wrote:
> From: Shannon Zhao
>
> Add reset handler which gets host value of PMCR_EL0 and make writable
> bits architecturally UNKNOWN. Add a common access handler for PMU
> registers which emulates writing and reading register and add emulation
> for PMCR.
>
> Sign
On 2015/9/11 17:10, Marc Zyngier wrote:
> On 11/09/15 09:54, Shannon Zhao wrote:
>> From: Shannon Zhao
>>
>> Here we plan to support virtual PMU for guest by full software
>> emulation, so define some basic structs and functions preparing for
>> futher steps. Define struct kvm_pmc for performanc
https://bugzilla.kernel.org/show_bug.cgi?id=104271
Hans Streibel changed:
What|Removed |Added
Component|kvm |PCI
Version|unspecified
On 09/11/2015 04:33 PM, Paolo Bonzini wrote:
>
> On 11/09/2015 10:15, Michael S. Tsirkin wrote:
>> I think we should add a capability for fast mmio.
>> This way, userspace can avoid crashing buggy kernels.
> I agree.
>
> Paolo
Right, then qemu will use datamatch eventfd if kenrel dost not have t
On 09/11/2015 04:31 PM, Cornelia Huck wrote:
> On Fri, 11 Sep 2015 10:26:41 +0200
> Paolo Bonzini wrote:
>
>> On 11/09/2015 05:17, Jason Wang wrote:
>>> + int len = r2->len ? r1->len : 0;
>>> +
>>> if (r1->addr < r2->addr)
>>> return -1;
>>> - if (r1->addr + r1->len > r2->add
On 09/11/2015 03:46 PM, Cornelia Huck wrote:
> On Fri, 11 Sep 2015 11:17:35 +0800
> Jason Wang wrote:
>
>> We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS
>> and another is KVM_FAST_MMIO_BUS but with a single iodev
>> instance. This will lead an issue: kvm_io_bus_destroy() k
https://bugzilla.kernel.org/show_bug.cgi?id=104271
--- Comment #4 from Hans Streibel ---
Created attachment 187321
--> https://bugzilla.kernel.org/attachment.cgi?id=187321&action=edit
Output of lspci -vvv
--
You are receiving this mail because:
You are watching the assignee of the bug.
--
To
On 09/11/2015 03:39 PM, Cornelia Huck wrote:
> On Fri, 11 Sep 2015 11:17:34 +0800
> Jason Wang wrote:
>
>> This patch factors out core eventfd assign/deassign logic and leave
>> the argument checking and bus index selection to callers.
>>
>> Cc: Gleb Natapov
>> Cc: Paolo Bonzini
>> Signed-off-
On 11/09/15 09:54, Shannon Zhao wrote:
> From: Shannon Zhao
>
> Here we plan to support virtual PMU for guest by full software
> emulation, so define some basic structs and functions preparing for
> futher steps. Define struct kvm_pmc for performance monitor counter and
> struct kvm_pmu for perfo
From: Shannon Zhao
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.h | 8
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
index d411e25..a0b3811 100644
--- a/arch/arm64/kvm/sys_regs.h
+++ b/arch/arm64/kvm/sys_regs.h
@@ -104,6
From: Shannon Zhao
Since the reset value of PMXEVCNTR is UNKNOWN, use reset_unknown for
its reset handler. Add access handler which emulates writing and reading
PMXEVCNTR register. When reading PMXEVCNTR, call perf_event_read_value
to get the count value of the perf event.
Signed-off-by: Shannon
From: Shannon Zhao
When we use tools like perf on host, perf passes the event type and the
id of this event type category to kernel, then kernel will map them to
hardware event number and write this number to PMU PMEVTYPER_EL0
register. While we're trapping and emulating guest accesses to PMU
reg
From: Shannon Zhao
Since the reset value of PMCNTENSET and PMCNTENCLR is UNKNOWN, use
reset_unknown for its reset handler. Add a new case to emulate writing
PMCNTENSET or PMCNTENCLR register.
When writing to PMCNTENSET, call perf_event_enable to enable the perf
event. When writing to PMCNTENCLR,
From: Shannon Zhao
Since the reset value of PMOVSSET and PMOVSCLR is UNKNOWN, use
reset_unknown for its reset handler. Add a new case to emulate writing
PMOVSSET or PMOVSCLR register.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 33 ++---
1 file chang
From: Shannon Zhao
Since the reset value of PMSELR_EL0 is UNKNOWN, use reset_unknown for
its reset handler. As it doesn't need to deal with the acsessing action
specially, it uses default case to emulate writing and reading PMSELR
register.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_re
From: Shannon Zhao
When KVM frees VCPU, it needs to free the perf_event of PMU.
Signed-off-by: Shannon Zhao
---
arch/arm/kvm/arm.c| 1 +
include/kvm/arm_pmu.h | 2 ++
virt/kvm/arm/pmu.c| 21 +
3 files changed, 24 insertions(+)
diff --git a/arch/arm/kvm/arm.c b/ar
From: Shannon Zhao
This patchset adds guest PMU support for KVM on ARM64. It takes
trap-and-emulate approach. When guest wants to monitor one event, it
will be trapped by KVM and KVM will call perf_event API to create a perf
event and call relevant perf_event APIs to get the count value of event.
From: Shannon Zhao
Since the reset value of PMCCNTR is UNKNOWN, use reset_unknown for its
reset handler. Add a new case to emulate reading to PMCCNTR register.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
di
From: Shannon Zhao
Since the reset value of PMUSERENR is zero, use reset_val(_cp15) with
zero for its reset handler.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys
From: Shannon Zhao
Here we plan to support virtual PMU for guest by full software
emulation, so define some basic structs and functions preparing for
futher steps. Define struct kvm_pmc for performance monitor counter and
struct kvm_pmu for performance monitor unit for each vcpu. According to
ARM
From: Shannon Zhao
Add reset handler which gets host value of PMCEID0 or PMCEID1. Since
write action to PMCEID0 or PMCEID1 is ignored, add a new case for this.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 36
1 file changed, 32 insertions(+),
From: Shannon Zhao
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.h | 8
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
index a0b3811..a476b1b 100644
--- a/arch/arm64/kvm/sys_regs.h
+++ b/arch/arm64/kvm/sys_regs.h
@@ -119,6
From: Shannon Zhao
We are about to trap and emulate acccesses to each PMU register
individually. This adds the context offsets for the AArch64 PMU
registers and their AArch32 counterparts.
Signed-off-by: Shannon Zhao
---
arch/arm64/include/asm/kvm_asm.h | 59 +++
From: Shannon Zhao
Add reset handler which gets host value of PMCR_EL0 and make writable
bits architecturally UNKNOWN. Add a common access handler for PMU
registers which emulates writing and reading register and add emulation
for PMCR.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c
From: Shannon Zhao
To use the ARMv8 PMU related register defines from the KVM code,
we move the relevant definitions to asm/pmu.h header file.
Signed-off-by: Anup Patel
Signed-off-by: Shannon Zhao
---
arch/arm64/include/asm/pmu.h | 45 ++
arch/arm64/k
From: Shannon Zhao
Add access handler which emulates writing and reading PMSWINC
register and add support for creating software increment event.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 18 +-
include/kvm/arm_pmu.h | 2 ++
virt/kvm/arm/pmu.c| 33
From: Shannon Zhao
Add access handler which emulates writing and reading PMEVCNTRn and
PMEVTYPERn.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 164 ++
1 file changed, 164 insertions(+)
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/ar
From: Shannon Zhao
Since the reset value of PMXEVTYPER is UNKNOWN, use reset_unknown or
reset_unknown_cp15 for its reset handler. Add access handler which
emulates writing and reading PMXEVTYPER register. When writing to
PMXEVTYPER, call kvm_pmu_set_counter_event_type to create a perf_event
for t
From: Shannon Zhao
Add a new kvm device type KVM_DEV_TYPE_ARM_PMU_V3 for ARM PMU. Implement
the kvm_device_ops for it.
Signed-off-by: Shannon Zhao
---
Documentation/virtual/kvm/devices/arm-pmu.txt | 15 +
arch/arm64/include/uapi/asm/kvm.h | 3 +
include/linux/kvm_host.h
From: Shannon Zhao
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/reset.c | 3 +++
include/kvm/arm_pmu.h | 2 ++
virt/kvm/arm/pmu.c | 18 ++
3 files changed, 23 insertions(+)
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index 0b43265..ee2c2e9 100644
--- a
From: Shannon Zhao
When calling perf_event_create_kernel_counter to create perf_event,
assign a overflow handler. Then when perf event overflows, set
irq_pending and call kvm_vcpu_kick() to sync the interrupt.
Signed-off-by: Shannon Zhao
---
arch/arm/kvm/arm.c| 3 +++
include/kvm/arm_pmu.
From: Shannon Zhao
Since the reset value of PMINTENSET and PMINTENCLR is UNKNOWN, use
reset_unknown for its reset handler. Add a new case to emulate writing
PMINTENSET or PMINTENCLR register.
Signed-off-by: Shannon Zhao
---
arch/arm64/kvm/sys_regs.c | 34 ++
1 f
On 05/14/2015 07:30 PM, Andrea Arcangeli wrote:
> Add documentation.
Hi Andrea,
I do not recall... Did you write a man page also for this new system call?
Thanks,
Michael
> Signed-off-by: Andrea Arcangeli
> ---
> Documentation/vm/userfaultfd.txt | 140
>
On Fri, 11 Sep 2015 10:26:41 +0200
Paolo Bonzini wrote:
> On 11/09/2015 05:17, Jason Wang wrote:
> > + int len = r2->len ? r1->len : 0;
> > +
> > if (r1->addr < r2->addr)
> > return -1;
> > - if (r1->addr + r1->len > r2->addr + r2->len)
> > + if (r1->addr + len > r2->addr +
On 11/09/2015 10:15, Michael S. Tsirkin wrote:
> I think we should add a capability for fast mmio.
> This way, userspace can avoid crashing buggy kernels.
I agree.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More
On 11/09/2015 05:17, Jason Wang wrote:
> + int len = r2->len ? r1->len : 0;
> +
> if (r1->addr < r2->addr)
> return -1;
> - if (r1->addr + r1->len > r2->addr + r2->len)
> + if (r1->addr + len > r2->addr + r2->len)
> return 1;
Perhaps better:
On 11/09/2015 09:39, Cornelia Huck wrote:
> > +static int
> > +kvm_deassign_ioeventfd_idx(struct kvm *kvm, enum kvm_bus bus_idx,
> > + struct kvm_ioeventfd *args)
>
> While this file uses newline before function name quite often, putting
> it on the same line seems more comm
On Fri, Sep 11, 2015 at 11:17:33AM +0800, Jason Wang wrote:
> Hi:
>
> This series fixes two issues of fast mmio eventfd:
>
> 1) A single iodev instance were registerd on two buses: KVM_MMIO_BUS
>and KVM_FAST_MMIO_BUS. This will cause double in
>ioeventfd_destructor()
> 2) A zero length io
On Fri, 11 Sep 2015 11:17:35 +0800
Jason Wang wrote:
> We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS
> and another is KVM_FAST_MMIO_BUS but with a single iodev
> instance. This will lead an issue: kvm_io_bus_destroy() knows nothing
> about the devices on two buses points to
On Fri, 11 Sep 2015 11:17:34 +0800
Jason Wang wrote:
> This patch factors out core eventfd assign/deassign logic and leave
> the argument checking and bus index selection to callers.
>
> Cc: Gleb Natapov
> Cc: Paolo Bonzini
> Signed-off-by: Jason Wang
> ---
> virt/kvm/eventfd.c | 83
> +
72 matches
Mail list logo