[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests using legacy SSBD


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 14 Mar 2022 16:32:26 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bWeRYe84E+mnxzJfF2PeK0WPHzXUiM7smqvJeYTiW6Y=; b=mqqETKGOYKUs/h5rQ3sBUksitZl7fHak5FBvSEnOXAdaPv49CgffbtD/8NPz3f8kuYntS7mwWH9GLgf2M16QouM1q2Q81tCo/Q0O97Hc9xrYn+jN9csFHsu2j3+Ye0IDN6lMjUv8fXtzP+DF+uWnHtbSQL3EPWq387HFVUQFWMjBNA7RQ1kQnhhsXGvJlylf/ld6HEPRZVrydIpoSJ64lrbuVsmntQD1Blg6dXi1HSFUHoGwEIeeNEoaui3Mc/0dR27HTxxxXsckRDd6rXw4b1XWcaMhDgj7cJS7JIhDNK/rTVaDfx49lHYZaHTRa8/8sQpF4oJ7vBIZy4Sp4IVj5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PlAqaXM1DAmvayt18UpsSERCEbe0L2CRd7w3FuF1/VO84XpDR2TLY7Q5NuiEHxrQrMRohagbYHYPNu7pb6+rgtc59TsorwKOAWONenseQ7HEbAEZDMdDeeqlI9yq8cDXOkMsi/yLcIM+g3rPUk0ce1TMfJG9QTlGULTEvqFPP6zzeSmFUFzrXDyzn5mFU9RkZDfv4+qLe/DAFckWkSIIZh0LkENRQGoJZmSudR66RF5h3VX69wKz0Yz4JwvVDO4FBdpvc9Z2G66phR8PUomm1YiBBYMPYxcfbe4LqRogP7iCtu+sy0BS1JlIS3AP7x7XyD9KJe2jgyS403OEbxN1fA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Mar 2022 15:33:09 +0000
  • Ironport-data: A9a23:tnIkdaA9I+cGyxVW/yvjw5YqxClBgxIJ4kV8jS/XYbTApGgmgWYPm GIdUW7TP/qPZmfzc4siYNu090MHscPRztFrQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Vg3tYy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPh98 v8Sp8ORdTsnBYGVlL0ceTJ2KTlHaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguw5K8bmJsUHs2xIxjDFF/c2B5vERs0m4PcGgm5g2ZEVRZ4yY eIYOWZxdhj9cyRLK0gcFrJuv7u5libgJmgwRFW9+vNsvjm7IBZK+KjgNp/Zd8KHQe1Rn12Ev STW8mLhGBYYOdeDjz2f/RqEmevnjS79HoUIG9WQ9PRnnVmSzWw7EwANWB2wpvzRt6Klc4sBc QpOoHNo9PVsshzwJjXgY/GmiHK+lEEOBPtsL+MBxFiBk6v+yCijHlFRG1atd+canMMxQDUr0 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A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Feb 14, 2022 at 05:44:01PM +0100, Jan Beulich wrote:
> On 01.02.2022 17:46, Roger Pau Monne wrote:
> > +   ASSERT(core->count <= c->x86_num_siblings);
> > +   if ((enable  && core->count == 1) ||
> > +       (!enable && core->count == 0))
> 
> Maybe simply "if ( core->count == enable )"? Or do compilers not like
> comparisons with booleans?

I had it like that, but decided to switch to the current code just
before sending because I think it's clearer. I didn't get complaints
from compilers, but I felt it was kind of abusing to compare a boolean
with and integer.

If you wish I can restore to that form.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.