lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGM2reZTfuMhKZLApidBcenbeJTYt6n_56htaK5YkDPseb_Bqw@mail.gmail.com>
Date:   Tue, 17 Jul 2018 21:38:02 -0400
From:   Pavel Tatashin <pasha.tatashin@...cle.com>
To:     boris.ostrovsky@...cle.com
Cc:     Steven Sistare <steven.sistare@...cle.com>,
        Daniel Jordan <daniel.m.jordan@...cle.com>,
        linux@...linux.org.uk, schwidefsky@...ibm.com,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        John Stultz <john.stultz@...aro.org>, sboyd@...eaurora.org,
        x86@...nel.org, LKML <linux-kernel@...r.kernel.org>,
        mingo@...hat.com, tglx@...utronix.de, hpa@...or.com,
        douly.fnst@...fujitsu.com, peterz@...radead.org, prarit@...hat.com,
        feng.tang@...el.com, Petr Mladek <pmladek@...e.com>,
        gnomes@...rguk.ukuu.org.uk, linux-s390@...r.kernel.org,
        jgross@...e.com
Subject: Re: [PATCH v13 06/18] x86/xen/time: initialize pv xen time in init_hypervisor_platform

> > +     set_fixmap(FIX_PARAVIRT_BOOTMAP, xen_start_info->shared_info);
> > +     HYPERVISOR_shared_info = (void *)fix_to_virt(FIX_PARAVIRT_BOOTMAP);
> > +
> > +     /* xen clock uses per-cpu vcpu_info, need to init it for boot cpu */
> > +     xen_vcpu_info_reset(0);
>
>
> I don't believe this is necessary, it has been done in
> xen_start_kernel() for PV guests.

We need it, because HYPERVISOR_shared_info has changed from dummy.
And, to output timestamps we must have access to the actual shared
page.

> > +
> > +     /* pvclock is in shared info area */
> > +     xen_init_time_ops();
> > +}
> > +
>
>
>
> >  }
> >
> > -void __ref xen_init_time_ops(void)
> > +void __init xen_init_time_ops(void)
> >  {
> >       pv_time_ops = xen_time_ops;
> >
> > @@ -542,17 +542,11 @@ void __init xen_hvm_init_time_ops(void)
> >               return;
> >
> >       if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
> > -             printk(KERN_INFO "Xen doesn't support pvclock on HVM,"
> > -                             "disable pv timer\n");
> > +             pr_info("Xen doesn't support pvclock on HVM, disable pv timer");
> >               return;
> >       }
> > -
> > -     pv_time_ops = xen_time_ops;
> > +     xen_init_time_ops();
>
>
> As we discussed elsewhere, now that HVM guests call this routine as well
> we need to make sure that x86_init.timers.timer_init is not updated
> there for HVM since those guests expect a "real" timer to be connected
> to IO-APIC.

Yes, I decided to keep xen_init_time_ops() and xen_hvm_init_time_ops()
separate. The unification does not save that many LOC, but increase
the complexity.

Thank you,
Pavel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ