On Wed, Sep 2, 2015 at 7:42 PM, Ming Lei wrote:
> On Wed, Sep 2, 2015 at 6:25 PM, Christoffer Dall
> wrote:
>> On Wed, Sep 02, 2015 at 02:31:21PM +0800, Ming Lei wrote:
>>> This patch removes config option of KVM_ARM_MAX_VCPUS,
>>> and like
On 17/09/15 07:08, Ming Lei wrote:
> On Wed, Sep 2, 2015 at 7:42 PM, Ming Lei wrote:
>> On Wed, Sep 2, 2015 at 6:25 PM, Christoffer Dall
>> wrote:
>>> On Wed, Sep 02, 2015 at 02:31:21PM +0800, Ming Lei wrote:
This patch removes config
* Andy Lutomirski wrote:
> Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
> turns all rdmsr and wrmsr operations into the safe variants without
> any checks that the operations actually succeed.
>
> This is IMO awful: it papers over bugs. In particular,
Hi Wei,
On 2015/9/17 13:56, Wei Huang wrote:
>
>
> On 09/16/2015 08:32 PM, Shannon Zhao wrote:
>> Hi Wei,
>>
>> On 2015/9/17 5:07, Wei Huang wrote:
>>> I am testing this series.
>> Thanks for your time and help.
>>
>>> The first question is: do you plan to add ACPI
>>> support in QEMU?
>
> I
On 09/16/2015 12:07 AM, Paolo Bonzini wrote:
On 26/08/2015 12:40, Xiao Guangrong wrote:
+
+size = get_file_size(fd);
+buf = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
I guess the user will want to choose between MAP_SHARED and MAP_PRIVATE.
This can be added in
On 17/09/15 00:33, Andy Lutomirski wrote:
> Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
> turns all rdmsr and wrmsr operations into the safe variants without
> any checks that the operations actually succeed.
>
> This is IMO awful: it papers over bugs. In particular, KVM
On Thu, Sep 17, 2015 at 09:19:20AM +0200, Ingo Molnar wrote:
> Most big distro kernels on bare metal have CONFIG_PARAVIRT=y (I checked
> Ubuntu and
> Fedora), so we are potentially exposing a lot of users to problems.
+ SUSE.
> Crashing the bootup on an unknown MSR is bad. Many MSR reads and
On 17/09/2015 10:58, Peter Zijlstra wrote:
> But the far greater problem I have with the whole virt thing is that
> you cannot use rdmsr_safe() to probe if an MSR exists at all because, as
> you told me, these virt thingies return 0 for all 'unknown' MSRs instead
> of faulting.
At least for
On 17/09/2015 11:31, Borislav Petkov wrote:
>
>> > Crashing the bootup on an unknown MSR is bad. Many MSR reads and writes
>> > are
>> > non-critical and returning the 'safe' result is much better than crashing
>> > or
>> > hanging the bootup.
> ... and prepending all MSR accesses with
On 17/09/15 12:17, Christoffer Dall wrote:
> On Wed, Sep 16, 2015 at 04:58:06PM +0100, Marc Zyngier wrote:
>> When running a guest with the architected timer disabled (with QEMU and
>> the kernel_irqchip=off option, for example), it is important to make
>> sure the timer gets turned off.
> Am 15.09.2015 um 18:27 schrieb Paolo Bonzini:
> > This new statistic can help diagnosing VCPUs that, for any reason,
> > trigger bad behavior of halt_poll_ns autotuning.
> >
> > For example, say halt_poll_ns = 48, and wakeups are spaced exactly
> > like 479us, 481us, 479us, 481us. Then KVM
On Wed, Sep 16, 2015 at 04:58:06PM +0100, Marc Zyngier wrote:
> When running a guest with the architected timer disabled (with QEMU and
> the kernel_irqchip=off option, for example), it is important to make
> sure the timer gets turned off. Otherwise, the guest may try to
> enable it anyway,
However, the difference between one CONFIG and another is quite frankly crazy.
We should explicitly use the safe versions where this is appropriate, and then
yes, we should do this.
Yet another reason the paravirt code is batshit crazy.
On September 17, 2015 2:31:34 AM PDT, Borislav Petkov
On 09/16/2015 12:06 AM, Paolo Bonzini wrote:
On 25/08/2015 18:03, Stefan Hajnoczi wrote:
+static uint64_t get_file_size(int fd)
+{
+struct stat stat_buf;
+uint64_t size;
+
+if (fstat(fd, _buf) < 0) {
+return 0;
+}
+
+if (S_ISREG(stat_buf.st_mode)) {
+
On 09/16/2015 12:10 AM, Paolo Bonzini wrote:
On 01/09/2015 11:14, Stefan Hajnoczi wrote:
When I was digging into live migration code, i noticed that the same MR name may
cause the name "idstr", please refer to qemu_ram_set_idstr().
Since nvdimm devices do not have parent-bus, it will
On 09/17/2015 05:04 PM, Igor Mammedov wrote:
On Thu, 17 Sep 2015 16:39:12 +0800
Xiao Guangrong wrote:
On 09/16/2015 12:10 AM, Paolo Bonzini wrote:
On 01/09/2015 11:14, Stefan Hajnoczi wrote:
When I was digging into live migration code, i noticed that
On 17/09/2015 03:51, Wu, Feng wrote:
>
>
>> -Original Message-
>> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
>> Sent: Wednesday, September 16, 2015 5:27 PM
>> To: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
>> mtosa...@redhat.com
>> Cc: eric.au...@linaro.org;
Hi Andrew,
On 2015/9/17 17:30, Andrew Jones wrote:
> On Thu, Sep 17, 2015 at 09:32:34AM +0800, Shannon Zhao wrote:
>> > Hi Wei,
>> >
>> > On 2015/9/17 5:07, Wei Huang wrote:
>>> > > I am testing this series.
>> > Thanks for your time and help.
>> >
>>> > > The first question is: do you plan to
The PAPR interface defines a hypercall to pass high-quality
hardware generated random numbers to guests. Recent kernels can
already provide this hypercall to the guest if the right hardware
random number generator is available. But in case the user wants
to use another source like EGD, or QEMU is
On Thu, 17 Sep 2015 16:39:12 +0800
Xiao Guangrong wrote:
>
>
> On 09/16/2015 12:10 AM, Paolo Bonzini wrote:
> >
> >
> > On 01/09/2015 11:14, Stefan Hajnoczi wrote:
>
> When I was digging into live migration code, i noticed that the same MR
> name
On Wed, Sep 16, 2015 at 04:33:11PM -0700, Andy Lutomirski wrote:
> Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
> turns all rdmsr and wrmsr operations into the safe variants without
> any checks that the operations actually succeed.
>
> This is IMO awful: it papers over
On Thu, Sep 17, 2015 at 09:32:34AM +0800, Shannon Zhao wrote:
> Hi Wei,
>
> On 2015/9/17 5:07, Wei Huang wrote:
> > I am testing this series.
> Thanks for your time and help.
>
> > The first question is: do you plan to add ACPI
> > support in QEMU?
> To the completeness, this should be added.
On 17/09/2015 11:14, Xiao Guangrong wrote:
>
>
> /* get the memory region from backend memory. */
> mr = host_memory_backend_get_memory(dimm->hostmem, errp);
>
> /* nvdimm_nr will map to guest address space. */
> memory_region_init_alias(>nvdimm_mr, OBJECT(dev),
>
On 17/09/2015 05:17, Wu, Feng wrote:
>>> > > + if (irq->dest_mode == APIC_DEST_PHYSICAL) {
>>> > > + if (irq->dest_id == 0xFF)
>>> > > + goto out;
>>> > > +
>>> > > + if (irq->dest_id >= ARRAY_SIZE(map->phys_map)) {
>> >
>> > Warning here
On Thu, Sep 17, 2015 at 01:40:30PM +0200, Paolo Bonzini wrote:
>
>
> On 17/09/2015 10:58, Peter Zijlstra wrote:
> > But the far greater problem I have with the whole virt thing is that
> > you cannot use rdmsr_safe() to probe if an MSR exists at all because, as
> > you told me, these virt
On 09/17/2015 05:34 PM, Paolo Bonzini wrote:
On 17/09/2015 11:14, Xiao Guangrong wrote:
/* get the memory region from backend memory. */
mr = host_memory_backend_get_memory(dimm->hostmem, errp);
/* nvdimm_nr will map to guest address space. */
memory_region_init_alias(>nvdimm_mr,
From: Will Deacon
Although the ThumbEE registers and traps were present in earlier
versions of the v8 architecture, it was retrospectively removed and so
we can do the same.
Whilst this breaks migrating a guest started on a previous version of
the kernel, it is much better
When running a guest with the architected timer disabled (with QEMU and
the kernel_irqchip=off option, for example), it is important to make
sure the timer gets turned off. Otherwise, the guest may try to
enable it anyway, leading to a screaming HW interrupt.
The fix is to unconditionally turn
From: Ming Lei
This patch removes config option of KVM_ARM_MAX_VCPUS,
and like other ARCHs, just choose the maximum allowed
value from hardware, and follows the reasons:
1) from distribution view, the option has to be
defined as the max allowed value because it need to
From: Marek Majtyka
A critical bug has been found in device memory stage1 translation for
VMs with more then 4GB of address space. Once vm_pgoff size is smaller
then pa (which is true for LPAE case, u32 and u64 respectively) some
more significant bits of pa may be lost
From: Pavel Fedin
Until b26e5fdac43c ("arm/arm64: KVM: introduce per-VM ops"),
kvm_vgic_map_resources() used to include a check on irqchip_in_kernel(),
and vgic_v2_map_resources() still has it.
But now vm_ops are not initialized until we call kvm_vgic_create().
Therefore
When running a guest with the architected timer disabled (with QEMU and
the kernel_irqchip=off option, for example), it is important to make
sure the timer gets turned off. Otherwise, the guest may try to
enable it anyway, leading to a screaming HW interrupt.
The fix is to unconditionally turn
On 09/17/2015 05:10 AM, Andrew Cooper wrote:
On 17/09/15 00:33, Andy Lutomirski wrote:
Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
turns all rdmsr and wrmsr operations into the safe variants without
any checks that the operations actually succeed.
This is IMO awful: it
On Thu, Sep 17, 2015 at 12:19 AM, Ingo Molnar wrote:
>
> * Andy Lutomirski wrote:
>
>> Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
>> turns all rdmsr and wrmsr operations into the safe variants without
>> any checks that the operations
On Thu, Sep 17, 2015 at 08:17:18AM -0700, Andy Lutomirski wrote:
> > Ah, that would be good news. Andy earlier argued I could not rely on
> > rdmsr_safe() faulting on unknown MSRs. If practically we can there's
> > some code I can simplify :-)
>
> I was taking about QEMU TCG, not KVM.
Just for
On Thu, Sep 17, 2015 at 8:17 AM, Peter Zijlstra wrote:
> On Thu, Sep 17, 2015 at 08:17:18AM -0700, Andy Lutomirski wrote:
>
>> > Ah, that would be good news. Andy earlier argued I could not rely on
>> > rdmsr_safe() faulting on unknown MSRs. If practically we can there's
>>
On 17/09/2015 17:27, Arjan van de Ven wrote:
>>
>>> ( We should double check that rdmsr()/wrmsr() results are never left
>>>uninitialized, but are set to zero or so, for cases where the
>>> return code is not
>>>checked. )
>>
>> It sure looks like native_read_msr_safe doesn't clear the
On 17/09/2015 17:26, Andy Lutomirski wrote:
> Maybe Paolo can fix QEMU to fail bad MSR accesses for real...
I was afraid of someone proposing exactly that. :)
I can do it since the list of MSRs can be lifted from KVM. Let's first
see the direction these patches go...
Paolo
--
To unsubscribe
2015-09-17 16:24+0200, Paolo Bonzini:
> I think kvm_apic_match_logical_addr for MSI and IOAPIC interrupts is
> buggy in x2apic mode.
>
> It does:
>
> if (apic_x2apic_mode(apic))
> return ((logical_id >> 16) == (mda >> 16))
>&& (logical_id & mda &
Commit f78195129963 ("kvm: add halt_poll_ns module parameter") calls, with
enabled preemption, single_task_running. When CONFIG_DEBUG_PREEMPT is
enabled that will result in a debug_smp_processor_id() call.
Cc: # 4.2.x
Signed-off-by: Dominik Dingel
On 17/09/15 16:02, Paolo Bonzini wrote:
>
>
> On 17/09/2015 16:46, Marc Zyngier wrote:
>> When running a guest with the architected timer disabled (with QEMU and
>> the kernel_irqchip=off option, for example), it is important to make
>> sure the timer gets turned off. Otherwise, the guest may
( We should double check that rdmsr()/wrmsr() results are never left
uninitialized, but are set to zero or so, for cases where the return code is
not
checked. )
It sure looks like native_read_msr_safe doesn't clear the output if
the rdmsr fails.
I'd suggest to return some poison not
On 17/09/2015 17:28, Marc Zyngier wrote:
> > diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S
> > index 702740d37465..93e322b4d242 100644
> > --- a/arch/arm/kvm/interrupts_head.S
> > +++ b/arch/arm/kvm/interrupts_head.S
> > @@ -514,6 +514,7 @@ ARM_BE8(rev r6, r6
On 9/17/2015 8:29 AM, Paolo Bonzini wrote:
On 17/09/2015 17:27, Arjan van de Ven wrote:
( We should double check that rdmsr()/wrmsr() results are never left
uninitialized, but are set to zero or so, for cases where the
return code is not
checked. )
It sure looks like
On Thu, Sep 17, 2015 at 01:39:26PM +0200, Paolo Bonzini wrote:
> That's not a big deal, that's what *_safe is for. The problem is that
> there are definitely some cases where the *_safe version is not being used.
I mean to do feature checks which assure you that those MSRs are
there so you don't
On 17/09/2015 17:31, Arjan van de Ven wrote:
>>
>> What about 0 + WARN?
>
> why 0?
>
> 0xdeadbeef or any other pattern (even 0x3636363636) makes more sense (of
> course also WARN... but most folks don't read dmesg for WARNs)
>
> (it's the same thing we do for list or slab poison stuff)
On 17/09/2015 17:58, Radim Krčmář wrote:
> For interrupts from MSI and IOxAPIC:
> - Flat logical interrupts are delivered as if we had natural
> (CPU0<->bit0, CPU1<->bit1, ...) flat logical xAPIC for first 8 VCPUs.
> - Cluster logical doesn't work much, it's interpreted like flat logical.
>
On Thu, Sep 17, 2015 at 03:03:15PM +0100, Alban Crequy wrote:
> kvm__set_dir() called in main() and kvm__get_dir() rely on $HOME. But in
> some environments (such as starting lkvm through systemd-run), $HOME is
> undefined. This causes bind() to use a socket path containing "(null)"
> and this
On 17/09/15 16:27, Borislav Petkov wrote:
> On Thu, Sep 17, 2015 at 01:39:26PM +0200, Paolo Bonzini wrote:
>> That's not a big deal, that's what *_safe is for. The problem is that
>> there are definitely some cases where the *_safe version is not being used.
> I mean to do feature checks which
On Thu, Sep 17, 2015 at 04:32:53PM +0100, Andrew Cooper wrote:
> There are plenty of non-architectural MSRs in use which don't have
> feature bits.
That's exactly what the "possible" adjective was supposed to represent.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
> -Original Message-
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> Sent: Thursday, September 17, 2015 5:42 PM
> To: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
> mtosa...@redhat.com
> Cc: eric.au...@linaro.org; kvm@vger.kernel.org;
> io...@lists.linux-foundation.org;
On 17/09/2015 16:46, Marc Zyngier wrote:
> Hi Paolo,
>
> We've had a "nice" collection of fixes trickling in this week, and
> since both Christoffer and I are away next week, I've decided to send
> everything your way a bit early.
Sure, thanks.
I'll send the pull request to Linus tomorrow.
When setting the debug register from userspace, make sure that
copy_from_user() is called with its parameters in the expected
order. It otherwise doesn't do what you think.
Fixes: 84e690bfbed1 ("KVM: arm64: introduce vcpu->arch.debug_ptr")
Reported-by: Peter Maydell
Cc:
On Sep 17, 2015 5:33 AM, "Peter Zijlstra" wrote:
>
> On Thu, Sep 17, 2015 at 01:40:30PM +0200, Paolo Bonzini wrote:
> >
> >
> > On 17/09/2015 10:58, Peter Zijlstra wrote:
> > > But the far greater problem I have with the whole virt thing is that
> > > you cannot use
kvm__set_dir() called in main() and kvm__get_dir() rely on $HOME. But in
some environments (such as starting lkvm through systemd-run), $HOME is
undefined. This causes bind() to use a socket path containing "(null)"
and this fails. The current code does not check errors returned by
realpath().
>> On 17/09/2015 05:17, Wu, Feng wrote:
>>> + if (irq->dest_mode == APIC_DEST_PHYSICAL) {
>>> + if (irq->dest_id == 0xFF)
>>> + goto out;
>>> +
>>> + if (irq->dest_id >= ARRAY_SIZE(map->phys_map)) {
>
> Warning
From: Will Deacon
When restoring the system register state for an AArch32 guest at EL2,
writes to DACR32_EL2 may not be correctly synchronised by Cortex-A57,
which can lead to the guest effectively running with junk in the DACR
and running into unexpected domain faults.
Hi Paolo,
We've had a "nice" collection of fixes trickling in this week, and
since both Christoffer and I are away next week, I've decided to send
everything your way a bit early. Fairly random stuff to be honnest,
but a negative diffstat can't be that bad! :-)
Thanks,
M.
The following
On 17/09/2015 16:46, Marc Zyngier wrote:
> When running a guest with the architected timer disabled (with QEMU and
> the kernel_irqchip=off option, for example), it is important to make
> sure the timer gets turned off. Otherwise, the guest may try to
> enable it anyway, leading to a screaming
On Thu, 17 Sep 2015 18:45:00 +0200
Paolo Bonzini wrote:
>
>
> On 17/09/2015 18:27, Dominik Dingel wrote:
> > + preempt_disable();
> > + solo = single_task_running();
> > + preempt_enable();
> > +
> >
* Andy Lutomirski wrote:
> On Thu, Sep 17, 2015 at 12:19 AM, Ingo Molnar wrote:
> >
> > * Andy Lutomirski wrote:
> >
> >> Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
> >> turns all rdmsr and wrmsr operations into
On 17/09/2015 18:27, Dominik Dingel wrote:
> + preempt_disable();
> + solo = single_task_running();
> + preempt_enable();
> +
> cur = ktime_get();
> - } while (single_task_running() && ktime_before(cur,
On Thu, Sep 17, 2015 at 10:30 AM, Ingo Molnar wrote:
>
> * Andy Lutomirski wrote:
>
>> On Thu, Sep 17, 2015 at 12:19 AM, Ingo Molnar wrote:
>> >
>> > * Andy Lutomirski wrote:
>> >
>> >> Setting CONFIG_PARAVIRT=y has an
On Thu, 2015-09-17 at 19:07 +0200, Dominik Dingel wrote:
> On Thu, 17 Sep 2015 18:45:00 +0200
> Paolo Bonzini wrote:
>
> >
> >
> > On 17/09/2015 18:27, Dominik Dingel wrote:
> > > + preempt_disable();
> > > + solo = single_task_running();
>
On Thu, Sep 17, 2015 at 1:10 PM, Konrad Rzeszutek Wilk
wrote:
> On Wed, Sep 16, 2015 at 06:39:03PM -0400, Cole Robinson wrote:
>> On 09/16/2015 05:08 PM, Konrad Rzeszutek Wilk wrote:
>> > On Wed, Sep 16, 2015 at 05:04:31PM -0400, Cole Robinson wrote:
>> >> On 09/16/2015
On Wed, Sep 16, 2015 at 06:39:03PM -0400, Cole Robinson wrote:
> On 09/16/2015 05:08 PM, Konrad Rzeszutek Wilk wrote:
> > On Wed, Sep 16, 2015 at 05:04:31PM -0400, Cole Robinson wrote:
> >> On 09/16/2015 04:07 PM, M A Young wrote:
> >>> On Wed, 16 Sep 2015, Cole Robinson wrote:
> >>>
>
On 17/09/2015 21:23, Andy Lutomirski wrote:
> On Thu, Sep 17, 2015 at 1:10 PM, Konrad Rzeszutek Wilk
> wrote:
>> On Wed, Sep 16, 2015 at 06:39:03PM -0400, Cole Robinson wrote:
>>> On 09/16/2015 05:08 PM, Konrad Rzeszutek Wilk wrote:
On Wed, Sep 16, 2015 at 05:04:31PM
This applies on top of my earlier MSR series.
Andy Lutomirski (2):
x86/msr: Carry on after a non-"safe" MSR access fails without
!panic_on_oops
x86/msr: Set the return value to zero when native_rdmsr_safe fails
arch/x86/include/asm/msr.h | 5 -
arch/x86/kernel/traps.c| 51
This will cause unchecked native_rdmsr_safe failures to return
deterministic results.
We could poison the results with something other than zero, but that
would increase code size.
Signed-off-by: Andy Lutomirski
---
arch/x86/include/asm/msr.h | 5 -
1 file changed, 4
This demotes an OOPS and likely panic due to a failed non-"safe" MSR
access to a WARN_ON_ONCE and a return of poisoned values (in the
RDMSR case). We still write a pr_info entry unconditionally for
debugging.
To be clear, this type of failure should *not* happen. This patch
exists to minimize
Adds code to enable fp/simd lazy switch. On each entry check if fp/simd
registers have been switched to guest, if no set the trap flag. On trap
switch fp/simd registers and set vfp_lazy to true and disable trapping.
When the vcpu is about to be put, then context switch fp/simd registers
save
These patches enable armv7 fp/simd lazy switch. On guest entry fp/simd
access trap is set, and on guest first access fp/simd registers are switched -
host saved, guest restored. CPU continues with guest fp/simd content until
vcpu_put where guest is saved and host is restored.
Running floating
Basic hooks are added to support fp/simd lazy switch. A vcpu flag to track
fp/simd state, offset into the vcpu structure and switch prototype function.
Signed-off-by: Mario Smarduch
---
arch/arm/include/asm/kvm_asm.h | 1 +
arch/arm/include/asm/kvm_host.h | 3 +++
> -Original Message-
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> Sent: Friday, September 18, 2015 12:00 AM
> To: Radim Krčmář
> Cc: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
> mtosa...@redhat.com; eric.au...@linaro.org; kvm@vger.kernel.org;
>
> -Original Message-
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> Sent: Thursday, September 17, 2015 10:25 PM
> To: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
> mtosa...@redhat.com
> Cc: eric.au...@linaro.org; kvm@vger.kernel.org;
> io...@lists.linux-foundation.org;
75 matches
Mail list logo